import React from 'react'; import '../../styles/base.module.css'; import { StepState } from './Step'; import { AllElementPropsWithoutRef } from '../../utils/elementTypings'; type Language = 'en' | 'fi' | 'sv' | string; export interface StepperCustomTheme { /** * A custom background color for stepper */ '--hds-stepper-background-color'?: string; /** * A custom color for stepper */ '--hds-stepper-color'?: string; /** * A custom width for step */ '--hds-step-width'?: string; /** * A custom color for selected step label */ '--hds-selected-step-label-color'?: string; /** * A custom color for not selected step label */ '--hds-not-selected-step-label-color'?: string; /** * A custom color for step circle background */ '--hds-step-background-color'?: string; /** * A custom color for step circle content */ '--hds-step-content-color'?: string; /** * A custom color for stepper focus borders */ '--hds-stepper-focus-border-color'?: string; } type Steps = { /** * The state of the step */ state: StepState; /** * The label of the step */ label: string; }[]; export type StepperProps = AllElementPropsWithoutRef<'div'> & { /** * A custom className passed to stepper */ className?: string; /** * A custom class name for step heading */ headingClassName?: string; /** * The language of the stepper */ language?: Language; /** * A callback function for custom action on step click */ onStepClick?: (event: React.MouseEvent, stepIndex: number) => void; /** * A function for rendering a custom aria-label for step's state */ renderCustomStateAriaLabel?: (stepIndex: number, state: StepState) => string; /** * A function for rendering a custom step count label */ renderCustomStepCountLabel?: (stepIndex: number, totalNumberOfSteps: number) => string; /** * A function for rendering a custom step heading */ renderCustomStepHeading?: (stepIndex: number, totalNumberOfSteps: number, label: string) => string; /** * The index of the selected step. Used to set the aria-current="step" attribute to the active step */ selectedStep?: number; /** * Boolean indicating small variant usage */ small?: boolean; /** * A boolean indicating step heading variant usage */ stepHeading?: boolean; /** * Step heading aria level */ stepHeadingAriaLevel?: number; /** * The steps of the stepper */ steps: Steps; /** * Custom theme */ theme?: StepperCustomTheme; }; export declare const Stepper: ({ className, language, selectedStep, small, renderCustomStepCountLabel, renderCustomStateAriaLabel, onStepClick, stepHeading, stepHeadingAriaLevel, headingClassName, "data-testid": dataTestId, renderCustomStepHeading, steps, theme, ...rest }: StepperProps) => React.JSX.Element; export {};