import type { Meta, StoryObj } from '@storybook/react-vite'; import { cn } from '@/lib/utils'; import { type ComponentMatrixCellProps, Story } from '../_internal/Story'; import { Select } from './Select'; const meta = { component: Select, parameters: { layout: 'fullscreen', }, title: 'components/form/Select', } satisfies Meta; export default meta; type StoryDefinition = StoryObj; type ThemeSelectStateProps = { disabled?: boolean; invalid?: boolean; triggerClassName?: string; value?: string; }; const STATE_COLUMNS: { key: string; label: string; props: ThemeSelectStateProps; }[] = [ { key: 'placeholder', label: 'Placeholder', props: {} }, { key: 'selected', label: 'Selected', props: { value: 'system' } }, { key: 'hover', label: 'Hover', props: { triggerClassName: 'pseudo-hover', value: 'system' }, }, { key: 'focus', label: 'Focus', props: { triggerClassName: 'pseudo-focus-visible', value: 'system' }, }, { key: 'disabled', label: 'Disabled', props: { disabled: true, value: 'system' }, }, { key: 'invalid', label: 'Invalid', props: { invalid: true, value: 'system' }, }, ]; const STATE_PROPS = Object.fromEntries( STATE_COLUMNS.map((state) => [state.key, state.props]), ) as Record; function SelectMatrixCell({ column }: ComponentMatrixCellProps) { return ; } function ThemeSelect({ disabled, invalid, triggerClassName, value, }: ThemeSelectStateProps) { return ( ); } export const All: StoryDefinition = { render: () => ( ), };