mx-ui-components
Version:
mobius ui library
92 lines (91 loc) • 2.53 kB
TypeScript
import BaseComponent from "../Counter/BaseComponent";
export default class Stepper extends BaseComponent {
stepsElement: stepStateT[];
prevStep: number;
curStep: number;
curAction: string;
currentStepId: string | undefined;
defaultStepsStyles: stepStylesT;
private stepperContainerStyles;
private stepperContainerElement;
private stepsDefaultStyles;
private _props;
private stepperObj;
private curStepData;
private prevStepData;
constructor();
static get observedAttributes(): string[];
attributeChangedCallback(name: string, oldValue: string | null, newValue: string): void;
connectedCallback(): void;
initStepperObj(): void;
handleStepper(curState: any): void;
getCurStateStyles(stepData: stepStateT): {
startStyle: string | undefined;
progressStyle: string | undefined;
doneStyle: string | undefined;
};
filterStyles(filterFrom: string, styles2filter?: string): string;
handleNextStep(curAppliedStyles: string, stepStyles: any): string;
handlePrevStep(curAppliedStyles: string, stepStyles: any): string;
updateStepsElement(): void;
createStepper(): void;
createTimeline(): void;
updateTimeline(): void;
updateConnectedComp(): void;
}
export { Stepper };
export declare enum stepState {
"START" = "start",
"PROGRESS" = "progress",
"DONE" = "done"
}
export type stepStateT = {
id: string;
state: stepState;
stepStyles: stepStylesT;
connectedComponentIds?: string | string[];
};
export type iconT = {
src: string;
alt?: string;
styles?: string;
};
export type stepStateStyles = {
styles?: string;
icons?: iconT;
};
export type stepStylesT = {
start?: stepStateStyles;
progress?: stepStateStyles;
done?: stepStateStyles;
};
export type stepsDataT = {
id?: string;
title?: string;
description?: string;
connectedComponentIds?: string | string[];
stepStyles?: stepStylesT;
hide?: boolean;
};
export declare enum Direction {
HORIZONTAL = "horizontal",
VERTICAL = "vertical"
}
export declare enum EVariant {
DEFAULT = "default",
PROGRESS = "progress",
DETAILED = "detailed",
VERTICAL = "vertical",
BREADCRUMB = "breadcrumb",
TIMELINE = "timeline"
}
export interface StepperVariant {
type: EVariant;
direction?: Direction;
}
export interface IStepper {
variant: StepperVariant;
stepsData?: stepsDataT[];
stepsCount?: number;
stepperContainerStyles?: string;
}