feat(ui): board design language as global tokens; KDS on tokens and shared components (platform-v2 3.2b-2)

- @xenia/ui: --x-board-* tokens (the kitchen display's look: dark board, light cards,
  status colours, card radius/shadows, number font), Tailwind board.* colours, contrast
  test for the board pairs; near-identical shades merged.
- New shared Stepper component (gallery + ui.mjs), labels ui.decrease / ui.increase.
- KDS: theme.js maps to the board tokens, no colour literals left (only stored setting
  values); decline / call waiter / settings use Dialog, Button, Switch, Select, Stepper;
  toasts are @xenia/ui toasts (ToastProvider at the terminal root).
- Terminal: apps can set their theme (APP_THEMES, KDS dark) while they run.
- CS-16: board screens and "no hard-coded colours in app code".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 20:02:35 +02:00
co-authored by Claude Opus 5.5
parent 5f6d4ab428
commit 77e0adbe9c
26 changed files with 485 additions and 383 deletions
+88
View File
@@ -246,6 +246,94 @@
}
}
/* ── Board (the kitchen display's design language, plan step 3.2b-2) ───────
* A dark board with light cards, for screens read from a distance (kitchen, bar,
* and any later "board" screen). Always dark: it doesn't follow data-theme; the
* dialogs on a board use the normal components in data-theme="dark".
* The age colours here are only defaults: each KDS screen stores its own. */
:root {
--x-board-bg-rgb: 29 35 43; /* the board behind the cards */
--x-board-rail-rgb: 22 27 33; /* side rail, side panels */
--x-board-topbar-rgb: 32 39 47; /* top bar */
--x-board-line-rgb: 43 51 61; /* dividers, tabs, badges */
--x-board-deep-rgb: 10 14 19; /* action bars, text on light badges, scrims */
--x-board-ink-rgb: 231 236 242; /* text on the board */
--x-board-ink-2-rgb: 170 180 192; /* secondary text, tabs */
--x-board-ink-3-rgb: 123 134 148; /* muted text, idle rail buttons */
--x-board-ink-4-rgb: 94 103 114; /* empty states */
--x-board-tab-active-rgb: 243 246 249; /* the selected tab */
--x-board-on-status-rgb: 255 255 255; /* text on coloured headers */
--x-board-card-rgb: 255 255 255; /* card body */
--x-board-card-ink-rgb: 31 36 43; /* item names */
--x-board-card-ink-2-rgb: 65 71 79; /* card footer text */
--x-board-card-muted-rgb: 174 180 188; /* done items, labels on the card */
--x-board-card-soft-rgb: 240 242 245; /* quantity badges, footer, scheduled orders */
--x-board-card-line-rgb: 232 235 239; /* lines inside a card */
--x-board-card-progress-rgb: 243 248 255; /* body of an order in progress */
--x-board-card-done-rgb: 244 247 244; /* body of a done order */
--x-board-note-rgb: 255 251 235; /* order note background */
--x-board-note-ink-rgb: 180 83 9; /* order note text */
--x-board-fresh-rgb: 52 181 106; /* new order (default age colour) */
--x-board-fresh-deep-rgb: 30 128 72; /* its subheader; extras on items */
--x-board-warning-rgb: 240 165 42; /* waiting a while */
--x-board-warning-deep-rgb: 184 115 16; /* its subheader; choices on items; call waiter */
--x-board-late-rgb: 232 81 63; /* late */
--x-board-late-deep-rgb: 160 45 30; /* its subheader; removed on items; decline */
--x-board-done-rgb: 61 71 87; /* done order header */
--x-board-done-deep-rgb: 42 49 64; /* its subheader */
--x-board-future-rgb: 74 85 104; /* scheduled order header */
--x-board-future-deep-rgb: 55 65 81; /* its subheader */
--x-board-future-glow-rgb: 109 208 138; /* scheduled: rail badge, card glow */
--x-board-progress-rgb: 47 127 240; /* in progress, selection, item notes */
--x-board-fresh-soft-rgb: 134 239 172; /* extras in the totals panel */
--x-board-warning-soft-rgb: 252 211 77; /* choices in the totals panel */
--x-board-late-soft-rgb: 252 165 165; /* removed in the totals panel */
--x-board-progress-soft-rgb: 147 197 253; /* notes in the totals panel */
--x-board-bg: rgb(var(--x-board-bg-rgb));
--x-board-rail: rgb(var(--x-board-rail-rgb));
--x-board-topbar: rgb(var(--x-board-topbar-rgb));
--x-board-line: rgb(var(--x-board-line-rgb));
--x-board-deep: rgb(var(--x-board-deep-rgb));
--x-board-ink: rgb(var(--x-board-ink-rgb));
--x-board-ink-2: rgb(var(--x-board-ink-2-rgb));
--x-board-ink-3: rgb(var(--x-board-ink-3-rgb));
--x-board-ink-4: rgb(var(--x-board-ink-4-rgb));
--x-board-tab-active: rgb(var(--x-board-tab-active-rgb));
--x-board-on-status: rgb(var(--x-board-on-status-rgb));
--x-board-card: rgb(var(--x-board-card-rgb));
--x-board-card-ink: rgb(var(--x-board-card-ink-rgb));
--x-board-card-ink-2: rgb(var(--x-board-card-ink-2-rgb));
--x-board-card-muted: rgb(var(--x-board-card-muted-rgb));
--x-board-card-soft: rgb(var(--x-board-card-soft-rgb));
--x-board-card-line: rgb(var(--x-board-card-line-rgb));
--x-board-card-progress: rgb(var(--x-board-card-progress-rgb));
--x-board-card-done: rgb(var(--x-board-card-done-rgb));
--x-board-note: rgb(var(--x-board-note-rgb));
--x-board-note-ink: rgb(var(--x-board-note-ink-rgb));
--x-board-fresh: rgb(var(--x-board-fresh-rgb));
--x-board-fresh-deep: rgb(var(--x-board-fresh-deep-rgb));
--x-board-warning: rgb(var(--x-board-warning-rgb));
--x-board-warning-deep: rgb(var(--x-board-warning-deep-rgb));
--x-board-late: rgb(var(--x-board-late-rgb));
--x-board-late-deep: rgb(var(--x-board-late-deep-rgb));
--x-board-done: rgb(var(--x-board-done-rgb));
--x-board-done-deep: rgb(var(--x-board-done-deep-rgb));
--x-board-future: rgb(var(--x-board-future-rgb));
--x-board-future-deep: rgb(var(--x-board-future-deep-rgb));
--x-board-future-glow: rgb(var(--x-board-future-glow-rgb));
--x-board-progress: rgb(var(--x-board-progress-rgb));
--x-board-fresh-soft: rgb(var(--x-board-fresh-soft-rgb));
--x-board-warning-soft: rgb(var(--x-board-warning-soft-rgb));
--x-board-late-soft: rgb(var(--x-board-late-soft-rgb));
--x-board-progress-soft: rgb(var(--x-board-progress-soft-rgb));
--x-board-radius-card: 10px;
--x-board-shadow-card: 0 1px 2px rgb(0 0 0 / 0.25), 0 6px 16px rgb(0 0 0 / 0.22);
--x-board-shadow-focus: 0 10px 24px rgb(0 0 0 / 0.40), 0 0 0 4px rgb(var(--x-board-progress-rgb) / 0.25);
--x-board-font-number: "Inter", "SF Pro Display", var(--x-font-sans);
}
/* ── Ready-to-use colours ────────────────────────────────────────────────────
* Redeclared wherever the channels can change, so a nested data-theme /
* data-venue-theme container gets its own values (custom properties are