@usableapp/cardds 0.1.3 → 0.1.5

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.
Files changed (95) hide show
  1. package/README.md +43 -40
  2. package/cardds.js +47 -10
  3. package/css/layover.css +67 -22
  4. package/css/sheet.css +10 -4
  5. package/css/step.css +14 -5
  6. package/css/tokens.css +1 -0
  7. package/dist/actions/Btn.js +1 -1
  8. package/dist/actions/BtnRow.js +1 -1
  9. package/dist/actions/Chip.js +2 -2
  10. package/dist/actions/Dot.js +1 -1
  11. package/dist/actions/Dropdown.d.ts +1 -1
  12. package/dist/actions/Dropdown.js +2 -2
  13. package/dist/actions/Fab.d.ts +1 -1
  14. package/dist/actions/Fab.js +2 -2
  15. package/dist/actions/IconBtn.d.ts +1 -1
  16. package/dist/actions/IconBtn.js +3 -3
  17. package/dist/actions/Link.d.ts +1 -1
  18. package/dist/actions/Link.js +2 -2
  19. package/dist/actions/Segment.js +1 -1
  20. package/dist/cardds.css +92 -31
  21. package/dist/cards/Card.js +1 -1
  22. package/dist/cards/CardFoot.js +1 -1
  23. package/dist/cards/CardHead.js +1 -1
  24. package/dist/cards/CardParts.js +1 -1
  25. package/dist/cards/Placeholder.js +1 -1
  26. package/dist/cards/Stat.js +1 -1
  27. package/dist/choice/Calendar.js +2 -2
  28. package/dist/choice/Check.js +1 -1
  29. package/dist/choice/DayStrip.js +1 -1
  30. package/dist/choice/Mood.js +1 -1
  31. package/dist/choice/Slider.js +1 -1
  32. package/dist/forms/AddRow.js +2 -2
  33. package/dist/forms/Composer.js +1 -1
  34. package/dist/forms/Field.d.ts +1 -1
  35. package/dist/forms/Field.js +2 -2
  36. package/dist/forms/FileBtn.js +1 -1
  37. package/dist/forms/Pin.js +1 -1
  38. package/dist/index.d.ts +71 -71
  39. package/dist/index.js +71 -71
  40. package/dist/journey/NoteRow.d.ts +1 -1
  41. package/dist/journey/NoteRow.js +2 -2
  42. package/dist/journey/Route.d.ts +1 -1
  43. package/dist/journey/Route.js +2 -2
  44. package/dist/journey/TileBadge.js +1 -1
  45. package/dist/layover/Banner.js +1 -1
  46. package/dist/layover/Callout.js +1 -1
  47. package/dist/layover/Deck.js +1 -1
  48. package/dist/lists/Kv.d.ts +1 -1
  49. package/dist/lists/Kv.js +2 -2
  50. package/dist/lists/Legend.js +2 -2
  51. package/dist/lists/Row.d.ts +1 -1
  52. package/dist/lists/Row.js +2 -2
  53. package/dist/lists/Timeline.js +1 -1
  54. package/dist/media/MapArea.js +1 -1
  55. package/dist/media/Mosaic.js +1 -1
  56. package/dist/media/Postcard.js +1 -1
  57. package/dist/media/Quote.js +1 -1
  58. package/dist/media/Tile.d.ts +1 -1
  59. package/dist/media/Tile.js +2 -2
  60. package/dist/numbers/Badge.js +1 -1
  61. package/dist/numbers/Band.js +1 -1
  62. package/dist/numbers/Bars.js +1 -1
  63. package/dist/numbers/DotGrid.js +1 -1
  64. package/dist/numbers/Picker.js +1 -1
  65. package/dist/numbers/Ring.js +1 -1
  66. package/dist/numbers/Track.js +1 -1
  67. package/dist/people/Avatar.d.ts +1 -1
  68. package/dist/people/Avatar.js +2 -2
  69. package/dist/people/AvatarPick.js +1 -1
  70. package/dist/scaffold/ActionBar.js +1 -1
  71. package/dist/scaffold/AppBar.js +1 -1
  72. package/dist/scaffold/Centre.js +1 -1
  73. package/dist/scaffold/EmptyState.js +1 -1
  74. package/dist/scaffold/FilterRow.js +1 -1
  75. package/dist/scaffold/FloatBar.js +1 -1
  76. package/dist/scaffold/PagerAt.js +1 -1
  77. package/dist/scaffold/Screen.js +1 -1
  78. package/dist/scaffold/Section.js +1 -1
  79. package/dist/scaffold/TopBar.js +1 -1
  80. package/dist/sheets/CardBack.js +2 -2
  81. package/dist/sheets/Drawer.d.ts +7 -3
  82. package/dist/sheets/Drawer.js +9 -5
  83. package/dist/sheets/Sheet.d.ts +3 -3
  84. package/dist/sheets/Sheet.js +1 -1
  85. package/dist/sheets/SheetBody.js +1 -1
  86. package/dist/sheets/SheetHead.js +1 -1
  87. package/dist/sheets/SheetStack.js +1 -1
  88. package/dist/sheets/SheetStage.d.ts +1 -1
  89. package/dist/sheets/SheetStage.js +1 -1
  90. package/dist/sheets/Step.d.ts +3 -4
  91. package/dist/sheets/Step.js +5 -5
  92. package/dist/type/Icon.d.ts +1 -1
  93. package/dist/type/Icon.js +2 -2
  94. package/dist/type/Text.js +1 -1
  95. package/package.json +3 -5
