Progress and Stepper #33
Reference in New Issue
Block a user
Delete Branch "adilallo/component/ProgressStepper"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement Progress and Stepper components (CR-46)
Overview
This PR implements two separate components for progress tracking: Progress (progress bar) and Stepper (step indicator). These components are part of the component implementation plan and will be used in future components like Modal for multi-step workflows.
The Progress component displays a 3-segment progress bar with support for partial fills, showing progress states from 1-0 through 3-2. The Stepper component displays a series of dots indicating the current active step in a multi-step process.
Both components follow the container/presentation pattern, use design tokens, and include comprehensive tests and Storybook stories.
Changes
Progress Component (
app/components/Progress/)Progress.container.tsx- Container logic with default state handlingProgress.view.tsx- Presentational component with 3-segment progress bar renderingProgress.types.ts- TypeScript interfaces for ProgressBarState (1-0 through 3-2)index.tsx- Default exportStepper Component (
app/components/Stepper/)Stepper.container.tsx- Container logic with default values (5 steps, active step 1)Stepper.view.tsx- Presentational component with dot indicatorsStepper.types.ts- TypeScript interfaces for StepperPropsindex.tsx- Default exportvar(--color-surface-inverse-secondary)Tests
tests/components/Progress.test.tsx- Unit tests with componentTestSuite, accessibility tests, and behavioral tests for all progress statestests/components/Stepper.test.tsx- Unit tests with componentTestSuite, accessibility tests, and behavioral tests for step renderingStorybook Stories
stories/Progress.stories.js- Stories for Default and AllStates (1-0 through 3-2)stories/Stepper.stories.js- Stories for Default and AllStates (active steps 1-5)Components Preview Page
app/components-preview/page.tsx- Added sections for Progress and Stepper components with all states displayedDesign Tokens Used
var(--spacing-scale-008),var(--spacing-scale-012)var(--color-content-default-brand-primary),var(--color-surface-default-secondary),var(--color-surface-inverse-secondary)var(--radius-full)Screenshots
How to Test
npm run storybook
Progress and Stepper Componentsto Progress and Stepper