blob: 49e5452a1c39afb92c0c1984127bb3471638ee67 [file] [log] [blame]
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
*/
import { Component, Input } from '@angular/core';
import { mixinDisabled, mixinDisableRipple } from '@covalent/core/common';
import { StepState } from '../step.component';
export class TdStepHeaderBase {
}
/* tslint:disable-next-line */
/** @type {?} */
export const _TdStepHeaderMixinBase = mixinDisableRipple(mixinDisabled(TdStepHeaderBase));
export class TdStepHeaderComponent extends _TdStepHeaderMixinBase {
constructor() {
super(...arguments);
/**
* state?: StepState or ['none' | 'required' | 'complete']
* Sets styles for state of header.
* Defaults to [StepState.None | 'none'].
*/
this.state = StepState.None;
}
/**
* Returns 'true' if [state] equals to [StepState.Complete | 'complete'], else 'false'.
* @return {?}
*/
isComplete() {
return this.state === StepState.Complete;
}
/**
* Returns 'true' if [state] equals to [StepState.Required | 'required'], else 'false'.
* @return {?}
*/
isRequired() {
return this.state === StepState.Required;
}
}
TdStepHeaderComponent.decorators = [
{ type: Component, args: [{
selector: 'td-step-header',
inputs: ['disabled', 'disableRipple'],
template: "<div class=\"td-step-header\"\n [class.mat-disabled]=\"disabled\"\n matRipple\n [matRippleDisabled]=\"disabled || disableRipple\"\n [tabIndex]=\"disabled ? -1 : (tabIndex || 0)\">\n <div class=\"td-circle\"\n [class.mat-inactive]=\"(!active && !isComplete()) || disabled\"\n [class.mat-active]=\"active && !disabled\"\n *ngIf=\"!isRequired() && !isComplete()\">\n <span *ngIf=\"(active || !isComplete())\">{{number || ''}}</span>\n </div>\n <div class=\"td-complete\" *ngIf=\"isComplete()\">\n <mat-icon class=\"mat-complete\">check_circle</mat-icon>\n </div>\n <div class=\"td-triangle\"\n [class.bg-muted]=\"disabled\"\n *ngIf=\"isRequired()\">\n <mat-icon class=\"mat-warn\">warning</mat-icon>\n </div>\n <div class=\"td-step-label-wrapper\"\n [class.mat-inactive]=\"(!active && !isComplete()) || disabled\"\n [class.mat-warn]=\"isRequired() && !disabled\">\n <div class=\"td-step-label\">\n <ng-content select=\"[td-step-header-label]\"></ng-content>\n </div>\n <div class=\"td-step-sublabel\">\n <ng-content select=\"[td-step-header-sublabel]\"></ng-content>\n </div>\n </div>\n <span class=\"td-step-header-separator\"></span>\n <mat-icon class=\"td-edit-icon\" *ngIf=\"isComplete() && !active && !disabled\">mode_edit</mat-icon>\n</div>",
styles: [".td-step-header{position:relative;outline:0;min-width:120px;height:72px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;max-width:100%}.td-step-header:hover:not(.mat-disabled){cursor:pointer}.td-step-header mat-icon.td-edit-icon{margin:0 8px}.td-step-header mat-icon.mat-warn{font-size:24px;height:24px;width:24px}.td-step-header mat-icon.mat-complete{position:relative;left:-2px;top:2px;font-size:28px;height:24px;width:24px}.td-step-header .td-circle{height:24px;width:24px;line-height:24px;border-radius:99%;text-align:center;-webkit-box-flex:0;-ms-flex:none;flex:none}.td-step-header .td-circle mat-icon{margin-top:2px;font-weight:700}.td-step-header .td-triangle>mat-icon{font-size:25px}::ng-deep :not([dir=rtl]) .td-step-header .td-circle,::ng-deep :not([dir=rtl]) .td-step-header .td-complete,::ng-deep :not([dir=rtl]) .td-step-header .td-triangle{margin-left:8px;margin-right:0}::ng-deep [dir=rtl] .td-step-header .td-circle,::ng-deep [dir=rtl] .td-step-header .td-complete,::ng-deep [dir=rtl] .td-step-header .td-triangle{margin-left:0;margin-right:8px}.td-step-header .td-circle,.td-step-header .td-complete{font-size:14px}.td-step-header .td-step-label-wrapper{padding-left:8px;padding-right:8px}.td-step-header .td-step-header-separator{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box}"]
}] }
];
TdStepHeaderComponent.propDecorators = {
number: [{ type: Input, args: ['number',] }],
active: [{ type: Input, args: ['active',] }],
state: [{ type: Input, args: ['state',] }],
tabIndex: [{ type: Input, args: ['tabIndex',] }]
};
if (false) {
/**
* Number assigned to [TdStepHeaderComponent].
* @type {?}
*/
TdStepHeaderComponent.prototype.number;
/**
* active?: boolean
* Sets for active/inactive states on header.
* @type {?}
*/
TdStepHeaderComponent.prototype.active;
/**
* state?: StepState or ['none' | 'required' | 'complete']
* Sets styles for state of header.
* Defaults to [StepState.None | 'none'].
* @type {?}
*/
TdStepHeaderComponent.prototype.state;
/**
* tabIndex?: number
* tabIndex of the step header for a11y
* @type {?}
*/
TdStepHeaderComponent.prototype.tabIndex;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RlcC1oZWFkZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGNvdmFsZW50L2NvcmUvc3RlcHMvIiwic291cmNlcyI6WyJzdGVwLWhlYWRlci9zdGVwLWhlYWRlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRWpELE9BQU8sRUFBZSxhQUFhLEVBQXFCLGtCQUFrQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFMUcsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBRTlDLE1BQU0sT0FBTyxnQkFBZ0I7Q0FBRzs7O0FBR2hDLE1BQU0sT0FBTyxzQkFBc0IsR0FBRyxrQkFBa0IsQ0FBQyxhQUFhLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQVF6RixNQUFNLE9BQU8scUJBQXNCLFNBQVEsc0JBQXNCO0lBTmpFOzs7Ozs7O1FBd0JrQix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