package/dist/index.js CHANGED
@@ -2,74 +2,74 @@
2
2
  // markup contract the CSS documents, nothing more. cardds.js rides along for
3
3
  // the behaviours (sheet handle, stack open/close, dropdown value sync).
4
4
  import '../cardds.js';
5
- export { cx } from './cx';
6
- export * from './type/Icon';
7
- export { ICON_NAMES } from './type/icons';
8
- export * from './type/Text';
9
- export * from './scaffold/Screen';
10
- export * from './scaffold/AppBar';
11
- export * from './scaffold/TopBar';
12
- export * from './scaffold/ActionBar';
13
- export * from './scaffold/PagerAt';
14
- export * from './scaffold/FloatBar';
15
- export * from './scaffold/FilterRow';
16
- export * from './scaffold/Section';
17
- export * from './scaffold/EmptyState';
18
- export * from './scaffold/Centre';
19
- export * from './cards/Card';
20
- export * from './cards/CardHead';
21
- export * from './cards/CardFoot';
22
- export * from './cards/CardParts';
23
- export * from './cards/Stat';
24
- export * from './cards/Placeholder';
25
- export * from './sheets/SheetStack';
26
- export * from './sheets/CardBack';
27
- export * from './sheets/Sheet';
28
- export * from './sheets/SheetHead';
29
- export * from './sheets/SheetBody';
30
- export * from './sheets/SheetStage';
31
- export * from './sheets/Step';
32
- export * from './sheets/Drawer';
33
- export * from './actions/Btn';
34
- export * from './actions/IconBtn';
35
- export * from './actions/Chip';
36
- export * from './actions/Dot';
37
- export * from './actions/Dropdown';
38
- export * from './actions/Segment';
39
- export * from './actions/Fab';
40
- export * from './actions/BtnRow';
41
- export * from './actions/Link';
42
- export * from './forms/Field';
43
- export * from './forms/FileBtn';
44
- export * from './forms/AddRow';
45
- export * from './forms/Pin';
46
- export * from './forms/Composer';
47
- export * from './choice/Check';
48
- export * from './choice/DayStrip';
49
- export * from './choice/Calendar';
50
- export * from './choice/Mood';
51
- export * from './choice/Slider';
52
- export * from './numbers/Ring';
53
- export * from './numbers/Track';
54
- export * from './numbers/Band';
55
- export * from './numbers/DotGrid';
56
- export * from './numbers/Picker';
57
- export * from './numbers/Badge';
58
- export * from './numbers/Bars';
59
- export * from './people/Avatar';
60
- export * from './people/AvatarPick';
61
- export * from './lists/Row';
62
- export * from './lists/Kv';
63
- export * from './lists/Timeline';
64
- export * from './lists/Legend';
65
- export * from './media/Quote';
66
- export * from './media/Postcard';
67
- export * from './media/MapArea';
68
- export * from './media/Tile';
69
- export * from './media/Mosaic';
70
- export * from './layover/Banner';
71
- export * from './layover/Callout';
72
- export * from './layover/Deck';
73
- export * from './journey/Route';
74
- export * from './journey/TileBadge';
75
- export * from './journey/NoteRow';
5
+ export { cx } from './cx.js';
6
+ export * from './type/Icon.js';
7
+ export { ICON_NAMES } from './type/icons.js';
8
+ export * from './type/Text.js';
9
+ export * from './scaffold/Screen.js';
10
+ export * from './scaffold/AppBar.js';
11
+ export * from './scaffold/TopBar.js';
12
+ export * from './scaffold/ActionBar.js';
13
+ export * from './scaffold/PagerAt.js';
14
+ export * from './scaffold/FloatBar.js';
15
+ export * from './scaffold/FilterRow.js';
16
+ export * from './scaffold/Section.js';
17
+ export * from './scaffold/EmptyState.js';
18
+ export * from './scaffold/Centre.js';
19
+ export * from './cards/Card.js';
20
+ export * from './cards/CardHead.js';
21
+ export * from './cards/CardFoot.js';
22
+ export * from './cards/CardParts.js';
23
+ export * from './cards/Stat.js';
24
+ export * from './cards/Placeholder.js';
25
+ export * from './sheets/SheetStack.js';
26
+ export * from './sheets/CardBack.js';
27
+ export * from './sheets/Sheet.js';
28
+ export * from './sheets/SheetHead.js';
29
+ export * from './sheets/SheetBody.js';
30
+ export * from './sheets/SheetStage.js';
31
+ export * from './sheets/Step.js';
32
+ export * from './sheets/Drawer.js';
33
+ export * from './actions/Btn.js';
34
+ export * from './actions/IconBtn.js';
35
+ export * from './actions/Chip.js';
36
+ export * from './actions/Dot.js';
37
+ export * from './actions/Dropdown.js';
38
+ export * from './actions/Segment.js';
39
+ export * from './actions/Fab.js';
40
+ export * from './actions/BtnRow.js';
41
+ export * from './actions/Link.js';
42
+ export * from './forms/Field.js';
43
+ export * from './forms/FileBtn.js';
44
+ export * from './forms/AddRow.js';
45
+ export * from './forms/Pin.js';
46
+ export * from './forms/Composer.js';
47
+ export * from './choice/Check.js';
48
+ export * from './choice/DayStrip.js';
49
+ export * from './choice/Calendar.js';
50
+ export * from './choice/Mood.js';
51
+ export * from './choice/Slider.js';
52
+ export * from './numbers/Ring.js';
53
+ export * from './numbers/Track.js';
54
+ export * from './numbers/Band.js';
55
+ export * from './numbers/DotGrid.js';
56
+ export * from './numbers/Picker.js';
57
+ export * from './numbers/Badge.js';
58
+ export * from './numbers/Bars.js';
59
+ export * from './people/Avatar.js';
60
+ export * from './people/AvatarPick.js';
61
+ export * from './lists/Row.js';
62
+ export * from './lists/Kv.js';
63
+ export * from './lists/Timeline.js';
64
+ export * from './lists/Legend.js';
65
+ export * from './media/Quote.js';
66
+ export * from './media/Postcard.js';
67
+ export * from './media/MapArea.js';
68
+ export * from './media/Tile.js';
69
+ export * from './media/Mosaic.js';
70
+ export * from './layover/Banner.js';
71
+ export * from './layover/Callout.js';
72
+ export * from './layover/Deck.js';
73
+ export * from './journey/Route.js';
74
+ export * from './journey/TileBadge.js';
75
+ export * from './journey/NoteRow.js';
@@ -1,5 +1,5 @@
1
1
  import type { ComponentPropsWithoutRef } from 'react';
