{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "step-indicator", "title": "Step Indicator", "description": "Ordered multi-step progress list with status markers (completed, saved, in progress, error, cannot start) and an aria-current step, plus a sectioned StepNav wrapper.", "dependencies": [ "clsx", "tailwind-merge" ], "registryDependencies": [ "https://ui.digital.nsw.gov.au/registry/r/theme.json", "https://ui.digital.nsw.gov.au/registry/r/link.json", "https://ui.digital.nsw.gov.au/registry/r/icons.json" ], "files": [ { "path": "src/components/step-indicator.tsx", "content": "'use client'\n\nimport React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nimport { Link } from '@/components/link'\nimport { IconCheck } from '@/icons/check'\nimport { IconError } from '@/icons/error'\nimport { IconMoreHoriz } from '@/icons/more-horiz'\nimport { IconRemove } from '@/icons/remove'\n\n/**\n * Progress state of a single step in a multi-step journey.\n *\n * `'default'` is the unannotated baseline (a step with no `status` set) and\n * renders identically to `'not-started'` — both exist because the nswds-app\n * source distinguished them, and consumers may key behaviour off the\n * difference even though the visual is shared.\n */\ntype StepStatus =\n 'default' | 'not-started' | 'in-progress' | 'completed' | 'saved' | 'error' | 'cannot-start'\n\n/** One entry in a {@link StepIndicator} list. */\ntype Step = {\n /** Visible step name, e.g. \"Your details\". */\n title: string\n /** Optional second line under the title. */\n description?: string\n /** Navigation target; also the identity compared against `currentHref`. */\n href: string\n /** Progress state. Omitted = `'default'` (renders as not started). */\n status?: StepStatus\n}\n\n/**\n * Per-status visual treatment, collapsed from the nswds-app source's seven\n * copy-pasted JSX branches into one map. Every colour funnels through a single\n * `--step-ink` custom property declared on the `