cps-ui-kit 0.51.0 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/esm2020/lib/components/cps-tab-group/cps-tab/cps-tab.component.mjs +37 -0
- package/esm2020/lib/components/cps-tab-group/cps-tab-group.component.mjs +137 -0
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/cps-ui-kit.mjs +164 -2
- package/fesm2015/cps-ui-kit.mjs.map +1 -1
- package/fesm2020/cps-ui-kit.mjs +164 -2
- package/fesm2020/cps-ui-kit.mjs.map +1 -1
- package/lib/components/cps-tab-group/cps-tab/cps-tab.component.d.ts +14 -0
- package/lib/components/cps-tab-group/cps-tab-group.component.d.ts +25 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
package/README.md
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, TemplateRef, ViewChild } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export class CpsTabComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.label = '';
|
|
8
|
+
this.icon = '';
|
|
9
|
+
this.tooltipText = '';
|
|
10
|
+
this.tooltipContentClass = 'cps-tooltip-content';
|
|
11
|
+
this.tooltipMaxWidth = '100%';
|
|
12
|
+
this.tooltipPersistent = false;
|
|
13
|
+
this.active = false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
CpsTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
CpsTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CpsTabComponent, isStandalone: true, selector: "cps-tab", inputs: { label: "label", icon: "icon", tooltipText: "tooltipText", tooltipContentClass: "tooltipContentClass", tooltipMaxWidth: "tooltipMaxWidth", tooltipPersistent: "tooltipPersistent" }, viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabComponent, decorators: [{
|
|
19
|
+
type: Component,
|
|
20
|
+
args: [{ standalone: true, imports: [CommonModule], selector: 'cps-tab', template: "<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n" }]
|
|
21
|
+
}], propDecorators: { label: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}], icon: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}], tooltipText: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], tooltipContentClass: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], tooltipMaxWidth: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], tooltipPersistent: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], content: [{
|
|
34
|
+
type: ViewChild,
|
|
35
|
+
args: [TemplateRef]
|
|
36
|
+
}] } });
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3BzLXRhYi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcHMtdWkta2l0L3NyYy9saWIvY29tcG9uZW50cy9jcHMtdGFiLWdyb3VwL2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|
|
1
|
+
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { Component, ContentChildren, EventEmitter, Input, Output } from '@angular/core';
|
|
4
|
+
import { CpsIconComponent } from '../cps-icon/cps-icon.component';
|
|
5
|
+
import { CpsTabComponent } from './cps-tab/cps-tab.component';
|
|
6
|
+
import { CpsTooltipDirective } from '../../directives/cps-tooltip.directive';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@angular/common";
|
|
9
|
+
export class CpsTabGroupComponent {
|
|
10
|
+
// eslint-disable-next-line no-useless-constructor
|
|
11
|
+
constructor(cdRef) {
|
|
12
|
+
this.cdRef = cdRef;
|
|
13
|
+
this.selectedIndex = 0;
|
|
14
|
+
this.isSubTabs = false; // applies an alternative styling to tabs
|
|
15
|
+
this.animationType = 'slide';
|
|
16
|
+
this.initAllTabsContent = false;
|
|
17
|
+
this.animationState = 'slideLeft';
|
|
18
|
+
this.beforeTabChanged = new EventEmitter();
|
|
19
|
+
this.afterTabChanged = new EventEmitter();
|
|
20
|
+
}
|
|
21
|
+
ngAfterContentInit() {
|
|
22
|
+
this.selectTab(this.selectedIndex);
|
|
23
|
+
}
|
|
24
|
+
ngAfterViewInit() {
|
|
25
|
+
this.cdRef.detectChanges();
|
|
26
|
+
}
|
|
27
|
+
selectTab(newSelectedIndex) {
|
|
28
|
+
const _tabs = this.tabs.toArray();
|
|
29
|
+
const currentSelectedTab = _tabs && _tabs[this.selectedIndex];
|
|
30
|
+
this.beforeTabChanged.emit({
|
|
31
|
+
currentTabIndex: this.selectedIndex,
|
|
32
|
+
newTabIndex: newSelectedIndex
|
|
33
|
+
});
|
|
34
|
+
currentSelectedTab && (currentSelectedTab.active = false);
|
|
35
|
+
const newSelectedTab = _tabs && _tabs[newSelectedIndex];
|
|
36
|
+
newSelectedTab && (newSelectedTab.active = true);
|
|
37
|
+
if (newSelectedIndex === this.selectedIndex) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (this.animationType === 'slide') {
|
|
41
|
+
this.animationState =
|
|
42
|
+
newSelectedIndex < this.selectedIndex ? 'slideLeft' : 'slideRight';
|
|
43
|
+
this.selectedIndex = newSelectedIndex;
|
|
44
|
+
this.afterTabChanged.emit({
|
|
45
|
+
currentTabIndex: newSelectedIndex
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else if (this.animationType === 'fade') {
|
|
49
|
+
this.animationState = 'fadeOut';
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
this.animationState = 'fadeIn';
|
|
52
|
+
this.selectedIndex = newSelectedIndex;
|
|
53
|
+
this.afterTabChanged.emit({
|
|
54
|
+
currentTabIndex: newSelectedIndex
|
|
55
|
+
});
|
|
56
|
+
}, 100);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
get selectedTab() {
|
|
60
|
+
return this.tabs.find((t) => t.active);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
CpsTabGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabGroupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
+
CpsTabGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CpsTabGroupComponent, isStandalone: true, selector: "cps-tab-group", inputs: { selectedIndex: "selectedIndex", isSubTabs: "isSubTabs", animationType: "animationType", initAllTabsContent: "initAllTabsContent" }, outputs: { beforeTabChanged: "beforeTabChanged", afterTabChanged: "afterTabChanged" }, queries: [{ propertyName: "tabs", predicate: CpsTabComponent }], ngImport: i0, template: "<ul class=\"cps-tabs\" [ngClass]=\"{ 'cps-tabs-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs; let tabIndex = index\">\n <li\n *ngIf=\"tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\"\n [cpsTooltip]=\"tab.tooltipText\"\n tooltipOpenDelay=\"1000\"\n tooltipCloseDelay=\"0\"\n tooltipPosition=\"bottom\"\n [tooltipMaxWidth]=\"tab.tooltipMaxWidth\"\n [tooltipPersistent]=\"tab.tooltipPersistent\"\n [tooltipContentClass]=\"tab.tooltipContentClass\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n <li\n *ngIf=\"!tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n </ng-container>\n</ul>\n<div\n class=\"cps-tab-content\"\n [ngClass]=\"{ 'cps-tab-content-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs\">\n <div\n [@slideInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'slide'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n [@fadeInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'fade'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'slide'\"\n [@slideInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'fade'\"\n [@fadeInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [":host .cps-tab-content{position:relative;min-height:100px;padding:10px}:host .cps-tabs{display:flex;list-style:none;padding:0;margin:0}:host .cps-tabs .cps-tab{display:inline-flex;align-items:center;justify-content:center;min-width:150px;padding:0 24px;font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:500;font-size:15px;line-height:20px;color:var(--cps-color-text-dark);opacity:1;cursor:pointer;border-bottom:3px solid transparent}:host .cps-tabs .cps-tab.active{color:var(--cps-color-calm)}:host .cps-tabs .cps-tab-link{text-decoration:none;padding:10px;color:inherit;transition:border-bottom-color .3s}:host .cps-tabs:not(.cps-tabs-subtabs){border-bottom:1px solid rgba(0,0,0,.12)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab.active{color:var(--cps-color-calm);border-bottom:3px solid var(--cps-color-surprise)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab:hover:not(.active){border-bottom:3px solid var(--cps-color-line-light)}:host .cps-tabs.cps-tabs-subtabs .cps-tab{height:33px;background-color:#d7d7d759}:host .cps-tabs.cps-tabs-subtabs .cps-tab.active{background-color:#fff}:host .cps-tabs.cps-tabs-subtabs .cps-tab:hover{color:var(--cps-color-calm)}:host .cps-tab-content.cps-tab-content-subtabs{background-color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "directive", type: CpsTooltipDirective, selector: "[cpsTooltip]", inputs: ["cpsTooltip", "tooltipOpenDelay", "tooltipCloseDelay", "tooltipOpenOn", "tooltipPosition", "tooltipPersistent", "tooltipDisabled", "tooltipMaxWidth", "tooltipContentClass"] }], animations: [
|
|
65
|
+
trigger('slideInOut', [
|
|
66
|
+
state('slideLeft', style({ transform: 'translateX(0)' })),
|
|
67
|
+
state('slideRight', style({ transform: 'translateX(0)' })),
|
|
68
|
+
transition('* => slideLeft', [
|
|
69
|
+
style({ transform: 'translateX(-100%)' }),
|
|
70
|
+
animate('200ms ease-in')
|
|
71
|
+
]),
|
|
72
|
+
transition('* => slideRight', [
|
|
73
|
+
style({ transform: 'translateX(100%)' }),
|
|
74
|
+
animate('200ms ease-in')
|
|
75
|
+
])
|
|
76
|
+
]),
|
|
77
|
+
trigger('fadeInOut', [
|
|
78
|
+
state('fadeIn', style({ opacity: 1 })),
|
|
79
|
+
state('fadeOut', style({ opacity: 0 })),
|
|
80
|
+
transition('fadeOut => fadeIn', [
|
|
81
|
+
style({ opacity: 0 }),
|
|
82
|
+
animate('100ms ease-in')
|
|
83
|
+
]),
|
|
84
|
+
transition('fadeIn => fadeOut', [
|
|
85
|
+
animate('0ms ease-out', style({ opacity: 0 }))
|
|
86
|
+
])
|
|
87
|
+
])
|
|
88
|
+
] });
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabGroupComponent, decorators: [{
|
|
90
|
+
type: Component,
|
|
91
|
+
args: [{ standalone: true, imports: [
|
|
92
|
+
CommonModule,
|
|
93
|
+
CpsIconComponent,
|
|
94
|
+
CpsTabComponent,
|
|
95
|
+
CpsTooltipDirective
|
|
96
|
+
], selector: 'cps-tab-group', animations: [
|
|
97
|
+
trigger('slideInOut', [
|
|
98
|
+
state('slideLeft', style({ transform: 'translateX(0)' })),
|
|
99
|
+
state('slideRight', style({ transform: 'translateX(0)' })),
|
|
100
|
+
transition('* => slideLeft', [
|
|
101
|
+
style({ transform: 'translateX(-100%)' }),
|
|
102
|
+
animate('200ms ease-in')
|
|
103
|
+
]),
|
|
104
|
+
transition('* => slideRight', [
|
|
105
|
+
style({ transform: 'translateX(100%)' }),
|
|
106
|
+
animate('200ms ease-in')
|
|
107
|
+
])
|
|
108
|
+
]),
|
|
109
|
+
trigger('fadeInOut', [
|
|
110
|
+
state('fadeIn', style({ opacity: 1 })),
|
|
111
|
+
state('fadeOut', style({ opacity: 0 })),
|
|
112
|
+
transition('fadeOut => fadeIn', [
|
|
113
|
+
style({ opacity: 0 }),
|
|
114
|
+
animate('100ms ease-in')
|
|
115
|
+
]),
|
|
116
|
+
transition('fadeIn => fadeOut', [
|
|
117
|
+
animate('0ms ease-out', style({ opacity: 0 }))
|
|
118
|
+
])
|
|
119
|
+
])
|
|
120
|
+
], template: "<ul class=\"cps-tabs\" [ngClass]=\"{ 'cps-tabs-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs; let tabIndex = index\">\n <li\n *ngIf=\"tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\"\n [cpsTooltip]=\"tab.tooltipText\"\n tooltipOpenDelay=\"1000\"\n tooltipCloseDelay=\"0\"\n tooltipPosition=\"bottom\"\n [tooltipMaxWidth]=\"tab.tooltipMaxWidth\"\n [tooltipPersistent]=\"tab.tooltipPersistent\"\n [tooltipContentClass]=\"tab.tooltipContentClass\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n <li\n *ngIf=\"!tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n </ng-container>\n</ul>\n<div\n class=\"cps-tab-content\"\n [ngClass]=\"{ 'cps-tab-content-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs\">\n <div\n [@slideInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'slide'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n [@fadeInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'fade'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'slide'\"\n [@slideInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'fade'\"\n [@fadeInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [":host .cps-tab-content{position:relative;min-height:100px;padding:10px}:host .cps-tabs{display:flex;list-style:none;padding:0;margin:0}:host .cps-tabs .cps-tab{display:inline-flex;align-items:center;justify-content:center;min-width:150px;padding:0 24px;font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:500;font-size:15px;line-height:20px;color:var(--cps-color-text-dark);opacity:1;cursor:pointer;border-bottom:3px solid transparent}:host .cps-tabs .cps-tab.active{color:var(--cps-color-calm)}:host .cps-tabs .cps-tab-link{text-decoration:none;padding:10px;color:inherit;transition:border-bottom-color .3s}:host .cps-tabs:not(.cps-tabs-subtabs){border-bottom:1px solid rgba(0,0,0,.12)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab.active{color:var(--cps-color-calm);border-bottom:3px solid var(--cps-color-surprise)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab:hover:not(.active){border-bottom:3px solid var(--cps-color-line-light)}:host .cps-tabs.cps-tabs-subtabs .cps-tab{height:33px;background-color:#d7d7d759}:host .cps-tabs.cps-tabs-subtabs .cps-tab.active{background-color:#fff}:host .cps-tabs.cps-tabs-subtabs .cps-tab:hover{color:var(--cps-color-calm)}:host .cps-tab-content.cps-tab-content-subtabs{background-color:#fff}\n"] }]
|
|
121
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tabs: [{
|
|
122
|
+
type: ContentChildren,
|
|
123
|
+
args: [CpsTabComponent]
|
|
124
|
+
}], selectedIndex: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], isSubTabs: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], animationType: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], initAllTabsContent: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], beforeTabChanged: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}], afterTabChanged: [{
|
|
135
|
+
type: Output
|
|
136
|
+
}] } });
|
|
137
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3BzLXRhYi1ncm91cC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcHMtdWkta2l0L3NyYy9saWIvY29tcG9uZW50cy9jcHMtdGFiLWdyb3VwL2Nwcy10YWItZ3JvdXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY3BzLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvY3BzLXRhYi1ncm91cC9jcHMtdGFiLWdyb3VwLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxPQUFPLEVBQ1AsS0FBSyxFQUNMLEtBQUssRUFDTCxVQUFVLEVBQ1YsT0FBTyxFQUNSLE1BQU0scUJBQXFCLENB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25lJyB9XCI+XG4gICAgICA8bmctY29udGFpbmVyIFtuZ1RlbXBsYXRlT3V0bGV0XT1cInRhYi5jb250ZW50XCI+PC9uZy1jb250YWluZXI+XG4gICAgPC9kaXY+XG4gICAgPGRpdlxuICAgICAgKm5nSWY9XCJpbml0QWxsVGFic0NvbnRlbnQgJiYgYW5pbWF0aW9uVHlwZSA9PT0gJ2ZhZGUnXCJcbiAgICAgIFtAZmFkZUluT3V0XT1cImFuaW1hdGlvblN0YXRlXCJcbiAgICAgIFtuZ1N0eWxlXT1cInsgZGlzcGxheTogdGFiLmFjdGl2ZSA/IG51bGwgOiAnbm9uZScgfVwiPlxuICAgICAgPG5nLWNvbnRhaW5lciBbbmdUZW1wbGF0ZU91dGxldF09XCJ0YWIuY29udGVudFwiPjwvbmctY29udGFpbmVyPlxuICAgIDwvZGl2PlxuICA8L25nLWNvbnRhaW5lcj5cbjwvZGl2PlxuIl19
|
package/esm2020/public-api.mjs
CHANGED
|
@@ -25,6 +25,8 @@ export * from './lib/components/cps-progress-linear/cps-progress-linear.componen
|
|
|
25
25
|
export * from './lib/components/cps-datepicker/cps-datepicker.component';
|
|
26
26
|
export * from './lib/components/cps-textarea/cps-textarea.component';
|
|
27
27
|
export * from './lib/components/cps-button-toggle/cps-button-toggle.component';
|
|
28
|
+
export * from './lib/components/cps-tab-group/cps-tab-group.component';
|
|
29
|
+
export * from './lib/components/cps-tab-group/cps-tab/cps-tab.component';
|
|
28
30
|
export * from './lib/directives/cps-tooltip.directive';
|
|
29
31
|
export * from './lib/utils/colors-utils';
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2Nwcy11aS1raXQvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYX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9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvY3BzLWJ1dHRvbi10b2dnbGUvY3BzLWJ1dHRvbi10b2dnbGUuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvY3BzLXRhYi1ncm91cC9jcHMtdGFiLWdyb3VwLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL2Nwcy10YWItZ3JvdXAvY3BzLXRhYi9jcHMtdGFiLmNvbXBvbmVudCc7XG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2RpcmVjdGl2ZXMvY3BzLXRvb2x0aXAuZGlyZWN0aXZlJztcblxuZXhwb3J0ICogZnJvbSAnLi9saWIvdXRpbHMvY29sb3JzLXV0aWxzJztcbiJdfQ==
|
package/fesm2015/cps-ui-kit.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { CommonModule, isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Input, Directive, HostListener, EventEmitter, Self, Optional, Output, ViewChild, Pipe, PLATFORM_ID, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, Host, ContentChild } from '@angular/core';
|
|
4
|
+
import { Component, Input, Directive, HostListener, EventEmitter, Self, Optional, Output, ViewChild, Pipe, PLATFORM_ID, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, Host, ContentChild, TemplateRef, ContentChildren } from '@angular/core';
|
|
5
5
|
import { Subscription } from 'rxjs';
|
|
6
6
|
import * as i1 from '@angular/forms';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
@@ -5172,6 +5172,168 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5172
5172
|
type: Output
|
|
5173
5173
|
}] } });
|
|
5174
5174
|
|
|
5175
|
+
class CpsTabComponent {
|
|
5176
|
+
constructor() {
|
|
5177
|
+
this.label = '';
|
|
5178
|
+
this.icon = '';
|
|
5179
|
+
this.tooltipText = '';
|
|
5180
|
+
this.tooltipContentClass = 'cps-tooltip-content';
|
|
5181
|
+
this.tooltipMaxWidth = '100%';
|
|
5182
|
+
this.tooltipPersistent = false;
|
|
5183
|
+
this.active = false;
|
|
5184
|
+
}
|
|
5185
|
+
}
|
|
5186
|
+
CpsTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5187
|
+
CpsTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CpsTabComponent, isStandalone: true, selector: "cps-tab", inputs: { label: "label", icon: "icon", tooltipText: "tooltipText", tooltipContentClass: "tooltipContentClass", tooltipMaxWidth: "tooltipMaxWidth", tooltipPersistent: "tooltipPersistent" }, viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
5188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabComponent, decorators: [{
|
|
5189
|
+
type: Component,
|
|
5190
|
+
args: [{ standalone: true, imports: [CommonModule], selector: 'cps-tab', template: "<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n" }]
|
|
5191
|
+
}], propDecorators: { label: [{
|
|
5192
|
+
type: Input
|
|
5193
|
+
}], icon: [{
|
|
5194
|
+
type: Input
|
|
5195
|
+
}], tooltipText: [{
|
|
5196
|
+
type: Input
|
|
5197
|
+
}], tooltipContentClass: [{
|
|
5198
|
+
type: Input
|
|
5199
|
+
}], tooltipMaxWidth: [{
|
|
5200
|
+
type: Input
|
|
5201
|
+
}], tooltipPersistent: [{
|
|
5202
|
+
type: Input
|
|
5203
|
+
}], content: [{
|
|
5204
|
+
type: ViewChild,
|
|
5205
|
+
args: [TemplateRef]
|
|
5206
|
+
}] } });
|
|
5207
|
+
|
|
5208
|
+
class CpsTabGroupComponent {
|
|
5209
|
+
// eslint-disable-next-line no-useless-constructor
|
|
5210
|
+
constructor(cdRef) {
|
|
5211
|
+
this.cdRef = cdRef;
|
|
5212
|
+
this.selectedIndex = 0;
|
|
5213
|
+
this.isSubTabs = false; // applies an alternative styling to tabs
|
|
5214
|
+
this.animationType = 'slide';
|
|
5215
|
+
this.initAllTabsContent = false;
|
|
5216
|
+
this.animationState = 'slideLeft';
|
|
5217
|
+
this.beforeTabChanged = new EventEmitter();
|
|
5218
|
+
this.afterTabChanged = new EventEmitter();
|
|
5219
|
+
}
|
|
5220
|
+
ngAfterContentInit() {
|
|
5221
|
+
this.selectTab(this.selectedIndex);
|
|
5222
|
+
}
|
|
5223
|
+
ngAfterViewInit() {
|
|
5224
|
+
this.cdRef.detectChanges();
|
|
5225
|
+
}
|
|
5226
|
+
selectTab(newSelectedIndex) {
|
|
5227
|
+
const _tabs = this.tabs.toArray();
|
|
5228
|
+
const currentSelectedTab = _tabs && _tabs[this.selectedIndex];
|
|
5229
|
+
this.beforeTabChanged.emit({
|
|
5230
|
+
currentTabIndex: this.selectedIndex,
|
|
5231
|
+
newTabIndex: newSelectedIndex
|
|
5232
|
+
});
|
|
5233
|
+
currentSelectedTab && (currentSelectedTab.active = false);
|
|
5234
|
+
const newSelectedTab = _tabs && _tabs[newSelectedIndex];
|
|
5235
|
+
newSelectedTab && (newSelectedTab.active = true);
|
|
5236
|
+
if (newSelectedIndex === this.selectedIndex) {
|
|
5237
|
+
return;
|
|
5238
|
+
}
|
|
5239
|
+
if (this.animationType === 'slide') {
|
|
5240
|
+
this.animationState =
|
|
5241
|
+
newSelectedIndex < this.selectedIndex ? 'slideLeft' : 'slideRight';
|
|
5242
|
+
this.selectedIndex = newSelectedIndex;
|
|
5243
|
+
this.afterTabChanged.emit({
|
|
5244
|
+
currentTabIndex: newSelectedIndex
|
|
5245
|
+
});
|
|
5246
|
+
}
|
|
5247
|
+
else if (this.animationType === 'fade') {
|
|
5248
|
+
this.animationState = 'fadeOut';
|
|
5249
|
+
setTimeout(() => {
|
|
5250
|
+
this.animationState = 'fadeIn';
|
|
5251
|
+
this.selectedIndex = newSelectedIndex;
|
|
5252
|
+
this.afterTabChanged.emit({
|
|
5253
|
+
currentTabIndex: newSelectedIndex
|
|
5254
|
+
});
|
|
5255
|
+
}, 100);
|
|
5256
|
+
}
|
|
5257
|
+
}
|
|
5258
|
+
get selectedTab() {
|
|
5259
|
+
return this.tabs.find((t) => t.active);
|
|
5260
|
+
}
|
|
5261
|
+
}
|
|
5262
|
+
CpsTabGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabGroupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5263
|
+
CpsTabGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CpsTabGroupComponent, isStandalone: true, selector: "cps-tab-group", inputs: { selectedIndex: "selectedIndex", isSubTabs: "isSubTabs", animationType: "animationType", initAllTabsContent: "initAllTabsContent" }, outputs: { beforeTabChanged: "beforeTabChanged", afterTabChanged: "afterTabChanged" }, queries: [{ propertyName: "tabs", predicate: CpsTabComponent }], ngImport: i0, template: "<ul class=\"cps-tabs\" [ngClass]=\"{ 'cps-tabs-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs; let tabIndex = index\">\n <li\n *ngIf=\"tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\"\n [cpsTooltip]=\"tab.tooltipText\"\n tooltipOpenDelay=\"1000\"\n tooltipCloseDelay=\"0\"\n tooltipPosition=\"bottom\"\n [tooltipMaxWidth]=\"tab.tooltipMaxWidth\"\n [tooltipPersistent]=\"tab.tooltipPersistent\"\n [tooltipContentClass]=\"tab.tooltipContentClass\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n <li\n *ngIf=\"!tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n </ng-container>\n</ul>\n<div\n class=\"cps-tab-content\"\n [ngClass]=\"{ 'cps-tab-content-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs\">\n <div\n [@slideInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'slide'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n [@fadeInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'fade'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'slide'\"\n [@slideInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'fade'\"\n [@fadeInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [":host .cps-tab-content{position:relative;min-height:100px;padding:10px}:host .cps-tabs{display:flex;list-style:none;padding:0;margin:0}:host .cps-tabs .cps-tab{display:inline-flex;align-items:center;justify-content:center;min-width:150px;padding:0 24px;font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:500;font-size:15px;line-height:20px;color:var(--cps-color-text-dark);opacity:1;cursor:pointer;border-bottom:3px solid transparent}:host .cps-tabs .cps-tab.active{color:var(--cps-color-calm)}:host .cps-tabs .cps-tab-link{text-decoration:none;padding:10px;color:inherit;transition:border-bottom-color .3s}:host .cps-tabs:not(.cps-tabs-subtabs){border-bottom:1px solid rgba(0,0,0,.12)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab.active{color:var(--cps-color-calm);border-bottom:3px solid var(--cps-color-surprise)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab:hover:not(.active){border-bottom:3px solid var(--cps-color-line-light)}:host .cps-tabs.cps-tabs-subtabs .cps-tab{height:33px;background-color:#d7d7d759}:host .cps-tabs.cps-tabs-subtabs .cps-tab.active{background-color:#fff}:host .cps-tabs.cps-tabs-subtabs .cps-tab:hover{color:var(--cps-color-calm)}:host .cps-tab-content.cps-tab-content-subtabs{background-color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CpsIconComponent, selector: "cps-icon", inputs: ["icon", "size", "color"] }, { kind: "directive", type: CpsTooltipDirective, selector: "[cpsTooltip]", inputs: ["cpsTooltip", "tooltipOpenDelay", "tooltipCloseDelay", "tooltipOpenOn", "tooltipPosition", "tooltipPersistent", "tooltipDisabled", "tooltipMaxWidth", "tooltipContentClass"] }], animations: [
|
|
5264
|
+
trigger('slideInOut', [
|
|
5265
|
+
state('slideLeft', style({ transform: 'translateX(0)' })),
|
|
5266
|
+
state('slideRight', style({ transform: 'translateX(0)' })),
|
|
5267
|
+
transition('* => slideLeft', [
|
|
5268
|
+
style({ transform: 'translateX(-100%)' }),
|
|
5269
|
+
animate('200ms ease-in')
|
|
5270
|
+
]),
|
|
5271
|
+
transition('* => slideRight', [
|
|
5272
|
+
style({ transform: 'translateX(100%)' }),
|
|
5273
|
+
animate('200ms ease-in')
|
|
5274
|
+
])
|
|
5275
|
+
]),
|
|
5276
|
+
trigger('fadeInOut', [
|
|
5277
|
+
state('fadeIn', style({ opacity: 1 })),
|
|
5278
|
+
state('fadeOut', style({ opacity: 0 })),
|
|
5279
|
+
transition('fadeOut => fadeIn', [
|
|
5280
|
+
style({ opacity: 0 }),
|
|
5281
|
+
animate('100ms ease-in')
|
|
5282
|
+
]),
|
|
5283
|
+
transition('fadeIn => fadeOut', [
|
|
5284
|
+
animate('0ms ease-out', style({ opacity: 0 }))
|
|
5285
|
+
])
|
|
5286
|
+
])
|
|
5287
|
+
] });
|
|
5288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CpsTabGroupComponent, decorators: [{
|
|
5289
|
+
type: Component,
|
|
5290
|
+
args: [{ standalone: true, imports: [
|
|
5291
|
+
CommonModule,
|
|
5292
|
+
CpsIconComponent,
|
|
5293
|
+
CpsTabComponent,
|
|
5294
|
+
CpsTooltipDirective
|
|
5295
|
+
], selector: 'cps-tab-group', animations: [
|
|
5296
|
+
trigger('slideInOut', [
|
|
5297
|
+
state('slideLeft', style({ transform: 'translateX(0)' })),
|
|
5298
|
+
state('slideRight', style({ transform: 'translateX(0)' })),
|
|
5299
|
+
transition('* => slideLeft', [
|
|
5300
|
+
style({ transform: 'translateX(-100%)' }),
|
|
5301
|
+
animate('200ms ease-in')
|
|
5302
|
+
]),
|
|
5303
|
+
transition('* => slideRight', [
|
|
5304
|
+
style({ transform: 'translateX(100%)' }),
|
|
5305
|
+
animate('200ms ease-in')
|
|
5306
|
+
])
|
|
5307
|
+
]),
|
|
5308
|
+
trigger('fadeInOut', [
|
|
5309
|
+
state('fadeIn', style({ opacity: 1 })),
|
|
5310
|
+
state('fadeOut', style({ opacity: 0 })),
|
|
5311
|
+
transition('fadeOut => fadeIn', [
|
|
5312
|
+
style({ opacity: 0 }),
|
|
5313
|
+
animate('100ms ease-in')
|
|
5314
|
+
]),
|
|
5315
|
+
transition('fadeIn => fadeOut', [
|
|
5316
|
+
animate('0ms ease-out', style({ opacity: 0 }))
|
|
5317
|
+
])
|
|
5318
|
+
])
|
|
5319
|
+
], template: "<ul class=\"cps-tabs\" [ngClass]=\"{ 'cps-tabs-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs; let tabIndex = index\">\n <li\n *ngIf=\"tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\"\n [cpsTooltip]=\"tab.tooltipText\"\n tooltipOpenDelay=\"1000\"\n tooltipCloseDelay=\"0\"\n tooltipPosition=\"bottom\"\n [tooltipMaxWidth]=\"tab.tooltipMaxWidth\"\n [tooltipPersistent]=\"tab.tooltipPersistent\"\n [tooltipContentClass]=\"tab.tooltipContentClass\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n <li\n *ngIf=\"!tab.tooltipText\"\n class=\"cps-tab\"\n (click)=\"selectTab(tabIndex)\"\n [ngClass]=\"{ active: tab.active }\">\n <cps-icon *ngIf=\"tab.icon\" class=\"cps-tab-icon\" [icon]=\"tab.icon\">\n </cps-icon>\n <a class=\"cps-tab-link\">{{ tab.label }}</a>\n </li>\n </ng-container>\n</ul>\n<div\n class=\"cps-tab-content\"\n [ngClass]=\"{ 'cps-tab-content-subtabs': isSubTabs }\">\n <ng-container *ngFor=\"let tab of tabs\">\n <div\n [@slideInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'slide'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n [@fadeInOut]=\"animationState\"\n *ngIf=\"tab.active && !initAllTabsContent && animationType === 'fade'\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'slide'\"\n [@slideInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n <div\n *ngIf=\"initAllTabsContent && animationType === 'fade'\"\n [@fadeInOut]=\"animationState\"\n [ngStyle]=\"{ display: tab.active ? null : 'none' }\">\n <ng-container [ngTemplateOutlet]=\"tab.content\"></ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [":host .cps-tab-content{position:relative;min-height:100px;padding:10px}:host .cps-tabs{display:flex;list-style:none;padding:0;margin:0}:host .cps-tabs .cps-tab{display:inline-flex;align-items:center;justify-content:center;min-width:150px;padding:0 24px;font-family:Source Sans Pro,sans-serif;font-style:normal;font-weight:500;font-size:15px;line-height:20px;color:var(--cps-color-text-dark);opacity:1;cursor:pointer;border-bottom:3px solid transparent}:host .cps-tabs .cps-tab.active{color:var(--cps-color-calm)}:host .cps-tabs .cps-tab-link{text-decoration:none;padding:10px;color:inherit;transition:border-bottom-color .3s}:host .cps-tabs:not(.cps-tabs-subtabs){border-bottom:1px solid rgba(0,0,0,.12)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab.active{color:var(--cps-color-calm);border-bottom:3px solid var(--cps-color-surprise)}:host .cps-tabs:not(.cps-tabs-subtabs) .cps-tab:hover:not(.active){border-bottom:3px solid var(--cps-color-line-light)}:host .cps-tabs.cps-tabs-subtabs .cps-tab{height:33px;background-color:#d7d7d759}:host .cps-tabs.cps-tabs-subtabs .cps-tab.active{background-color:#fff}:host .cps-tabs.cps-tabs-subtabs .cps-tab:hover{color:var(--cps-color-calm)}:host .cps-tab-content.cps-tab-content-subtabs{background-color:#fff}\n"] }]
|
|
5320
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tabs: [{
|
|
5321
|
+
type: ContentChildren,
|
|
5322
|
+
args: [CpsTabComponent]
|
|
5323
|
+
}], selectedIndex: [{
|
|
5324
|
+
type: Input
|
|
5325
|
+
}], isSubTabs: [{
|
|
5326
|
+
type: Input
|
|
5327
|
+
}], animationType: [{
|
|
5328
|
+
type: Input
|
|
5329
|
+
}], initAllTabsContent: [{
|
|
5330
|
+
type: Input
|
|
5331
|
+
}], beforeTabChanged: [{
|
|
5332
|
+
type: Output
|
|
5333
|
+
}], afterTabChanged: [{
|
|
5334
|
+
type: Output
|
|
5335
|
+
}] } });
|
|
5336
|
+
|
|
5175
5337
|
/*
|
|
5176
5338
|
* Public API Surface of cps-ui-kit
|
|
5177
5339
|
*/
|
|
@@ -5180,5 +5342,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
5180
5342
|
* Generated bundle index. Do not edit.
|
|
5181
5343
|
*/
|
|
5182
5344
|
|
|
5183
|
-
export { CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsDatepickerComponent, CpsExpansionPanelComponent, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsMenuComponent, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsSelectComponent, CpsTableColumnFilterDirective, CpsTableColumnSortableDirective, CpsTableComponent, CpsTagComponent, CpsTextareaComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory };
|
|
5345
|
+
export { CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsDatepickerComponent, CpsExpansionPanelComponent, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsMenuComponent, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsSelectComponent, CpsTabComponent, CpsTabGroupComponent, CpsTableColumnFilterDirective, CpsTableColumnSortableDirective, CpsTableComponent, CpsTagComponent, CpsTextareaComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory };
|
|
5184
5346
|
//# sourceMappingURL=cps-ui-kit.mjs.map
|