UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

73 lines (72 loc) 2.45 kB
import { EventEmitter, VNode } from "../../stencil-public-runtime"; import { NumberingSystem } from "../../utils/locale"; import { Layout, Scale } from "../interfaces"; import { StepperItemChangeEventDetail, StepperItemKeyEventDetail } from "./interfaces"; /** * @slot - A slot for adding `calcite-stepper-item` elements. */ export declare class Stepper { el: HTMLCalciteStepperElement; /** When `true`, displays a status icon in the `calcite-stepper-item` heading. */ icon: boolean; /** Defines the layout of the component. */ layout: Extract<"horizontal" | "vertical", Layout>; /** When `true`, displays the step number in the `calcite-stepper-item` heading. */ numbered: boolean; /** * Specifies the Unicode numeral system used by the component for localization. */ numberingSystem?: NumberingSystem; numberingSystemChange(): void; /** * Specifies the component's selected item. * * @readonly */ selectedItem: HTMLCalciteStepperItemElement; /** Specifies the size of the component. */ scale: Scale; /** * Fires when the active `calcite-stepper-item` changes. * */ calciteStepperItemChange: EventEmitter<void>; /** * Fires when the active `calcite-stepper-item` changes. * * @internal */ calciteInternalStepperItemChange: EventEmitter<StepperItemChangeEventDetail>; componentDidLoad(): void; render(): VNode; calciteInternalStepperItemKeyEvent(event: CustomEvent<StepperItemKeyEventDetail>): void; registerItem(event: CustomEvent): void; updateItem(event: CustomEvent): void; handleUserRequestedStepperItemSelect(): void; /** Set the next `calcite-stepper-item` as active. */ nextStep(): Promise<void>; /** Set the previous `calcite-stepper-item` as active. */ prevStep(): Promise<void>; /** * Set a specified `calcite-stepper-item` as active. * * @param step */ goToStep(step: number): Promise<void>; /** Set the first `calcite-stepper-item` as active. */ startStep(): Promise<void>; /** Set the last `calcite-stepper-item` as active. */ endStep(): Promise<void>; private itemMap; /** list of sorted Stepper items */ private items; /** list of enabled Stepper items */ private enabledItems; /** keep track of the currently active item position */ private currentPosition; private getEnabledStepIndex; private updateStep; private sortItems; private filterItems; private setStepperItemNumberingSystem; }