@usableapp/cardds 0.7.41 → 0.7.42
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
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
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.42 — 2026-10-02
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **`CallSheet ways`: a way with no `action`** — a sheet with no button on the page, called by the sheet before it (the app sets `open` to its index from that sheet's foot): a form in several sheets, one after another. Before, every way drew a button. The first way WITH an action is the primary button. Story `CallSheet · Follows`.
|
|
9
|
+
|
|
5
10
|
## 0.7.41 — 2026-10-02
|
|
6
11
|
|
|
7
12
|
### Added
|
|
@@ -15,8 +15,9 @@ export interface CallSheetSheet {
|
|
|
15
15
|
}
|
|
16
16
|
/** one way in: its button and the sheet it calls */
|
|
17
17
|
export interface CallSheetWay {
|
|
18
|
-
/** the button's words
|
|
19
|
-
|
|
18
|
+
/** the button's words. NONE = a sheet with no button on the page: the sheet BEFORE it calls it (the app sets `open` to its
|
|
19
|
+
* index from that sheet's foot) — a form in several sheets, one after another */
|
|
20
|
+
action?: ReactNode;
|
|
20
21
|
/** what that button brings up */
|
|
21
22
|
sheet: CallSheetSheet;
|
|
22
23
|
}
|
|
@@ -21,6 +21,7 @@ export function CallSheet({ media, heading, body, action, sheet, ways, open: ope
|
|
|
21
21
|
const list = ways ?? (sheet ? [{ action, sheet }] : []);
|
|
22
22
|
const [on, set] = useControlled(openProp === undefined ? undefined : index(openProp), index(defaultOpen), onOpenChange && ((next) => onOpenChange(next !== null, next)));
|
|
23
23
|
const [at, setAt] = useState('full');
|
|
24
|
+
const first = list.findIndex((w) => w.action != null); // the first way WITH a button is the primary one
|
|
24
25
|
// a sheet on its way out keeps its body until it has slid away — an emptied sheet sliding down read as a broken one
|
|
25
26
|
const [leaving, setLeaving] = useState(null), [was, setWas] = useState(on);
|
|
26
27
|
if (was !== on) {
|
|
@@ -28,7 +29,7 @@ export function CallSheet({ media, heading, body, action, sheet, ways, open: ope
|
|
|
28
29
|
if (was !== null)
|
|
29
30
|
setLeaving(was);
|
|
30
31
|
}
|
|
31
|
-
return (_jsxs(Screen, { fill: true, ...rest, children: [_jsxs(Step, { children: [_jsxs(Page, { children: [media, _jsx(CardHead, { level: "h1", heading: heading }), typeof body === 'string' ? _jsx(Text, { level: "body", children: body }) : body, _jsx(CtaPack, { children: list.map((w, i) => (_jsx(Btn, { primary: i ===
|
|
32
|
+
return (_jsxs(Screen, { fill: true, ...rest, children: [_jsxs(Step, { children: [_jsxs(Page, { children: [media, _jsx(CardHead, { level: "h1", heading: heading }), typeof body === 'string' ? _jsx(Text, { level: "body", children: body }) : body, _jsx(CtaPack, { children: list.map((w, i) => w.action == null ? null : (_jsx(Btn, { primary: i === first, quiet: i !== first, "aria-expanded": on === i, onClick: () => { setAt('full'); set(i); }, children: w.action }, i))) })] }), list.map(({ sheet: sh }, i) => (_jsxs(Sheet, { state: on === i ? at : 'away', onStateChange: (s) => { if (s === 'away')
|
|
32
33
|
set(null);
|
|
33
34
|
else
|
|
34
35
|
setAt(s); }, onSettled: (s) => { if (s === 'away' && leaving === i)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usableapp/cardds",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.42",
|
|
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.",
|