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:
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { lazy, Suspense, useEffect, useState } from 'react'
|
||||
import { BrowserRouter, Routes, Route, Navigate, useNavigate } from 'react-router-dom'
|
||||
import useAuthStore from './store/authStore'
|
||||
import AppLayout from './layouts/AppLayout'
|
||||
@@ -54,6 +54,9 @@ import SettingsPage from './pages/Settings/SettingsPage'
|
||||
import NotesPage from './pages/NotesPage'
|
||||
import PermissionGuard from './components/PermissionGuard'
|
||||
|
||||
// @xenia/ui visual check page, dev builds only (left out of production bundles)
|
||||
const UiGallery = import.meta.env.DEV ? lazy(() => import('@xenia/ui/gallery')) : null
|
||||
|
||||
function Spinner() {
|
||||
return (
|
||||
<div className="min-h-screen bg-slate-50 flex items-center justify-center">
|
||||
@@ -109,6 +112,7 @@ export default function App() {
|
||||
<AuthRehydrator>
|
||||
<Routes>
|
||||
<Route path="/setup" element={<SetupWizard />} />
|
||||
{UiGallery && <Route path="/ui-gallery" element={<Suspense fallback={null}><UiGallery /></Suspense>} />}
|
||||
<Route path="/login" element={<SetupGuard><LoginPage /></SetupGuard>} />
|
||||
<Route path="/kds" element={<RequireAuth><KdsPage /></RequireAuth>} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user