import React from "react"; import { StoryObj, Meta } from "@storybook/react-vite"; import List from "./list"; const meta: Meta = { title: "FP.React Components/List", tags: ["stable", "version:1.0.0", "accessibility:wcag-aa"], component: List, parameters: { docs: { description: { component: ` A flexible, accessible list component supporting unordered (ul), ordered (ol), and definition (dl) lists with WCAG 2.1 AA compliance. ## Features - 🎯 Multiple list types (ul, ol, dl) - ♿ WCAG 2.1 AA compliant - 🎨 Built-in variants (inline, compact, spaced, custom, none) - ⚡ React.forwardRef support - 📦 Compound component pattern - 🎨 CSS custom properties for theming ## Accessibility - Semantic HTML with native screen reader support - role="list" override for Safari/VoiceOver when styling is removed - ARIA label support - Keyboard navigation compatible `, }, }, }, argTypes: { type: { control: "select", options: ["ul", "ol", "dl"], description: "Type of list element to render", table: { defaultValue: { summary: "ul" }, }, }, variant: { control: "select", options: ["none", "inline", "compact", "spaced", "custom"], description: "Variant for custom styling", table: { defaultValue: { summary: "undefined" }, }, }, role: { control: "text", description: "ARIA role override (use 'list' when removing list styling)", }, "aria-label": { control: "text", description: "Accessible label for screen readers", }, children: { control: false, description: "Child elements (typically List.ListItem components)", }, styles: { control: "object", description: "Inline CSS styles (can include CSS custom properties)", }, }, } as Meta; export default meta; type Story = StoryObj; // ============================================================================= // Basic Examples // ============================================================================= export const DefaultUnorderedList: Story = { args: { children: ( <> React - A JavaScript library for building UIs TypeScript - JavaScript with syntax for types SCSS - Syntactically Awesome Style Sheets ), }, parameters: { docs: { description: { story: "Basic unordered list with default bullet styling. Uses semantic `