UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

31 lines (30 loc) 1.58 kB
import { Step } from './Step'; import { StepperProps } from './Stepper'; export type StepperAriaAttributes = 'aria-label' | 'aria-labelledby'; export declare const STEPPER_ALIGNMENT: readonly ["left", "center"]; export type StepperAlignment = (typeof STEPPER_ALIGNMENT)[number]; export declare const STEPPER_ORIENTATION: readonly ["horizontal", "vertical"]; export type StepperOrientation = (typeof STEPPER_ORIENTATION)[number]; export type ValidateStepperPropsParams = Pick<StepperProps, 'aria' | 'steps'>; export declare const validateStepperProps: ({ aria, steps, }: ValidateStepperPropsParams) => void; export declare const validateIsLiveRegionPresentForStepper: () => void; export type StepperLanguage = 'en' | 'de'; export type StepperTranslations = typeof DS_STEPPER_TRANSLATIONS_EN; export declare const DS_STEPPER_TRANSLATIONS_EN: { current: string; completed: string; step: string; of: string; }; export declare const DS_STEPPER_TRANSLATIONS_DE: StepperTranslations; export declare const DS_STEPPER_TRANSLATIONS: Record<StepperLanguage, StepperTranslations>; /** * Get the current step in the stepper. * If no step is marked as 'current', the last step with a defined state is returned. * If no steps have a defined state, the first step is returned. * @param steps The array of steps. * @returns The current step. */ export declare const getCurrentStep: (steps: Step[]) => Step; export declare const getCurrentStepIndex: (steps: Step[]) => number; export declare const isStepClickable: (state: Step["state"], disabled: boolean | undefined) => boolean;