@usableapp/cardds 0.7.160 → 0.7.162
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 +43 -0
- package/css/actions.css +27 -34
- package/css/base.css +8 -5
- package/css/card.css +5 -5
- package/css/journey.css +5 -7
- package/css/layover.css +0 -1
- package/css/lists.css +2 -2
- package/css/media.css +5 -0
- package/css/numbers.css +1 -1
- package/css/palette.css +1 -1
- package/css/parts.css +78 -40
- package/css/sheet.css +1 -1
- package/css/stack.css +13 -5
- package/css/stamp.css +30 -30
- package/css/tokens.css +37 -4
- package/dist/actions/Btn.d.ts +59 -28
- package/dist/actions/Btn.js +17 -5
- package/dist/actions/BtnGroup.d.ts +3 -3
- package/dist/actions/BtnGroup.js +2 -2
- package/dist/actions/BtnRow.d.ts +2 -2
- package/dist/actions/BtnRow.js +1 -1
- package/dist/actions/Chip.d.ts +1 -1
- package/dist/actions/Fab.d.ts +11 -7
- package/dist/actions/Fab.js +6 -5
- package/dist/actions/LinkBlock.d.ts +4 -2
- package/dist/actions/LinkBlock.js +6 -3
- package/dist/cardds.css +213 -136
- package/dist/cards/CardParts.d.ts +1 -1
- package/dist/cards/CardParts.js +1 -1
- package/dist/catalog.json +1 -1
- package/dist/choice/Calendar.js +2 -2
- package/dist/forms/Composer.d.ts +2 -2
- package/dist/forms/Field.d.ts +1 -1
- package/dist/forms/Field.js +1 -1
- package/dist/forms/FileBtn.d.ts +8 -7
- package/dist/forms/FileBtn.js +3 -3
- package/dist/forms/MessageBar.d.ts +2 -2
- package/dist/forms/MessageBar.js +4 -4
- package/dist/forms/Pin.js +2 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/journey/JourneyBadge.d.ts +7 -4
- package/dist/journey/JourneyBadge.js +3 -3
- package/dist/lists/Bubble.d.ts +6 -6
- package/dist/lists/Row.js +5 -2
- package/dist/media/Postcard.d.ts +1 -1
- package/dist/media/Postcard.js +2 -2
- package/dist/media/Tile.d.ts +4 -6
- package/dist/media/Tile.js +2 -2
- package/dist/parts/End.d.ts +1 -1
- package/dist/parts/End.js +1 -1
- package/dist/parts/Foot.d.ts +3 -3
- package/dist/parts/Foot.js +1 -1
- package/dist/parts/Head.d.ts +3 -1
- package/dist/parts/Head.js +7 -2
- package/dist/parts/Words.d.ts +3 -1
- package/dist/parts/Words.js +13 -3
- package/dist/parts/endRoom.d.ts +11 -0
- package/dist/parts/endRoom.js +40 -0
- package/dist/post/PostDesk.js +2 -3
- package/dist/post/PostLetter.js +2 -2
- package/dist/scaffold/ActionBar.d.ts +4 -4
- package/dist/scaffold/ActionBar.js +3 -3
- package/dist/scaffold/AppBar.d.ts +1 -1
- package/dist/scaffold/FloatBar.d.ts +1 -1
- package/dist/scaffold/TopBar.d.ts +2 -2
- package/dist/sheets/Modal.d.ts +2 -2
- package/dist/sheets/Modal.js +2 -2
- package/dist/sheets/Sheet.d.ts +1 -1
- package/dist/sheets/Sheet.js +1 -1
- package/dist/sheets/SheetStack.js +3 -4
- package/dist/sheets/StackBack.d.ts +1 -1
- package/dist/sheets/StackBack.js +2 -3
- package/dist/sheets/StackSheet.d.ts +1 -1
- package/dist/sheets/StackSheet.js +2 -3
- package/dist/sheets/sheetDrag.js +2 -2
- package/dist/sheets/stackCard.js +5 -6
- package/dist/stamp/Stamp.d.ts +4 -2
- package/dist/stamp/Stamp.js +2 -2
- package/dist/state.d.ts +2 -0
- package/dist/state.js +9 -0
- package/dist/sticky/Sticky.d.ts +1 -1
- package/dist/sticky/StickyAnswer.d.ts +1 -1
- package/dist/sticky/StickyHeading.d.ts +2 -2
- package/dist/templates/CallSheet.js +1 -1
- package/dist/templates/Walkthrough.js +2 -2
- package/dist/type/Icon.d.ts +1 -1
- package/dist/type/Icon.js +1 -1
- package/dist/type/textScale.d.ts +4 -3
- package/dist/type/textScale.js +4 -3
- package/docs/reference.md +45 -25
- package/lint/rules.mjs +7 -7
- package/package.json +3 -1
- package/scripts/codemod-parts.mjs +1 -1
- package/dist/actions/IconBtn.d.ts +0 -326
- package/dist/actions/IconBtn.js +0 -19
package/css/stack.css
CHANGED
|
@@ -39,8 +39,16 @@
|
|
|
39
39
|
|
|
40
40
|
/* ---- the stack: cascading peek sheets; heads peek, the set bleeds to
|
|
41
41
|
the screen's bottom edge, so bottom corners are square ---- */
|
|
42
|
-
/* step =
|
|
43
|
-
|
|
42
|
+
/* step = the single Sheet's peek (sheet.css --sheet-peek): the card's padding
|
|
43
|
+
(20) + the head (--tap, 48) + the card's gap (--card-gap-rest, 16) = 84.
|
|
44
|
+
The room under the head is the gap, less than the padding and edge over it,
|
|
45
|
+
because the words leave their own empty descent under them: so the space
|
|
46
|
+
under the words is the space over the tallest marks (29.9 / 30.4 at the
|
|
47
|
+
default bases, 35.9 / 36.4 at --tap-base 3.75rem, Chrome). The head's share
|
|
48
|
+
is the same on both sides, so that holds whatever --tap-base a theme sets.
|
|
49
|
+
It was --tap-base × 11/6 (88): the strip grew with --tap-base alone while
|
|
50
|
+
the room over the head stayed the card's padding, so every px a theme added
|
|
51
|
+
to --tap-base went under the words (at 3.75rem: a 110 strip, 48 under). */
|
|
44
52
|
/* one track, exactly the stack's own height: an auto track would size itself
|
|
45
53
|
to the tallest sheet's CONTENT (a sheet's `height: 100%` is cyclic while the
|
|
46
54
|
track is being sized), so a long sheet grew the track past the screen and
|
|
@@ -53,7 +61,7 @@
|
|
|
53
61
|
Lh, 2026-09-11). --_n: how many sheets the stack holds, read from the DOM
|
|
54
62
|
by :has below so the closed geometry needs no script and no per-stack
|
|
55
63
|
declaration. */
|
|
56
|
-
.sheet-stack { display: grid; grid-template-rows: minmax(0, 1fr); --stack-step: calc(var(--
|
|
64
|
+
.sheet-stack { display: grid; grid-template-rows: minmax(0, 1fr); --stack-step: calc(var(--card-pad-rest) + var(--tap) + var(--card-gap-rest)); margin-inline: calc(-1 * var(--screen-pad)); --_n: 1; }
|
|
57
65
|
.sheet-stack > .card {
|
|
58
66
|
--card-gap: var(--sp-5); /* head→content gap = the strip's 20px rhythm */
|
|
59
67
|
}
|
|
@@ -90,7 +98,7 @@
|
|
|
90
98
|
letter-spacing: var(--track-display);
|
|
91
99
|
/* the FIRST line sits on the centre of the peek strip (--stack-step tall,
|
|
92
100
|
measured from the card's top edge); line two runs under the next card */
|
|
93
|
-
margin-top: calc((var(--stack-step) - 1lh) / 2 - var(--sp-5) - var(--
|
|
101
|
+
margin-top: calc((var(--stack-step) - 1lh) / 2 - var(--sp-5) - var(--glyph-rise)); /* --glyph-rise: tokens.css, the room for the marks over line one */
|
|
94
102
|
}
|
|
95
103
|
/* fanned stack: a toggle opens the stack wider so every peek shows more */
|
|
96
104
|
.sheet-stack--fanned { --stack-step: calc(var(--tap-base) * 19 / 6); }
|
|
@@ -104,7 +112,7 @@
|
|
|
104
112
|
/* ---- .sheet-stack--tap — tap a peeked sheet open; a back button returns it. How its sheets move (one property: translate) is
|
|
105
113
|
told over their rules, where they sit, in card.css. ---- */
|
|
106
114
|
.sheet-stack--tap > .card {
|
|
107
|
-
--_back-size: var(--stack-back-size,
|
|
115
|
+
--_back-size: var(--stack-back-size, var(--icon-lg)); /* read once, shared by the back button and the head's padding below */
|
|
108
116
|
}
|
|
109
117
|
|
|
110
118
|
/* the GRIP (Lh 2026-10-05): four small dots at the middle of every sheet's top edge — a sign that this card
|
package/css/stamp.css
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
THE THIRD SIZE (Lh 2026-10-17): `.stamp-book--fill` (below) makes each stamp as wide as its third, the gaps one --screen-pad. */
|
|
26
26
|
.stamp, .stamp-place {
|
|
27
27
|
box-sizing: border-box;
|
|
28
|
-
width: var(--stamp-size,
|
|
28
|
+
width: var(--stamp-size, var(--stamp));
|
|
29
29
|
max-width: 100%; /* a holder narrower than a stamp still shows it whole */
|
|
30
30
|
aspect-ratio: 4 / 5;
|
|
31
31
|
margin-inline: auto;
|
|
@@ -38,20 +38,20 @@
|
|
|
38
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
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
40
|
its edge on any ground, a white one too; black as the scrim, no color-mix (iOS 16.4) */
|
|
41
|
-
--_contact: 0 0
|
|
41
|
+
--_contact: 0 0 var(--stamp-contact-blur) rgb(0 0 0 / 0.6);
|
|
42
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) */
|
|
43
43
|
rotate: var(--stamp-turn, none);
|
|
44
44
|
animation: var(--stamp-arrive, none);
|
|
45
45
|
}
|
|
46
46
|
.stamp__paper {
|
|
47
|
-
--_pitch: calc(100cqw /
|
|
48
|
-
--_hole:
|
|
47
|
+
--_pitch: calc(100cqw / var(--stamp-perf-count)); /* one tooth: 8 across, 10 down (a token, no knob: a stamp looks the same at every size, Lh 2026-10-29) — the holes land whole on every edge. Fewer and larger than a real stamp's: a small stamp's teeth must still read (Lh 2026-10-26, it was 12 × 15; Lh 2026-10-07, it was 20 × 25) */
|
|
48
|
+
--_hole: var(--stamp-perf-hole);
|
|
49
49
|
position: absolute;
|
|
50
50
|
inset: 0;
|
|
51
51
|
-webkit-mask: linear-gradient(#000 0 0) center / calc(100% - var(--_pitch)) calc(100% - var(--_pitch)) no-repeat,
|
|
52
|
-
radial-gradient(circle, transparent var(--_hole), #000 calc(var(--_hole) +
|
|
52
|
+
radial-gradient(circle, transparent var(--_hole), #000 calc(var(--_hole) + var(--stamp-perf-soft))) calc(var(--_pitch) / -2) calc(var(--_pitch) / -2) / var(--_pitch) var(--_pitch);
|
|
53
53
|
mask: linear-gradient(#000 0 0) center / calc(100% - var(--_pitch)) calc(100% - var(--_pitch)) no-repeat,
|
|
54
|
-
radial-gradient(circle, transparent var(--_hole), #000 calc(var(--_hole) +
|
|
54
|
+
radial-gradient(circle, transparent var(--_hole), #000 calc(var(--_hole) + var(--stamp-perf-soft))) calc(var(--_pitch) / -2) calc(var(--_pitch) / -2) / var(--_pitch) var(--_pitch);
|
|
55
55
|
}
|
|
56
56
|
/* the white frame: the paper's own colour round the picture. --frameless (`frame={false}`): the paper takes the picture's tone class instead,
|
|
57
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) */
|
|
@@ -63,40 +63,40 @@
|
|
|
63
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
64
|
--stamp-shadow */
|
|
65
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(
|
|
66
|
+
.stamp__shade { position: absolute; inset: 0; filter: blur(var(--stamp-contact-blur)); }
|
|
67
67
|
.stamp__shade > .stamp__paper { background-image: linear-gradient(var(--stamp-tone-shadow-bg, var(--_tone-shade)) 0 0); }
|
|
68
|
-
.stamp__pic { position: absolute; inset: var(--stamp-frame,
|
|
68
|
+
.stamp__pic { position: absolute; inset: var(--stamp-frame, var(--stamp-frame-w)); overflow: hidden; } /* the paper's frame round the picture; the ground is the tone class's */
|
|
69
69
|
|
|
70
70
|
/* the pictures, placed by COUNT: where, how wide, how far turned — the layout is the stamp's look, never the app's.
|
|
71
71
|
A share of the picture area; the foot stays clear for the words. */
|
|
72
72
|
.stamp__art { position: absolute; left: var(--_x); top: var(--_y); width: var(--_w); aspect-ratio: 1; translate: -50% -50%; rotate: var(--_r); }
|
|
73
73
|
.stamp__art > * { display: block; width: 100%; height: 100%; }
|
|
74
|
-
.stamp--1 .stamp__art { --_x:
|
|
75
|
-
.stamp--2 .stamp__art:nth-child(1) { --_x:
|
|
76
|
-
.stamp--2 .stamp__art:nth-child(2) { --_x:
|
|
77
|
-
.stamp--3 .stamp__art:nth-child(1) { --_x:
|
|
78
|
-
.stamp--3 .stamp__art:nth-child(2) { --_x:
|
|
79
|
-
.stamp--3 .stamp__art:nth-child(3) { --_x:
|
|
80
|
-
.stamp--4 .stamp__art:nth-child(1) { --_x:
|
|
81
|
-
.stamp--4 .stamp__art:nth-child(2) { --_x:
|
|
82
|
-
.stamp--4 .stamp__art:nth-child(3) { --_x:
|
|
83
|
-
.stamp--4 .stamp__art:nth-child(4) { --_x:
|
|
74
|
+
.stamp--1 .stamp__art { --_x: var(--stamp-art-1-1-x); --_y: var(--stamp-art-1-1-y); --_w: var(--stamp-art-1-1-w); --_r: 0deg; }
|
|
75
|
+
.stamp--2 .stamp__art:nth-child(1) { --_x: var(--stamp-art-2-1-x); --_y: var(--stamp-art-2-1-y); --_w: var(--stamp-art-2-1-w); --_r: calc(var(--tilt-base) * -6); }
|
|
76
|
+
.stamp--2 .stamp__art:nth-child(2) { --_x: var(--stamp-art-2-2-x); --_y: var(--stamp-art-2-2-y); --_w: var(--stamp-art-2-2-w); --_r: calc(var(--tilt-base) * 8); }
|
|
77
|
+
.stamp--3 .stamp__art:nth-child(1) { --_x: var(--stamp-art-3-1-x); --_y: var(--stamp-art-3-1-y); --_w: var(--stamp-art-3-1-w); --_r: calc(var(--tilt-base) * -8); }
|
|
78
|
+
.stamp--3 .stamp__art:nth-child(2) { --_x: var(--stamp-art-3-2-x); --_y: var(--stamp-art-3-2-y); --_w: var(--stamp-art-3-2-w); --_r: calc(var(--tilt-base) * 7); }
|
|
79
|
+
.stamp--3 .stamp__art:nth-child(3) { --_x: var(--stamp-art-3-3-x); --_y: var(--stamp-art-3-3-y); --_w: var(--stamp-art-3-3-w); --_r: calc(var(--tilt-base) * -2); }
|
|
80
|
+
.stamp--4 .stamp__art:nth-child(1) { --_x: var(--stamp-art-4-1-x); --_y: var(--stamp-art-4-1-y); --_w: var(--stamp-art-4-1-w); --_r: calc(var(--tilt-base) * -8); }
|
|
81
|
+
.stamp--4 .stamp__art:nth-child(2) { --_x: var(--stamp-art-4-2-x); --_y: var(--stamp-art-4-2-y); --_w: var(--stamp-art-4-2-w); --_r: calc(var(--tilt-base) * 7); }
|
|
82
|
+
.stamp--4 .stamp__art:nth-child(3) { --_x: var(--stamp-art-4-3-x); --_y: var(--stamp-art-4-3-y); --_w: var(--stamp-art-4-3-w); --_r: calc(var(--tilt-base) * 5); }
|
|
83
|
+
.stamp--4 .stamp__art:nth-child(4) { --_x: var(--stamp-art-4-4-x); --_y: var(--stamp-art-4-4-y); --_w: var(--stamp-art-4-4-w); --_r: calc(var(--tilt-base) * -6); }
|
|
84
84
|
|
|
85
85
|
/* the words on the picture's foot: a small line, then the big name — one line each (clipped sideways only: Thai tone marks stand above the line box) */
|
|
86
|
-
.stamp__cap { position: absolute; inset-inline:
|
|
86
|
+
.stamp__cap { position: absolute; inset-inline: var(--stamp-cap-inset); bottom: var(--stamp-cap-foot); display: grid; gap: var(--stamp-cap-gap); }
|
|
87
87
|
.stamp__words, .stamp__name { display: block; min-width: 0; white-space: nowrap; overflow-x: clip; text-overflow: ellipsis; }
|
|
88
88
|
.stamp__words { --_words: 4.8cqw; font: var(--fw-medium) var(--_words) / round(down, calc(var(--lh-title) * 1em), 1px) var(--font-ui); font-size: var(--stamp-words-font-size, var(--_words)); }
|
|
89
89
|
.stamp__name { --_name: 9.5cqw; font: var(--fw-black) var(--_name) / round(down, calc(var(--lh-display) * 1em), 1px) var(--font-display); font-size: var(--stamp-name-font-size, var(--_name)); }
|
|
90
|
-
/* at the stamp's own size and under (and stuck on a note): the small line goes, the name grows */
|
|
91
90
|
/* --bare: the pictures alone, no words — a stamp stuck on something (a note, a postcard). The words belong to the album.
|
|
92
91
|
The pictures take the foot's room: each sits a little lower, so the group stands in the middle of the frame. */
|
|
93
92
|
.stamp--bare .stamp__cap, .stamp-on .stamp__cap, .post-corner .stamp__cap, .stamp--xs .stamp__cap { display: none; }
|
|
94
|
-
.stamp--bare .stamp__art, .stamp-on .stamp__art, .post-corner .stamp__art, .stamp--xs .stamp__art { top: calc(var(--_y) +
|
|
93
|
+
.stamp--bare .stamp__art, .stamp-on .stamp__art, .post-corner .stamp__art, .stamp--xs .stamp__art { top: calc(var(--_y) + var(--stamp-bare-drop)); }
|
|
95
94
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
95
|
+
/* the small line shows only on an LG stamp: one wider than the standard size, by the consumer's word (`Stamp lg`, `.stamp--lg`), or a
|
|
96
|
+
stamp the book makes its third (`.stamp-book--fill`). Every other stamp — the standard size, the small one, one stuck on a note — drops it,
|
|
97
|
+
and its name grows (Lh 2026-10-29: no layout chosen by a size query; it was `@container (max-width: 6rem)`) */
|
|
98
|
+
.stamp:not(.stamp--lg, .stamp-book--fill > .stamp-cell > .stamp) .stamp__words { display: none; }
|
|
99
|
+
.stamp:not(.stamp--lg, .stamp-book--fill > .stamp-cell > .stamp) .stamp__name { --_name: 12cqw; }
|
|
100
100
|
|
|
101
101
|
/* --xs: the stamp INLINE with a status line (a card's foot: the stamp, "X took it", a round button) — one caption line tall,
|
|
102
102
|
--stamp-xs-size (18.7 × 23.4 at the default bases, one Chip xs tall, on --fs-base: it follows the words it stands with; Lh 2026-10-24).
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
10 down), and the frame round the picture wider to clear them. Several, lapped, with a "+8": AvatarStack (below).
|
|
105
105
|
<span class="stamp stamp--1 stamp--xs">…</span> */
|
|
106
106
|
.stamp--xs { width: var(--stamp-xs-size, var(--stamp-xs)); flex: none; margin-inline: 0; filter: drop-shadow(var(--stamp-shadow, var(--_contact))); }
|
|
107
|
-
.stamp--xs .stamp__pic { inset: var(--stamp-frame,
|
|
107
|
+
.stamp--xs .stamp__pic { inset: var(--stamp-frame, var(--stamp-xs-frame-w)); }
|
|
108
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 */
|
|
109
109
|
.stamp--held { visibility: hidden; }
|
|
110
110
|
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
stroke: var(--_edge);
|
|
159
159
|
stroke-width: var(--_dot);
|
|
160
160
|
stroke-linecap: round;
|
|
161
|
-
stroke-dasharray: var(--stamp-place-dash, 0) var(--stamp-place-gap,
|
|
161
|
+
stroke-dasharray: var(--stamp-place-dash, 0) var(--stamp-place-gap, var(--stamp-place-dot-pitch));
|
|
162
162
|
}
|
|
163
163
|
.card .stamp-place, .post-paper .stamp-place { --_edge: var(--stamp-place-border, var(--card-muted)); color: var(--stamp-place-ink, var(--card-muted)); }
|
|
164
164
|
.stamp-place--faint { --_edge: var(--stamp-place-faint-border, var(--hairline)); }
|
|
@@ -254,9 +254,9 @@
|
|
|
254
254
|
.stamp-on > .stamp { max-width: none; }
|
|
255
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).
|
|
256
256
|
After the rule above, at the same weight: `main` is the one place a stuck stamp reads --stamp-size. */
|
|
257
|
-
.stamp-on--main > .stamp { width: var(--stamp-size,
|
|
257
|
+
.stamp-on--main > .stamp { width: var(--stamp-size, var(--stamp)); }
|
|
258
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 */
|
|
259
|
-
.stamp-on--under > .stamp { width: var(--stamp-size,
|
|
259
|
+
.stamp-on--under > .stamp { width: var(--stamp-size, var(--stamp)); filter: drop-shadow(var(--stamp-shadow, var(--_contact))); }
|
|
260
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) */
|
|
261
261
|
.stamp-on--move { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; transition: scale var(--motion-press) var(--ease-out); }
|
|
262
262
|
.stamp-on--move:focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
filter: drop-shadow(var(--stamp-shadow, var(--_contact)));
|
|
320
320
|
}
|
|
321
321
|
:is(.appbar__brand, .appbar__who) > .stamp .stamp__cap { display: none; }
|
|
322
|
-
:is(.appbar__brand, .appbar__who) > .stamp .stamp__art { top: calc(var(--_y) +
|
|
322
|
+
:is(.appbar__brand, .appbar__who) > .stamp .stamp__art { top: calc(var(--_y) + var(--stamp-bare-drop)); }
|
|
323
323
|
/* ---- where it sits in what card.css draws (docs/reference.md rule 15) ---- */
|
|
324
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.
|
|
325
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
|
package/css/tokens.css
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
--tap-base: 3rem; /* 48 the size of THINGS: touch targets and control heights (--tap*, --btn-h, --chip-h, --bar-h,
|
|
29
29
|
--header-h, --fab), icons, avatars, dots, the ring and the tiles. --sp-base is the room BETWEEN things.
|
|
30
30
|
Text-holders follow the type instead: --badge, --icon-xs and --stamp-xs (inline with captions) are on --fs-base;
|
|
31
|
-
the form controls (--form-tap*, --
|
|
31
|
+
the form controls (--form-tap*, --chip-h) on both, the larger wins.
|
|
32
32
|
Not on a base: --screen-w (the column), borders / rules / focus (fixed rem), shadows, motion. */
|
|
33
33
|
|
|
34
34
|
/* ---- spacing (4pt grid): the number in the name is the multiplier ---- */
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
--tap: max(var(--tap-floor), var(--tap-base)); /* 48 primary touch target */
|
|
49
49
|
--tap-sm: max(var(--tap-floor), calc(var(--tap-base) * 11 / 12)); /* 44 minimum touch target */
|
|
50
50
|
--tap-lg: max(var(--tap-floor), calc(var(--tap-base) * 7 / 6)); /* 56 hero controls: send, field with action */
|
|
51
|
-
--tap-xl: max(var(--tap-floor), calc(var(--tap-base) * 17 / 12)); /* 68 the biggest round control: a foot of a few big round buttons (
|
|
51
|
+
--tap-xl: max(var(--tap-floor), calc(var(--tap-base) * 17 / 12)); /* 68 the biggest round control: a foot of a few big round buttons (Btn round xl) */
|
|
52
52
|
/* FORM CONTROLS follow the words they hold (Lh 2026-10-26: "form fields and the words in them use the same tokens"): a field, a button,
|
|
53
53
|
a chip, a Pin cell, a switch, a check and a segmented choice are the larger of their size of things (--tap-base) and the same share of
|
|
54
54
|
the type (--fs-base). At the default bases the two are equal (48 = 22 × 24/11); a member's larger text (setTextScale) grows them at the
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
--form-tap: max(var(--tap), calc(var(--fs-base) * 24 / 11)); /* 48 a check, a switch's row, a segmented choice, a slider's knob */
|
|
57
57
|
--form-tap-sm: max(var(--tap-sm), calc(var(--fs-base) * 2)); /* 44 */
|
|
58
58
|
--form-tap-lg: max(var(--tap-lg), calc(var(--fs-base) * 28 / 11)); /* 56 a Field */
|
|
59
|
-
--btn-h:
|
|
59
|
+
--btn-h: var(--tap); /* 48 the md step of every button, a pill and a round alike (Lh 2026-10-29: one ladder, sm --tap-sm · md --tap · lg --tap-lg) */
|
|
60
60
|
--btn-xl-h: max(calc(var(--tap-base) * 11 / 6), calc(var(--fs-base) * 4)); /* 88 the one giant CTA */
|
|
61
61
|
--chip-h: max(calc(var(--tap-base) * 19 / 24), calc(var(--fs-base) * 19 / 11)); /* 38 chip height */
|
|
62
62
|
--bar-h: calc(var(--tap-base) * 4 / 3); /* 64 float bar, day cell */
|
|
@@ -76,6 +76,31 @@
|
|
|
76
76
|
--icon-lg: calc(var(--tap-base) * 2 / 3); /* 32 empty states */
|
|
77
77
|
--icon-xs: calc(var(--fs-base) * 0.775); /* 17 inline with captions/chips only (row meta, link arrows) — the caption's size */
|
|
78
78
|
--stamp-xs: calc(var(--fs-base) * 0.85); /* 18.7 × 23.4 the stamp inline with a status line: one Chip xs tall (Lh picked it 2026-10-24) */
|
|
79
|
+
--stamp: calc(var(--tap) * 2); /* 96 × 120 the one size of a stamp, two taps wide (knob --stamp-size) */
|
|
80
|
+
|
|
81
|
+
/* ---- the stamp's drawing (stamp.css): each a share of the stamp's own width (cqw) or of its picture (%), so it scales with the stamp ---- */
|
|
82
|
+
--stamp-perf-count: 8; /* teeth across (10 down, the 4:5 does it) — no knob: a stamp looks the same at every size */
|
|
83
|
+
--stamp-perf-hole: 3.9cqw; /* a tooth's hole: its radius */
|
|
84
|
+
--stamp-perf-soft: 0.4cqw; /* a hole's rim, clear to paper */
|
|
85
|
+
--stamp-frame-w: 8cqw; /* the paper's frame round the picture — knob --stamp-frame */
|
|
86
|
+
--stamp-xs-frame-w: 12cqw; /* …on an xs stamp, wider to clear its teeth */
|
|
87
|
+
--stamp-cap-inset: 5cqw; /* the words' room from the picture's sides */
|
|
88
|
+
--stamp-cap-foot: 3.5cqw; /* …from the picture's foot */
|
|
89
|
+
--stamp-cap-gap: 0.4cqw; /* between the small line and the name */
|
|
90
|
+
--stamp-bare-drop: 9%; /* a bare stamp's pictures, lower by this share: the foot's room is theirs */
|
|
91
|
+
--stamp-contact-blur: calc(var(--border-w) / 4); /* the contact shadow's blur, black or a frameless stamp's own tone */
|
|
92
|
+
--stamp-place-dot-pitch: calc(var(--sp-base) * 1.5); /* 6 an empty place's edge: one dot's centre to the next — knob --stamp-place-gap */
|
|
93
|
+
/* the pictures, by count (--stamp-art-<count>-<which>-x|y|w): the middle of each and its width, shares of the picture area */
|
|
94
|
+
--stamp-art-1-1-x: 50%; --stamp-art-1-1-y: 40%; --stamp-art-1-1-w: 72%;
|
|
95
|
+
--stamp-art-2-1-x: 37%; --stamp-art-2-1-y: 27%; --stamp-art-2-1-w: 58%;
|
|
96
|
+
--stamp-art-2-2-x: 63%; --stamp-art-2-2-y: 56%; --stamp-art-2-2-w: 54%;
|
|
97
|
+
--stamp-art-3-1-x: 30%; --stamp-art-3-1-y: 21%; --stamp-art-3-1-w: 50%;
|
|
98
|
+
--stamp-art-3-2-x: 71%; --stamp-art-3-2-y: 31%; --stamp-art-3-2-w: 46%;
|
|
99
|
+
--stamp-art-3-3-x: 47%; --stamp-art-3-3-y: 58%; --stamp-art-3-3-w: 54%;
|
|
100
|
+
--stamp-art-4-1-x: 29%; --stamp-art-4-1-y: 19%; --stamp-art-4-1-w: 44%;
|
|
101
|
+
--stamp-art-4-2-x: 71%; --stamp-art-4-2-y: 24%; --stamp-art-4-2-w: 42%;
|
|
102
|
+
--stamp-art-4-3-x: 31%; --stamp-art-4-3-y: 57%; --stamp-art-4-3-w: 42%;
|
|
103
|
+
--stamp-art-4-4-x: 70%; --stamp-art-4-4-y: 60%; --stamp-art-4-4-w: 44%;
|
|
79
104
|
|
|
80
105
|
/* ---- people & big elements ---- */
|
|
81
106
|
--avatar-sm: calc(var(--tap-base) * 5 / 6); /* 40 row lead */
|
|
@@ -86,6 +111,7 @@
|
|
|
86
111
|
--ring-w: calc(var(--tap-base) * 11 / 24); /* 22 .ring stroke */
|
|
87
112
|
--tile-min: calc(var(--tap-base) * 5 / 2); /* 120 .tile-grid column floor */
|
|
88
113
|
--tile-h: calc(var(--tap-base) * 11 / 4); /* 132 tile / band height */
|
|
114
|
+
--drawer-h: calc(var(--tap-base) * 14 / 3); /* 224 a modal's drawer, a page's picture */
|
|
89
115
|
|
|
90
116
|
/* ---- radius ---- */
|
|
91
117
|
/* TILT (Lh 2026-10-20: no unit a component writes for itself): every paper laid at an angle (a note, a stamp, a letter, a card
|
|
@@ -99,6 +125,7 @@
|
|
|
99
125
|
--r-media: var(--r-base); /* 20.8 images inside cards */
|
|
100
126
|
--r-control: calc(var(--r-base) * 0.875); /* 18.2 fields, thumbs, menu rows */
|
|
101
127
|
--r-badge: calc(var(--r-base) * 0.625); /* 13 tile badge, bars */
|
|
128
|
+
--r-tail: calc(var(--r-base) * 0.4375); /* 9.1 a corner that POINTS: a bubble's tail (Lh 2026-10-29) */
|
|
102
129
|
|
|
103
130
|
/* ---- borders / rules / elevation (rem, like every length) ---- */
|
|
104
131
|
/* one device-independent pixel in rem: what the platform needs to keep a hidden word in the accessibility tree, and the half-width
|
|
@@ -142,7 +169,7 @@
|
|
|
142
169
|
--ease-linear: linear;
|
|
143
170
|
--ease-settle: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
144
171
|
--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
|
|
172
|
+
--motion-send: 0.7s; /* something going OUT from a button (Btn sending, actions.css): the icon tips forward, two rings spread */
|
|
146
173
|
--motion-press: 0.12s; /* a control giving under the finger and springing back (actions.css PRESS) */
|
|
147
174
|
--press-scale: 0.96; /* how far a finger-sized control gives — a share of its size */
|
|
148
175
|
--scale-lift: 1.06; /* a stamp lifted off the paper while the finger holds it */
|
|
@@ -209,6 +236,12 @@
|
|
|
209
236
|
--lh-ruled: 1.7; /* a ruled sheet: the line under every line of writing */
|
|
210
237
|
--track-loose: 0.02em; /* initials in an avatar */
|
|
211
238
|
--track-caps: 0.08em; /* a kicker in capitals */
|
|
239
|
+
/* THE GLYPHS' ROOM (Lh 2026-10-29): how far a glyph's ink reaches past its line box, in the type's own em (a font metric, so it follows the
|
|
240
|
+
size it is read at). A line that clips its words (a line clamp, an ellipsis) pads its box by these inside the clip and gives them back
|
|
241
|
+
outside it, so no mark is cut and nothing moves. Rise: a stacked Thai mark over the first line. Drop: a lower vowel under the last (it
|
|
242
|
+
reaches 0.30em under the baseline; a tight line box, 1.15, ends 0.175em under it) */
|
|
243
|
+
--glyph-rise: 0.2em;
|
|
244
|
+
--glyph-drop: 0.15em;
|
|
212
245
|
/* THE EIGHT KINDS: each has its face, weight, size (--fs-* above), leading and tracking, and its style --type-<kind> is made of them */
|
|
213
246
|
--fw-display: var(--fw-heavy); --lh-display: 1.15; --track-display: -0.02em; /* leading: Thai marks stack to 1.1em up and 0.3em down in FC Pride — 1.02 clipped them (2026-09-10) */
|
|
214
247
|
--fw-h1: var(--fw-black); --lh-h1: 1.15; --track-h1: -0.015em; /* tight, the display's floor: a stacked mark (1.13em up) clears the line above (Lh 2026-10-25: 1.2 read loose) */
|
package/dist/actions/Btn.d.ts
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import { type ComponentProps } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
import { type IconName } from '../type/Icon.js';
|
|
3
|
+
/** the ONE size ladder of every button, a pill and a round of one step the same height so either stands in for the other in a row:
|
|
4
|
+
* `sm` one small tap (`--tap-sm`, 44 — the touch floor) · `md` one tap (`--btn-h` = `--tap`, 48) · `lg` the hero control (`--tap-lg`, 56) ·
|
|
5
|
+
* `xl` the biggest, NOT swap-equal (Lh 2026-10-29: at xl the two shapes are too different to be one step): a pill `--btn-xl-h`, 88, the one
|
|
6
|
+
* giant call to action; a round `--tap-xl`, 68, a foot of a few big round answers */
|
|
7
|
+
export type BtnSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
8
|
+
/** what the button says about its move: `default` plain · `primary` the filled one forward move (the palette's primary, `--btn-primary-bg`) ·
|
|
9
|
+
* `quiet` ink on whatever it sits on, a faint outline · `warn` the warning ink (`--signal-warn`, knob `--btn-warn-ink`), a move to think twice about */
|
|
10
|
+
export type BtnTone = 'default' | 'primary' | 'quiet' | 'warn';
|
|
11
|
+
interface BtnBase extends Omit<ComponentProps<'button'>, 'form' | 'children'> {
|
|
12
|
+
/** the step on the one size ladder, both shapes alike (default `md`) */
|
|
13
|
+
size?: BtnSize;
|
|
14
|
+
/** what it says about its move (default `default`) */
|
|
15
|
+
tone?: BtnTone;
|
|
20
16
|
/** a link styled as a button */
|
|
21
17
|
href?: string;
|
|
22
18
|
/** SENDING: something goes OUT from the button — its icon swells and tips forward, two rings spread from it (`--motion-send`, 0.7 s; knob
|
|
@@ -26,19 +22,53 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
|
|
|
26
22
|
/** the send-out has ended (once per `sending`; at once where motion is off): the app does what follows */
|
|
27
23
|
onSent?: () => void;
|
|
28
24
|
}
|
|
25
|
+
export interface PillBtnProps extends BtnBase {
|
|
26
|
+
/** `pill` (default): the worded button, as wide as its words */
|
|
27
|
+
shape?: 'pill';
|
|
28
|
+
/** the words; an Icon xs may lead or trail them */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/** full width */
|
|
31
|
+
block?: boolean;
|
|
32
|
+
/** 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,
|
|
33
|
+
* not a page CTA (Lh 2026-09-25). In a card's foot (`Foot`, `FeedCard foot`) it keeps that size instead of
|
|
34
|
+
* filling the row. Replaces the native `form` attribute (a button outside its <form> — not a cardds pattern). */
|
|
35
|
+
form?: boolean;
|
|
36
|
+
icon?: never;
|
|
37
|
+
label?: never;
|
|
38
|
+
}
|
|
39
|
+
interface RoundBase extends BtnBase {
|
|
40
|
+
/** `round`: the round button, as wide as it is tall */
|
|
41
|
+
shape: 'round';
|
|
42
|
+
/** the accessible name — required, the button shows no words of its own */
|
|
43
|
+
label: string;
|
|
44
|
+
block?: never;
|
|
45
|
+
form?: never;
|
|
46
|
+
}
|
|
47
|
+
/** a round button shows its `icon` (sized to the button; anything else it holds — a Badge, a word in a `BtnGroup` frame — follows the icon),
|
|
48
|
+
* or, with no icon, a short WORD (`lg` / `xl`: it grows with the member's text size up to the circle's share) */
|
|
49
|
+
export type RoundBtnProps = RoundBase & ({
|
|
50
|
+
icon: IconName;
|
|
51
|
+
children?: ReactNode;
|
|
52
|
+
} | {
|
|
53
|
+
icon?: never;
|
|
54
|
+
children: string;
|
|
55
|
+
});
|
|
56
|
+
export type BtnProps = PillBtnProps | RoundBtnProps;
|
|
29
57
|
/**
|
|
30
|
-
* Btn —
|
|
31
|
-
*
|
|
58
|
+
* Btn — THE button (Lh 2026-10-29: one component, so any button swaps for another). `shape`: a `pill` of words (default) or a `round` of an
|
|
59
|
+
* icon; `size` one ladder for both (`sm` 44 · `md` 48 · `lg` 56, a pill and a round one height; `xl` each shape its own, not swap-equal); `tone` `primary` for the one move, `quiet` on tinted cards, `warn`.
|
|
60
|
+
* In a Foot up to four share the line; in an ActionBar it takes the width. A round `sm` stands in heads and bars, `xl` in a foot of a few
|
|
61
|
+
* big round answers (`<Foot round>`). It is a button and nothing more: to open a Menu, give it the platform's `popoverTarget={the Menu's id}`
|
|
62
|
+
* and render that `<Menu popover actions id>` wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`.
|
|
32
63
|
*/
|
|
33
|
-
export declare function Btn(
|
|
34
|
-
translate?: "yes" | "no" | undefined | undefined;
|
|
35
|
-
onChange?: import("react").ChangeEventHandler<HTMLButtonElement, Element> | undefined;
|
|
64
|
+
export declare function Btn(props: BtnProps): import("react").DetailedReactHTMLElement<{
|
|
36
65
|
slot?: string | undefined | undefined;
|
|
37
66
|
style?: import("react").CSSProperties | undefined;
|
|
38
67
|
title?: string | undefined | undefined;
|
|
68
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
69
|
+
onChange?: import("react").ChangeEventHandler<HTMLButtonElement, Element> | undefined;
|
|
39
70
|
dir?: string | undefined | undefined;
|
|
40
71
|
name?: string | undefined | undefined;
|
|
41
|
-
children?: import("react").ReactNode;
|
|
42
72
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
43
73
|
color?: string | undefined | undefined;
|
|
44
74
|
id?: string | undefined | undefined;
|
|
@@ -73,7 +103,7 @@ export declare function Btn({ primary, quiet, warn, block, form, xl, sm, href, s
|
|
|
73
103
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
74
104
|
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
75
105
|
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
76
|
-
"aria-label"
|
|
106
|
+
"aria-label": string | undefined;
|
|
77
107
|
"aria-labelledby"?: string | undefined | undefined;
|
|
78
108
|
"aria-level"?: number | undefined | undefined;
|
|
79
109
|
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
@@ -312,8 +342,8 @@ export declare function Btn({ primary, quiet, warn, block, form, xl, sm, href, s
|
|
|
312
342
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
313
343
|
is?: string | undefined | undefined;
|
|
314
344
|
exportparts?: string | undefined | undefined;
|
|
315
|
-
disabled?: boolean | undefined | undefined;
|
|
316
345
|
value?: string | number | readonly string[] | undefined;
|
|
346
|
+
disabled?: boolean | undefined | undefined;
|
|
317
347
|
formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
|
|
318
348
|
formEncType?: string | undefined | undefined;
|
|
319
349
|
formMethod?: string | undefined | undefined;
|
|
@@ -321,6 +351,7 @@ export declare function Btn({ primary, quiet, warn, block, form, xl, sm, href, s
|
|
|
321
351
|
formTarget?: string | undefined | undefined;
|
|
322
352
|
onAnimationEnd: (e: import("react").AnimationEvent<HTMLButtonElement>) => void;
|
|
323
353
|
href: string | undefined;
|
|
324
|
-
type: "
|
|
354
|
+
type: "button" | "reset" | "submit" | undefined;
|
|
325
355
|
className: string;
|
|
326
356
|
}, HTMLButtonElement>;
|
|
357
|
+
export {};
|
package/dist/actions/Btn.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { createElement } from 'react';
|
|
2
3
|
import { useSendOut } from './useSendOut.js';
|
|
3
4
|
import { cx } from '../cx.js';
|
|
5
|
+
import { Icon } from '../type/Icon.js';
|
|
4
6
|
/**
|
|
5
|
-
* Btn —
|
|
6
|
-
*
|
|
7
|
+
* Btn — THE button (Lh 2026-10-29: one component, so any button swaps for another). `shape`: a `pill` of words (default) or a `round` of an
|
|
8
|
+
* icon; `size` one ladder for both (`sm` 44 · `md` 48 · `lg` 56, a pill and a round one height; `xl` each shape its own, not swap-equal); `tone` `primary` for the one move, `quiet` on tinted cards, `warn`.
|
|
9
|
+
* In a Foot up to four share the line; in an ActionBar it takes the width. A round `sm` stands in heads and bars, `xl` in a foot of a few
|
|
10
|
+
* big round answers (`<Foot round>`). It is a button and nothing more: to open a Menu, give it the platform's `popoverTarget={the Menu's id}`
|
|
11
|
+
* and render that `<Menu popover actions id>` wherever you like — the panel anchors to the button that opened it. To open anything else, `onClick`.
|
|
7
12
|
*/
|
|
8
|
-
export function Btn(
|
|
13
|
+
export function Btn(props) {
|
|
14
|
+
const { shape, size, tone, href, sending, onSent, onAnimationEnd, className, type, children, block, form, label, icon, ...rest } = props;
|
|
9
15
|
const ended = useSendOut(sending, onSent, onAnimationEnd);
|
|
16
|
+
const round = shape === 'round';
|
|
17
|
+
const base = round ? 'icon-btn' : 'btn';
|
|
18
|
+
const step = size && size !== 'md' ? `${base}--${size}` : undefined;
|
|
19
|
+
const look = tone && tone !== 'default' ? `${base}--${tone}` : undefined;
|
|
20
|
+
const invert = round && tone === 'primary' && 'icon-btn--invert'; // the round primary's old class name too: a theme's `.icon-btn--invert` rule still hits it
|
|
10
21
|
return createElement(href ? 'a' : 'button', {
|
|
11
22
|
onAnimationEnd: ended,
|
|
12
23
|
href,
|
|
13
24
|
type: href ? undefined : type ?? 'button',
|
|
14
|
-
|
|
25
|
+
'aria-label': round ? label : undefined,
|
|
26
|
+
className: cx(base, step, look, invert, block && 'btn--block', form && 'btn--form', sending && 'is-sending', className),
|
|
15
27
|
...rest,
|
|
16
|
-
});
|
|
28
|
+
}, round && icon ? _jsxs(_Fragment, { children: [_jsx(Icon, { name: icon, size: size === 'sm' ? 'sm' : 'md' }), children] }) : children);
|
|
17
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps } from 'react';
|
|
2
2
|
type Picked = string | null | string[];
|
|
3
3
|
export interface BtnGroupProps extends Omit<ComponentProps<'div'>, 'onChange' | 'defaultValue'> {
|
|
4
|
-
/** how the buttons stand (Lh 2026-10-24: one panel of buttons, two looks): `frame` — up to FOUR `
|
|
4
|
+
/** how the buttons stand (Lh 2026-10-24: one panel of buttons, two looks): `frame` — up to FOUR round `Btn`s in ONE frame, sharing its
|
|
5
5
|
* width, a rule between them (a card's or a sheet's foot) · `strip` — `BtnGroupItem`s of words a small gap apart, sharing the width,
|
|
6
6
|
* the picked one filled (a tab strip, a day picker; as many as fit) · `choice` (Lh 2026-10-24) — `BtnGroupItem`s of words that READ
|
|
7
7
|
* AS BUTTONS: joined in ONE frame like `frame`'s, a full tap tall, a rule between them, the picked one a solid brand fill with its ink (a pick of
|
|
@@ -34,8 +34,8 @@ export interface BtnGroupProps extends Omit<ComponentProps<'div'>, 'onChange' |
|
|
|
34
34
|
labelled?: boolean;
|
|
35
35
|
}
|
|
36
36
|
/** BtnGroup — a panel of buttons, one job in two looks (`look`). `frame` (default): up to FOUR icon buttons in ONE frame, sharing its
|
|
37
|
-
* width, a rule between them in the frame's colour (Lh 2026-09-29). Each is
|
|
38
|
-
* stand beside the icon as its child (`<
|
|
37
|
+
* width, a rule between them in the frame's colour (Lh 2026-09-29). Each is a round `Btn` (its `label` is its spoken name); a WORD may
|
|
38
|
+
* stand beside the icon as its child (`<Btn shape="round" icon="man" label="ชาย">ชาย</Btn>`) — two named sides of a `Panes`. At home
|
|
39
39
|
* in a card's or a sheet's foot; `vertical` at a row's end; `form` as a small control of its own in the middle of a `Page` or a `Centre`
|
|
40
40
|
* (`<BtnGroup form labelled label="เปลี่ยนสีพื้น">` = the words, then the narrow panel, both centred). `strip`: `BtnGroupItem`s of words
|
|
41
41
|
* sharing the width (a tab strip, a day picker), a tablist. Plain: each button does its own thing on its onClick. With `select`, a pressed
|
package/dist/actions/BtnGroup.js
CHANGED
|
@@ -3,8 +3,8 @@ import { Children, cloneElement, isValidElement, useId } from 'react';
|
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
import { useControlled, warnOnce } from '../state.js';
|
|
5
5
|
/** BtnGroup — a panel of buttons, one job in two looks (`look`). `frame` (default): up to FOUR icon buttons in ONE frame, sharing its
|
|
6
|
-
* width, a rule between them in the frame's colour (Lh 2026-09-29). Each is
|
|
7
|
-
* stand beside the icon as its child (`<
|
|
6
|
+
* width, a rule between them in the frame's colour (Lh 2026-09-29). Each is a round `Btn` (its `label` is its spoken name); a WORD may
|
|
7
|
+
* stand beside the icon as its child (`<Btn shape="round" icon="man" label="ชาย">ชาย</Btn>`) — two named sides of a `Panes`. At home
|
|
8
8
|
* in a card's or a sheet's foot; `vertical` at a row's end; `form` as a small control of its own in the middle of a `Page` or a `Centre`
|
|
9
9
|
* (`<BtnGroup form labelled label="เปลี่ยนสีพื้น">` = the words, then the narrow panel, both centred). `strip`: `BtnGroupItem`s of words
|
|
10
10
|
* sharing the width (a tab strip, a day picker), a tablist. Plain: each button does its own thing on its onClick. With `select`, a pressed
|
package/dist/actions/BtnRow.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
export interface BtnRowProps extends ComponentProps<'div'> {
|
|
3
|
-
/** a few big round `
|
|
3
|
+
/** a few big round `Btn`s (`size="xl"`), each its own size, as ONE group in the middle a fixed gap apart — the look of `Foot round`, in a card's
|
|
4
4
|
* content, so the card's `Foot` stays free for its status line. Knob `--btn-row-gap` (default `--sp-6` here, `--sp-2` for Btns) */
|
|
5
5
|
round?: boolean;
|
|
6
6
|
/** with `round`: a dotted link between each two buttons and a closer gap (× · ? · ✓ — the answers of a `ModalAsk`; was `BtnTrio`).
|
|
@@ -11,6 +11,6 @@ export interface BtnRowProps extends ComponentProps<'div'> {
|
|
|
11
11
|
/** the buttons stand at the END of the row (the right, in a left-to-right script) — with `wrap` */
|
|
12
12
|
end?: boolean;
|
|
13
13
|
}
|
|
14
|
-
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round
|
|
14
|
+
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round Btns there
|
|
15
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
16
|
export declare function BtnRow({ round, joined, wrap, end, className, children, ...rest }: BtnRowProps): import("react").JSX.Element;
|
package/dist/actions/BtnRow.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
3
|
import { joinDots } from './joined.js';
|
|
4
|
-
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round
|
|
4
|
+
/** BtnRow — twin CTAs inside a card's content sharing the width (Log time · Offer), or with `round` a group of round Btns there
|
|
5
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
6
|
export function BtnRow({ round, joined, wrap, end, className, children, ...rest }) {
|
|
7
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 });
|
package/dist/actions/Chip.d.ts
CHANGED
|
@@ -359,7 +359,7 @@ export interface ChipChoiceProps extends Omit<ComponentProps<'div'>, 'defaultVal
|
|
|
359
359
|
onValueChange?: (value: string[]) => void;
|
|
360
360
|
/** the group's accessible name (it has no visible label of its own: the heading above it is the app's) */
|
|
361
361
|
label: string;
|
|
362
|
-
/** a control standing FIRST in the row, before the chips — the "+" that adds a choice (`<
|
|
362
|
+
/** a control standing FIRST in the row, before the chips — the "+" that adds a choice (`<Btn shape="round" size="sm" icon="plus" …>`); what it does is the app's */
|
|
363
363
|
add?: ReactNode;
|
|
364
364
|
/** a wrapping row instead of the one-line strip that runs to its holder's edges and scrolls sideways (the default) */
|
|
365
365
|
wrap?: boolean;
|
package/dist/actions/Fab.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import type { IconName } from '../type/Icon.js';
|
|
3
|
+
import { type BtnTone } from './Btn.js';
|
|
4
|
+
export interface FabProps extends Omit<ComponentProps<'button'>, 'form' | 'children'> {
|
|
4
5
|
/** the accessible name — required, the button has no text */
|
|
5
6
|
label: string;
|
|
6
|
-
/** the icon (default plus);
|
|
7
|
+
/** the icon (default plus); a word child replaces it */
|
|
7
8
|
icon?: IconName;
|
|
8
|
-
/**
|
|
9
|
-
|
|
9
|
+
/** a short word in place of the icon */
|
|
10
|
+
children?: string;
|
|
11
|
+
/** a Btn's tone (default `primary`, filled); `default` for a plain one */
|
|
12
|
+
tone?: BtnTone;
|
|
10
13
|
}
|
|
11
|
-
/** Fab — the square floating action at the bottom-right of a stage or screen (above the bar):
|
|
12
|
-
|
|
14
|
+
/** Fab — the square floating action at the bottom-right of a stage or screen (above the bar): a round Btn with the fab's place and its
|
|
15
|
+
* own size (`--fab`, so it takes no `size`). */
|
|
16
|
+
export declare function Fab({ label, icon, tone, className, children, ...rest }: FabProps): import("react").JSX.Element;
|
package/dist/actions/Fab.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export function Fab({ label, icon = 'plus',
|
|
7
|
-
|
|
3
|
+
import { Btn } from './Btn.js';
|
|
4
|
+
/** Fab — the square floating action at the bottom-right of a stage or screen (above the bar): a round Btn with the fab's place and its
|
|
5
|
+
* own size (`--fab`, so it takes no `size`). */
|
|
6
|
+
export function Fab({ label, icon = 'plus', tone = 'primary', className, children, ...rest }) {
|
|
7
|
+
const own = { label, tone, className: cx('fab', className), ...rest };
|
|
8
|
+
return children ? _jsx(Btn, { shape: "round", ...own, children: children }) : _jsx(Btn, { shape: "round", icon: icon, ...own });
|
|
8
9
|
}
|
|
@@ -5,5 +5,7 @@ export interface LinkBlockProps extends ComponentProps<'a'> {
|
|
|
5
5
|
}
|
|
6
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
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
|
-
|
|
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
|
+
* A `Row` in it with a lead and a meta is a led line: its end (`<End caption="Maps"><Icon name="arrow-up-right" /></End>`, the words and their arrow
|
|
10
|
+
* as one) at the top right, its centre on the title's first line's x-height middle; the title and the meta flow round it and under it. */
|
|
11
|
+
export declare function LinkBlock({ className, children, ...rest }: LinkBlockProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
+
import { RowEndRoomCtx } from '../parts/endRoom.js';
|
|
3
4
|
/** 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
|
|
4
5
|
* `<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.
|
|
5
|
-
* Name it with `aria-label` when it leaves the app (`target="_blank"`). Nothing that can be pressed goes inside. Knob `--link-block-gap`.
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* Name it with `aria-label` when it leaves the app (`target="_blank"`). Nothing that can be pressed goes inside. Knob `--link-block-gap`.
|
|
7
|
+
* A `Row` in it with a lead and a meta is a led line: its end (`<End caption="Maps"><Icon name="arrow-up-right" /></End>`, the words and their arrow
|
|
8
|
+
* as one) at the top right, its centre on the title's first line's x-height middle; the title and the meta flow round it and under it. */
|
|
9
|
+
export function LinkBlock({ className, children, ...rest }) {
|
|
10
|
+
return _jsx("a", { className: cx('link-block', className), ...rest, children: _jsx(RowEndRoomCtx.Provider, { value: true, children: children }) });
|
|
8
11
|
}
|