feat(ui): @xenia/ui design tokens, Tailwind preset and base components

Platform-v2 step 2.3 (APPS_PLATFORM D-15 §9):
- tokens.css: --x- prefixed colours (light/dark/system + 5 venue accent themes),
  spacing, radius, type scale, shadows, motion, z-index; variables only
- components.css: .x-* classes only, no element selectors (new rule CS-16)
- Button, IconButton, Dialog, Sheet, Toast, PinPad, InfoTip, EmptyState,
  Spinner, Field/Input/Textarea/Select, Switch (accessible: focus trap and
  restore, ARIA wiring, 44px targets)
- tailwind-preset.js (adds names only); manager uses it + styles.css, the
  waiter imports tokens.css; existing screens unchanged
- dev-only /ui-gallery in the manager; e2e suite tests/e2e/ui.mjs; unit tests
  for PIN rules and WCAG AA contrast of every token pair, both in run-all

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 19:33:58 +02:00
co-authored by Claude Opus 5.5
parent c7102f1c89
commit 3580f2815c
36 changed files with 1920 additions and 8 deletions
+19
View File
@@ -0,0 +1,19 @@
import { cx } from '../internal/cx.js'
import { ModalFrame } from '../internal/ModalFrame.jsx'
/**
* A panel that slides in from the bottom (phones: action sheets, pickers) or the
* right (desktop: detail and edit panels). Same props and behaviour as Dialog.
* side: 'bottom' | 'right'
*/
export function Sheet({ side = 'bottom', className, ...props }) {
return (
<ModalFrame
{...props}
overlayClass={`x-overlay--${side}`}
panelClass={cx('x-sheet', `x-sheet--${side}`, className)}
bodyClass="x-sheet__body"
grip={side === 'bottom'}
/>
)
}