@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.
- package/CHANGELOG.md +134 -0
- package/bin/cardds.mjs +6 -2
- package/cardds.css +1 -0
- package/css/actions.css +16 -9
- package/css/base.css +6 -9
- package/css/card.css +21 -173
- package/css/finish.css +4 -4
- package/css/journey.css +4 -1
- package/css/layover.css +4 -14
- package/css/lists.css +3 -18
- package/css/media.css +1 -7
- package/css/parts.css +380 -0
- package/css/sheet.css +21 -140
- package/css/stack.css +15 -26
- package/css/stamp.css +1 -1
- package/css/step.css +3 -3
- package/css/theme.template.css +1 -1
- package/css/tokens.css +5 -4
- package/dist/actions/BarNote.d.ts +2 -2
- package/dist/actions/BarNote.js +2 -2
- package/dist/actions/Btn.d.ts +2 -2
- package/dist/actions/Btn.js +1 -1
- package/dist/actions/BtnRow.d.ts +1 -1
- package/dist/actions/BtnRow.js +1 -1
- package/dist/actions/Chip.d.ts +7 -3
- package/dist/actions/Chip.js +5 -5
- package/dist/actions/IconBtn.d.ts +1 -1
- package/dist/actions/IconBtn.js +1 -1
- package/dist/actions/IconBtnGroup.d.ts +1 -1
- package/dist/cardds.css +486 -410
- package/dist/cards/Card.d.ts +6 -22
- package/dist/cards/Card.js +11 -22
- package/dist/cards/CardFeed.d.ts +1 -1
- package/dist/cards/CardFeed.js +5 -5
- package/dist/cards/CardParts.d.ts +0 -12
- package/dist/cards/CardParts.js +0 -12
- package/dist/cards/cardGo.js +1 -1
- package/dist/cards/cardGrounds.js +2 -2
- package/dist/catalog.json +1 -1
- package/dist/forms/Field.d.ts +1 -1
- package/dist/forms/Field.js +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +6 -5
- package/dist/lists/Row.d.ts +7 -22
- package/dist/lists/Row.js +6 -4
- package/dist/media/MapArea.d.ts +7 -3
- package/dist/media/MapArea.js +4 -3
- package/dist/media/Tile.d.ts +3 -7
- package/dist/media/Tile.js +5 -5
- package/dist/numbers/Spinner.d.ts +1 -1
- package/dist/numbers/Spinner.js +1 -1
- package/dist/parts/Body.d.ts +7 -0
- package/dist/parts/Body.js +11 -0
- package/dist/parts/End.d.ts +10 -0
- package/dist/parts/End.js +7 -0
- package/dist/parts/Foot.d.ts +17 -0
- package/dist/parts/Foot.js +11 -0
- package/dist/parts/Head.d.ts +15 -0
- package/dist/parts/Head.js +34 -0
- package/dist/parts/Lead.d.ts +10 -0
- package/dist/parts/Lead.js +9 -0
- package/dist/parts/Words.d.ts +13 -0
- package/dist/parts/Words.js +20 -0
- package/dist/parts/headCtx.d.ts +7 -0
- package/dist/parts/headCtx.js +9 -0
- package/dist/scaffold/EmptyState.d.ts +1 -1
- package/dist/scaffold/EmptyState.js +1 -1
- package/dist/scaffold/Screen.js +1 -1
- package/dist/sheets/Modal.d.ts +3 -7
- package/dist/sheets/Modal.js +3 -7
- package/dist/sheets/Sheet.d.ts +2 -2
- package/dist/sheets/Sheet.js +8 -9
- package/dist/sheets/SheetStack.d.ts +3 -3
- package/dist/sheets/SheetStack.js +4 -4
- package/dist/sheets/SheetSteps.d.ts +1 -1
- package/dist/sheets/SheetSteps.js +2 -2
- package/dist/sheets/StackBack.d.ts +1 -1
- package/dist/sheets/StackBack.js +1 -1
- package/dist/sheets/StackSheet.js +7 -7
- package/dist/sheets/sheetMeasure.js +3 -3
- package/dist/sheets/sheetStepsPile.js +2 -2
- package/dist/sheets/stackCard.js +6 -6
- package/dist/templates/CallSheet.js +6 -5
- package/dist/templates/Walkthrough.js +3 -2
- package/docs/reference.md +75 -36
- package/lib/catalog.mjs +2 -0
- package/lib/mcp.mjs +1 -1
- package/lint/rules.mjs +22 -8
- package/package.json +2 -1
- package/scripts/codemod-parts.mjs +324 -0
- package/dist/cards/CardFoot.d.ts +0 -15
- package/dist/cards/CardFoot.js +0 -9
- package/dist/cards/CardHead.d.ts +0 -21
- package/dist/cards/CardHead.js +0 -39
- package/dist/cards/Stat.d.ts +0 -19
- package/dist/cards/Stat.js +0 -14
- package/dist/sheets/SheetBody.d.ts +0 -5
- package/dist/sheets/SheetBody.js +0 -9
- package/dist/sheets/SheetHead.d.ts +0 -15
- package/dist/sheets/SheetHead.js +0 -6
package/css/stack.css
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<div class="sheet-stack sheet-stack--tap"> (drop --tap for a static stack)
|
|
20
20
|
<article class="card card--2">
|
|
21
|
-
<div class="
|
|
21
|
+
<div class="head">
|
|
22
22
|
<button class="icon-btn icon-btn--sm sheet-stack__back" aria-label="Back">…</button>
|
|
23
23
|
<h2 class="t-h2 t-caps">Shopping</h2>
|
|
24
24
|
<span class="icon-row">…</span> (optional trailing icons)
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
|
|
74
74
|
/* NOT a skeleton head: a peek is one line at its own size, and the display
|
|
75
75
|
stack deliberately runs a second line under the next card. */
|
|
76
|
-
.sheet-stack > .card > .
|
|
76
|
+
.sheet-stack > .card > .head :is(h1, h2, h3) {
|
|
77
77
|
font-size: var(--fs-h1);
|
|
78
78
|
line-height: var(--lh-solid);
|
|
79
79
|
letter-spacing: var(--track-h2);
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
/* display stack: the giant title IS the peek — line one shows, line two is
|
|
86
86
|
clipped by the next card (recents / library lists) */
|
|
87
87
|
.sheet-stack--display { --stack-step: calc(var(--tap-base) * 13 / 6); }
|
|
88
|
-
.sheet-stack--display > .card > .
|
|
88
|
+
.sheet-stack--display > .card > .head :is(h1, h2, h3) {
|
|
89
89
|
font: var(--type-display);
|
|
90
90
|
letter-spacing: var(--track-display);
|
|
91
91
|
/* the FIRST line sits on the centre of the peek strip (--stack-step tall,
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
NOT: there, every card is full height and full content always, and a
|
|
100
100
|
peek is simply the strip of it the next card doesn't cover — the way a
|
|
101
101
|
card in a real deck is never a shorter card, just a mostly hidden one. */
|
|
102
|
-
.sheet-stack:not(.sheet-stack--tap) > .card:has(~ .card):not(.is-open) > :not(.
|
|
102
|
+
.sheet-stack:not(.sheet-stack--tap) > .card:has(~ .card):not(.is-open) > :not(.head) { display: none; }
|
|
103
103
|
|
|
104
104
|
/* ---- .sheet-stack--tap — tap a peeked sheet open; a back button returns it. How its sheets move (one property: translate) is
|
|
105
105
|
told over their rules, where they sit, in card.css. ---- */
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
slide read as a second thing moving while the sheet itself moved; Lh,
|
|
248
248
|
2026-09-11). Only the sheet travels; the button appears where it is. */
|
|
249
249
|
/* a sheet's OWN head and back: the card is the stack's child or, with one host wrapper, the wrapper's. A card standing in the sheet's body wears its own head */
|
|
250
|
-
:is(.sheet-stack--tap > .card, .sheet-stack--tap > :not(.card, .sheet-stack__base) > .card) > .
|
|
250
|
+
:is(.sheet-stack--tap > .card, .sheet-stack--tap > :not(.card, .sheet-stack__base) > .card) > .head > .sheet-stack__back {
|
|
251
251
|
position: absolute;
|
|
252
252
|
left: 0;
|
|
253
253
|
top: 50%;
|
|
@@ -262,35 +262,24 @@
|
|
|
262
262
|
min-height: 0;
|
|
263
263
|
padding: 0;
|
|
264
264
|
}
|
|
265
|
-
.sheet-stack--tap > .card.is-open > .
|
|
265
|
+
.sheet-stack--tap > .card.is-open > .head > .sheet-stack__back {
|
|
266
266
|
opacity: 1;
|
|
267
267
|
visibility: visible;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
.sheet-stack > .card:has(> .
|
|
271
|
-
.sheet-stack > .card > .sheet__body { --_cover: 0rem; } /* nothing slid under here: the stack's sheet is always whole */
|
|
272
|
-
/* a paper stack's foot is paper (card.css paints it): its ink reads the action's side */
|
|
273
|
-
.sheet-stack > .card.sheet--paper > .card__foot { --dark: var(--action-dark); }
|
|
270
|
+
.sheet-stack > .card:has(> .body) > :not(.body) { flex-shrink: 0; }
|
|
274
271
|
|
|
275
272
|
/* ---- StackSheet's tabs (Lh 2026-09-23): the head's end is a row of small icon buttons, the sheet's pages — the chosen one
|
|
276
273
|
filled (.icon-btn--invert) only while the sheet is open; a count is a small circle over the icon's top right corner ---- */
|
|
277
274
|
.stack-sheet__tabs { display: flex; gap: var(--stack-sheet-tabs-gap, var(--sp-2)); flex: none; } /* room between the tabs: with none, the chosen tab's disc touched its neighbour's (Lh 2026-09-24) */
|
|
278
|
-
/* the
|
|
279
|
-
(StackSheet measures --_over, the width it overflows by, and sets .is-long), one way: it waits, runs to the end, waits, and starts again from the first letter — like a song title */
|
|
280
|
-
.stack-sheet__title {
|
|
281
|
-
flex: 1; min-width: 0; overflow-x: clip; overflow-y: visible; white-space: nowrap; overflow-wrap: normal; /* clip SIDEWAYS only:
|
|
282
|
-
hidden clipped the Thai tone marks above a line-height-1 line (เพื่อน lost its ไม้เอก — Lh 2026-09-24) */
|
|
283
|
-
translate: 0 var(--stack-sheet-title-shift, -0.1em); /* FC Pride's line box carries more room above its letters than below: the
|
|
284
|
-
letters sat ~0.1em under the middle of the back disc and the tabs — lifted onto it (Lh 2026-09-24) */
|
|
285
|
-
}
|
|
275
|
+
/* the title's run (the title's own rules are parts.css's, in a stack sheet) */
|
|
286
276
|
.stack-sheet__run { display: inline-block; }
|
|
287
|
-
.stack-
|
|
277
|
+
.stack-sheet > .head > .words__title.is-long > .stack-sheet__run {
|
|
288
278
|
animation: stack-sheet-run var(--stack-sheet-run-time, var(--_run, var(--motion-run))) var(--ease-in-out) infinite; /* ONE way: start → end, then back to the start at once (Lh 2026-09-24) */ /* --_run: from the overflow, 30px a second + the pauses */
|
|
289
279
|
}
|
|
290
280
|
@keyframes stack-sheet-run { 0%, 20% { translate: 0; } 85%, 100% { translate: calc(-1 * var(--_over)); } }
|
|
291
281
|
@media (prefers-reduced-motion: reduce) {
|
|
292
|
-
.stack-
|
|
293
|
-
.stack-sheet__title.is-long { text-overflow: ellipsis; }
|
|
282
|
+
.stack-sheet > .head > .words__title.is-long > .stack-sheet__run { animation: none; display: inline; } /* inline: an ellipsis cannot cut an inline-block */
|
|
294
283
|
.stack-sheet__tab { transition: none; } /* the disc is simply there while open, and gone while closed */
|
|
295
284
|
}
|
|
296
285
|
.stack-sheet__tab {
|
|
@@ -324,23 +313,23 @@
|
|
|
324
313
|
/* a CLOSED sheet shows no chosen disc either (Lh 2026-10-04): arriving on the home, every tab of every sheet is the icon
|
|
325
314
|
alone. The fill fades in with the rise — the tab that was pressed, or the one the sheet opens on — and fades out as the
|
|
326
315
|
sheet folds. The class stays (which page it is); only the paint waits for .is-open. */
|
|
327
|
-
.sheet-stack--tap > .card:not(.is-open) > .
|
|
316
|
+
.sheet-stack--tap > .card:not(.is-open) > .head .stack-sheet__tab.icon-btn--invert {
|
|
328
317
|
border-color: transparent; background-color: transparent; box-shadow: none; color: inherit;
|
|
329
318
|
}
|
|
330
319
|
/* the last tab's ICON lines up with the inset, not its button's edge: an unchosen tab shows the glyph only, so the button's own
|
|
331
320
|
margin around it reaches into the card's padding — and an open head (back · title · three tabs) keeps one line (Lh 2026-09-23) */
|
|
332
|
-
.
|
|
321
|
+
.head > .stack-sheet__tabs { margin-right: calc(-1 * var(--sp-2)); }
|
|
333
322
|
|
|
334
323
|
/* AT THE END (Lh 2026-09-29, the home): after the tabs, chevron down — the open sheet folds down. The head's end gives it its room
|
|
335
324
|
while open; the last tab then sits on the inset (no reach into the padding) */
|
|
336
325
|
.sheet-stack--tap .sheet-stack__back--end { left: auto; right: 0; }
|
|
337
|
-
.sheet-stack--tap > .card.is-open > .
|
|
326
|
+
.sheet-stack--tap > .card.is-open > .head:has(> .sheet-stack__back--end) > .stack-sheet__tabs { margin-right: 0; }
|
|
338
327
|
.sheet-stack--tap .sheet-stack__back > .icon { --icon-size: var(--stack-back-icon, calc(var(--tap-base) * 13 / 24)); } /* 26: the chevron fills the small disc (Lh 2026-09-23) */
|
|
339
328
|
.sheet-stack--tap .sheet-stack__back::after { content: ""; position: absolute; inset: calc((var(--_back-size) - var(--tap-sm)) / 2); }
|
|
340
329
|
|
|
341
330
|
/* the open sheet's title folds it (SheetStack.tsx): it says so to a pointer */
|
|
342
|
-
.sheet-stack--tap > .card.is-open > .
|
|
343
|
-
.sheet-stack--tap > .card.is-open > :not(.
|
|
331
|
+
.sheet-stack--tap > .card.is-open > .head > :is(h1, h2, h3) { cursor: pointer; }
|
|
332
|
+
.sheet-stack--tap > .card.is-open > :not(.head) { -webkit-user-select: var(--screen-select, none); user-select: var(--screen-select, none); } /* the open sheet reads as the rest of the screen: not selectable (Lh 2026-09-25; it was text) */
|
|
344
333
|
|
|
345
334
|
/* ---- where it sits in what base.css draws (docs/reference.md rule 15) ---- */
|
|
346
335
|
/* min-height: 0 — a flex item's floor is its content, and the stack's content
|
package/css/stamp.css
CHANGED
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
/* ---- where it sits in what card.css draws (docs/reference.md rule 15) ---- */
|
|
280
|
-
.
|
|
280
|
+
.head > .stamp { grid-column: 2; grid-row: 1 / span 2; margin-inline: 0; }
|
|
281
281
|
/* ---- where it sits in what people.css draws (docs/reference.md rule 15) ---- */
|
|
282
282
|
/* a stamp in the stack is the stamp's small size (--stamp-sm-size: one rule in stamp.css, 48 × 60), lapped like the heads. Measured 2026-10-11 in a Row's
|
|
283
283
|
lead with a title, a meta line and an end button: at 375 the meta line breaks in two, accepted by Lh (a lap of 16 would hold it; the lap stays 8)
|
package/css/step.css
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
What the member reads (words on the base — not a card, Lh 2026-09-16), what the member does when the
|
|
4
4
|
step asks for it (a sheet, sheet.css). The move: a page of words has
|
|
5
5
|
an .action-bar (actions.css) OUTSIDE the step, below it — the base's;
|
|
6
|
-
a step with a sheet has none: the sheet's own .
|
|
6
|
+
a step with a sheet has none: the sheet's own .foot finishes it
|
|
7
7
|
(see "LAYERS" below).
|
|
8
8
|
|
|
9
9
|
<section class="step">
|
|
10
10
|
<section class="page">…the words…</section> ← first
|
|
11
|
-
<article class="card sheet sheet--half">…the controls… <div class="
|
|
11
|
+
<article class="card sheet sheet--half">…the controls… <div class="foot">…</div></article> ← last, optional
|
|
12
12
|
</section>
|
|
13
13
|
<div class="action-bar">…</div> ← the screen's last child, only when there is no sheet
|
|
14
14
|
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
.screen > .step:first-child, .screen--lead > .step { --_lead: var(--screen-lead, 15cqh); } /* top="lead" says it; a Step first says it too */
|
|
61
61
|
|
|
62
62
|
/* LAYERS (Lh, 2026-09-20): the base, then the sheet over it, then the top bar. A bar is the BASE's — the
|
|
63
|
-
move of a page of words — so a step with a sheet has NO bar: the sheet finishes on its own .
|
|
63
|
+
move of a page of words — so a step with a sheet has NO bar: the sheet finishes on its own .foot
|
|
64
64
|
(sheet.css), and a form lives whole in ONE sheet, never item by item on the base. That is how cardds's
|
|
65
65
|
own screens are composed (the guide); the framework does not police it — a component never changes
|
|
66
66
|
because another one is there. */
|
package/css/theme.template.css
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
--ink-onlight --ink-onlight-muted --ink-ondark --ink-ondark-muted
|
|
50
50
|
---- sides: each ground says only whether it is dark (1) or light (0); its words and glyphs follow ----
|
|
51
51
|
--surface-dark (0) --card-1-dark (0) --card-2-dark (0) --card-3-dark (1) --card-4-dark (0) --card-5-dark (1)
|
|
52
|
-
--accent-dark (1, the brand fill) --action-dark (0, the paper of buttons, chips, fields) --neg-dark (1, a falling
|
|
52
|
+
--accent-dark (1, the brand fill) --action-dark (0, the paper of buttons, chips, fields) --neg-dark (1, a falling number)
|
|
53
53
|
A dark mode is these sides turned to 1 with their fills darkened, in a [data-mode="dark"] block of your own: no rule per piece.
|
|
54
54
|
A surface of your own: give it a fill and `--dark: 1` (or 0), and its --card-ink / --card-muted that side's set. */
|
|
55
55
|
|
package/css/tokens.css
CHANGED
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
--card-1-dark: 0; --card-2-dark: 0; --card-3-dark: 1; --card-4-dark: 0; --card-5-dark: 1;
|
|
249
249
|
--accent-dark: 1; /* the brand fill: a primary button, a picked chip, a picked day */
|
|
250
250
|
--action-dark: 0; /* the paper fill of neutral controls: a button, a chip, a field, a plain tile */
|
|
251
|
-
--neg-dark: 1; /* a falling
|
|
251
|
+
--neg-dark: 1; /* the fill of a falling number (--neg) */
|
|
252
252
|
|
|
253
253
|
/* app background ("earth-toned surface or shiny color, up to the app") */
|
|
254
254
|
--surface: var(--color-surface, #f2f2f0);
|
|
@@ -292,6 +292,7 @@
|
|
|
292
292
|
--ink-tint: color-mix(in srgb, currentColor 12%, transparent); /* hover, rails, rests */
|
|
293
293
|
--ink-rail: color-mix(in srgb, currentColor 30%, transparent); /* todo steps, ghost edges */
|
|
294
294
|
--accent-soft: color-mix(in srgb, var(--accent) 22%, transparent); /* calendar marks */
|
|
295
|
+
--accent-wash: color-mix(in srgb, var(--accent) 22%, var(--action-bg)); /* the same wash laid on the paper of fields and buttons, opaque: a soft chip reads the same on any card (Chip soft) */
|
|
295
296
|
--accent-mid: color-mix(in srgb, var(--accent) 50%, transparent);
|
|
296
297
|
/* PASTELS (Lh 2026-10-20: a component never brings a colour of its own; every colour is the theme's): the nine pastel papers of a
|
|
297
298
|
sticky note, a note chooser's swatch and a stamp's picture ground (src/sticky/tones.ts names them), and a stamp's paper. Light
|
|
@@ -353,11 +354,11 @@
|
|
|
353
354
|
(card.css, media.css…) and is named in this list, which gives it the inks every piece on it reads: --card-ink (words, icons,
|
|
354
355
|
marks, dots: currentColor), --card-muted (secondary words), the four signals, --on-accent (the ink on the accent fill, whose
|
|
355
356
|
side is --accent-dark) and --accent-ink (the brand as a glyph). A piece with no fill of its own reads only these, so a dark
|
|
356
|
-
surface turns everything on it to ondark with no rule per piece. A piece with no fill that stands in for a surface (
|
|
357
|
+
surface turns everything on it to ondark with no rule per piece. A piece with no fill that stands in for a surface (an upload
|
|
357
358
|
tile) takes its ground's side: `--dark: inherit`. inkGrounds() measures it; docs/reference.md "Ink follows its ground" */
|
|
358
359
|
:where(body, [data-palette], [data-mode], .card, .tile, .modal__drawer, .postcard__front, .postcard__back, .sticky, .post-paper,
|
|
359
|
-
.float-bar__pill, .snackbar__body, .
|
|
360
|
-
.postcard__band, .track__step, .toggle, .chip, .card__face, .card--bands > :is(.
|
|
360
|
+
.float-bar__pill, .snackbar__body, .track, .tile-badge, .avatar, .bubble__body, .map__hint, .map__pin, .sheet--paper > :is(.body, .foot),
|
|
361
|
+
.postcard__band, .track__step, .toggle, .chip, .card__face, .card--bands > :is(.head, .foot), .card--bands > .card__face > :is(.head, .foot)) {
|
|
361
362
|
--card-ink: color-mix(in srgb, var(--ink-ondark) calc(var(--dark) * 100%), var(--ink-onlight));
|
|
362
363
|
--card-muted: color-mix(in srgb, var(--ink-ondark-muted) calc(var(--dark) * 100%), var(--ink-onlight-muted));
|
|
363
364
|
--on-accent: color-mix(in srgb, var(--ink-ondark) calc(var(--accent-dark) * 100%), var(--ink-onlight));
|
|
@@ -5,7 +5,7 @@ export interface BarNoteProps extends ComponentProps<'div'> {
|
|
|
5
5
|
* BarNote — the words that stand WHERE THE MAIN BUTTON WOULD BE when there is nothing to press: a block exactly the main button's
|
|
6
6
|
* size (full width, `--btn-h` tall), lying on the ground — no fill, no border, no rounding — holding one line of muted words, an
|
|
7
7
|
* inline `Icon` allowed ("กดที่ <Icon name="share" /> ด้านล่างนี้" — the member does the thing elsewhere). It does nothing on a tap.
|
|
8
|
-
* A member of the BOTTOM: a `
|
|
9
|
-
* it (
|
|
8
|
+
* A member of the BOTTOM: a `Foot`'s row or an `ActionBar`'s, in place of the button, never beside one; a `link` still goes under
|
|
9
|
+
* it (Foot `link`, ActionBar `ctaLink`). One fixed shape — never styled per use (Lh 2026-09-24).
|
|
10
10
|
*/
|
|
11
11
|
export declare function BarNote({ className, children, ...rest }: BarNoteProps): import("react").JSX.Element;
|
package/dist/actions/BarNote.js
CHANGED
|
@@ -4,8 +4,8 @@ import { cx } from '../cx.js';
|
|
|
4
4
|
* BarNote — the words that stand WHERE THE MAIN BUTTON WOULD BE when there is nothing to press: a block exactly the main button's
|
|
5
5
|
* size (full width, `--btn-h` tall), lying on the ground — no fill, no border, no rounding — holding one line of muted words, an
|
|
6
6
|
* inline `Icon` allowed ("กดที่ <Icon name="share" /> ด้านล่างนี้" — the member does the thing elsewhere). It does nothing on a tap.
|
|
7
|
-
* A member of the BOTTOM: a `
|
|
8
|
-
* it (
|
|
7
|
+
* A member of the BOTTOM: a `Foot`'s row or an `ActionBar`'s, in place of the button, never beside one; a `link` still goes under
|
|
8
|
+
* it (Foot `link`, ActionBar `ctaLink`). One fixed shape — never styled per use (Lh 2026-09-24).
|
|
9
9
|
*/
|
|
10
10
|
export function BarNote({ className, children, ...rest }) {
|
|
11
11
|
return _jsx("div", { role: "note", className: cx('action-note', className), ...rest, children: _jsx("span", { className: "action-note__words", children: children }) });
|
package/dist/actions/Btn.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
|
|
|
7
7
|
/** full width */
|
|
8
8
|
block?: boolean;
|
|
9
9
|
/** a form's button: sized to its words with wide side padding, centred on its own row — it reads as part of the form above it,
|
|
10
|
-
* not a page CTA (Lh 2026-09-25). In a card's foot (`
|
|
10
|
+
* not a page CTA (Lh 2026-09-25). In a card's foot (`Foot`, `FeedCard foot`) it keeps that size instead of
|
|
11
11
|
* filling the row. Replaces the native `form` attribute (a button outside its <form> — not a cardds pattern). */
|
|
12
12
|
form?: boolean;
|
|
13
13
|
/** the one giant call to action in a tinted card ("Taxi!") */
|
|
@@ -17,7 +17,7 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Btn — the pill button (48px+ tall). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
20
|
-
* In a
|
|
20
|
+
* 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.
|
|
21
21
|
*/
|
|
22
22
|
export declare function Btn({ primary, quiet, block, form, xl, href, className, type, ...rest }: BtnProps): import("react").DetailedReactHTMLElement<{
|
|
23
23
|
translate?: "yes" | "no" | undefined | undefined;
|
package/dist/actions/Btn.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createElement } from 'react';
|
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
3
|
/**
|
|
4
4
|
* Btn — the pill button (48px+ tall). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
5
|
-
* In a
|
|
5
|
+
* 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
6
|
*/
|
|
7
7
|
export function Btn({ primary, quiet, block, form, xl, href, className, type, ...rest }) {
|
|
8
8
|
return createElement(href ? 'a' : 'button', {
|
package/dist/actions/BtnRow.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
export interface BtnRowProps extends ComponentProps<'div'> {
|
|
3
3
|
}
|
|
4
|
-
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer). In a foot use
|
|
4
|
+
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer). In a foot use Foot instead. */
|
|
5
5
|
export declare function BtnRow({ className, ...rest }: BtnRowProps): import("react").JSX.Element;
|
package/dist/actions/BtnRow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
-
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer). In a foot use
|
|
3
|
+
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer). In a foot use Foot instead. */
|
|
4
4
|
export function BtnRow({ className, ...rest }) {
|
|
5
5
|
return _jsx("div", { className: cx('btn-row', className), ...rest });
|
|
6
6
|
}
|
package/dist/actions/Chip.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { type DotTone } from './Dot.js';
|
|
|
3
3
|
export interface ChipProps extends ComponentProps<'span'> {
|
|
4
4
|
/** filled accent: the selected / live state */
|
|
5
5
|
on?: boolean;
|
|
6
|
+
/** a soft accent fill, no edge: a status that should be seen but is not the live one (a "new" in a card's head); `on` is the stronger */
|
|
7
|
+
soft?: boolean;
|
|
6
8
|
/** quiet: an untouched default value — muted words, the thin edge, nothing to find the eye (docs/reference.md rule 13) */
|
|
7
9
|
muted?: boolean;
|
|
8
10
|
/** a leading signal dot: `a` (the accent signal), `b` (the secondary), or one of the signal set — ok · warn · error · info */
|
|
@@ -16,8 +18,8 @@ export interface ChipProps extends ComponentProps<'span'> {
|
|
|
16
18
|
/** the chip's words */
|
|
17
19
|
children?: ReactNode;
|
|
18
20
|
}
|
|
19
|
-
/** Chip — a status or attribute tag (with an optional signal Dot), or a small tap target; `sm` = a small label only; `on` when it is the live one. For a choice use ChipPick (`sign` for the +/× interest picker). */
|
|
20
|
-
export declare function Chip({ on, muted, dot, sm, as, href, className, children, ...rest }: ChipProps): import("react").DetailedReactHTMLElement<{
|
|
21
|
+
/** Chip — a status or attribute tag (with an optional signal Dot), or a small tap target; `sm` = a small label only; `soft` for a status that should be seen, `on` when it is the live one. For a choice use ChipPick (`sign` for the +/× interest picker). */
|
|
22
|
+
export declare function Chip({ on, soft, muted, dot, sm, as, href, className, children, ...rest }: ChipProps): import("react").DetailedReactHTMLElement<{
|
|
21
23
|
ref?: import("react").Ref<HTMLSpanElement> | undefined;
|
|
22
24
|
key?: import("react").Key | null | undefined;
|
|
23
25
|
defaultChecked?: boolean | undefined;
|
|
@@ -324,9 +326,11 @@ export declare function ChipPick({ type, sign, name, value, checked, defaultChec
|
|
|
324
326
|
export interface ChipRowProps extends ComponentProps<'div'> {
|
|
325
327
|
/** run the row to the card's edges as a one-line scrolling strip (`.bleed`: nowrap, overflow, the hairline ink scrollbar) */
|
|
326
328
|
bleed?: boolean;
|
|
329
|
+
/** the words that LEAD the chips ("Meet at" before a place): set in the chips' own type, at the middle of their height */
|
|
330
|
+
lead?: ReactNode;
|
|
327
331
|
}
|
|
328
332
|
/** ChipRow — chips on a wrapping line (or a bleeding strip). */
|
|
329
|
-
export declare function ChipRow({ bleed, className, ...rest }: ChipRowProps): import("react").JSX.Element;
|
|
333
|
+
export declare function ChipRow({ bleed, lead, className, children, ...rest }: ChipRowProps): import("react").JSX.Element;
|
|
330
334
|
export interface ChipGridProps extends ComponentProps<'div'> {
|
|
331
335
|
}
|
|
332
336
|
/** ChipGrid — equal-width ChipPicks in a grid (time slots, skills). */
|
package/dist/actions/Chip.js
CHANGED
|
@@ -3,10 +3,10 @@ import { createElement } from 'react';
|
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
import { tagged } from '../pressable.js';
|
|
5
5
|
import { Dot } from './Dot.js';
|
|
6
|
-
/** Chip — a status or attribute tag (with an optional signal Dot), or a small tap target; `sm` = a small label only; `on` when it is the live one. For a choice use ChipPick (`sign` for the +/× interest picker). */
|
|
7
|
-
export function Chip({ on, muted, dot, sm, as, href, className, children, ...rest }) {
|
|
6
|
+
/** Chip — a status or attribute tag (with an optional signal Dot), or a small tap target; `sm` = a small label only; `soft` for a status that should be seen, `on` when it is the live one. For a choice use ChipPick (`sign` for the +/× interest picker). */
|
|
7
|
+
export function Chip({ on, soft, muted, dot, sm, as, href, className, children, ...rest }) {
|
|
8
8
|
const { el, props } = tagged(as, href);
|
|
9
|
-
return createElement(el, { ...props, className: cx('chip', on && 'chip--on', muted && 'chip--muted', sm && 'chip--sm', className), ...rest }, dot && _jsx(Dot, { b: dot === 'b', tone: dot === 'a' || dot === 'b' ? undefined : dot }), children);
|
|
9
|
+
return createElement(el, { ...props, className: cx('chip', on && 'chip--on', soft && !on && 'chip--soft', muted && 'chip--muted', sm && 'chip--sm', className), ...rest }, dot && _jsx(Dot, { b: dot === 'b', tone: dot === 'a' || dot === 'b' ? undefined : dot }), children);
|
|
10
10
|
}
|
|
11
11
|
/** ChipPick — a chip that is a choice, on a sheet and never in a Card (the sheet is the paper the member fills in, Lh 2026-10-18): full-width in a ChipGrid (9:00 · 9:30 · …), or `sign` on a ChipRow (+ off, × on — the
|
|
12
12
|
* interest picker); the picked one fills with accent. A native radio/checkbox inside the label carries the state. */
|
|
@@ -14,8 +14,8 @@ export function ChipPick({ type, sign, name, value, checked, defaultChecked, onC
|
|
|
14
14
|
return (_jsxs("label", { className: cx('chip chip--pick', sign && 'chip--sign', className), ...rest, children: [_jsx("input", { type: type ?? (sign ? 'checkbox' : 'radio'), name: name, value: value, checked: checked, defaultChecked: defaultChecked, onChange: onChange }), children] }));
|
|
15
15
|
}
|
|
16
16
|
/** ChipRow — chips on a wrapping line (or a bleeding strip). */
|
|
17
|
-
export function ChipRow({ bleed, className, ...rest }) {
|
|
18
|
-
return
|
|
17
|
+
export function ChipRow({ bleed, lead, className, children, ...rest }) {
|
|
18
|
+
return _jsxs("div", { className: cx('chip-row', bleed && 'bleed', className), ...rest, children: [lead != null && _jsx("span", { className: "chip-row__lead", children: lead }), children] });
|
|
19
19
|
}
|
|
20
20
|
/** ChipGrid — equal-width ChipPicks in a grid (time slots, skills). */
|
|
21
21
|
export function ChipGrid({ className, ...rest }) {
|
|
@@ -20,7 +20,7 @@ export interface IconBtnProps extends ComponentProps<'button'> {
|
|
|
20
20
|
href?: string;
|
|
21
21
|
}
|
|
22
22
|
/** 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
|
-
* primary fill. `size="lg"` / `"xl"` are the big rounds (the foot of a few round answers: `<
|
|
23
|
+
* 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
24
|
* as its child (`<IconBtn size="xl" primary label="ช่วยเหลือ">ช่วย</IconBtn>`): it grows with the member's text size up to the circle's share.
|
|
25
25
|
* 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
26
|
* wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`. */
|
package/dist/actions/IconBtn.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cx } from '../cx.js';
|
|
|
4
4
|
import { warnOnce } from '../state.js';
|
|
5
5
|
import { Icon } from '../type/Icon.js';
|
|
6
6
|
/** 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
|
-
* primary fill. `size="lg"` / `"xl"` are the big rounds (the foot of a few round answers: `<
|
|
7
|
+
* 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
8
|
* as its child (`<IconBtn size="xl" primary label="ช่วยเหลือ">ช่วย</IconBtn>`): it grows with the member's text size up to the circle's share.
|
|
9
9
|
* 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
10
|
* wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`. */
|
|
@@ -12,7 +12,7 @@ export interface IconBtnGroupProps extends Omit<ComponentProps<'div'>, 'onChange
|
|
|
12
12
|
defaultValue?: Picked;
|
|
13
13
|
/** asks the app: `one` → the pressed value · `many` → the new list */
|
|
14
14
|
onChange?: (value: Picked) => void;
|
|
15
|
-
/** the buttons one OVER the other, the panel one button wide — at a `Row`'s
|
|
15
|
+
/** the buttons one OVER the other, the panel one button wide — at a `Row`'s end, where a panel across would take the words' room */
|
|
16
16
|
vertical?: boolean;
|
|
17
17
|
/** 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 `Btn form` is —
|
|
18
18
|
* 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 the row.
|