@usableapp/cardds 0.7.26 → 0.7.28

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,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.28 — 2026-09-29
6
+
7
+ ### Added
8
+ - **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`.
9
+ - `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`.
10
+
11
+ ## 0.7.27 — 2026-09-29
12
+
13
+ ### Changed
14
+ - `StackSheet` (so `Home`): the open sheet's back button (chevron down) is HIDDEN for now — Lh 2026-09-29: not used in real work yet. A tap on the open sheet's title still folds it. `backAt="end"` (or `"start"`) brings it back; `Home backAt` passes it through. New value `backAt="none"` = the default.
15
+
5
16
  ## 0.7.26 — 2026-09-29
6
17
 
7
18
  ### Fixed (`cardds check` / ESLint — two holes mailpool found, 2026-09-29)
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); }
@@ -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`: the question, its fine print, and a `BtnTrio` (or two buttons) — plain buttons with the app's `onClick`; the Drawer does nothing with them. */
32
- export declare function Drawer({ title, caption, className, children, ...rest }: DrawerProps): import("react").JSX.Element;
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. */
@@ -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`: the question, its fine print, and a `BtnTrio` (or two buttons) — plain buttons with the app's `onClick`; the Drawer does nothing with them. */
52
- export function Drawer({ title, caption, className, children, ...rest }) {
53
- return (_jsxs("div", { className: cx('modal__drawer', className), ...rest, children: [_jsx("h2", { className: "t-h2", children: title }), caption != null && _jsx("p", { className: "t-caption", children: caption }), children] }));
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 }) {
@@ -26,8 +26,9 @@ export interface StackSheetProps extends Omit<ComponentProps<'article'>, 'title'
26
26
  foot?: ReactNode;
27
27
  /** the back button's label (shown once the sheet is open) */
28
28
  backLabel?: string;
29
- /** where the back button stands: `end` (default — after the tabs, chevron DOWN: the sheet folds down, Lh 2026-09-29) or `start` (before the title, chevron left) */
30
- backAt?: 'start' | 'end';
29
+ /** where the back button stands: `none` (default — hidden for now, Lh 2026-09-29: not used in real work yet; a tap on the open sheet's title folds it) ·
30
+ * `end` (after the tabs, chevron DOWN: the sheet folds down) · `start` (before the title, chevron left) */
31
+ backAt?: 'none' | 'start' | 'end';
31
32
  }
32
33
  /**
33
34
  * StackSheet — ONE sheet of a `SheetStack`, in the one sheet shape: SHEET HEAD (back · title · tabs or an icon) pinned at the top ·
@@ -17,7 +17,7 @@ import { Badge } from '../numbers/Badge.js';
17
17
  * a count shows as a small circle over its icon. The body is the app's: render the page of the chosen tab (and nothing while the sheet
18
18
  * is closed — see `Home`). A direct child of `SheetStack`.
19
19
  */
20
- export function StackSheet({ title, tone, icon, tabs, tab: tabProp, defaultTab, onTabChange, foot, backLabel = 'Back', backAt = 'end', className, children, ...rest }) {
20
+ export function StackSheet({ title, tone, icon, tabs, tab: tabProp, defaultTab, onTabChange, foot, backLabel = 'Back', backAt = 'none', className, children, ...rest }) {
21
21
  const [tab, pick] = useControlled(tabProp, defaultTab ?? tabs?.[0]?.id, onTabChange);
22
22
  // a title longer than its room does not wrap: it runs sideways, like a song title in a short slot — the room it overflows by
23
23
  // is measured here (the tabs may grow with the text size) and handed to the CSS as --_over
@@ -1,7 +1,7 @@
1
1
  import { type ComponentProps, type ReactNode } from 'react';
2
2
  import type { Tone } from '../cards/Card.js';
3
3
  import { Screen } from '../scaffold/Screen.js';
4
- import { type StackSheetTab } from '../sheets/StackSheet.js';
4
+ import { type StackSheetTab, type StackSheetProps } from '../sheets/StackSheet.js';
5
5
  export interface HomeSheet {
6
6
  /** the sheet head's title — an h2 (the page's one h1 is in `base`) */
7
7
  title: ReactNode;
@@ -36,6 +36,8 @@ export interface HomeProps extends Omit<ComponentProps<typeof Screen>, 'children
36
36
  keep?: boolean;
37
37
  /** the open sheet's back button label */
38
38
  backLabel?: string;
39
+ /** the open sheet's back button — see `StackSheet backAt` (default `none`: hidden for now) */
40
+ backAt?: StackSheetProps['backAt'];
39
41
  /** layers over the screen (a SheetStage over + Modal) */
40
42
  children?: ReactNode;
41
43
  }
@@ -46,4 +48,4 @@ export interface HomeProps extends Omit<ComponentProps<typeof Screen>, 'children
46
48
  * at the bottom). A tap on a head brings that sheet up to fill everything under the top. Only the open sheet's body is rendered — three
47
49
  * sections on one home never cost three pages (`keep` holds a body once opened).
48
50
  */
49
- export declare function Home({ top, title, sheets, open: openProp, defaultOpen, onOpenChange, base, keep, backLabel, children, ...rest }: HomeProps): import("react").JSX.Element;
51
+ export declare function Home({ top, title, sheets, open: openProp, defaultOpen, onOpenChange, base, keep, backLabel, backAt, children, ...rest }: HomeProps): import("react").JSX.Element;
@@ -14,7 +14,7 @@ const LEAVE = 800; // ms: a closing sheet keeps its body until it has slid home
14
14
  * at the bottom). A tap on a head brings that sheet up to fill everything under the top. Only the open sheet's body is rendered — three
15
15
  * sections on one home never cost three pages (`keep` holds a body once opened).
16
16
  */
17
- export function Home({ top, title, sheets, open: openProp, defaultOpen = null, onOpenChange, base, keep, backLabel = 'Back', children, ...rest }) {
17
+ export function Home({ top, title, sheets, open: openProp, defaultOpen = null, onOpenChange, base, keep, backLabel = 'Back', backAt, children, ...rest }) {
18
18
  const [open, change] = useControlled(openProp, defaultOpen, onOpenChange);
19
19
  const [leaving, setLeaving] = useState(null);
20
20
  const [seen, setSeen] = useState(() => new Set(open != null ? [open] : []));
@@ -34,5 +34,5 @@ export function Home({ top, title, sheets, open: openProp, defaultOpen = null, o
34
34
  }, [leaving]);
35
35
  const [tabs, setTabs] = useState(() => Object.fromEntries(sheets.map((x, i) => [i, x.defaultTab ?? x.tabs?.[0]?.id])));
36
36
  const shows = (i) => i === open || i === leaving || (keep && seen.has(i));
37
- return (_jsxs(Screen, { fill: true, top: top, ...rest, children: [_jsx(Text, { level: "h1", as: "h1", sr: true, children: title }), _jsx(SheetStack, { closed: true, open: open, onOpenChange: change, base: base, children: sheets.map((s, i) => (_jsx(StackSheet, { tone: s.tone ?? TONES[i], title: s.title, icon: s.icon, tabs: s.tabs, tab: tabs[i], onTabChange: (t) => setTabs((v) => ({ ...v, [i]: t })), backLabel: backLabel, foot: typeof s.foot === 'function' ? s.foot(tabs[i]) : s.foot, children: shows(i) ? (typeof s.body === 'function' ? s.body(tabs[i]) : s.body) : null }, i))) }), children] }));
37
+ return (_jsxs(Screen, { fill: true, top: top, ...rest, children: [_jsx(Text, { level: "h1", as: "h1", sr: true, children: title }), _jsx(SheetStack, { closed: true, open: open, onOpenChange: change, base: base, children: sheets.map((s, i) => (_jsx(StackSheet, { tone: s.tone ?? TONES[i], title: s.title, icon: s.icon, tabs: s.tabs, tab: tabs[i], onTabChange: (t) => setTabs((v) => ({ ...v, [i]: t })), backLabel: backLabel, backAt: backAt, foot: typeof s.foot === 'function' ? s.foot(tabs[i]) : s.foot, children: shows(i) ? (typeof s.body === 'function' ? s.body(tabs[i]) : s.body) : null }, i))) }), children] }));
38
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.7.26",
3
+ "version": "0.7.28",
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.",