import type { Meta, StoryObj } from '@storybook/react-vite'; import { css } from 'styled-system/css'; const meta = { title: 'Foundations/Shape', parameters: { layout: 'padded' }, } satisfies Meta; export default meta; type Story = StoryObj; // ── Pre-declared css() calls — Panda CSS statically extracts these ───────────── // (dynamic template literals cannot be extracted; explicit literals are required) const radiusBox: Record = { none: css({ borderRadius: 'none', bg: 'primary.subtle.bg', borderColor: 'primary.outline.border', }), extraSmall: css({ borderRadius: 'extraSmall', bg: 'primary.subtle.bg', borderColor: 'primary.outline.border', }), small: css({ borderRadius: 'small', bg: 'primary.subtle.bg', borderColor: 'primary.outline.border', }), medium: css({ borderRadius: 'medium', bg: 'primary.subtle.bg', borderColor: 'primary.outline.border', }), large: css({ borderRadius: 'large', bg: 'primary.subtle.bg', borderColor: 'primary.outline.border', }), extraLarge: css({ borderRadius: 'extraLarge', bg: 'primary.subtle.bg', borderColor: 'primary.outline.border', }), full: css({ borderRadius: 'full', bg: 'primary.subtle.bg', borderColor: 'primary.outline.border', }), }; // ── Data ──────────────────────────────────────────────────────────────────────── const RADII: { token: string; value: string; wide?: boolean }[] = [ { token: 'none', value: '0px' }, { token: 'extraSmall', value: '4px' }, { token: 'small', value: '8px' }, { token: 'medium', value: '12px' }, { token: 'large', value: '16px' }, { token: 'extraLarge', value: '28px' }, { token: 'full', value: '9999px', wide: true }, ]; // ── Shared helpers ────────────────────────────────────────────────────────────── function SectionHeading({ title, description, }: { title: string; description: string; }) { return (

{title}

{description}

); } // ── Story 1: Radii Tokens ────────────────────────────────────────────────────── export const RadiiTokens: Story = { name: '1 · Border Radius Tokens', render: () => (
{RADII.map(({ token, value, wide }) => (
{token} {value}
))}
), };