UNPKG

@crediblefinance/credible-ui

Version:

Credible's standard UI library

32 lines 13.2 kB
import { Component, EventEmitter, Input, Output } from '@angular/core'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; export class CfVerticalProgressBarComponent { selectedIndex = 0; currentState = ''; steps = []; currentStep = 0; changeStep = new EventEmitter(); theme = 'dark'; constructor() { } ngOnInit() { } changeStepHandler(index) { this.changeStep.emit(index); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CfVerticalProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: CfVerticalProgressBarComponent, selector: "cf-vertical-progress-bar", inputs: { steps: "steps", currentStep: "currentStep", theme: "theme" }, outputs: { changeStep: "changeStep" }, ngImport: i0, template: "<div class=\"cf-vertical-progress-bar\" [ngClass]=\"theme\">\n <div class=\"step-container\" *ngFor=\"let step of steps; let i = index\">\n <div class=\"step-heading\">\n <div class=\"step\" [ngClass]=\"{\n 'step-active': i === currentStep,\n 'step-complete': step.completed\n }\" (click)=\"changeStepHandler(i)\">\n <div class=\"step-counter\">\n <span *ngIf=\"!step.completed\" style=\"bottom: 5px; position: relative;\">{{ i + 1 }}</span>\n <i class=\"fa-solid fa-check\" *ngIf=\"step.completed\"></i>\n </div>\n <div class=\"step-title\">{{ step.label }}</div>\n </div>\n </div>\n\n <div class=\"step-content\">\n {{ step.content }}\n </div>\n </div>\n</div>", styles: [".cf-vertical-progress-bar .step-container{padding-left:0rem;padding-right:1rem;padding-bottom:.5rem}.cf-vertical-progress-bar .step-container .step-heading{display:flex;justify-content:left;margin-top:0;gap:.5rem}.cf-vertical-progress-bar .step-container .step-heading .step{display:flex;gap:.5rem;align-items:center}.cf-vertical-progress-bar .step-container .step-heading .step:hover{cursor:pointer}.cf-vertical-progress-bar .step-container .step-heading .step .step-counter{border-radius:50%;background-color:#24252b;color:#d3d3d3;width:30px;height:30px;font-size:.9rem;align-items:center;text-align:center;display:grid}.cf-vertical-progress-bar .step-container .step-heading .step .step-title{color:#d3d3d3}.cf-vertical-progress-bar .step-container .step-heading .step .step-divider{color:#d3d3d3;width:100px}.cf-vertical-progress-bar .step-container .step-heading .step:last-child .step-divider{display:none!important}.cf-vertical-progress-bar .step-container .step-heading .step-active .step-counter{font-weight:500}.cf-vertical-progress-bar .step-container .step-heading .step-active .step-title{color:#fff;font-weight:500}.cf-vertical-progress-bar .step-container .step-heading .step-complete .step-counter{background-color:#cf0;color:#000;width:25px;height:25px}.cf-vertical-progress-bar .step-container .step-heading .step-complete .step-title{color:#cf0}.cf-vertical-progress-bar .step-container .step-content{padding-left:1rem;margin-left:.75rem;margin-top:1rem;min-height:1rem}.cf-vertical-progress-bar .step-container:last-child .step-content{border-left:none}.cf-vertical-progress-bar.dark .step-container .step-heading .step .step-counter{background-color:#24252b;color:#d3d3d3}.cf-vertical-progress-bar.dark .step-container .step-heading .step .step-title,.cf-vertical-progress-bar.dark .step-container .step-heading .step .step-divider{color:#d3d3d3}.cf-vertical-progress-bar.dark .step-container .step-heading .step-active .step-title{color:#fff}.cf-vertical-progress-bar.dark .step-container .step-heading .step-complete .step-counter{background-color:#cf0;color:#000}.cf-vertical-progress-bar.dark .step-container .step-heading .step-complete .step-title{color:#cf0;font-weight:400}.cf-vertical-progress-bar.dark .step-container .step-content{border-left:.1px solid grey;color:#d3d3d3}.cf-vertical-progress-bar.light .step-container .step-heading .step .step-counter{background-color:#d3d3d3;color:#000}.cf-vertical-progress-bar.light .step-container .step-heading .step .step-title,.cf-vertical-progress-bar.light .step-container .step-heading .step .step-divider{color:gray}.cf-vertical-progress-bar.light .step-container .step-heading .step-active .step-title{color:#000}.cf-vertical-progress-bar.light .step-container .step-heading .step-complete .step-counter{background-color:#cf0;color:#000}.cf-vertical-progress-bar.light .step-container .step-heading .step-complete .step-title{color:#000;font-weight:700}.cf-vertical-progress-bar.light .step-container .step-content{color:gray;border-left:.2px solid lightgrey}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CfVerticalProgressBarComponent, decorators: [{ type: Component, args: [{ selector: 'cf-vertical-progress-bar', template: "<div class=\"cf-vertical-progress-bar\" [ngClass]=\"theme\">\n <div class=\"step-container\" *ngFor=\"let step of steps; let i = index\">\n <div class=\"step-heading\">\n <div class=\"step\" [ngClass]=\"{\n 'step-active': i === currentStep,\n 'step-complete': step.completed\n }\" (click)=\"changeStepHandler(i)\">\n <div class=\"step-counter\">\n <span *ngIf=\"!step.completed\" style=\"bottom: 5px; position: relative;\">{{ i + 1 }}</span>\n <i class=\"fa-solid fa-check\" *ngIf=\"step.completed\"></i>\n </div>\n <div class=\"step-title\">{{ step.label }}</div>\n </div>\n </div>\n\n <div class=\"step-content\">\n {{ step.content }}\n </div>\n </div>\n</div>", styles: [".cf-vertical-progress-bar .step-container{padding-left:0rem;padding-right:1rem;padding-bottom:.5rem}.cf-vertical-progress-bar .step-container .step-heading{display:flex;justify-content:left;margin-top:0;gap:.5rem}.cf-vertical-progress-bar .step-container .step-heading .step{display:flex;gap:.5rem;align-items:center}.cf-vertical-progress-bar .step-container .step-heading .step:hover{cursor:pointer}.cf-vertical-progress-bar .step-container .step-heading .step .step-counter{border-radius:50%;background-color:#24252b;color:#d3d3d3;width:30px;height:30px;font-size:.9rem;align-items:center;text-align:center;display:grid}.cf-vertical-progress-bar .step-container .step-heading .step .step-title{color:#d3d3d3}.cf-vertical-progress-bar .step-container .step-heading .step .step-divider{color:#d3d3d3;width:100px}.cf-vertical-progress-bar .step-container .step-heading .step:last-child .step-divider{display:none!important}.cf-vertical-progress-bar .step-container .step-heading .step-active .step-counter{font-weight:500}.cf-vertical-progress-bar .step-container .step-heading .step-active .step-title{color:#fff;font-weight:500}.cf-vertical-progress-bar .step-container .step-heading .step-complete .step-counter{background-color:#cf0;color:#000;width:25px;height:25px}.cf-vertical-progress-bar .step-container .step-heading .step-complete .step-title{color:#cf0}.cf-vertical-progress-bar .step-container .step-content{padding-left:1rem;margin-left:.75rem;margin-top:1rem;min-height:1rem}.cf-vertical-progress-bar .step-container:last-child .step-content{border-left:none}.cf-vertical-progress-bar.dark .step-container .step-heading .step .step-counter{background-color:#24252b;color:#d3d3d3}.cf-vertical-progress-bar.dark .step-container .step-heading .step .step-title,.cf-vertical-progress-bar.dark .step-container .step-heading .step .step-divider{color:#d3d3d3}.cf-vertical-progress-bar.dark .step-container .step-heading .step-active .step-title{color:#fff}.cf-vertical-progress-bar.dark .step-container .step-heading .step-complete .step-counter{background-color:#cf0;color:#000}.cf-vertical-progress-bar.dark .step-container .step-heading .step-complete .step-title{color:#cf0;font-weight:400}.cf-vertical-progress-bar.dark .step-container .step-content{border-left:.1px solid grey;color:#d3d3d3}.cf-vertical-progress-bar.light .step-container .step-heading .step .step-counter{background-color:#d3d3d3;color:#000}.cf-vertical-progress-bar.light .step-container .step-heading .step .step-title,.cf-vertical-progress-bar.light .step-container .step-heading .step .step-divider{color:gray}.cf-vertical-progress-bar.light .step-container .step-heading .step-active .step-title{color:#000}.cf-vertical-progress-bar.light .step-container .step-heading .step-complete .step-counter{background-color:#cf0;color:#000}.cf-vertical-progress-bar.light .step-container .step-heading .step-complete .step-title{color:#000;font-weight:700}.cf-vertical-progress-bar.light .step-container .step-content{color:gray;border-left:.2px solid lightgrey}\n"] }] }], ctorParameters: () => [], propDecorators: { steps: [{ type: Input }], currentStep: [{ type: Input }], changeStep: [{ type: Output }], theme: [{ type: Input }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Yt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rpdj5cbiAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgPGRpdiBjbGFzcz1cInN0ZXAtY29udGVudFwiPlxuICAgICAgICAgICAge3sgc3RlcC5jb250ZW50IH19XG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuPC9kaXY+Il19