docs(design): pass 2 components (IconButton tones, Switch info, wide dialog and drawer, PrintArea), every page on Page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -35,7 +35,7 @@ Every page's root is `<Page>` from `@xenia/ui`. It provides:
|
||||
- **Never** put `p-*`, `max-w-*`, `mx-auto`, `h-full` or `overflow-*` on a page's root, and never nest a second width limit inside it.
|
||||
- Checked by `tests/e2e/manager_layout.mjs` (1920×1080 and 3440×1440: every page fills / is centred, and scrolls). Add a new page to its `PAGES` list.
|
||||
|
||||
Pages not on `<Page>` yet (own layouts, next review pass): Management → Products (category tree + list), Management → Tables (list + floor editor), Inventory → Stock (placeholder).
|
||||
Every page is on `<Page>` except Inventory → Stock (a placeholder). Two-column pages (Products: the category tree and the list; the floor editor: the map and its panels) put each side in its own container (`rounded-card border bg-surface shadow-raised`), the narrow side `sticky` so it stays in view while the page scrolls.
|
||||
|
||||
## 3. Components (`@xenia/ui`)
|
||||
|
||||
@@ -48,8 +48,12 @@ Pages not on `<Page>` yet (own layouts, next review pass): Management → Produc
|
||||
| A toggle filter (a state) | `FilterChip` (`tone`, `count`) | |
|
||||
| Two or three views (List / Map / QR) | `Segmented` | the view in the address (`?view=`) |
|
||||
| Sections of a page or a dialog | `Tabs` (`size="lg"` on pages) | scrolls sideways only, never up/down |
|
||||
| A help tip | `InfoTip` | opens on hover (mouse) and on tap |
|
||||
| Dialogs | `Dialog` `sm` 400 · `md` 520 · `lg` 720 · `xl` 920 | the day summary is `xl` |
|
||||
| A help tip | `InfoTip` | opens on hover (mouse) and on tap. Beside a switch: `Switch info={<InfoTip>…}` puts it right after the text, never after the switch |
|
||||
| Row actions that stand apart | `IconButton tone` | `danger` delete / archive · `warning` block · `info` zones · `accent` edit · `success` unblock: a pastel button (soft background, ink icon). Neutral actions stay `ghost` |
|
||||
| Dialogs | `Dialog` `sm` 400 · `md` 520 · `lg` 720 · `xl` 920 · `wide` (~88 % of a 16:9 screen, capped on ultrawides) | the day summary is `xl`, the product editor `wide` |
|
||||
| A side drawer | `Sheet side="right"` (`size="wide"`: 600 px) | the permissions editor is `wide` |
|
||||
| Print only this | `PrintArea` (+ `PrintSheet` for cards to cut out) | rendered into `<body>`, hidden on screen; while mounted, printing prints only it. One per page |
|
||||
| Section titles inside a panel or drawer | `text-overline font-semibold uppercase tracking-wide text-ink-3` + a `flex-1 border-t border-line` rule after it | as the navigation's group titles |
|
||||
|
||||
The manager's own building blocks (until they move to `@xenia/ui`): `Panel`, `Table`, `Stat` in `pages/reports/kit/parts.jsx`; `Card`, `Figure`, `Pill`, `SplitBar` in `pages/overview/parts.jsx`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user