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
+3 -1
View File
@@ -4,7 +4,7 @@
import { useEffect, useState } from 'react'
import {
Button, Dialog, EmptyState, Field, IconButton, InfoTip, Input, PinPad, Select, Sheet,
Spinner, Switch, Textarea, ToastProvider, useToast,
Spinner, Stepper, Switch, Textarea, ToastProvider, useToast,
} from '../src/index.js'
import '../src/styles.css'
@@ -44,6 +44,7 @@ function Demo() {
const [locked, setLocked] = useState(false)
const [sheet, setSheet] = useState(null)
const [on, setOn] = useState(true)
const [step, setStep] = useState(30)
const [off, setOff] = useState(false)
const [name, setName] = useState('')
const [lang, setLang] = useState('el')
@@ -143,6 +144,7 @@ function Demo() {
<Switch checked={on} onChange={setOn} label="Print kitchen tickets" description="Send new items to the kitchen printer." />
<Switch checked={off} onChange={setOff} label="Alert after print failures" />
<Switch checked disabled label="Disabled (on)" />
<div style={row}><Stepper value={step} steps={[10, 15, 20, 30, 45, 60]} format={v => `${v}s`} onChange={setStep} label="Check every" /> <Stepper value={3} min={1} max={5} disabled label="Disabled" /></div>
<div style={row}>Alert after <InfoTip side="bottom">How many failed print attempts before managers are notified. 0 turns the alert off.</InfoTip></div>
</div>
</Section>