import type { Meta, StoryObj } from '@storybook/react-vite' import { ProgressBar } from './ProgressBar' const meta = { title: 'Components/ProgressBar', component: ProgressBar, tags: ['autodocs'], parameters: { layout: 'centered' }, decorators: [ (Story) => (
), ], argTypes: { style: { control: 'select', options: ['THIN', 'THICK'] }, color: { control: 'text' }, labelPosition: { control: 'select', options: ['ABOVE', 'ADJACENT', 'COLLAPSED', 'JUSTIFIED'] }, }, } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { args: { label: 'Task Completion', instructions: '143 of 150 tasks completed', percentage: 95, color: 'ACCENT', style: 'THICK', }, } export const ThinStyle: Story = { args: { label: 'Thin Progress Bar', percentage: 75, color: 'ACCENT', style: 'THIN', }, } export const ThickStyle: Story = { args: { label: 'Thick Progress Bar', percentage: 75, color: 'ACCENT', style: 'THICK', }, } export const SemanticColors: Story = { args: { percentage: 80, }, render: () => (
), } export const CustomHexColor: Story = { args: { label: 'Custom Hex Color', percentage: 85, color: 'VIOLET_500', }, } export const HiddenPercentage: Story = { args: { label: 'Without Percentage Display', instructions: 'Percentage text hidden', percentage: 45, color: 'ACCENT', showPercentage: false, }, } export const OverflowPercentage: Story = { args: { label: 'Edge Cases', instructions: 'Handles values outside 0-100 range', percentage: 120, color: 'WARN', }, } export const CollapsedLabel: Story = { args: { label: 'Collapsed Label', labelPosition: 'COLLAPSED', percentage: 55, color: 'POSITIVE', accessibilityText: 'Hidden label progress bar at 55 percent', }, }