@usableapp/cardds 0.7.126 → 0.7.127
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 +10 -0
- package/css/actions.css +1 -0
- package/css/finish.css +1 -0
- package/css/tokens.css +1 -1
- package/dist/actions/Btn.d.ts +3 -1
- package/dist/actions/Btn.js +2 -2
- package/dist/cardds.css +3 -1
- package/dist/catalog.json +1 -1
- package/docs/reference.md +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.127 — 2026-10-25
|
|
6
|
+
|
|
7
|
+
`Btn warn`: a pill in the warning ink. The member's own item gets a standard foot: Edit left, cancel right.
|
|
8
|
+
|
|
9
|
+
Components: Btn
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`Btn warn`**: the button's words and icon are in the warning signal ink (`--signal-warn`, knob `--btn-warn-ink`). Use it for a move to think twice about, not an error. Fill, edge and size stay the plain Btn's; under `data-finish="ink"` the edge stays the plain button's too.
|
|
13
|
+
- **Standard: the member's own item** (their request, post, booking). The foot is one line: Edit left, cancel right. `<Foot><Btn><Icon name="pencil" size="xs" /> Edit</Btn><Btn warn><Icon name="x" size="xs" /> Cancel request</Btn></Foot>`. Story `Btn · OwnItemFoot` (new); `docs/reference.md`.
|
|
14
|
+
|
|
5
15
|
## 0.7.126 — 2026-10-25
|
|
6
16
|
|
|
7
17
|
A long `Text expand` keeps its ink when pressed, a banded card's head holds an `under` stamp beside it, and under `lit` a button has no shadow behind it.
|
package/css/actions.css
CHANGED
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
it is ink on whatever it sits on — inherit, or on the dark slot (card--3) it
|
|
154
154
|
would take the light-card action ink and vanish */
|
|
155
155
|
.btn--quiet { background: transparent; color: inherit; border-color: var(--btn-quiet-border, color-mix(in srgb, currentColor 35%, transparent)); }
|
|
156
|
+
.btn--warn { --dark: var(--action-dark); color: var(--btn-warn-ink, var(--signal-warn)); } /* a move to think twice about ("cancel the request"): the signal set's warning, on the button's own paper — its side, not the card's */
|
|
156
157
|
.btn--block { width: 100%; }
|
|
157
158
|
.btn--form { justify-self: center; align-self: center; margin-inline: auto; padding-inline: var(--btn-form-pad-x, calc(var(--sp-base) * 14.5)); /* 58px: "ส่งรหัส OTP" at 213px, 20% longer than at 40px sides (Lh 2026-09-25) */ } /* a form's button: its words + wide sides, centred in a grid (a step) or a block (Lh 2026-09-25) */
|
|
158
159
|
/* xl: the one giant call to action in a tinted card ("Taxi!") */
|
package/css/finish.css
CHANGED
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
[data-finish="ink"] { --card-border: var(--on-surface); --action-border: var(--on-surface); --outline: currentColor; }
|
|
162
162
|
[data-finish="ink"] .card { border: var(--ink-w, 0.15625rem) solid var(--on-surface); box-shadow: var(--ink-off, 0.3125rem) var(--ink-off, 0.3125rem) 0 0 var(--on-surface); }
|
|
163
163
|
[data-finish="ink"] :is(.btn, .chip, .icon-btn:not(.icon-btn-group > *)) { border: var(--ink-w, 0.15625rem) solid currentColor; box-shadow: 0.1875rem 0.1875rem 0 0 currentColor; }
|
|
164
|
+
[data-finish="ink"] .btn--warn { border-color: var(--btn-ink, var(--action-ink)); box-shadow: 0.1875rem 0.1875rem 0 0 var(--btn-ink, var(--action-ink)); } /* the edge stays the plain button's: only the words take the warning */
|
|
164
165
|
[data-finish="ink"] .btn--primary { border-color: var(--on-surface); box-shadow: 0.1875rem 0.1875rem 0 0 var(--on-surface); }
|
|
165
166
|
[data-finish="ink"] .toggle { box-shadow: 0.125rem 0.125rem 0 0 var(--on-surface); }
|
|
166
167
|
[data-finish="ink"] .card--row > .lead { border-width: var(--ink-w, 0.15625rem); }
|
package/css/tokens.css
CHANGED
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
tile) takes its ground's side: `--dark: inherit`. inkGrounds() measures it; docs/reference.md "Ink follows its ground" */
|
|
362
362
|
:where(body, [data-palette], [data-mode], .card, .tile, .modal__drawer, .postcard__front, .postcard__back, .sticky, .post-paper,
|
|
363
363
|
.float-bar__pill, .snackbar__body, .track, .tile-badge, .avatar, .bubble__body, .map__hint, .map__pin, .sheet--paper > :is(.body, .foot),
|
|
364
|
-
.postcard__band, .track__step, .toggle, .chip, .card__face, .card--bands > :is(.head, .foot), .card--bands > .card__face > :is(.head, .foot)) {
|
|
364
|
+
.postcard__band, .track__step, .toggle, .chip, .btn--warn, .card__face, .card--bands > :is(.head, .foot), .card--bands > .card__face > :is(.head, .foot)) {
|
|
365
365
|
--card-ink: color-mix(in srgb, var(--ink-ondark) calc(var(--dark) * 100%), var(--ink-onlight));
|
|
366
366
|
--card-muted: color-mix(in srgb, var(--ink-ondark-muted) calc(var(--dark) * 100%), var(--ink-onlight-muted));
|
|
367
367
|
--on-accent: color-mix(in srgb, var(--ink-ondark) calc(var(--accent-dark) * 100%), var(--ink-onlight));
|
package/dist/actions/Btn.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
|
|
|
4
4
|
primary?: boolean;
|
|
5
5
|
/** ink on whatever it sits on, a faint outline */
|
|
6
6
|
quiet?: boolean;
|
|
7
|
+
/** the warning ink (`--signal-warn`, knob `--btn-warn-ink`), for a move to think twice about: "Cancel request" on the member's own item */
|
|
8
|
+
warn?: boolean;
|
|
7
9
|
/** full width */
|
|
8
10
|
block?: boolean;
|
|
9
11
|
/** 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,
|
|
@@ -19,7 +21,7 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
|
|
|
19
21
|
* Btn — the pill button (48px+ tall). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
20
22
|
* 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
23
|
*/
|
|
22
|
-
export declare function Btn({ primary, quiet, block, form, xl, href, className, type, ...rest }: BtnProps): import("react").DetailedReactHTMLElement<{
|
|
24
|
+
export declare function Btn({ primary, quiet, warn, block, form, xl, href, className, type, ...rest }: BtnProps): import("react").DetailedReactHTMLElement<{
|
|
23
25
|
translate?: "yes" | "no" | undefined | undefined;
|
|
24
26
|
onChange?: import("react").ChangeEventHandler<HTMLButtonElement, Element> | undefined;
|
|
25
27
|
slot?: string | undefined | undefined;
|
package/dist/actions/Btn.js
CHANGED
|
@@ -4,11 +4,11 @@ import { cx } from '../cx.js';
|
|
|
4
4
|
* Btn — the pill button (48px+ tall). Plain by default; `primary` for the one move; `quiet` on tinted cards.
|
|
5
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
|
-
export function Btn({ primary, quiet, block, form, xl, href, className, type, ...rest }) {
|
|
7
|
+
export function Btn({ primary, quiet, warn, block, form, xl, href, className, type, ...rest }) {
|
|
8
8
|
return createElement(href ? 'a' : 'button', {
|
|
9
9
|
href,
|
|
10
10
|
type: href ? undefined : type ?? 'button',
|
|
11
|
-
className: cx('btn', primary && 'btn--primary', quiet && 'btn--quiet', block && 'btn--block', form && 'btn--form', xl && 'btn--xl', className),
|
|
11
|
+
className: cx('btn', primary && 'btn--primary', quiet && 'btn--quiet', warn && 'btn--warn', block && 'btn--block', form && 'btn--form', xl && 'btn--xl', className),
|
|
12
12
|
...rest,
|
|
13
13
|
});
|
|
14
14
|
}
|
package/dist/cardds.css
CHANGED
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
tile) takes its ground's side: `--dark: inherit`. inkGrounds() measures it; docs/reference.md "Ink follows its ground" */
|
|
403
403
|
:where(body, [data-palette], [data-mode], .card, .tile, .modal__drawer, .postcard__front, .postcard__back, .sticky, .post-paper,
|
|
404
404
|
.float-bar__pill, .snackbar__body, .track, .tile-badge, .avatar, .bubble__body, .map__hint, .map__pin, .sheet--paper > :is(.body, .foot),
|
|
405
|
-
.postcard__band, .track__step, .toggle, .chip, .card__face, .card--bands > :is(.head, .foot), .card--bands > .card__face > :is(.head, .foot)) {
|
|
405
|
+
.postcard__band, .track__step, .toggle, .chip, .btn--warn, .card__face, .card--bands > :is(.head, .foot), .card--bands > .card__face > :is(.head, .foot)) {
|
|
406
406
|
--card-ink: color-mix(in srgb, var(--ink-ondark) calc(var(--dark) * 100%), var(--ink-onlight));
|
|
407
407
|
--card-muted: color-mix(in srgb, var(--ink-ondark-muted) calc(var(--dark) * 100%), var(--ink-onlight-muted));
|
|
408
408
|
--on-accent: color-mix(in srgb, var(--ink-ondark) calc(var(--accent-dark) * 100%), var(--ink-onlight));
|
|
@@ -2833,6 +2833,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
2833
2833
|
it is ink on whatever it sits on — inherit, or on the dark slot (card--3) it
|
|
2834
2834
|
would take the light-card action ink and vanish */
|
|
2835
2835
|
.btn--quiet { background: transparent; color: inherit; border-color: var(--btn-quiet-border, color-mix(in srgb, currentColor 35%, transparent)); }
|
|
2836
|
+
.btn--warn { --dark: var(--action-dark); color: var(--btn-warn-ink, var(--signal-warn)); } /* a move to think twice about ("cancel the request"): the signal set's warning, on the button's own paper — its side, not the card's */
|
|
2836
2837
|
.btn--block { width: 100%; }
|
|
2837
2838
|
.btn--form { justify-self: center; align-self: center; margin-inline: auto; padding-inline: var(--btn-form-pad-x, calc(var(--sp-base) * 14.5)); /* 58px: "ส่งรหัส OTP" at 213px, 20% longer than at 40px sides (Lh 2026-09-25) */ } /* a form's button: its words + wide sides, centred in a grid (a step) or a block (Lh 2026-09-25) */
|
|
2838
2839
|
/* xl: the one giant call to action in a tinted card ("Taxi!") */
|
|
@@ -6479,6 +6480,7 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
6479
6480
|
[data-finish="ink"] { --card-border: var(--on-surface); --action-border: var(--on-surface); --outline: currentColor; }
|
|
6480
6481
|
[data-finish="ink"] .card { border: var(--ink-w, 0.15625rem) solid var(--on-surface); box-shadow: var(--ink-off, 0.3125rem) var(--ink-off, 0.3125rem) 0 0 var(--on-surface); }
|
|
6481
6482
|
[data-finish="ink"] :is(.btn, .chip, .icon-btn:not(.icon-btn-group > *)) { border: var(--ink-w, 0.15625rem) solid currentColor; box-shadow: 0.1875rem 0.1875rem 0 0 currentColor; }
|
|
6483
|
+
[data-finish="ink"] .btn--warn { border-color: var(--btn-ink, var(--action-ink)); box-shadow: 0.1875rem 0.1875rem 0 0 var(--btn-ink, var(--action-ink)); } /* the edge stays the plain button's: only the words take the warning */
|
|
6482
6484
|
[data-finish="ink"] .btn--primary { border-color: var(--on-surface); box-shadow: 0.1875rem 0.1875rem 0 0 var(--on-surface); }
|
|
6483
6485
|
[data-finish="ink"] .toggle { box-shadow: 0.125rem 0.125rem 0 0 var(--on-surface); }
|
|
6484
6486
|
[data-finish="ink"] .card--row > .lead { border-width: var(--ink-w, 0.15625rem); }
|