2
- import { type IconName } from '../type/Icon';
2
+ import { type IconName } from '../type/Icon.js';
3
3
  export interface NoteRowProps extends ComponentPropsWithoutRef<'div'> {
4
4
  icon?: IconName;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
3
- import { Icon } from '../type/Icon';
2
+ import { cx } from '../cx.js';
3
+ import { Icon } from '../type/Icon.js';
4
4
  /** NoteRow — icon + caption: transit hints, fine print. */
5
5
  export function NoteRow({ icon = 'clock', className, children, ...rest }) {
6
6
  return (_jsxs("div", { className: cx('note-row', className), ...rest, children: [_jsx(Icon, { name: icon, size: "sm" }), " ", children] }));
@@ -1,5 +1,5 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { type IconName } from '../type/Icon';
2
+ import { type IconName } from '../type/Icon.js';
3
3
  export interface RoutePoint {
4
4
  /** the place name (caption) */
5
5
  place: ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
3
- import { Icon } from '../type/Icon';
2
+ import { cx } from '../cx.js';
3
+ import { Icon } from '../type/Icon.js';
4
4
  /** Route — endpoint · dotted connector with an icon · endpoint: flights, buses, deliveries. */
5
5
  export function Route({ from, to, via = 'plane', className, ...rest }) {
6
6
  const point = (p, end) => (_jsxs("div", { className: cx('route__point', end && 'route__point--end'), children: [_jsx("span", { className: "route__place", children: p.place }), _jsx("span", { className: "route__code", children: p.code }), _jsx("span", { className: "route__time", children: p.time })] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** TileBadge — a tiny label over a big value: gate, seat, date, rating. */
4
4
  export function TileBadge({ 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 })] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Banner — a chip that expands into a tinted card, no JS (a native details). */
4
4
  export function Banner({ summary, tone = 3, className, children, ...rest }) {
5
5
  return (_jsxs("details", { className: cx('banner', className), ...rest, children: [_jsx("summary", { children: summary }), _jsx("div", { className: cx('card banner__body', tone !== 1 && `card--${tone}`), children: children })] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Callout — a small card with a tail, pinned over a map or a media. */
4
4
  export function Callout({ title, sub, top, left, className, style, ...rest }) {
5
5
  return (_jsxs("div", { className: cx('callout', className), style: { top, left, translate: left ? '-50% 0' : undefined, ...style }, ...rest, children: [_jsx("span", { className: "callout__title", children: title }), sub != null && _jsx("span", { className: "callout__sub", children: sub })] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Deck — swipe cards fanned behind each other; the LAST child is on top. Children are Cards (the front one may `fold`). */
4
4
  export function Deck({ className, ...rest }) {
5
5
  return _jsx("div", { className: cx('deck', className), ...rest });
@@ -1,5 +1,5 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import { type IconName } from '../type/Icon';
2
+ import { type IconName } from '../type/Icon.js';
3
3
  export interface KvProps extends ComponentPropsWithoutRef<'dl'> {
4
4
  /** hairlines between rows */
5
5
  lined?: boolean;
package/dist/lists/Kv.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
3
- import { Icon } from '../type/Icon';
2
+ import { cx } from '../cx.js';
3
+ import { Icon } from '../type/Icon.js';
4
4
  /** Kv — key-value rows: label left, value right (Pay with · Time credits); children are KVRows. */
5
5
  export function Kv({ lined, className, ...rest }) {
6
6
  return _jsx("dl", { className: cx('kv', lined && 'kv--lined', className), ...rest });
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
3
- import { Dot } from '../actions/Dot';
2
+ import { cx } from '../cx.js';
3
+ import { Dot } from '../actions/Dot.js';
4
4
  /** Legend — signal dots with captions under a chart; children are LegendItems. */
5
5
  export function Legend({ className, ...rest }) {
6
6
  return _jsx("div", { className: cx('legend', className), ...rest });
@@ -1,5 +1,5 @@
1
1
  import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
- import { type IconName } from '../type/Icon';
2
+ import { type IconName } from '../type/Icon.js';
3
3
  export interface RowProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
4
4
  /** the leading visual: an Avatar, an AvatarStack, an Icon */
5
5
  lead?: ReactNode;
package/dist/lists/Row.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement } from 'react';
3
- import { cx } from '../cx';
4
- import { Icon } from '../type/Icon';
3
+ import { cx } from '../cx.js';
4
+ import { Icon } from '../type/Icon.js';
5
5
  /**
6
6
  * Row — a frameless row inside a card: lead · title + meta · end. 48px+ tall, a tap target.
7
7
  * Several go in Rows (hairlines between). A row that IS a card is `Card row`.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Timeline — a hairline with accent dots, date marks and entries to the right; children are TimelineItems. */
4
4
  export function Timeline({ className, ...rest }) {
5
5
  return _jsx("ol", { className: cx('timeline', className), ...rest });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * MapArea — the box a map engine draws in, behind a stage sheet: the child is the engine's mount and fills it;
5
5
  * before tiles arrive (or offline) the box shows the wireframe street pattern, never a hole. The ring marks the
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Mosaic — one big photo + two small in a card (three Placeholders or imgs). */
4
4
  export function Mosaic({ label = 'Photos', className, ...rest }) {
5
5
  return _jsx("div", { className: cx('mosaic', className), role: "img", "aria-label": label, ...rest });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * Postcard — a member's introduction as a card in the hand: the photo (or the wireframe box) with the name in front,
5
5
  * the caption on the back; a tap on either face turns it over (cardds.js toggles `is-flipped`, `--motion-flip`).
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Quote — a giant opening mark, big text, an overline attribution. */
4
4
  export function Quote({ text, by, sm, className, ...rest }) {
5
5
  return (_jsxs("blockquote", { className: cx('quote', sm && 'quote--sm', className), ...rest, children: [_jsx("p", { className: "quote__text", children: text }), by != null && _jsx("footer", { className: "quote__by", children: by })] }));
@@ -1,5 +1,5 @@
1
1
  import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
- import { type IconName } from '../type/Icon';
2
+ import { type IconName } from '../type/Icon.js';
3
3
  export interface TileGridProps extends ComponentPropsWithoutRef<'div'> {
4
4
  /** three across on a phone (attachments, upload kinds) */
5
5
  cols3?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement } from 'react';
3
- import { cx } from '../cx';
4
- import { Icon } from '../type/Icon';
3
+ import { cx } from '../cx.js';
4
+ import { Icon } from '../type/Icon.js';
5
5
  /** TileGrid — big square Tiles in a responsive grid. */
6
6
  export function TileGrid({ cols3, bleed, className, ...rest }) {
7
7
  return _jsx("div", { className: cx('tile-grid', cols3 && 'tile-grid--3', bleed && 'bleed', className), ...rest });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Badge — the tiny count beside a title or tab ("Leads +9"). */
4
4
  export function Badge({ soft, className, ...rest }) {
5
5
  return _jsx("span", { className: cx('badge', soft && 'badge--soft', className), ...rest });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Band — a data card: 2-line label · giant number · footnote. Stack several in a BandStack for one boundary with hairlines. */
4
4
  export function Band({ 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 })] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Bars — three or four bars with a count on top, the glance chart; children are Bar. */
4
4
  export function Bars({ max, className, style, ...rest }) {
5
5
  return _jsx("div", { className: cx('bars', className), style: { ...style, '--max': max }, ...rest });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** DotGrid — progress over time as a grid of dots, one element and three numbers (`--total`, `--done`, `--cols`). */
4
4
  export function DotGrid({ total, done, cols, label, className, style, ...rest }) {
5
5
  return (_jsx("div", { className: cx('dotgrid', className), style: { ...style, '--total': total, '--done': done, ...(cols ? { '--cols': cols } : {}) }, role: "img", "aria-label": label ?? `${done} of ${total}`, ...rest }));
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from 'react';
3
- import { cx } from '../cx';
3
+ import { cx } from '../cx.js';
4
4
  /** Picker — a horizontal snap picker, the centre value big between two accent rules; children are PickerItems. */
5
5
  export function Picker({ unit, label, className, children, ...rest }) {
6
6
  const rail = useRef(null);
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Ring — the conic gauge with its value centred; data goes in as `--value`, the math lives in CSS. */
4
4
  export function Ring({ value, size, text, caption, label, className, style, children, ...rest }) {
5
5
  return (_jsxs("div", { className: cx('ring', size && `ring--${size}`, className), style: { ...style, '--value': value }, role: "img", "aria-label": label ?? `${value} percent`, ...rest, children: [text != null && _jsx("span", { className: "ring__value", children: text }), caption != null && _jsx("span", { className: "ring__label", children: caption }), children] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** Track — step progress in a dark pill: done · done · todo; children are TrackSteps holding an Icon each. */
4
4
  export function Track({ label = 'Progress', className, ...rest }) {
5
5
  return _jsx("ol", { className: cx('track', className), "aria-label": label, ...rest });
@@ -1,5 +1,5 @@
1
1
  import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
- import { type IconName } from '../type/Icon';
2
+ import { type IconName } from '../type/Icon.js';
3
3
  export interface AvatarProps extends ComponentPropsWithoutRef<'span'> {
4
4
  /** sm 32px · default 40px · lg 56px · xl 72px (a sheet head's icon ring) */
5
5
  size?: 'sm' | 'lg' | 'xl';
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createElement } from 'react';
3
- import { cx } from '../cx';
4
- import { Icon } from '../type/Icon';
3
+ import { cx } from '../cx.js';
4
+ import { Icon } from '../type/Icon.js';
5
5
  /** Avatar — initials by default, a photo or an Icon when there is one; sizes are the tokens. */
6
6
  export function Avatar({ size, outline, add, on, halo, center, src, alt = '', icon, as, href, className, children, ...rest }) {
7
7
  const el = as ?? (href ? 'a' : 'span');
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** AvatarPick — the chooser row: big heads with name and role under, scrolling sideways; children are AvatarPickItems. */
4
4
  export function AvatarPick({ bleed, label, className, ...rest }) {
5
5
  return _jsx("div", { className: cx('avatar-pick', bleed && 'bleed', className), "aria-label": label, ...rest });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * ActionBar — the screen's ONE move, fixed at the bottom, OUTSIDE the Screen/Step (a sibling after it).
5
5
  * Plain: one wide primary Btn (the step that commits). `pager`: Back + Next as peers — buttons only; where you are is the
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * AppBar — the app-context bar fixed at the very top: logo · two-line label · switcher.
5
5
  * It is fixed, so the Screen it sits in reserves its height (`--header-h`, 60px) automatically.
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { flushSync } from 'react-dom';
3
- import { cx } from '../cx';
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
6
  * card: an EmptyState; a Card with its quiet second Btn and the PagerAt under it; a Deck with its DeckActions.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** EmptyState — centred: a large icon, a heading, a line of body text, an optional CTA. On the surface (in a `Centre`)
4
4
  * or inside a card's section ("nothing here yet" under a heading) — the ink follows the card it sits in. */
5
5
  export function EmptyState({ icon, title, action, level = 'h2', className, children, ...rest }) {
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** FilterRow — a row of Dropdowns sharing the width, under the TopBar (this week · USD). */
4
4
  export function FilterRow({ className, ...rest }) {
5
5
  return _jsx("div", { className: cx('filter-row', className), ...rest });
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { createElement } from 'react';
3
- import { cx } from '../cx';
3
+ import { cx } from '../cx.js';
4
4
  /**
5
5
  * FloatBar — the glass pill navigation floating over content, plus one detached round button.
6
6
  * Children are FloatBarItems; fixed at the bottom (absolute inside a SheetStage). Use it instead of an ActionBar
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** PagerAt — the "where am I" dots, centred under the card that changes (a child of Centre): one accent dot at the current page. Never inside an ActionBar. */
4
4
  export function PagerAt({ at, of, label, className, ...rest }) {
5
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)) }));
@@ -1,5 +1,5 @@
1
1
  import { createElement } from 'react';
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * Screen — the mobile screen column: max 25rem wide, the standard horizontal inset, NO vertical padding
5
5
  * (bars reserve their own room). Every screen is base · top menu · bottom menu · content.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * Section — frameless on-surface content + a CTA: an overline, a display heading, a paragraph, a CtaPack.
5
5
  * NEVER a card: sections are what the base says; cards are content the system offers.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * TopBar — the screen's title bar: back · TITLE · actions. Same 60px floor as the AppBar.
5
5
  * One per screen, first child of the Screen; a Step that follows it touches it.
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
3
- import { Icon } from '../type/Icon';
2
+ import { cx } from '../cx.js';
3
+ import { Icon } from '../type/Icon.js';
4
4
  /** CardBack — the back button a tapped stack sheet reveals in its head; first child of that sheet's CardHead. Hidden until the sheet is open. */
5
5
  export function CardBack({ label = 'Back', className, ...rest }) {
6
6
  return (_jsx("button", { type: "button", className: cx('icon-btn icon-btn--sm card__back', className), "aria-label": label, ...rest, children: _jsx(Icon, { name: "arrow-left" }) }));
@@ -1,7 +1,11 @@
1
1
  import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
- export interface LiftProps extends ComponentPropsWithoutRef<'article'> {
2
+ export interface ModalProps extends ComponentPropsWithoutRef<'article'> {
3
3
  }
4
- /** Lift — the page content card lifted above a Drawer on an `SheetStage ask`. */
4
+ /** Modal — the ask: ONE card at the centre of a `SheetStage ask`, two parts — a `Lift` (the thing being asked about, light, scrolls when tall) and a `Drawer` (the dark end that asks). No border. Two beats on appearing: drops in from above to the centre · the drawer comes out below while the lift moves up. A click on any button in the Drawer plays them backwards and fires `cardds:modal` on the stage (`detail.answer` = the button's `data-answer`) for the app to remove it. */
5
+ export declare function Modal({ className, ...rest }: ModalProps): import("react").JSX.Element;
6
+ export interface LiftProps extends ComponentPropsWithoutRef<'div'> {
7
+ }
8
+ /** Lift — the light part of a `Modal`: the case, request or item the question is about (a CardHead, rows, a timeline); scrolls inside when tall. */
5
9
  export declare function Lift({ className, ...rest }: LiftProps): import("react").JSX.Element;
6
10
  export interface DrawerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
7
11
  /** the question */
@@ -9,7 +13,7 @@ export interface DrawerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'titl
9
13
  /** the fine print under it */
10
14
  caption?: ReactNode;
11
15
  }
12
- /** Drawer — the dark strip at the bottom of an ask stage: a question, a caption, a BtnTrio (no · ask · yes). */
16
+ /** Drawer — the dark end of a `Modal`: the question, its fine print, and a `BtnTrio` (or two buttons); give each button a `data-answer` — any of them closes the modal. */
13
17
  export declare function Drawer({ title, caption, className, children, ...rest }: DrawerProps): import("react").JSX.Element;
14
18
  export interface BtnTrioProps extends ComponentPropsWithoutRef<'div'> {
15
19
  }
@@ -1,13 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Children, Fragment } from 'react';
3
- import { cx } from '../cx';
4
- /** Lift — the page content card lifted above a Drawer on an `SheetStage ask`. */
3
+ import { cx } from '../cx.js';
4
+ /** Modal — the ask: ONE card at the centre of a `SheetStage ask`, two parts — a `Lift` (the thing being asked about, light, scrolls when tall) and a `Drawer` (the dark end that asks). No border. Two beats on appearing: drops in from above to the centre · the drawer comes out below while the lift moves up. A click on any button in the Drawer plays them backwards and fires `cardds:modal` on the stage (`detail.answer` = the button's `data-answer`) for the app to remove it. */
5
+ export function Modal({ className, ...rest }) {
6
+ return _jsx("article", { className: cx('card modal', className), ...rest });
7
+ }
8
+ /** Lift — the light part of a `Modal`: the case, request or item the question is about (a CardHead, rows, a timeline); scrolls inside when tall. */
5
9
  export function Lift({ className, ...rest }) {
6
- return _jsx("article", { className: cx('card lift', className), ...rest });
10
+ return _jsx("div", { className: cx('modal__lift', className), ...rest });
7
11
  }
8
- /** Drawer — the dark strip at the bottom of an ask stage: a question, a caption, a BtnTrio (no · ask · yes). */
12
+ /** Drawer — the dark end of a `Modal`: the question, its fine print, and a `BtnTrio` (or two buttons); give each button a `data-answer` — any of them closes the modal. */
9
13
  export function Drawer({ title, caption, className, children, ...rest }) {
10
- return (_jsxs("div", { className: cx('drawer', className), ...rest, children: [_jsx("h2", { className: "t-h2", children: title }), caption != null && _jsx("p", { className: "t-caption", children: caption }), children] }));
14
+ 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] }));
11
15
  }
12
16
  /** BtnTrio — three round buttons with dotted connectors between them (× · ? · ✓); the middle one inverted. */
13
17
  export function BtnTrio({ className, children, ...rest }) {
@@ -1,13 +1,13 @@
1
1
  import type { ComponentPropsWithoutRef } from 'react';
2
- export type SheetState = 'peek' | 'half' | 'full';
2
+ export type SheetState = 'peek' | 'half' | '3q' | 'full';
3
3
  export interface SheetProps extends ComponentPropsWithoutRef<'article'> {
4
- /** how far the sheet slid: `peek` (handle + title row) · `half` (default) · `full` (its top edge at the top bar) — a class, never a height */
4
+ /** how far the sheet slid: `peek` (handle + title row) · `half` (default) · `3q` (three quarters showing) · `full` (its top edge at the top bar) — a class, never a height. A tap on the handle toggles between this state and peek; a drag snaps to any of `states` */
5
5
  state?: SheetState;
6
6
  /** floats above a footnote strip on a dim stage (bottom corners and border back) */
7
7
  raised?: boolean;
8
8
  /** the grab handle (tap / drag / keyboard via cardds.js); `false` for a sheet with no handle, a string sets its accessible name */
9
9
  handle?: boolean | string;
10
- /** which states the handle cycles through, e.g. "peek half full" (default all three) */
10
+ /** which states a drag snaps to, e.g. "peek half full" (default all four: peek half 3q full) */
11
11
  states?: string;
12
12
  }
13
13
  /**
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
4
  * Sheet — the SINGLE sheet: one card as a bottom sheet holding what the member ACTS on (controls, or small `Card sm`
5
5
  * content cards). Always the full height of its box — a Step or a SheetStage — a state is only how far it slid.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /** SheetBody — everything under a Sheet's head: the one thing that scrolls; its scroll padding keeps a focused control above the cut. Content never goes straight into the Sheet. */
4
4
  export function SheetBody({ className, ...rest }) {
5
5
  return _jsx("div", { className: cx('sheet__body', className), ...rest });