igniteui-angular-sovn
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
93 lines (76 loc) • 2.19 kB
text/typescript
import { Directive, ElementRef, HostBinding, Inject, Input } from '@angular/core';
import { IgxStep, IGX_STEP_COMPONENT } from './stepper.common';
import { IgxStepperService } from './stepper.service';
export class IgxStepActiveIndicatorDirective { }
export class IgxStepCompletedIndicatorDirective { }
export class IgxStepInvalidIndicatorDirective { }
export class IgxStepIndicatorDirective { }
export class IgxStepTitleDirective {
public defaultClass = true;
}
export class IgxStepSubTitleDirective {
public defaultClass = true;
}
export class IgxStepContentDirective {
private get target(): IgxStep {
return this.step;
}
public defaultClass = true;
public role = 'tabpanel';
public get stepId(): string {
return this.target.id;
}
public id = this.target.id.replace('step', 'content');
public get tabIndex(): number {
if (this._tabIndex !== null) {
return this._tabIndex;
}
return this.stepperService.activeStep === this.target ? 0 : -1;
}
public set tabIndex(val: number) {
this._tabIndex = val;
}
private _tabIndex = null;
constructor(
private step: IgxStep,
private stepperService: IgxStepperService,
public elementRef: ElementRef<HTMLElement>
) { }
}