@usableapp/cardds 0.7.27 → 0.7.29
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 +11 -0
- package/css/layover.css +8 -0
- package/dist/cardds.css +8 -0
- package/dist/sheets/Drawer.d.ts +6 -2
- package/dist/sheets/Drawer.js +5 -3
- package/dist/sheets/Sheet.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.
|
|
4
4
|
|
|
5
|
+
## 0.7.29 — 2026-09-29
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- `Sheet`: lowered to peek by its handle and raised again, the field marked to take the cursor (`data-autofocus` — the open `SheetStep`'s first field, e.g. the first `Pin` cell) takes it back after the slide. Before: only the first arrival did; raised again, the cursor stayed on the handle (timebank login, Lh 2026-09-29). A field that already has the cursor keeps it. Nothing to change in a screen.
|
|
9
|
+
|
|
10
|
+
## 0.7.28 — 2026-09-29
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **The CONFIRM** (Lh 2026-09-29, from timebank's log-out): a `Modal` holding ONLY a `Drawer` (no `Lift`) — a question with nothing to show above it. The Drawer is then the whole card: as tall as its words (not the fixed `--drawer-h` band), one beat in (no second beat for the drawer). Knob `--modal-confirm-pad-y`. Gallery: `Modal · Confirm`.
|
|
14
|
+
- `Drawer light`: the card's paper and dark words instead of the dark end — same layout, same `BtnTrio`; the one solid (`invert`) button turns dark. Knobs `--modal-drawer-light-bg` · `--modal-drawer-light-ink`. Gallery: `Modal · ConfirmLight`.
|
|
15
|
+
|
|
5
16
|
## 0.7.27 — 2026-09-29
|
|
6
17
|
|
|
7
18
|
### Changed
|
package/css/layover.css
CHANGED
|
@@ -73,6 +73,14 @@
|
|
|
73
73
|
--accent: var(--card-3-ink); /* the one solid button inverts on the dark drawer */
|
|
74
74
|
--on-accent: var(--card-3-bg);
|
|
75
75
|
}
|
|
76
|
+
.modal__drawer--light { /* light: the card's paper, dark words (Lh 2026-09-29) — the one solid button turns dark */
|
|
77
|
+
background: var(--modal-drawer-light-bg, var(--card-bg));
|
|
78
|
+
color: var(--modal-drawer-light-ink, var(--card-ink));
|
|
79
|
+
--accent: var(--card-ink);
|
|
80
|
+
--on-accent: var(--card-bg);
|
|
81
|
+
}
|
|
82
|
+
/* the CONFIRM: a Modal with no Lift — the drawer IS the card, as tall as its words (no fixed band, no second beat) */
|
|
83
|
+
.modal:not(:has(> .modal__lift)) > .modal__drawer { height: auto; padding-block: var(--modal-confirm-pad-y, var(--sp-6)); animation: none; }
|
|
76
84
|
.modal__drawer .t-caption { opacity: var(--dim); }
|
|
77
85
|
.modal__drawer .icon-btn { background: transparent; color: inherit; border-color: var(--ink-rail); }
|
|
78
86
|
.modal__drawer .icon-btn--invert { background: var(--accent); color: var(--on-accent); border-color: transparent; width: var(--tap-lg); height: var(--tap-lg); }
|
package/dist/cardds.css
CHANGED
|
@@ -3643,6 +3643,14 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
3643
3643
|
--accent: var(--card-3-ink); /* the one solid button inverts on the dark drawer */
|
|
3644
3644
|
--on-accent: var(--card-3-bg);
|
|
3645
3645
|
}
|
|
3646
|
+
.modal__drawer--light { /* light: the card's paper, dark words (Lh 2026-09-29) — the one solid button turns dark */
|
|
3647
|
+
background: var(--modal-drawer-light-bg, var(--card-bg));
|
|
3648
|
+
color: var(--modal-drawer-light-ink, var(--card-ink));
|
|
3649
|
+
--accent: var(--card-ink);
|
|
3650
|
+
--on-accent: var(--card-bg);
|
|
3651
|
+
}
|
|
3652
|
+
/* the CONFIRM: a Modal with no Lift — the drawer IS the card, as tall as its words (no fixed band, no second beat) */
|
|
3653
|
+
.modal:not(:has(> .modal__lift)) > .modal__drawer { height: auto; padding-block: var(--modal-confirm-pad-y, var(--sp-6)); animation: none; }
|
|
3646
3654
|
.modal__drawer .t-caption { opacity: var(--dim); }
|
|
3647
3655
|
.modal__drawer .icon-btn { background: transparent; color: inherit; border-color: var(--ink-rail); }
|
|
3648
3656
|
.modal__drawer .icon-btn--invert { background: var(--accent); color: var(--on-accent); border-color: transparent; width: var(--tap-lg); height: var(--tap-lg); }
|
package/dist/sheets/Drawer.d.ts
CHANGED
|
@@ -27,9 +27,13 @@ export interface DrawerProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
|
27
27
|
title: ReactNode;
|
|
28
28
|
/** the fine print under it */
|
|
29
29
|
caption?: ReactNode;
|
|
30
|
+
/** a LIGHT drawer: the card's paper and dark words instead of the dark end (Lh 2026-09-29) — same layout, same trio; the one solid button turns dark */
|
|
31
|
+
light?: boolean;
|
|
30
32
|
}
|
|
31
|
-
/** Drawer — the dark end of a `Modal
|
|
32
|
-
|
|
33
|
+
/** Drawer — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and a `BtnTrio` (or two buttons) — plain buttons
|
|
34
|
+
* with the app's `onClick`; the Drawer does nothing with them. A `Modal` holding ONLY a Drawer (no `Lift`) is the CONFIRM: a question with nothing
|
|
35
|
+
* to show above it — the Drawer is the whole card and comes in with it in one beat. */
|
|
36
|
+
export declare function Drawer({ title, caption, light, className, children, ...rest }: DrawerProps): import("react").JSX.Element;
|
|
33
37
|
export interface BtnTrioProps extends ComponentProps<'div'> {
|
|
34
38
|
}
|
|
35
39
|
/** BtnTrio — three round buttons with dotted connectors between them (× · ? · ✓); the middle one inverted. */
|
package/dist/sheets/Drawer.js
CHANGED
|
@@ -48,9 +48,11 @@ export function Modal({ open = true, onClosed, onDismiss, className, ...rest })
|
|
|
48
48
|
export function Lift({ className, ...rest }) {
|
|
49
49
|
return _jsx("div", { className: cx('modal__lift', className), ...rest });
|
|
50
50
|
}
|
|
51
|
-
/** Drawer — the dark end of a `Modal
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
/** Drawer — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and a `BtnTrio` (or two buttons) — plain buttons
|
|
52
|
+
* with the app's `onClick`; the Drawer does nothing with them. A `Modal` holding ONLY a Drawer (no `Lift`) is the CONFIRM: a question with nothing
|
|
53
|
+
* to show above it — the Drawer is the whole card and comes in with it in one beat. */
|
|
54
|
+
export function Drawer({ title, caption, light, className, children, ...rest }) {
|
|
55
|
+
return (_jsxs("div", { className: cx('modal__drawer', light && 'modal__drawer--light', className), ...rest, children: [_jsx("h2", { className: "t-h2", children: title }), caption != null && _jsx("p", { className: "t-caption", children: caption }), children] }));
|
|
54
56
|
}
|
|
55
57
|
/** BtnTrio — three round buttons with dotted connectors between them (× · ? · ✓); the middle one inverted. */
|
|
56
58
|
export function BtnTrio({ className, children, ...rest }) {
|
package/dist/sheets/Sheet.js
CHANGED
|
@@ -80,7 +80,9 @@ export function Sheet({ state, defaultState = 'half', onStateChange, onSettled,
|
|
|
80
80
|
useEffect(() => {
|
|
81
81
|
if (current !== 'peek' && current !== 'away')
|
|
82
82
|
home.current = current;
|
|
83
|
-
|
|
83
|
+
const back = was.current === 'peek' && current !== 'peek' && current !== 'away' && !!ref.current?.querySelector('[data-autofocus]:not([inert] *)')
|
|
84
|
+
&& (!ref.current?.contains(document.activeElement) || document.activeElement === handleRef.current); // raised from peek by the handle: the marked field takes the cursor again (timebank login, Lh 2026-09-29) — never taken from a field that has it
|
|
85
|
+
if ((was.current === 'away' && current !== 'away') || back) { // it just came onto the screen: the cursor goes to what is marked to take it first (`data-autofocus` — a SheetSteps marks its open step's first field), else the handle, for the keyboard user
|
|
84
86
|
// …once it has finished sliding in (Lh 2026-09-24): the keyboard must not come up while the sheet still moves
|
|
85
87
|
const el = ref.current;
|
|
86
88
|
let done = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.29",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "card-first mobile design system, React-first: the components in src/ are thin wrappers over the CSS contract (css/*.css stays the only truth); gallery/ shows every story live (npm run dev), tests/ measures the geometry.",
|