@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
@@ -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
  /** SheetHead — the stage sheet's three-column head: round button · centred title + sub · round button. A step sheet uses a CardHead instead. */
4
4
  export function SheetHead({ lead, title, sub, trail, className, ...rest }) {
5
5
  return (_jsxs("div", { className: cx('sheet__head', className), ...rest, children: [lead ?? _jsx("span", {}), _jsxs("div", { children: [_jsx("h2", { className: "sheet__title", children: title }), sub != null && _jsx("span", { className: "sheet__sub", children: sub })] }), trail ?? _jsx("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
  /**
4
4
  * SheetStack — the MENU: sheets stacked like paper at the middle of the home screen, every one a main section.
5
5
  * Children are Cards, direct children only, at most five: first = the back of the stack, last = the front (open) sheet.
@@ -6,7 +6,7 @@ export interface SheetStageProps extends ComponentPropsWithoutRef<'div'> {
6
6
  hero?: ReactNode;
7
7
  /** blur and darken the background (the dim page sheet) */
8
8
  dim?: boolean;
9
- /** the ask drawer stage: a Lift card over a dark Drawer */
9
+ /** the ask stage: the page under a scrim, one Modal (Lift + Drawer) at the centre */
10
10
  ask?: boolean;
11
11
  /** a footnote strip on the scrim under a raised sheet */
12
12
  foot?: ReactNode;
@@ -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
  * SheetStage — a page-level overlay stage, its own 100dvh page: a Sheet over a map (or over a `hero` — one
5
5
  * thing centred in the band a half sheet leaves open), the dim page sheet
@@ -2,14 +2,13 @@ import type { ComponentPropsWithoutRef } from 'react';
2
2
  export interface StepProps extends ComponentPropsWithoutRef<'section'> {
3
3
  }
4
4
  /**
5
- * Step — one screen, one task. Children: a StepCard first (what the member READS), an optional Sheet last
5
+ * Step — one screen, one task. Children: a StepCard first (what the member READS — words on the base, not a card), an optional Sheet last
6
6
  * (what the member DOES); the ActionBar goes OUTSIDE, after the Step. It fills a `Screen fill` between the top bar
7
7
  * and the bar's room, bleeds to the screen's edges (the sheet is full-width), and follows its TopBar/AppBar directly.
8
8
  * Reads → StepCard only. Acts → StepCard + Sheet. Never hand-lay a step, never write a sheet height.
9
9
  */
10
10
  export declare function Step({ className, ...rest }: StepProps): import("react").JSX.Element;
11
11
  export interface StepCardProps extends ComponentPropsWithoutRef<'article'> {
12
- tone?: 1 | 2 | 3;
13
12
  }
14
- /** StepCard — the reading card of a Step: a normal Card (CardHead · content) that hugs its words and scrolls inside itself when the column runs out. */
15
- export declare function StepCard({ tone, className, ...rest }: StepCardProps): import("react").JSX.Element;
13
+ /** StepCard — the reading block of a Step: the words on the base, no frame, no area colour (a CardHead · content, with a card's rhythm); it hugs its words and scrolls inside itself when the column runs out. */
14
+ export declare function StepCard({ className, ...rest }: StepCardProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  /**
4
- * Step — one screen, one task. Children: a StepCard first (what the member READS), an optional Sheet last
4
+ * Step — one screen, one task. Children: a StepCard first (what the member READS — words on the base, not a card), an optional Sheet last
5
5
  * (what the member DOES); the ActionBar goes OUTSIDE, after the Step. It fills a `Screen fill` between the top bar
6
6
  * and the bar's room, bleeds to the screen's edges (the sheet is full-width), and follows its TopBar/AppBar directly.
7
7
  * Reads → StepCard only. Acts → StepCard + Sheet. Never hand-lay a step, never write a sheet height.
@@ -9,7 +9,7 @@ import { cx } from '../cx';
9
9
  export function Step({ className, ...rest }) {
10
10
  return _jsx("section", { className: cx('step', className), ...rest });
11
11
  }
12
- /** StepCard — the reading card of a Step: a normal Card (CardHead · content) that hugs its words and scrolls inside itself when the column runs out. */
13
- export function StepCard({ tone, className, ...rest }) {
14
- return _jsx("article", { className: cx('card step__card', tone && tone !== 1 && `card--${tone}`, className), ...rest });
12
+ /** StepCard — the reading block of a Step: the words on the base, no frame, no area colour (a CardHead · content, with a card's rhythm); it hugs its words and scrolls inside itself when the column runs out. */
13
+ export function StepCard({ className, ...rest }) {
14
+ return _jsx("article", { className: cx('step__card', className), ...rest });
15
15
  }
@@ -1,4 +1,4 @@
1
- import { type IconName } from './icons';
1
+ import { type IconName } from './icons.js';
2
2
  export type { IconName };
3
3
  export interface IconProps extends Omit<React.ComponentPropsWithoutRef<'svg'>, 'children'> {
4
4
  /** one of the 57 Lucide symbols in icons.svg (arrow-left, bell, check, chevron-down, id-card, plus, x, …) */
package/dist/type/Icon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cx } from '../cx';
3
- import { ICONS } from './icons';
2
+ import { cx } from '../cx.js';
3
+ import { ICONS } from './icons.js';
4
4
  /**
5
5
  * Icon — a Lucide stroke icon from the cardds sprite, inlined (no icons.svg file needed at runtime).
6
6
  * Sizes are the tokens the CSS defines: `.icon` 28px, `--sm` 28px (a semantic size, same as md today), `--xs` 16px, `--lg` 32px.
package/dist/type/Text.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createElement } from 'react';
2
- import { cx } from '../cx';
2
+ import { cx } from '../cx.js';
3
3
  const DEFAULT_AS = {
4
4
  display: 'h2', h1: 'h2', h2: 'h2', title: 'p', body: 'p', label: 'span', caption: 'span', overline: 'span', stat: 'p',
5
5
  };
package/package.json CHANGED
@@ -1,18 +1,16 @@
1
1
  {
2
2
  "name": "@usableapp/cardds",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
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), app/ is the Commons Time Bank PWA built from them, demo/ the CSS spec pages the acceptance tests (tests/) drive.",
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.",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+ssh://git@github.com/everysundays/cardds.git"
10
10
  },
11
11
  "scripts": {
12
- "dev": "vite --config app/vite.config.ts",
12
+ "dev": "vite --config gallery/vite.config.ts",
13
13
  "build": "node scripts/build-icons.mjs && tsc -p tsconfig.json && node scripts/flatten-css.mjs",
14
- "build:app": "node scripts/build-icons.mjs && vite build --config app/vite.config.ts",
15
- "preview:app": "vite preview --config app/vite.config.ts",
16
14
  "test": "playwright test",
17
15
  "validate:inbox": "node scripts/validate-inbox.mjs",
18
16
  "mcp:verify": "cd mcp-server && npm run verify && npm run verify:http",