cc-haha/desktop/gallery.html
程序员阿江(Relakkes) 9dd7295cd2 feat(desktop): add a dev-only component gallery
Renders every `components/ui` primitive under each of the three themes at
`/gallery.html`, reachable under `bun run dev` with no backend.

Unit tests assert structure and ARIA. They cannot tell whether a token
resolves to a readable color, whether an overlay lands above the thing it
is meant to cover, or whether an entrance animation actually plays. Three
defects surfaced here that had a full green suite behind them:

- `Button` and `IconButton` swallowed refs, so `Tooltip` had nothing to
  measure and `Dropdown` could not return focus. Console warning only.
- The light theme's warning badge sat at 2.66:1.
- `Dropdown`'s Escape closed the dialog behind it as well.

Vite's build input is `index.html` alone, so this never enters the
production bundle.
2026-07-26 18:31:34 +08:00

13 lines
315 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>components/ui gallery</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/dev/gallery.tsx"></script>
</body>
</html>