import { default as React, JSX } from 'react'; import { SelectedAriaAttributes } from '../../types'; import { DSLanguage } from '../../utils'; import { StepState } from './Step.utils'; import { StepperAlignment, StepperAriaAttributes, StepperOrientation, StepperTranslations } from './Stepper.utils'; export interface Step { /** Label text displayed for the Step. */ label: string; /** Short descriptive text displayed beneath the label. */ hint?: string; /** Disables the Step, preventing user interaction. * @default false */ disabled?: boolean; /** * State of the Step. If set to 'current', the step is highlighted as the current step. * @default undefined */ state?: StepState; /** Callback function called when the Step is clicked. */ onClick?: (event: React.MouseEvent) => void; } export interface StepperProps extends React.HTMLAttributes { /** ARIA attributes to enhance accessibility * `{'aria-label'?: string;` * `'aria-labelledby'?: string;}` * */ aria: SelectedAriaAttributes; /** An array of Step Objects containing the label and other optional parameters. * `{label: string; hint: string; disabled?: boolean; state?: 'current' | 'completed' | undefined; onClick?: (event: React.MouseEvent) => void;}[]`*/ steps: Step[]; /** Callback function called when the selection of the Stepper changes. */ onStepChange: (selectedStepIndex: number) => void; /** Alignment of the DSStepper. * @default 'left' */ alignment?: StepperAlignment; /** Sets language for screen reader messages and ICU plural rule resolution. * Use `'de'` or `'en'` for preconfigured translations, or any * [BCP 47 language tag](https://www.rfc-editor.org/info/bcp47) (e.g. `'fr'`, `'pl'`, `'en-GB'`) * when providing a custom `translations` object. * @default 'en' */ lang?: DSLanguage; /** Orientation of the DSStepper. * @default 'horizontal' */ orientation?: StepperOrientation; /** Translations for the DSStepper. Use our [customization page](/?path=/docs/components-stepper-translations--documentation) for creating custom translations. */ translations?: StepperTranslations; } /** * The `` component provides an accessible step-based navigation pattern following the `aria-current="step"` specification. * It is a **controlled component** and does not manage its own state. * It renders steps as buttons inside an ordered list (`
    `) wrapped in a semantic `