import type { Meta, StoryObj } from '@storybook/react-vite'; import { expect, within } from 'storybook/test'; import { biergartenThemes } from '../app/lib/themes'; const themesDescription = `Palette reference for all Biergarten themes. Each panel shows the main semantic color pairs, status tokens, and custom content tokens so you can catch contrast issues, pairing mistakes, and mood drift before they show up in real components.`; function ThemeSwatch({ label, className }: { label: string; className: string }) { return
{label}
; } /** For custom tokens not covered by Tailwind utilities (surface, muted, highlight). */ function CssVarSwatch({ label, bg, color }: { label: string; bg: string; color: string }) { return (
{label}
); } function TextTokenSample({ label, background, text, }: { label: string; background: string; text: string; }) { return (

{label}

Secondary copy, placeholders, and helper text.

); } function ThemePanel({ label, value, vibe }: { label: string; value: string; vibe: string }) { return (

{label}

{vibe}

{/* Core palette */}

Core

{/* Status tokens */}

Status

{/* Content tokens (custom) */}

Content

Semantic tokens stay stable while the atmosphere changes.
); } const meta = { title: 'Themes/Biergarten Themes', parameters: { layout: 'fullscreen', docs: { description: { component: themesDescription, }, }, }, tags: ['autodocs'], render: () => (
{biergartenThemes.map((theme) => ( ))}
), } satisfies Meta; export default meta; type Story = StoryObj; export const Gallery: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); for (const theme of biergartenThemes) { await expect(canvas.getByRole('heading', { name: theme.label })).toBeInTheDocument(); } }, };