@usableapp/cardds 0.7.73 → 0.7.75
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 +41 -0
- package/README.md +13 -10
- package/bin/cardds.mjs +4 -2
- package/css/layover.css +5 -1
- package/css/lists.css +1 -1
- package/dist/actions/{ActionNote.d.ts → BarNote.d.ts} +3 -3
- package/dist/actions/{ActionNote.js → BarNote.js} +2 -2
- package/dist/actions/BtnGroup.d.ts +11 -0
- package/dist/actions/{Segment.js → BtnGroup.js} +4 -4
- package/dist/actions/{WaitLink.d.ts → Countdown.d.ts} +3 -3
- package/dist/actions/{WaitLink.js → Countdown.js} +2 -2
- package/dist/actions/Link.d.ts +2 -2
- package/dist/cardds.css +6 -2
- package/dist/cards/Card.d.ts +1 -1
- package/dist/cards/CardParts.d.ts +1 -1
- package/dist/cards/CardParts.js +1 -1
- package/dist/catalog.json +1 -1
- package/dist/choice/Calendar.d.ts +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.js +7 -7
- package/dist/journey/{TileBadge.d.ts → JourneyBadge.d.ts} +3 -3
- package/dist/journey/{TileBadge.js → JourneyBadge.js} +2 -2
- package/dist/numbers/NumberBand.d.ts +18 -0
- package/dist/numbers/{Band.js → NumberBand.js} +4 -4
- package/dist/post/PostLetter.d.ts +5 -5
- package/dist/scaffold/ActionBar.d.ts +2 -2
- package/dist/scaffold/ActionBar.js +1 -1
- package/dist/scaffold/Centre.d.ts +3 -3
- package/dist/scaffold/Centre.js +3 -3
- package/dist/scaffold/Page.d.ts +1 -1
- package/dist/scaffold/Page.js +1 -1
- package/dist/scaffold/Pager.d.ts +11 -0
- package/dist/scaffold/Pager.js +6 -0
- package/dist/scaffold/Panes.d.ts +2 -2
- package/dist/scaffold/Panes.js +3 -3
- package/dist/scaffold/Screen.d.ts +1 -1
- package/dist/scaffold/Screen.js +1 -1
- package/dist/sheets/{Drawer.d.ts → Modal.d.ts} +13 -13
- package/dist/sheets/{Drawer.js → Modal.js} +10 -10
- package/dist/sheets/Sheet.d.ts +2 -1
- package/dist/sheets/Sheet.js +1 -0
- package/dist/sheets/SheetStack.d.ts +1 -0
- package/dist/sheets/SheetStack.js +1 -0
- package/dist/sheets/SheetSteps.d.ts +2 -2
- package/dist/sheets/SheetSteps.js +1 -1
- package/dist/sheets/StackSheet.d.ts +2 -2
- package/dist/sheets/StackSheet.js +1 -1
- package/dist/templates/CallSheet.d.ts +2 -2
- package/dist/templates/Home.d.ts +1 -1
- package/dist/templates/Walkthrough.d.ts +4 -4
- package/dist/templates/Walkthrough.js +2 -2
- package/lib/catalog.mjs +21 -2
- package/lib/guide.mjs +16 -0
- package/lib/mcp.mjs +3 -2
- package/lint/eslint.mjs +2 -2
- package/lint/rules.mjs +75 -2
- package/package.json +1 -1
- package/dist/actions/Segment.d.ts +0 -11
- package/dist/numbers/Band.d.ts +0 -18
- package/dist/scaffold/PagerAt.d.ts +0 -11
- package/dist/scaffold/PagerAt.js +0 -6
|
@@ -16,9 +16,9 @@ export interface CalendarProps extends Omit<ComponentProps<'div'>, 'title' | 'on
|
|
|
16
16
|
onPrev?: () => void;
|
|
17
17
|
/** the next-month button was tapped: the app turns the month, as with `onPrev` */
|
|
18
18
|
onNext?: () => void;
|
|
19
|
-
/** the previous button's accessible name
|
|
19
|
+
/** the previous button's accessible name — cardds names it in the page's language (`<html lang>`); pass it only for different words */
|
|
20
20
|
prevLabel?: string;
|
|
21
|
-
/** the next button's accessible name
|
|
21
|
+
/** the next button's accessible name — cardds names it in the page's language (`<html lang>`); pass it only for different words */
|
|
22
22
|
nextLabel?: string;
|
|
23
23
|
/** softly marked days */
|
|
24
24
|
marks?: number[];
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export * from './scaffold/Screen.js';
|
|
|
11
11
|
export * from './scaffold/AppBar.js';
|
|
12
12
|
export * from './scaffold/TopBar.js';
|
|
13
13
|
export * from './scaffold/ActionBar.js';
|
|
14
|
-
export * from './scaffold/
|
|
14
|
+
export * from './scaffold/Pager.js';
|
|
15
15
|
export * from './scaffold/Panes.js';
|
|
16
16
|
export * from './scaffold/FloatBar.js';
|
|
17
17
|
export * from './scaffold/FilterRow.js';
|
|
@@ -34,18 +34,18 @@ export * from './sheets/SheetBody.js';
|
|
|
34
34
|
export * from './sheets/SheetStage.js';
|
|
35
35
|
export * from './sheets/Step.js';
|
|
36
36
|
export * from './sheets/SheetSteps.js';
|
|
37
|
-
export * from './sheets/
|
|
37
|
+
export * from './sheets/Modal.js';
|
|
38
38
|
export * from './actions/Btn.js';
|
|
39
39
|
export * from './actions/IconBtn.js';
|
|
40
40
|
export * from './actions/IconBtnGroup.js';
|
|
41
41
|
export * from './actions/Chip.js';
|
|
42
42
|
export * from './actions/Dot.js';
|
|
43
43
|
export * from './actions/Dropdown.js';
|
|
44
|
-
export * from './actions/
|
|
44
|
+
export * from './actions/BtnGroup.js';
|
|
45
45
|
export * from './actions/Fab.js';
|
|
46
46
|
export * from './actions/BtnRow.js';
|
|
47
47
|
export * from './actions/Link.js';
|
|
48
|
-
export * from './actions/
|
|
48
|
+
export * from './actions/Countdown.js';
|
|
49
49
|
export * from './forms/Field.js';
|
|
50
50
|
export * from './forms/FileBtn.js';
|
|
51
51
|
export * from './forms/AddRow.js';
|
|
@@ -60,7 +60,7 @@ export * from './numbers/Ring.js';
|
|
|
60
60
|
export * from './numbers/Progress.js';
|
|
61
61
|
export * from './numbers/Spinner.js';
|
|
62
62
|
export * from './numbers/Track.js';
|
|
63
|
-
export * from './numbers/
|
|
63
|
+
export * from './numbers/NumberBand.js';
|
|
64
64
|
export * from './numbers/DotGrid.js';
|
|
65
65
|
export * from './numbers/Picker.js';
|
|
66
66
|
export * from './numbers/Badge.js';
|
|
@@ -95,11 +95,11 @@ export * from './layover/Banner.js';
|
|
|
95
95
|
export * from './layover/Callout.js';
|
|
96
96
|
export * from './layover/Snackbar.js';
|
|
97
97
|
export * from './journey/Route.js';
|
|
98
|
-
export * from './journey/
|
|
98
|
+
export * from './journey/JourneyBadge.js';
|
|
99
99
|
export * from './journey/NoteRow.js';
|
|
100
100
|
export * from './templates/Walkthrough.js';
|
|
101
101
|
export * from './templates/Home.js';
|
|
102
102
|
export * from './sheets/StackSheet.js';
|
|
103
103
|
export * from './templates/CallSheet.js';
|
|
104
104
|
export * from './templates/Splash.js';
|
|
105
|
-
export * from './actions/
|
|
105
|
+
export * from './actions/BarNote.js';
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export * from './scaffold/Screen.js';
|
|
|
15
15
|
export * from './scaffold/AppBar.js';
|
|
16
16
|
export * from './scaffold/TopBar.js';
|
|
17
17
|
export * from './scaffold/ActionBar.js';
|
|
18
|
-
export * from './scaffold/
|
|
18
|
+
export * from './scaffold/Pager.js';
|
|
19
19
|
export * from './scaffold/Panes.js';
|
|
20
20
|
export * from './scaffold/FloatBar.js';
|
|
21
21
|
export * from './scaffold/FilterRow.js';
|
|
@@ -38,18 +38,18 @@ export * from './sheets/SheetBody.js';
|
|
|
38
38
|
export * from './sheets/SheetStage.js';
|
|
39
39
|
export * from './sheets/Step.js';
|
|
40
40
|
export * from './sheets/SheetSteps.js';
|
|
41
|
-
export * from './sheets/
|
|
41
|
+
export * from './sheets/Modal.js';
|
|
42
42
|
export * from './actions/Btn.js';
|
|
43
43
|
export * from './actions/IconBtn.js';
|
|
44
44
|
export * from './actions/IconBtnGroup.js';
|
|
45
45
|
export * from './actions/Chip.js';
|
|
46
46
|
export * from './actions/Dot.js';
|
|
47
47
|
export * from './actions/Dropdown.js';
|
|
48
|
-
export * from './actions/
|
|
48
|
+
export * from './actions/BtnGroup.js';
|
|
49
49
|
export * from './actions/Fab.js';
|
|
50
50
|
export * from './actions/BtnRow.js';
|
|
51
51
|
export * from './actions/Link.js';
|
|
52
|
-
export * from './actions/
|
|
52
|
+
export * from './actions/Countdown.js';
|
|
53
53
|
export * from './forms/Field.js';
|
|
54
54
|
export * from './forms/FileBtn.js';
|
|
55
55
|
export * from './forms/AddRow.js';
|
|
@@ -64,7 +64,7 @@ export * from './numbers/Ring.js';
|
|
|
64
64
|
export * from './numbers/Progress.js';
|
|
65
65
|
export * from './numbers/Spinner.js';
|
|
66
66
|
export * from './numbers/Track.js';
|
|
67
|
-
export * from './numbers/
|
|
67
|
+
export * from './numbers/NumberBand.js';
|
|
68
68
|
export * from './numbers/DotGrid.js';
|
|
69
69
|
export * from './numbers/Picker.js';
|
|
70
70
|
export * from './numbers/Badge.js';
|
|
@@ -99,11 +99,11 @@ export * from './layover/Banner.js';
|
|
|
99
99
|
export * from './layover/Callout.js';
|
|
100
100
|
export * from './layover/Snackbar.js';
|
|
101
101
|
export * from './journey/Route.js';
|
|
102
|
-
export * from './journey/
|
|
102
|
+
export * from './journey/JourneyBadge.js';
|
|
103
103
|
export * from './journey/NoteRow.js';
|
|
104
104
|
export * from './templates/Walkthrough.js';
|
|
105
105
|
export * from './templates/Home.js';
|
|
106
106
|
export * from './sheets/StackSheet.js';
|
|
107
107
|
export * from './templates/CallSheet.js';
|
|
108
108
|
export * from './templates/Splash.js';
|
|
109
|
-
export * from './actions/
|
|
109
|
+
export * from './actions/BarNote.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface JourneyBadgeProps extends ComponentProps<'span'> {
|
|
3
3
|
/** the small label above ("Gate") */
|
|
4
4
|
label: ReactNode;
|
|
5
5
|
/** the big value ("21") */
|
|
@@ -11,5 +11,5 @@ export interface TileBadgeProps extends ComponentProps<'span'> {
|
|
|
11
11
|
/** pinned to a CardMedia's corner (rating, price) */
|
|
12
12
|
corner?: boolean;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
export declare function
|
|
14
|
+
/** JourneyBadge — a tiny label over a big value: gate, seat, date, rating. */
|
|
15
|
+
export declare function JourneyBadge({ label, value, sub, plain, corner, className, ...rest }: JourneyBadgeProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
-
/**
|
|
4
|
-
export function
|
|
3
|
+
/** JourneyBadge — a tiny label over a big value: gate, seat, date, rating. */
|
|
4
|
+
export function JourneyBadge({ label, value, sub, plain, corner, className, ...rest }) {
|
|
5
5
|
return (_jsxs("span", { className: cx('tile-badge', plain && 'tile-badge--plain', corner && 'tile-badge--corner', className), ...rest, children: [_jsx("span", { className: "tile-badge__label", children: label }), _jsx("span", { className: "tile-badge__value", children: value }), sub != null && _jsx("span", { className: "tile-badge__label", children: sub })] }));
|
|
6
6
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import type { Tone } from '../cards/Card.js';
|
|
3
|
+
export interface NumberBandProps extends ComponentProps<'article'> {
|
|
4
|
+
/** the two-line label (use a `<br />` to break it) */
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
/** the giant number; wrap a unit in `<small>` */
|
|
7
|
+
num: ReactNode;
|
|
8
|
+
/** the footnote under the label */
|
|
9
|
+
foot?: ReactNode;
|
|
10
|
+
/** the paper — see `Tone` */
|
|
11
|
+
tone?: Tone;
|
|
12
|
+
}
|
|
13
|
+
/** NumberBand — a data card: 2-line label · giant number · footnote. Stack several in a NumberBandStack for one boundary with hairlines. */
|
|
14
|
+
export declare function NumberBand({ label, num, foot, tone, className, ...rest }: NumberBandProps): import("react").JSX.Element;
|
|
15
|
+
export interface NumberBandStackProps extends ComponentProps<'div'> {
|
|
16
|
+
}
|
|
17
|
+
/** NumberBandStack — several NumberBands as ONE card boundary, a hairline between each. */
|
|
18
|
+
export declare function NumberBandStack({ className, ...rest }: NumberBandStackProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from '../cx.js';
|
|
3
|
-
/**
|
|
4
|
-
export function
|
|
3
|
+
/** NumberBand — a data card: 2-line label · giant number · footnote. Stack several in a NumberBandStack for one boundary with hairlines. */
|
|
4
|
+
export function NumberBand({ label, num, foot, tone, className, ...rest }) {
|
|
5
5
|
return (_jsxs("article", { className: cx('card card--band', tone && tone !== 1 && `card--${tone}`, className), ...rest, children: [_jsx("span", { className: "band__label", children: label }), _jsx("span", { className: "band__num", children: num }), foot != null && _jsx("span", { className: "band__foot", children: foot })] }));
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
export function
|
|
7
|
+
/** NumberBandStack — several NumberBands as ONE card boundary, a hairline between each. */
|
|
8
|
+
export function NumberBandStack({ className, ...rest }) {
|
|
9
9
|
return _jsx("div", { className: cx('band-stack', className), ...rest });
|
|
10
10
|
}
|
|
@@ -32,15 +32,15 @@ export interface PostLetterProps extends ComponentProps<'div'> {
|
|
|
32
32
|
sign?: ReactNode;
|
|
33
33
|
/** one line under the card: the trip it made */
|
|
34
34
|
journey?: ReactNode;
|
|
35
|
-
/** the tab's words while the picture is in front
|
|
35
|
+
/** the tab's words while the picture is in front — cardds names it in the page's language (`<html lang>`); pass it only for different words */
|
|
36
36
|
backLabel?: string;
|
|
37
|
-
/** the tab's words while the back is in front */
|
|
37
|
+
/** the tab's words while the back is in front — named by cardds like `backLabel`; pass it only for different words */
|
|
38
38
|
pictureLabel?: string;
|
|
39
|
-
/** the play control's name while the note is paused
|
|
39
|
+
/** the play control's name while the note is paused — named by cardds in the page's language (`<html lang>`); pass it only for different words */
|
|
40
40
|
playLabel?: string;
|
|
41
|
-
/** the play control's name while the note plays
|
|
41
|
+
/** the play control's name while the note plays — named by cardds like `playLabel`; pass it only for different words */
|
|
42
42
|
pauseLabel?: string;
|
|
43
|
-
/** the small word before the name
|
|
43
|
+
/** the small word before the name — named by cardds in the page's language (`<html lang>`); pass it only for different words */
|
|
44
44
|
toLabel?: ReactNode;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -9,13 +9,13 @@ export interface ActionBarProps extends ComponentProps<'div'> {
|
|
|
9
9
|
* ActionBar — the screen's ONE move: the Screen's `bottom` (`<Screen fill bottom={<ActionBar…>}>`), the last part of its flex
|
|
10
10
|
* column, as tall as its rows. Never after `</Screen>`, never positioned by hand.
|
|
11
11
|
* Plain: one wide primary Btn (the step that commits).
|
|
12
|
-
* `pager`: Back + Next as peers
|
|
12
|
+
* `pager`: the pager bar — Back + Next as peers, buttons only. The `Pager` (the dots that say where the walk is) is a different thing: it may be the bar's first row (a Walkthrough).
|
|
13
13
|
* `tiers`: an ActionBarTier with a control (a Slider) above the button tier.
|
|
14
14
|
* In a `Screen fill` it is a layer over the content's foot; on a scrolling Screen a sticky last row.
|
|
15
15
|
*/
|
|
16
16
|
export declare function ActionBar({ variant, inline, className, style, ...rest }: ActionBarProps): import("react").JSX.Element;
|
|
17
17
|
export interface ActionBarTierProps extends ComponentProps<'div'> {
|
|
18
|
-
/** the tier that holds the round pager (two IconBtns at the edges) */
|
|
18
|
+
/** the tier that holds the round pager bar (two IconBtns at the edges) */
|
|
19
19
|
pager?: boolean;
|
|
20
20
|
}
|
|
21
21
|
/** ActionBarTier — one row inside an `ActionBar variant="tiers"`: a control row, or the pager row. */
|
|
@@ -4,7 +4,7 @@ import { cx } from '../cx.js';
|
|
|
4
4
|
* ActionBar — the screen's ONE move: the Screen's `bottom` (`<Screen fill bottom={<ActionBar…>}>`), the last part of its flex
|
|
5
5
|
* column, as tall as its rows. Never after `</Screen>`, never positioned by hand.
|
|
6
6
|
* Plain: one wide primary Btn (the step that commits).
|
|
7
|
-
* `pager`: Back + Next as peers
|
|
7
|
+
* `pager`: the pager bar — Back + Next as peers, buttons only. The `Pager` (the dots that say where the walk is) is a different thing: it may be the bar's first row (a Walkthrough).
|
|
8
8
|
* `tiers`: an ActionBarTier with a control (a Slider) above the button tier.
|
|
9
9
|
* In a `Screen fill` it is a layer over the content's foot; on a scrolling Screen a sticky last row.
|
|
10
10
|
*/
|
|
@@ -3,7 +3,7 @@ export interface CentreProps extends ComponentProps<'div'> {
|
|
|
3
3
|
}
|
|
4
4
|
/**
|
|
5
5
|
* Centre — the centred group: ONE thing to read at the human centre of the screen, when that thing is not a lone
|
|
6
|
-
* card: an EmptyState; a Card with its quiet second Btn and the
|
|
6
|
+
* card: an EmptyState; a Card with its quiet second Btn and the Pager under it.
|
|
7
7
|
* On a plain `Screen` (the usual case, Lh 2026-09-12) it is in flow: the column is one phone tall, the group takes
|
|
8
8
|
* the room after the TopBar and centres a short card; a long card makes the page longer and scrolls up under the
|
|
9
9
|
* bar — nothing is capped, nothing shrinks. On a `Screen fill` it floats at 40% down (`--screen-centre`), capped
|
|
@@ -17,8 +17,8 @@ export interface PagesProps extends ComponentProps<'div'> {
|
|
|
17
17
|
* Pages — the pages of a walk, all one height: every page is rendered, stacked in one cell as tall as the
|
|
18
18
|
* tallest at any text size. Give the current one `aria-current="step"` and every other one `inert`
|
|
19
19
|
* (hidden in place, out of the tab order). Turn with slideTo().
|
|
20
|
-
* Pages of cards: `Card`s, inside a Centre, above the
|
|
21
|
-
* reading block (no Sheet on that screen — a pager never works beside one), the round pager in the ActionBar.
|
|
20
|
+
* Pages of cards: `Card`s, inside a Centre, above the Pager. Pages of words: `Page`s, as a Step's
|
|
21
|
+
* reading block (no Sheet on that screen — a pager bar never works beside one), the round pager bar in the ActionBar.
|
|
22
22
|
*/
|
|
23
23
|
export declare function Pages({ className, ...rest }: PagesProps): import("react").JSX.Element;
|
|
24
24
|
/** the direction a Centre's card slides: `next` — out to the left, the new one in from the right; `back` — the reverse */
|
package/dist/scaffold/Centre.js
CHANGED
|
@@ -3,7 +3,7 @@ import { flushSync } from 'react-dom';
|
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
/**
|
|
5
5
|
* Centre — the centred group: ONE thing to read at the human centre of the screen, when that thing is not a lone
|
|
6
|
-
* card: an EmptyState; a Card with its quiet second Btn and the
|
|
6
|
+
* card: an EmptyState; a Card with its quiet second Btn and the Pager under it.
|
|
7
7
|
* On a plain `Screen` (the usual case, Lh 2026-09-12) it is in flow: the column is one phone tall, the group takes
|
|
8
8
|
* the room after the TopBar and centres a short card; a long card makes the page longer and scrolls up under the
|
|
9
9
|
* bar — nothing is capped, nothing shrinks. On a `Screen fill` it floats at 40% down (`--screen-centre`), capped
|
|
@@ -17,8 +17,8 @@ export function Centre({ className, ...rest }) {
|
|
|
17
17
|
* Pages — the pages of a walk, all one height: every page is rendered, stacked in one cell as tall as the
|
|
18
18
|
* tallest at any text size. Give the current one `aria-current="step"` and every other one `inert`
|
|
19
19
|
* (hidden in place, out of the tab order). Turn with slideTo().
|
|
20
|
-
* Pages of cards: `Card`s, inside a Centre, above the
|
|
21
|
-
* reading block (no Sheet on that screen — a pager never works beside one), the round pager in the ActionBar.
|
|
20
|
+
* Pages of cards: `Card`s, inside a Centre, above the Pager. Pages of words: `Page`s, as a Step's
|
|
21
|
+
* reading block (no Sheet on that screen — a pager bar never works beside one), the round pager bar in the ActionBar.
|
|
22
22
|
*/
|
|
23
23
|
export function Pages({ className, ...rest }) {
|
|
24
24
|
return _jsx("div", { className: cx('pages', className), ...rest });
|
package/dist/scaffold/Page.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface PageProps extends ComponentProps<'section'> {
|
|
|
6
6
|
/**
|
|
7
7
|
* Page — ONE page of words in the content: a picture (optional, first — it stays put while the words scroll), a heading, the words,
|
|
8
8
|
* maybe a CtaPack. A component INSIDE the content box, never the box itself (Lh 2026-09-23): several Pages in a `Pages` = a walk the
|
|
9
|
-
* pager turns (slideTo); a single one sits in the content (a Step) directly. Was BaseContent until 2026-09-23 — "words on the base" meant
|
|
9
|
+
* pager bar turns (slideTo); a single one sits in the content (a Step) directly. Was BaseContent until 2026-09-23 — "words on the base" meant
|
|
10
10
|
* a still, one-scaffold screen, which is gone.
|
|
11
11
|
*/
|
|
12
12
|
export declare function Page({ bleed, className, ...rest }: PageProps): import("react").JSX.Element;
|
package/dist/scaffold/Page.js
CHANGED
|
@@ -3,7 +3,7 @@ import { cx } from '../cx.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Page — ONE page of words in the content: a picture (optional, first — it stays put while the words scroll), a heading, the words,
|
|
5
5
|
* maybe a CtaPack. A component INSIDE the content box, never the box itself (Lh 2026-09-23): several Pages in a `Pages` = a walk the
|
|
6
|
-
* pager turns (slideTo); a single one sits in the content (a Step) directly. Was BaseContent until 2026-09-23 — "words on the base" meant
|
|
6
|
+
* pager bar turns (slideTo); a single one sits in the content (a Step) directly. Was BaseContent until 2026-09-23 — "words on the base" meant
|
|
7
7
|
* a still, one-scaffold screen, which is gone.
|
|
8
8
|
*/
|
|
9
9
|
export function Page({ bleed, className, ...rest }) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface PagerProps extends Omit<ComponentProps<'span'>, 'children'> {
|
|
3
|
+
/** the current page, 1-based */
|
|
4
|
+
at: number;
|
|
5
|
+
/** how many pages */
|
|
6
|
+
of: number;
|
|
7
|
+
/** accessible name; defaults to "Page {at} of {of}" */
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Pager — the "where am I" dots: one accent dot at the current page. Under the card that changes (a child of Centre), or a Step's child after its Pages — pinned to the base's foot. One per walk, never inside a page; in a Walkthrough it is the bottom layer's first row (an ActionBar child, centred). */
|
|
11
|
+
export declare function Pager({ at, of, label, className, ...rest }: PagerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from '../cx.js';
|
|
3
|
+
/** Pager — the "where am I" dots: one accent dot at the current page. Under the card that changes (a child of Centre), or a Step's child after its Pages — pinned to the base's foot. One per walk, never inside a page; in a Walkthrough it is the bottom layer's first row (an ActionBar child, centred). */
|
|
4
|
+
export function Pager({ at, of, label, className, ...rest }) {
|
|
5
|
+
return (_jsx("span", { className: cx('pager__at', className), role: "img", "aria-label": label ?? `Page ${at} of ${of}`, ...rest, children: Array.from({ length: of }, (_, i) => _jsx("i", { className: i + 1 === at ? 'is-at' : undefined }, i)) }));
|
|
6
|
+
}
|
package/dist/scaffold/Panes.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps } from 'react';
|
|
2
2
|
export interface PanesProps extends Omit<ComponentProps<'div'>, 'onChange'> {
|
|
3
|
-
/** CONTROLLED: the pane in sight (0-based). The app owns it — pair it with `onAtChange`; a `
|
|
3
|
+
/** CONTROLLED: the pane in sight (0-based). The app owns it — pair it with `onAtChange`; a `BtnGroup` beside it sets the same number. */
|
|
4
4
|
at?: number;
|
|
5
5
|
/** UNCONTROLLED: the pane it starts on (default 0) */
|
|
6
6
|
defaultAt?: number;
|
|
@@ -14,7 +14,7 @@ export interface PanesProps extends Omit<ComponentProps<'div'>, 'onChange'> {
|
|
|
14
14
|
/**
|
|
15
15
|
* Panes — a few panes side by side INSIDE a card or a sheet, one in sight: the member swipes left / right to the next, the dots
|
|
16
16
|
* under them say where (Lh 2026-10-02). Children are `Pane`s. It holds a number, controlled like an input: `at` + `onAtChange`, or
|
|
17
|
-
* `defaultAt` — so a `
|
|
17
|
+
* `defaultAt` — so a `BtnGroup` over it (the app's wiring) names the panes and moves to one by a tap; the swipe is never the only way.
|
|
18
18
|
* Not a walk: pages of words on the base are `Pages`. The panes out of sight are `inert`.
|
|
19
19
|
*/
|
|
20
20
|
export declare function Panes({ at, defaultAt, onAtChange, dots, label, className, children, ...rest }: PanesProps): import("react").JSX.Element;
|
package/dist/scaffold/Panes.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Children, cloneElement, isValidElement, useEffect, useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { reducedMotion, useControlled, watchSize } from '../state.js';
|
|
4
4
|
import { cx } from '../cx.js';
|
|
5
|
-
import {
|
|
5
|
+
import { Pager } from './Pager.js';
|
|
6
6
|
/**
|
|
7
7
|
* Panes — a few panes side by side INSIDE a card or a sheet, one in sight: the member swipes left / right to the next, the dots
|
|
8
8
|
* under them say where (Lh 2026-10-02). Children are `Pane`s. It holds a number, controlled like an input: `at` + `onAtChange`, or
|
|
9
|
-
* `defaultAt` — so a `
|
|
9
|
+
* `defaultAt` — so a `BtnGroup` over it (the app's wiring) names the panes and moves to one by a tap; the swipe is never the only way.
|
|
10
10
|
* Not a walk: pages of words on the base are `Pages`. The panes out of sight are `inert`.
|
|
11
11
|
*/
|
|
12
12
|
export function Panes({ at, defaultAt = 0, onAtChange, dots = true, label, className, children, ...rest }) {
|
|
@@ -37,7 +37,7 @@ export function Panes({ at, defaultAt = 0, onAtChange, dots = true, label, class
|
|
|
37
37
|
request(Math.min(panes.length - 1, Math.max(0, Math.round(r.scrollLeft / r.clientWidth))));
|
|
38
38
|
}, 120);
|
|
39
39
|
};
|
|
40
|
-
return (_jsxs("div", { className: cx('panes', className), role: "group", "aria-label": label, ...rest, children: [_jsx("div", { className: "panes__rail", ref: rail, onScroll: scrolled, children: panes.map((p, i) => cloneElement(p, { inert: i !== current || undefined })) }), dots && panes.length > 1 && _jsx(
|
|
40
|
+
return (_jsxs("div", { className: cx('panes', className), role: "group", "aria-label": label, ...rest, children: [_jsx("div", { className: "panes__rail", ref: rail, onScroll: scrolled, children: panes.map((p, i) => cloneElement(p, { inert: i !== current || undefined })) }), dots && panes.length > 1 && _jsx(Pager, { at: current + 1, of: panes.length })] }));
|
|
41
41
|
}
|
|
42
42
|
/** Pane — one pane of a `Panes`: components one after another, as in a card. */
|
|
43
43
|
export function Pane({ className, ...rest }) {
|
|
@@ -21,7 +21,7 @@ export interface ScreenProps extends ComponentProps<'div'> {
|
|
|
21
21
|
* Screen — the mobile screen in THREE parts: **top** and **content** (the children) in one flex column, the content down to the
|
|
22
22
|
* screen's foot; **bottom** a LAYER over it there (Lh 2026-09-23). Top = `TopBar` / `AppBar`, or `top="lead"` (no bar, the words start
|
|
23
23
|
* 15% down). Content = a box of components one after another — a `Step` (`Pages` of `Page`s / a `Page` [+ `Sheet`]), a `Centre`, a
|
|
24
|
-
* `SheetStack`… Bottom = an `ActionBar` (the walk's `
|
|
24
|
+
* `SheetStack`… Bottom = an `ActionBar` (the walk's `Pager` its first row) or a `FloatBar`, covering the content's foot on purpose. Max 34.375rem (550px) wide, the standard inset, no vertical padding. A plain Screen (no `fill`) scrolls.
|
|
25
25
|
* ONE OUTCOME, DRAWN ONCE (Lh 2026-10-01): a screen that can come out more than one way is not drawn until the app knows which —
|
|
26
26
|
* `ready={false}` until then.
|
|
27
27
|
* The slots set the order; children laid by hand in the same order still work.
|
package/dist/scaffold/Screen.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cx } from '../cx.js';
|
|
|
5
5
|
* Screen — the mobile screen in THREE parts: **top** and **content** (the children) in one flex column, the content down to the
|
|
6
6
|
* screen's foot; **bottom** a LAYER over it there (Lh 2026-09-23). Top = `TopBar` / `AppBar`, or `top="lead"` (no bar, the words start
|
|
7
7
|
* 15% down). Content = a box of components one after another — a `Step` (`Pages` of `Page`s / a `Page` [+ `Sheet`]), a `Centre`, a
|
|
8
|
-
* `SheetStack`… Bottom = an `ActionBar` (the walk's `
|
|
8
|
+
* `SheetStack`… Bottom = an `ActionBar` (the walk's `Pager` its first row) or a `FloatBar`, covering the content's foot on purpose. Max 34.375rem (550px) wide, the standard inset, no vertical padding. A plain Screen (no `fill`) scrolls.
|
|
9
9
|
* ONE OUTCOME, DRAWN ONCE (Lh 2026-10-01): a screen that can come out more than one way is not drawn until the app knows which —
|
|
10
10
|
* `ready={false}` until then.
|
|
11
11
|
* The slots set the order; children laid by hand in the same order still work.
|
|
@@ -10,30 +10,30 @@ export interface ModalProps extends ComponentProps<'article'> {
|
|
|
10
10
|
onDismiss?: (reason: 'scrim' | 'escape') => void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Modal — the ask: ONE card at the centre of a `SheetStage dim`, two parts — a `
|
|
14
|
-
* when tall) and a `
|
|
15
|
-
* out below while the
|
|
13
|
+
* Modal — the ask: ONE card at the centre of a `SheetStage dim`, two parts — a `ModalBody` (the thing being asked about, light, scrolls
|
|
14
|
+
* when tall) and a `ModalAsk` (the dark end that asks). No border. Two beats on appearing: drops in from above, then the ModalAsk comes
|
|
15
|
+
* out below while the ModalBody moves up.
|
|
16
16
|
* A COMPONENT, not a wiring: it does not know its buttons. They are plain `IconBtn`s / `Btn`s with the app's `onClick` — the app
|
|
17
17
|
* records the answer and sets `open={false}`; the modal's one behaviour is how it leaves. `onDismiss` asks to leave unanswered (a tap on
|
|
18
|
-
* the scrim, Esc).
|
|
18
|
+
* the scrim, Esc). When it has arrived, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the question — write no focus code.
|
|
19
19
|
*/
|
|
20
20
|
export declare function Modal({ open, onClosed, onDismiss, className, ...rest }: ModalProps): import("react").JSX.Element;
|
|
21
|
-
export interface
|
|
21
|
+
export interface ModalBodyProps extends ComponentProps<'div'> {
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
export declare function
|
|
25
|
-
export interface
|
|
23
|
+
/** ModalBody — the light part of a `Modal`: the case, request or item the question is about (a CardHead, rows, a timeline); scrolls inside when tall. */
|
|
24
|
+
export declare function ModalBody({ className, ...rest }: ModalBodyProps): import("react").JSX.Element;
|
|
25
|
+
export interface ModalAskProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
26
26
|
/** the question */
|
|
27
27
|
title: ReactNode;
|
|
28
28
|
/** the fine print under it */
|
|
29
29
|
caption?: ReactNode;
|
|
30
|
-
/** a LIGHT
|
|
30
|
+
/** a LIGHT ModalAsk: 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
31
|
light?: boolean;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* with the app's `onClick`; the
|
|
35
|
-
* to show above it — the
|
|
36
|
-
export declare function
|
|
33
|
+
/** ModalAsk — 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 ModalAsk does nothing with them. A `Modal` holding ONLY a ModalAsk (no `ModalBody`) is the CONFIRM: a question with nothing
|
|
35
|
+
* to show above it — the ModalAsk is the whole card and comes in with it in one beat. */
|
|
36
|
+
export declare function ModalAsk({ title, caption, light, className, children, ...rest }: ModalAskProps): import("react").JSX.Element;
|
|
37
37
|
export interface BtnTrioProps extends ComponentProps<'div'> {
|
|
38
38
|
}
|
|
39
39
|
/** BtnTrio — three round buttons with dotted connectors between them (× · ? · ✓); the middle one inverted. */
|
|
@@ -3,12 +3,12 @@ import { Children, Fragment, useEffect, useRef } from 'react';
|
|
|
3
3
|
import { focusWhenActive, useLatest } from '../state.js';
|
|
4
4
|
import { cx } from '../cx.js';
|
|
5
5
|
/**
|
|
6
|
-
* Modal — the ask: ONE card at the centre of a `SheetStage dim`, two parts — a `
|
|
7
|
-
* when tall) and a `
|
|
8
|
-
* out below while the
|
|
6
|
+
* Modal — the ask: ONE card at the centre of a `SheetStage dim`, two parts — a `ModalBody` (the thing being asked about, light, scrolls
|
|
7
|
+
* when tall) and a `ModalAsk` (the dark end that asks). No border. Two beats on appearing: drops in from above, then the ModalAsk comes
|
|
8
|
+
* out below while the ModalBody moves up.
|
|
9
9
|
* A COMPONENT, not a wiring: it does not know its buttons. They are plain `IconBtn`s / `Btn`s with the app's `onClick` — the app
|
|
10
10
|
* records the answer and sets `open={false}`; the modal's one behaviour is how it leaves. `onDismiss` asks to leave unanswered (a tap on
|
|
11
|
-
* the scrim, Esc).
|
|
11
|
+
* the scrim, Esc). When it has arrived, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the question — write no focus code.
|
|
12
12
|
*/
|
|
13
13
|
export function Modal({ open = true, onClosed, onDismiss, className, ...rest }) {
|
|
14
14
|
const ref = useRef(null);
|
|
@@ -54,14 +54,14 @@ export function Modal({ open = true, onClosed, onDismiss, className, ...rest })
|
|
|
54
54
|
}, [has, open]);
|
|
55
55
|
return _jsx("article", { ref: ref, className: cx('card modal', className), ...rest });
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
export function
|
|
57
|
+
/** ModalBody — the light part of a `Modal`: the case, request or item the question is about (a CardHead, rows, a timeline); scrolls inside when tall. */
|
|
58
|
+
export function ModalBody({ className, ...rest }) {
|
|
59
59
|
return _jsx("div", { className: cx('modal__lift', className), ...rest });
|
|
60
60
|
}
|
|
61
|
-
/**
|
|
62
|
-
* with the app's `onClick`; the
|
|
63
|
-
* to show above it — the
|
|
64
|
-
export function
|
|
61
|
+
/** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and a `BtnTrio` (or two buttons) — plain buttons
|
|
62
|
+
* with the app's `onClick`; the ModalAsk does nothing with them. A `Modal` holding ONLY a ModalAsk (no `ModalBody`) is the CONFIRM: a question with nothing
|
|
63
|
+
* to show above it — the ModalAsk is the whole card and comes in with it in one beat. */
|
|
64
|
+
export function ModalAsk({ title, caption, light, className, children, ...rest }) {
|
|
65
65
|
return (_jsxs("div", { className: cx('modal__drawer', light && 'modal__drawer--light', className), ...rest, children: [_jsx("h2", { className: "t-h2", tabIndex: -1, children: title }), caption != null && _jsx("p", { className: "t-caption", children: caption }), children] }));
|
|
66
66
|
}
|
|
67
67
|
/** BtnTrio — three round buttons with dotted connectors between them (× · ? · ✓); the middle one inverted. */
|
package/dist/sheets/Sheet.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface SheetProps extends Omit<ComponentProps<'article'>, 'onChange'>
|
|
|
19
19
|
onSettled?: (state: SheetState) => void;
|
|
20
20
|
/** the states a drag snaps to and a reveal may climb through — "peek half full", or an array (default all four) */
|
|
21
21
|
states?: string | readonly Resting[];
|
|
22
|
-
/** the grab handle; `false` for a sheet with no handle
|
|
22
|
+
/** the grab handle; `false` for a sheet with no handle. cardds names it in the page's language (`<html lang>`) — a string is for different words only */
|
|
23
23
|
handle?: boolean | string;
|
|
24
24
|
/** the grab mark. `line` (default) or `dots`: both sit in the card's top padding, the same distance from the edge, so the title does not move */
|
|
25
25
|
mark?: 'line' | 'dots';
|
|
@@ -50,5 +50,6 @@ export interface SheetProps extends Omit<ComponentProps<'article'>, 'onChange'>
|
|
|
50
50
|
* fixed habit of every sheet. A sheet asked up in the same box meanwhile waits for it: "one left, another came", never two sheets
|
|
51
51
|
* crossing and never one continuous move, whatever the app's wiring (both states set in one render, or the next raised from the
|
|
52
52
|
* first's `onSettled`) — the app adds no timer.
|
|
53
|
+
* The CURSOR is cardds's too: once it has come up it waits in the field marked `data-autofocus`, else the first field, else the heading — write no `autoFocus` or `.focus()` for it.
|
|
53
54
|
*/
|
|
54
55
|
export declare function Sheet({ state, defaultState, onStateChange, onSettled, states, handle, mark, refreshing, tone, paper, className, children, onFocus, ...rest }: SheetProps): import("react").JSX.Element;
|
package/dist/sheets/Sheet.js
CHANGED
|
@@ -37,6 +37,7 @@ function markLong(node, long) {
|
|
|
37
37
|
* fixed habit of every sheet. A sheet asked up in the same box meanwhile waits for it: "one left, another came", never two sheets
|
|
38
38
|
* crossing and never one continuous move, whatever the app's wiring (both states set in one render, or the next raised from the
|
|
39
39
|
* first's `onSettled`) — the app adds no timer.
|
|
40
|
+
* The CURSOR is cardds's too: once it has come up it waits in the field marked `data-autofocus`, else the first field, else the heading — write no `autoFocus` or `.focus()` for it.
|
|
40
41
|
*/
|
|
41
42
|
export function Sheet({ state, defaultState = 'half', onStateChange, onSettled, states, handle = true, mark = 'line', refreshing, tone, paper, className, children, onFocus, ...rest }) {
|
|
42
43
|
const [current, request] = useControlled(state, defaultState, onStateChange);
|
|
@@ -38,5 +38,6 @@ export interface SheetStackProps extends ComponentProps<'div'> {
|
|
|
38
38
|
* the phone's back button can open and close a section. WHAT the sheet does with that, and with `refreshing`, lives on the card (`stack`):
|
|
39
39
|
* the place classes, the grip, the pull. The stack only says which index. Sheets are rigid — the open one slides up, the ones after it leave
|
|
40
40
|
* below, the ones before tuck under nearest-first; closing reverses in two beats. Only `translate` (stack.css); never a size.
|
|
41
|
+
* The CURSOR is cardds's: a sheet that opens takes it in the field marked `data-autofocus`, else the first field, else the heading — write no `autoFocus` or `.focus()` for it.
|
|
41
42
|
*/
|
|
42
43
|
export declare function SheetStack({ mode, open, defaultOpen, onOpenChange, onRefresh, refreshing, mark, fanned, closed, rise, base, className, children, onClickCapture, onPointerDownCapture, ref: passed, ...rest }: SheetStackProps): import("react").JSX.Element;
|
|
@@ -55,6 +55,7 @@ function stamp(child, place) {
|
|
|
55
55
|
* the phone's back button can open and close a section. WHAT the sheet does with that, and with `refreshing`, lives on the card (`stack`):
|
|
56
56
|
* the place classes, the grip, the pull. The stack only says which index. Sheets are rigid — the open one slides up, the ones after it leave
|
|
57
57
|
* below, the ones before tuck under nearest-first; closing reverses in two beats. Only `translate` (stack.css); never a size.
|
|
58
|
+
* The CURSOR is cardds's: a sheet that opens takes it in the field marked `data-autofocus`, else the first field, else the heading — write no `autoFocus` or `.focus()` for it.
|
|
58
59
|
*/
|
|
59
60
|
export function SheetStack({ mode = 'tap', open, defaultOpen = null, onOpenChange, onRefresh, refreshing = null, mark = 'dots', fanned, closed, rise = 'under', base, className, children, onClickCapture, onPointerDownCapture, ref: passed, ...rest }) {
|
|
60
61
|
const [current, request] = useControlled(open, defaultOpen, onOpenChange);
|
|
@@ -40,7 +40,7 @@ export interface SheetStepProps extends Omit<ComponentProps<'li'>, 'title'> {
|
|
|
40
40
|
summary?: ReactNode;
|
|
41
41
|
/** the member may pass this step without doing it: a small link at its end moves on (reason `skip`) */
|
|
42
42
|
skippable?: boolean;
|
|
43
|
-
/** the skip link's words (
|
|
43
|
+
/** the skip link's words — cardds names it in the page's language (`<html lang>`); pass it only for different words */
|
|
44
44
|
skipLabel?: ReactNode;
|
|
45
45
|
/** what went wrong, in words — one line UNDER the step's button (an alert icon, `--signal-error`, read out at once): the number
|
|
46
46
|
* is not a phone number, no signal, the code could not be sent, the two PINs differ. The step stays where it is; to send the
|
|
@@ -50,5 +50,5 @@ export interface SheetStepProps extends Omit<ComponentProps<'li'>, 'title'> {
|
|
|
50
50
|
* step's buttons take no taps meanwhile. The app moves `at` when the answer is good, or sets `error`. */
|
|
51
51
|
busy?: ReactNode;
|
|
52
52
|
}
|
|
53
|
-
/** SheetStep — one step of a SheetSteps: its title, then what the member does (a Field, a Pin, a Toggle, the step's own Btn). */
|
|
53
|
+
/** SheetStep — one step of a SheetSteps: its title, then what the member does (a Field, a Pin, a Toggle, the step's own Btn). When it opens, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the title — write no focus code. */
|
|
54
54
|
export declare function SheetStep({ title, summary, skippable, skipLabel, error, busy, className, children, ...rest }: SheetStepProps): import("react").JSX.Element;
|
|
@@ -201,7 +201,7 @@ function useStepChecks(off, park) {
|
|
|
201
201
|
};
|
|
202
202
|
return { note, group, press };
|
|
203
203
|
}
|
|
204
|
-
/** SheetStep — one step of a SheetSteps: its title, then what the member does (a Field, a Pin, a Toggle, the step's own Btn). */
|
|
204
|
+
/** SheetStep — one step of a SheetSteps: its title, then what the member does (a Field, a Pin, a Toggle, the step's own Btn). When it opens, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the title — write no focus code. */
|
|
205
205
|
export function SheetStep({ title, summary, skippable, skipLabel = word('skip'), error, busy, className, children, ...rest }) {
|
|
206
206
|
const ctx = useContext(StepCtx);
|
|
207
207
|
if (!ctx)
|
|
@@ -29,7 +29,7 @@ export interface StackSheetProps extends Omit<ComponentProps<'article'>, 'title'
|
|
|
29
29
|
onTabChange?: (tab: string) => void;
|
|
30
30
|
/** the SHEET FOOT: the CTA at the sheet's bottom (one row) */
|
|
31
31
|
foot?: ReactNode;
|
|
32
|
-
/** the back button's label (shown once the sheet is open) */
|
|
32
|
+
/** the back button's label (shown once the sheet is open) — cardds names it in the page's language (`<html lang>`); pass it only for different words */
|
|
33
33
|
backLabel?: string;
|
|
34
34
|
/** 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) ·
|
|
35
35
|
* `end` (after the tabs, chevron DOWN: the sheet folds down) · `start` (before the title, chevron left) */
|
|
@@ -42,6 +42,6 @@ export interface StackSheetProps extends Omit<ComponentProps<'article'>, 'title'
|
|
|
42
42
|
* SHEET BODY (the children; scrolls) · SHEET FOOT (`foot`, the CTA) at the bottom. Its tabs are icon buttons. The chosen one is filled
|
|
43
43
|
* only while this sheet is open — a closed home shows every icon plain; the disc fades in with the rise and out with the fold.
|
|
44
44
|
* 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
|
|
45
|
-
* is closed — see `Home`). A direct child of `SheetStack`.
|
|
45
|
+
* is closed — see `Home`). A direct child of `SheetStack`. Once open, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the heading — write no focus code.
|
|
46
46
|
*/
|
|
47
47
|
export declare function StackSheet({ title, tone, paper, icon, tabs, tab: tabProp, defaultTab, onTabChange, foot, backLabel, backAt, stack, className, children, ...rest }: StackSheetProps): import("react").JSX.Element;
|
|
@@ -17,7 +17,7 @@ import { word } from '../words.js';
|
|
|
17
17
|
* SHEET BODY (the children; scrolls) · SHEET FOOT (`foot`, the CTA) at the bottom. Its tabs are icon buttons. The chosen one is filled
|
|
18
18
|
* only while this sheet is open — a closed home shows every icon plain; the disc fades in with the rise and out with the fold.
|
|
19
19
|
* 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
|
|
20
|
-
* is closed — see `Home`). A direct child of `SheetStack`.
|
|
20
|
+
* is closed — see `Home`). A direct child of `SheetStack`. Once open, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the heading — write no focus code.
|
|
21
21
|
*/
|
|
22
22
|
export function StackSheet({ title, tone, paper, icon, tabs, tab: tabProp, defaultTab, onTabChange, foot, backLabel = word('back'), backAt = 'none', stack, className, children, ...rest }) {
|
|
23
23
|
const [tab, pick] = useControlled(tabProp, defaultTab ?? tabs?.[0]?.id, onTabChange);
|
|
@@ -10,7 +10,7 @@ export interface CallSheetSheet {
|
|
|
10
10
|
foot?: ReactNode;
|
|
11
11
|
/** a small link UNDER that button (a `Link sm`, e.g. details for developers) */
|
|
12
12
|
footLink?: ReactNode;
|
|
13
|
-
/** this sheet's handle
|
|
13
|
+
/** this sheet's handle: `false` for none, a string only for words different from cardds's own (named in the page's language, `<html lang>`); overrides the CallSheet's `handle` */
|
|
14
14
|
handle?: SheetProps['handle'];
|
|
15
15
|
}
|
|
16
16
|
/** one way in: its button and the sheet it calls */
|
|
@@ -45,7 +45,7 @@ export interface CallSheetProps extends Omit<ComponentProps<typeof Screen>, 'chi
|
|
|
45
45
|
onOpenChange?: (open: boolean, way: number | null) => void;
|
|
46
46
|
/** the sheets' resting states once up (default "peek full") */
|
|
47
47
|
states?: string;
|
|
48
|
-
/** every sheet's handle:
|
|
48
|
+
/** every sheet's handle: `false` for none; cardds names it in the page's language (`<html lang>`), so pass a string only for different words. A sheet's own `handle` wins */
|
|
49
49
|
handle?: SheetProps['handle'];
|
|
50
50
|
/** layers over the screen */
|
|
51
51
|
children?: ReactNode;
|