@usableapp/cardds 0.7.142 → 0.7.144
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 +21 -0
- package/css/card.css +1 -0
- package/css/forms.css +54 -0
- package/css/sticky.css +4 -3
- package/dist/cardds.css +59 -3
- package/dist/catalog.json +1 -1
- package/dist/forms/MessageBar.d.ts +31 -0
- package/dist/forms/MessageBar.js +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/scaffold/Screen.d.ts +1 -1
- package/dist/scaffold/Screen.js +1 -1
- package/docs/reference.md +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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.144 — 2026-10-26
|
|
6
|
+
|
|
7
|
+
A list of steps on a whole-card back reads from the start edge.
|
|
8
|
+
|
|
9
|
+
Components: Card
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **`Bullets` on a `Card backFull` back keeps the card's width and reads from the start edge** (Lh 2026-10-26). Before → after: the whole back was centred (`.card__middle--full`), so a list of steps stood in the middle and each line's words centred under its pic → the `Bullets` stretches to the card's width and its text starts at the start edge, as a `Pin` or a `Field` already did. Nothing to change in a screen.
|
|
13
|
+
|
|
14
|
+
## 0.7.143 — 2026-10-26
|
|
15
|
+
|
|
16
|
+
A sticky note's shadow is lighter and closer. A chat of bubbles has its message box: `MessageBar`.
|
|
17
|
+
|
|
18
|
+
Components: Sticky, MessageBar, Screen
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- **A sticky note's shadow is lighter and closer** (Lh 2026-10-26: too dark for paper barely off the page). Before → after: 28% ink, set `--sp-1` down → 14% ink, a hair down, showing only a hairline below the note. `--sticky-shadow-bg` and `--sticky-shadow-blur` still retune it. Nothing to change in a screen.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- **`MessageBar`**: the box a chat's message is typed in, at the foot of a `Thread` of `Bubble`s — `lead` (an extra `IconBtn`) · the box · an `IconBtn invert` send, off while the box holds only blanks. The box starts one line tall, grows to five (`--message-bar-input-max-h`), then scrolls. Controlled like an input (`value` + `onValueChange`, or `defaultValue`); `onSend(words)` hands the words over and asks for an empty box; the cursor stays in the box. Put it in `Screen`'s `bottom` (`<Screen fill bottom={<MessageBar sendLabel="ส่ง" …/>}>`): Screen measures it into `--bottom-h` as it does an `ActionBar`, and it rides above the keyboard (`--kb`). Before → after: a bubble chat had no box to type in → `MessageBar`. Stories `MessageBar`, `Bubble · WithMessageBar`.
|
|
25
|
+
|
|
5
26
|
## 0.7.142 — 2026-10-26
|
|
6
27
|
|
|
7
28
|
A stamp's shadow is its contact shadow only, lighter. A `Stamp` in an `AppBar`'s `icon` is the bar's inner height tall.
|
package/css/card.css
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
.card__middle { flex: 1 0 auto; display: flex; flex-direction: column; gap: var(--card-gap); height: var(--card-middle-h, auto); overflow: hidden; } /* a flex column, not a grid: the middle's height is the flexed one, so one thing on a face (a QR, a code) may take the whole middle with height: 100% (a grid's auto row never stretched to it, and the thing stood at the top of an empty band) */
|
|
90
90
|
.card__middle--full { justify-content: center; align-items: center; text-align: center; } /* Card backFull: the back is the whole card, no head and no foot — one code, one sentence and its button, a thank-you, in the middle both ways */
|
|
91
91
|
.card__middle--full > :is(.pin, .field, .composer, .form-note) { align-self: stretch; } /* a thing to type in keeps the card's width (centred, a Pin's cells would shrink to nothing) */
|
|
92
|
+
.card__middle--full > .bullets { align-self: stretch; text-align: start; } /* a list of steps keeps the card's width and reads from the start edge (centred, each line's pic would float with its words) */
|
|
92
93
|
.card__turn { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
|
|
93
94
|
.card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
|
|
94
95
|
.head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: -0.15em; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
|
package/css/forms.css
CHANGED
|
@@ -83,3 +83,57 @@
|
|
|
83
83
|
.form-note { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin: 0; font: var(--form-note-font, var(--type-caption)); color: var(--form-note-ink, var(--card-muted)); text-align: center; }
|
|
84
84
|
.form-note--error { color: var(--form-note-error-ink, var(--signal-error)); }
|
|
85
85
|
@media (prefers-reduced-motion: no-preference) { .form-note--busy > .icon { --icon-spin: turn var(--motion-spin) var(--ease-linear) infinite; } } /* `turn`: tokens.css */
|
|
86
|
+
|
|
87
|
+
/* ---- message bar: the box a chat's message is typed in, at the conversation's foot (MessageBar) ----
|
|
88
|
+
lead · the box · send. The box grows with the words: a hidden copy of them (::after, from data-value) shares the textarea's grid
|
|
89
|
+
cell and font, so the cell is as tall as the words — up to --message-bar-input-max-h (five lines), then the textarea scrolls.
|
|
90
|
+
content-box: the cap counts lines, the padding comes on top. The buttons stay on the last line's row (flex-end).
|
|
91
|
+
<div class="message-bar"><button class="icon-btn">…</button>
|
|
92
|
+
<div class="message-bar__box" data-value="…"><textarea class="message-bar__input" rows="1"></textarea></div>
|
|
93
|
+
<button class="icon-btn icon-btn--invert" disabled>…</button></div> */
|
|
94
|
+
.message-bar {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: flex-end;
|
|
97
|
+
gap: var(--message-bar-gap, var(--sp-2));
|
|
98
|
+
padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--_safe-b-open)); /* its ground runs under the phone's gesture bar, the box stands above it */
|
|
99
|
+
background: var(--message-bar-bg, var(--surface));
|
|
100
|
+
}
|
|
101
|
+
.message-bar > .icon-btn { flex: none; }
|
|
102
|
+
.message-bar__box {
|
|
103
|
+
flex: 1;
|
|
104
|
+
min-width: 0;
|
|
105
|
+
display: grid;
|
|
106
|
+
align-content: center;
|
|
107
|
+
min-height: var(--form-tap);
|
|
108
|
+
border: var(--border-w) solid var(--message-bar-box-border, var(--action-border));
|
|
109
|
+
border-radius: var(--message-bar-box-radius, var(--r-control));
|
|
110
|
+
background: var(--message-bar-box-bg, var(--action-bg));
|
|
111
|
+
color: var(--message-bar-box-ink, var(--action-ink));
|
|
112
|
+
}
|
|
113
|
+
.message-bar__box:has(:focus) { border-color: var(--message-bar-box-active-border, currentColor); } /* the box the cursor is in: its edge goes full ink, as a Field's */
|
|
114
|
+
.message-bar__input,
|
|
115
|
+
.message-bar__box::after {
|
|
116
|
+
grid-area: 1 / 1;
|
|
117
|
+
box-sizing: content-box;
|
|
118
|
+
max-height: var(--message-bar-input-max-h, 5lh);
|
|
119
|
+
margin: 0;
|
|
120
|
+
padding: var(--message-bar-input-pad-y, var(--sp-2)) var(--message-bar-input-pad-x, var(--sp-4));
|
|
121
|
+
border: 0;
|
|
122
|
+
font: var(--message-bar-input-font, var(--fw-regular) var(--fs-lg) / var(--lh-field) var(--font-ui)); /* the words being typed read as a Field's */
|
|
123
|
+
white-space: pre-wrap;
|
|
124
|
+
overflow-wrap: anywhere;
|
|
125
|
+
}
|
|
126
|
+
.message-bar__box::after { content: attr(data-value) " "; visibility: hidden; overflow: hidden; } /* the trailing space: a last empty line still counts */
|
|
127
|
+
.message-bar__input {
|
|
128
|
+
resize: none;
|
|
129
|
+
overflow-y: auto;
|
|
130
|
+
background: transparent;
|
|
131
|
+
color: inherit;
|
|
132
|
+
outline: none; /* the box itself tells focus */
|
|
133
|
+
caret-color: currentColor;
|
|
134
|
+
}
|
|
135
|
+
.message-bar__input::placeholder { color: inherit; opacity: var(--fade-hint); }
|
|
136
|
+
/* the Screen's BOTTOM: in a .screen--fill a layer over the content's foot, as the .action-bar is (actions.css) — Screen measures it
|
|
137
|
+
into --bottom-h, so a Page's last words scroll clear; on a scrolling screen its sticky last row. Both ride above the keyboard (--kb) */
|
|
138
|
+
.screen--fill > .message-bar { position: absolute; inset-inline: 0; bottom: var(--kb, 0rem); z-index: var(--z-bar); }
|
|
139
|
+
.screen:not(.screen--fill) > .message-bar:last-child { position: sticky; bottom: var(--kb, 0rem); z-index: var(--z-bar); margin: 0 calc(-1 * var(--screen-pad)); }
|
package/css/sticky.css
CHANGED
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
/* the edge and the shadow: two layers UNDER the paper, each drawn in the note's own shape by a gradient — never a filter on the
|
|
36
36
|
note (Safari repainted a filtered note as a hard grey band once a stamp on it had moved; Lh 2026-10-07).
|
|
37
37
|
::after is the EDGE: the shape one hairline larger all round, so a pale note still ends somewhere on a pale ground.
|
|
38
|
-
::before is the SHADOW: the shape set a
|
|
38
|
+
::before is the SHADOW: the shape set a hair down and in, pale and softened on its own layer — paper lying almost flat on the page,
|
|
39
|
+
so it shows only a hairline below the note (Lh 2026-10-26: the old one was too dark for something barely off the page). */
|
|
39
40
|
.sticky::before, .sticky::after {
|
|
40
41
|
content: "";
|
|
41
42
|
position: absolute;
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
}
|
|
47
48
|
.sticky::after { --_ink: var(--sticky-edge-bg, color-mix(in srgb, var(--ink-onlight) 14%, transparent)); inset: calc(-1 * var(--border-w)); }
|
|
48
49
|
.sticky::before {
|
|
49
|
-
--_ink: var(--sticky-shadow-bg, color-mix(in srgb, var(--ink-onlight)
|
|
50
|
-
inset: var(--sp-
|
|
50
|
+
--_ink: var(--sticky-shadow-bg, color-mix(in srgb, var(--ink-onlight) 14%, transparent));
|
|
51
|
+
inset: var(--sp-0) var(--sp-0) calc(-1 * var(--px)) var(--sp-0);
|
|
51
52
|
filter: blur(var(--sticky-shadow-blur, var(--sp-0)));
|
|
52
53
|
}
|
|
53
54
|
.sticky--flat::before, .sticky--flat::after { background: var(--_ink); }
|
package/dist/cardds.css
CHANGED
|
@@ -1050,6 +1050,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
1050
1050
|
.card__middle { flex: 1 0 auto; display: flex; flex-direction: column; gap: var(--card-gap); height: var(--card-middle-h, auto); overflow: hidden; } /* a flex column, not a grid: the middle's height is the flexed one, so one thing on a face (a QR, a code) may take the whole middle with height: 100% (a grid's auto row never stretched to it, and the thing stood at the top of an empty band) */
|
|
1051
1051
|
.card__middle--full { justify-content: center; align-items: center; text-align: center; } /* Card backFull: the back is the whole card, no head and no foot — one code, one sentence and its button, a thank-you, in the middle both ways */
|
|
1052
1052
|
.card__middle--full > :is(.pin, .field, .composer, .form-note) { align-self: stretch; } /* a thing to type in keeps the card's width (centred, a Pin's cells would shrink to nothing) */
|
|
1053
|
+
.card__middle--full > .bullets { align-self: stretch; text-align: start; } /* a list of steps keeps the card's width and reads from the start edge (centred, each line's pic would float with its words) */
|
|
1053
1054
|
.card__turn { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
|
|
1054
1055
|
.card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
|
|
1055
1056
|
.head > .chip-row > .chip > .icon { --icon-display: inline-block; --icon-align: -0.15em; --icon-margin: 0 var(--chip-sm-gap, var(--sp-1)) 0 0; }
|
|
@@ -2608,6 +2609,60 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
2608
2609
|
.form-note--error { color: var(--form-note-error-ink, var(--signal-error)); }
|
|
2609
2610
|
@media (prefers-reduced-motion: no-preference) { .form-note--busy > .icon { --icon-spin: turn var(--motion-spin) var(--ease-linear) infinite; } } /* `turn`: tokens.css */
|
|
2610
2611
|
|
|
2612
|
+
/* ---- message bar: the box a chat's message is typed in, at the conversation's foot (MessageBar) ----
|
|
2613
|
+
lead · the box · send. The box grows with the words: a hidden copy of them (::after, from data-value) shares the textarea's grid
|
|
2614
|
+
cell and font, so the cell is as tall as the words — up to --message-bar-input-max-h (five lines), then the textarea scrolls.
|
|
2615
|
+
content-box: the cap counts lines, the padding comes on top. The buttons stay on the last line's row (flex-end).
|
|
2616
|
+
<div class="message-bar"><button class="icon-btn">…</button>
|
|
2617
|
+
<div class="message-bar__box" data-value="…"><textarea class="message-bar__input" rows="1"></textarea></div>
|
|
2618
|
+
<button class="icon-btn icon-btn--invert" disabled>…</button></div> */
|
|
2619
|
+
.message-bar {
|
|
2620
|
+
display: flex;
|
|
2621
|
+
align-items: flex-end;
|
|
2622
|
+
gap: var(--message-bar-gap, var(--sp-2));
|
|
2623
|
+
padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--_safe-b-open)); /* its ground runs under the phone's gesture bar, the box stands above it */
|
|
2624
|
+
background: var(--message-bar-bg, var(--surface));
|
|
2625
|
+
}
|
|
2626
|
+
.message-bar > .icon-btn { flex: none; }
|
|
2627
|
+
.message-bar__box {
|
|
2628
|
+
flex: 1;
|
|
2629
|
+
min-width: 0;
|
|
2630
|
+
display: grid;
|
|
2631
|
+
align-content: center;
|
|
2632
|
+
min-height: var(--form-tap);
|
|
2633
|
+
border: var(--border-w) solid var(--message-bar-box-border, var(--action-border));
|
|
2634
|
+
border-radius: var(--message-bar-box-radius, var(--r-control));
|
|
2635
|
+
background: var(--message-bar-box-bg, var(--action-bg));
|
|
2636
|
+
color: var(--message-bar-box-ink, var(--action-ink));
|
|
2637
|
+
}
|
|
2638
|
+
.message-bar__box:has(:focus) { border-color: var(--message-bar-box-active-border, currentColor); } /* the box the cursor is in: its edge goes full ink, as a Field's */
|
|
2639
|
+
.message-bar__input,
|
|
2640
|
+
.message-bar__box::after {
|
|
2641
|
+
grid-area: 1 / 1;
|
|
2642
|
+
box-sizing: content-box;
|
|
2643
|
+
max-height: var(--message-bar-input-max-h, 5lh);
|
|
2644
|
+
margin: 0;
|
|
2645
|
+
padding: var(--message-bar-input-pad-y, var(--sp-2)) var(--message-bar-input-pad-x, var(--sp-4));
|
|
2646
|
+
border: 0;
|
|
2647
|
+
font: var(--message-bar-input-font, var(--fw-regular) var(--fs-lg) / var(--lh-field) var(--font-ui)); /* the words being typed read as a Field's */
|
|
2648
|
+
white-space: pre-wrap;
|
|
2649
|
+
overflow-wrap: anywhere;
|
|
2650
|
+
}
|
|
2651
|
+
.message-bar__box::after { content: attr(data-value) " "; visibility: hidden; overflow: hidden; } /* the trailing space: a last empty line still counts */
|
|
2652
|
+
.message-bar__input {
|
|
2653
|
+
resize: none;
|
|
2654
|
+
overflow-y: auto;
|
|
2655
|
+
background: transparent;
|
|
2656
|
+
color: inherit;
|
|
2657
|
+
outline: none; /* the box itself tells focus */
|
|
2658
|
+
caret-color: currentColor;
|
|
2659
|
+
}
|
|
2660
|
+
.message-bar__input::placeholder { color: inherit; opacity: var(--fade-hint); }
|
|
2661
|
+
/* the Screen's BOTTOM: in a .screen--fill a layer over the content's foot, as the .action-bar is (actions.css) — Screen measures it
|
|
2662
|
+
into --bottom-h, so a Page's last words scroll clear; on a scrolling screen its sticky last row. Both ride above the keyboard (--kb) */
|
|
2663
|
+
.screen--fill > .message-bar { position: absolute; inset-inline: 0; bottom: var(--kb, 0rem); z-index: var(--z-bar); }
|
|
2664
|
+
.screen:not(.screen--fill) > .message-bar:last-child { position: sticky; bottom: var(--kb, 0rem); z-index: var(--z-bar); margin: 0 calc(-1 * var(--screen-pad)); }
|
|
2665
|
+
|
|
2611
2666
|
/* ---- css/journey.css — route, tile badge, note row ---- */
|
|
2612
2667
|
/* ============================================================
|
|
2613
2668
|
cardds/journey.css — trip/status primitives inside cards:
|
|
@@ -4768,7 +4823,8 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4768
4823
|
/* the edge and the shadow: two layers UNDER the paper, each drawn in the note's own shape by a gradient — never a filter on the
|
|
4769
4824
|
note (Safari repainted a filtered note as a hard grey band once a stamp on it had moved; Lh 2026-10-07).
|
|
4770
4825
|
::after is the EDGE: the shape one hairline larger all round, so a pale note still ends somewhere on a pale ground.
|
|
4771
|
-
::before is the SHADOW: the shape set a
|
|
4826
|
+
::before is the SHADOW: the shape set a hair down and in, pale and softened on its own layer — paper lying almost flat on the page,
|
|
4827
|
+
so it shows only a hairline below the note (Lh 2026-10-26: the old one was too dark for something barely off the page). */
|
|
4772
4828
|
.sticky::before, .sticky::after {
|
|
4773
4829
|
content: "";
|
|
4774
4830
|
position: absolute;
|
|
@@ -4779,8 +4835,8 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4779
4835
|
}
|
|
4780
4836
|
.sticky::after { --_ink: var(--sticky-edge-bg, color-mix(in srgb, var(--ink-onlight) 14%, transparent)); inset: calc(-1 * var(--border-w)); }
|
|
4781
4837
|
.sticky::before {
|
|
4782
|
-
--_ink: var(--sticky-shadow-bg, color-mix(in srgb, var(--ink-onlight)
|
|
4783
|
-
inset: var(--sp-
|
|
4838
|
+
--_ink: var(--sticky-shadow-bg, color-mix(in srgb, var(--ink-onlight) 14%, transparent));
|
|
4839
|
+
inset: var(--sp-0) var(--sp-0) calc(-1 * var(--px)) var(--sp-0);
|
|
4784
4840
|
filter: blur(var(--sticky-shadow-blur, var(--sp-0)));
|
|
4785
4841
|
}
|
|
4786
4842
|
.sticky--flat::before, .sticky--flat::after { background: var(--_ink); }
|