suis 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,7 @@ export * from './suis-breadcrumbs';
5
5
  export * from './suis-button';
6
6
  export * from './suis-button-link';
7
7
  export * from './suis-button-outlined';
8
+ export * from './suis-chart';
8
9
  export * from './suis-chip';
9
10
  export * from './suis-container';
10
11
  export * from './suis-dialog';
@@ -39,4 +40,4 @@ export * from './suis-text-area';
39
40
  export * from './suis-title';
40
41
  export * from './suis-toggle';
41
42
  export * from './suis-toolbar';
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNB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XRlbSc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtbmF2aWdhdGlvbi1pdGVtJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1ub3RpZmljYXRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5vdGlmaWNhdGlvbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXBhZ2luYXRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXByb2dyZXNzLWJhcic7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtc2VsZWN0JztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1zZWxlY3Qtb3B0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1zZWxlY3QtbXVsdGknO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXNwaW5uZXInO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXNwaW5uZXItY29udGFpbmVyJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10YWJsZSc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtdGFicyc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtdGV4dC1hcmVhJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10aXRsZSc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtdG9nZ2xlJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10b29sYmFyJztcbiJdfQ==
@@ -0,0 +1,3 @@
1
+ export * from './suis-chart.component';
2
+ export * from './suis-chart.interfaces';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtY2hhcnQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLWNoYXJ0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtY2hhcnQuaW50ZXJmYWNlcyc7XG4iXX0=
@@ -0,0 +1,35 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class SuisChartDataPipe {
4
+ transform(data, compareData) {
5
+ if (!compareData.length)
6
+ return data;
7
+ const combinedData = [];
8
+ data.forEach((item, index) => {
9
+ combinedData.push(item);
10
+ if (compareData.length - 1 >= index) {
11
+ combinedData.push({
12
+ ...compareData[index],
13
+ compare: true,
14
+ });
15
+ }
16
+ else {
17
+ combinedData.push({
18
+ value: 0,
19
+ compare: true,
20
+ });
21
+ }
22
+ });
23
+ return combinedData;
24
+ }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartDataPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
26
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SuisChartDataPipe, isStandalone: true, name: "suisChartData" }); }
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartDataPipe, decorators: [{
29
+ type: Pipe,
30
+ args: [{
31
+ name: 'suisChartData',
32
+ standalone: true,
33
+ }]
34
+ }] });
35
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1jaGFydC1kYXRhLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtY2hhcnQvc3Vpc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JldHVybiBjb21iaW5lZERhdGE7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,19 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class SuisChartHeightPipe {
4
+ transform(value, maxValue) {
5
+ if (value > maxValue)
6
+ return '100%';
7
+ return `${(value / maxValue) * 100}%`;
8
+ }
9
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartHeightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
10
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SuisChartHeightPipe, isStandalone: true, name: "suisChartHeight" }); }
11
+ }
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartHeightPipe, decorators: [{
13
+ type: Pipe,
14
+ args: [{
15
+ name: 'suisChartHeight',
16
+ standalone: true,
17
+ }]
18
+ }] });
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1jaGFydC1oZWlnaHQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1jaGFydC9zdWlzLWNoYXJ0LWhlaWdodC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQU1wRCxNQUFNLE9BQU8sbUJBQW1CO0lBQzlCLFNBQVMsQ0FBQyxLQUFhLEVBQUUsUUFBZ0I7UUFDdkMsSUFBSSxLQUFLLEdBQUcsUUFBUTtZQUFFLE9BQU8sTUFBTSxDQUFDO1FBQ3BDLE9BQU8sR0FBRyxDQUFDLEtBQUssR0FBRyxRQUFRLENBQUMsR0FBRyxHQUFHLEdBQUcsQ0FBQztJQUN4QyxDQUFDOytHQUpVLG1CQUFtQjs2R0FBbkIsbUJBQW1COzs0RkFBbkIsbUJBQW1CO2tCQUovQixJQUFJO21CQUFDO29CQUNKLElBQUksRUFBRSxpQkFBaUI7b0JBQ3ZCLFVBQVUsRUFBRSxJQUFJO2lCQUNqQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBpcGUsIFBpcGVUcmFuc2Zvcm0gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQFBpcGUoe1xuICBuYW1lOiAnc3Vpc0NoYXJ0SGVpZ2h0JyxcbiAgc3RhbmRhbG9uZTogdHJ1ZSxcbn0pXG5leHBvcnQgY2xhc3MgU3Vpc0NoYXJ0SGVpZ2h0UGlwZSBpbXBsZW1lbnRzIFBpcGVUcmFuc2Zvcm0ge1xuICB0cmFuc2Zvcm0odmFsdWU6IG51bWJlciwgbWF4VmFsdWU6IG51bWJlcik6IHN0cmluZyB7XG4gICAgaWYgKHZhbHVlID4gbWF4VmFsdWUpIHJldHVybiAnMTAwJSc7XG4gICAgcmV0dXJuIGAkeyh2YWx1ZSAvIG1heFZhbHVlKSAqIDEwMH0lYDtcbiAgfVxufVxuIl19
@@ -0,0 +1,82 @@
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
2
+ import { NgClass, NgForOf, NgIf } from '@angular/common';
3
+ import { SuisChartHeightPipe } from './suis-chart-height.pipe';
4
+ import { SuisNgClassPipe } from '../../pipes';
5
+ import { SuisChartDataPipe } from './suis-chart-data.pipe';
6
+ import * as i0 from "@angular/core";
7
+ export class SuisChartComponent {
8
+ constructor() {
9
+ /** @internal */
10
+ this._maxValue = 100;
11
+ /**
12
+ * Array of the chart bars labels. By default set to empty array.
13
+ */
14
+ this.labels = [];
15
+ /**
16
+ * Array of data values and optionally colors. Type of SuisChartDataItem[]. By default set to empty array.
17
+ */
18
+ this.data = [];
19
+ /**
20
+ * Sets the default color of the chart bars. Type of SuisColor. By default set to 'primary'.
21
+ */
22
+ this.color = 'primary';
23
+ /**
24
+ * Adjusts the width of the chart bars. Type of SuisSize. By default set to 'md'.
25
+ */
26
+ this.size = 'md';
27
+ /**
28
+ * Sets the maximum value automatically based on data values. By default set to false.
29
+ */
30
+ this.autoMax = false;
31
+ /**
32
+ * Array of comparision data values and optionally colors. Type of SuisChartDataItem[]. By default set to empty array.
33
+ */
34
+ this.compareData = [];
35
+ /**
36
+ * Sets the default color of the comparision chart bars. Type of SuisColor. By default set to 'warning'.
37
+ */
38
+ this.compareColor = 'warning';
39
+ }
40
+ /** @internal */
41
+ get maxValue() {
42
+ if (!this.autoMax)
43
+ return this._maxValue;
44
+ return Math.max(...[...this.data, ...this.compareData].map((item) => item.value));
45
+ }
46
+ /**
47
+ * Set the maximum value of the chart bars. By default set to 100.
48
+ */
49
+ set maxValue(value) {
50
+ this._maxValue = value;
51
+ }
52
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
53
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SuisChartComponent, isStandalone: true, selector: "suis-chart", inputs: { maxValue: "maxValue", labels: "labels", data: "data", color: "color", size: "size", autoMax: "autoMax", compareData: "compareData", compareColor: "compareColor" }, ngImport: i0, template: "<div class=\"suis-chart\">\n <div\n class=\"suis-chart__content\"\n [ngClass]=\"'suis-chart__content' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let item of data | suisChartData : compareData\"\n class=\"suis-chart__content__item\"\n [ngClass]=\"\n 'suis-chart__content__item'\n | suisNgClass\n : (item.compare ? item.color || compareColor : item.color || color)\n : (item.compare ? 'compare' : 'single')\n \"\n [style.height]=\"item.value | suisChartHeight : maxValue\"\n >\n <div class=\"suis-chart__content__item__value\">\n {{ item.value }}\n </div>\n </div>\n </div>\n <div\n class=\"suis-chart__labels\"\n [ngClass]=\"'suis-chart__labels' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let label of labels\"\n class=\"suis-chart__labels__item\"\n [class.suis-chart__labels__item--double]=\"compareData.length\"\n >\n {{ label }}\n </div>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block;height:100%}.suis-chart{height:100%}.suis-chart__content,.suis-chart__labels{display:flex;align-items:flex-end;justify-content:center}.suis-chart__content--xs .suis-chart__content__item,.suis-chart__content--xs .suis-chart__labels__item,.suis-chart__labels--xs .suis-chart__content__item,.suis-chart__labels--xs .suis-chart__labels__item{width:1rem}.suis-chart__content--xs .suis-chart__content__item:not(:last-child),.suis-chart__content--xs .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xs .suis-chart__content__item:not(:last-child),.suis-chart__labels--xs .suis-chart__labels__item:not(:last-child){margin-right:.5rem}.suis-chart__content--xs .suis-chart__content__item--compare,.suis-chart__content--xs .suis-chart__labels__item--compare,.suis-chart__labels--xs .suis-chart__content__item--compare,.suis-chart__labels--xs .suis-chart__labels__item--compare{margin-left:-.5rem}.suis-chart__content--xs .suis-chart__content__item--double,.suis-chart__content--xs .suis-chart__labels__item--double,.suis-chart__labels--xs .suis-chart__content__item--double,.suis-chart__labels--xs .suis-chart__labels__item--double{width:2rem}.suis-chart__content--sm .suis-chart__content__item,.suis-chart__content--sm .suis-chart__labels__item,.suis-chart__labels--sm .suis-chart__content__item,.suis-chart__labels--sm .suis-chart__labels__item{width:1.25rem}.suis-chart__content--sm .suis-chart__content__item:not(:last-child),.suis-chart__content--sm .suis-chart__labels__item:not(:last-child),.suis-chart__labels--sm .suis-chart__content__item:not(:last-child),.suis-chart__labels--sm .suis-chart__labels__item:not(:last-child){margin-right:.625rem}.suis-chart__content--sm .suis-chart__content__item--compare,.suis-chart__content--sm .suis-chart__labels__item--compare,.suis-chart__labels--sm .suis-chart__content__item--compare,.suis-chart__labels--sm .suis-chart__labels__item--compare{margin-left:-.625rem}.suis-chart__content--sm .suis-chart__content__item--double,.suis-chart__content--sm .suis-chart__labels__item--double,.suis-chart__labels--sm .suis-chart__content__item--double,.suis-chart__labels--sm .suis-chart__labels__item--double{width:2.5rem}.suis-chart__content--md .suis-chart__content__item,.suis-chart__content--md .suis-chart__labels__item,.suis-chart__labels--md .suis-chart__content__item,.suis-chart__labels--md .suis-chart__labels__item{width:1.5rem}.suis-chart__content--md .suis-chart__content__item:not(:last-child),.suis-chart__content--md .suis-chart__labels__item:not(:last-child),.suis-chart__labels--md .suis-chart__content__item:not(:last-child),.suis-chart__labels--md .suis-chart__labels__item:not(:last-child){margin-right:.75rem}.suis-chart__content--md .suis-chart__content__item--compare,.suis-chart__content--md .suis-chart__labels__item--compare,.suis-chart__labels--md .suis-chart__content__item--compare,.suis-chart__labels--md .suis-chart__labels__item--compare{margin-left:-.75rem}.suis-chart__content--md .suis-chart__content__item--double,.suis-chart__content--md .suis-chart__labels__item--double,.suis-chart__labels--md .suis-chart__content__item--double,.suis-chart__labels--md .suis-chart__labels__item--double{width:3rem}.suis-chart__content--lg .suis-chart__content__item,.suis-chart__content--lg .suis-chart__labels__item,.suis-chart__labels--lg .suis-chart__content__item,.suis-chart__labels--lg .suis-chart__labels__item{width:1.75rem}.suis-chart__content--lg .suis-chart__content__item:not(:last-child),.suis-chart__content--lg .suis-chart__labels__item:not(:last-child),.suis-chart__labels--lg .suis-chart__content__item:not(:last-child),.suis-chart__labels--lg .suis-chart__labels__item:not(:last-child){margin-right:.875rem}.suis-chart__content--lg .suis-chart__content__item--compare,.suis-chart__content--lg .suis-chart__labels__item--compare,.suis-chart__labels--lg .suis-chart__content__item--compare,.suis-chart__labels--lg .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--lg .suis-chart__content__item--double,.suis-chart__content--lg .suis-chart__labels__item--double,.suis-chart__labels--lg .suis-chart__content__item--double,.suis-chart__labels--lg .suis-chart__labels__item--double{width:3.5rem}.suis-chart__content--xl .suis-chart__content__item,.suis-chart__content--xl .suis-chart__labels__item,.suis-chart__labels--xl .suis-chart__content__item,.suis-chart__labels--xl .suis-chart__labels__item{width:2rem}.suis-chart__content--xl .suis-chart__content__item:not(:last-child),.suis-chart__content--xl .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xl .suis-chart__content__item:not(:last-child),.suis-chart__labels--xl .suis-chart__labels__item:not(:last-child){margin-right:1rem}.suis-chart__content--xl .suis-chart__content__item--compare,.suis-chart__content--xl .suis-chart__labels__item--compare,.suis-chart__labels--xl .suis-chart__content__item--compare,.suis-chart__labels--xl .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--xl .suis-chart__content__item--double,.suis-chart__content--xl .suis-chart__labels__item--double,.suis-chart__labels--xl .suis-chart__content__item--double,.suis-chart__labels--xl .suis-chart__labels__item--double{width:4rem}.suis-chart__content{height:100%}.suis-chart__content__item{background-color:#192a56;min-height:.0625rem;position:relative}.suis-chart__content__item--primary{background-color:#192a56}.suis-chart__content__item--secondary{background-color:#273c75}.suis-chart__content__item--tertiary{background-color:#dcdde1}.suis-chart__content__item--complementary{background-color:#f5f6fa}.suis-chart__content__item--success{background-color:#2ed573}.suis-chart__content__item--warning{background-color:#ffa502}.suis-chart__content__item--danger{background-color:#ff4757}.suis-chart__content__item--white{background-color:#fff}.suis-chart__content__item--gray{background-color:#bcbcbc}.suis-chart__content__item--dark{background-color:#000}.suis-chart__content__item__value{position:absolute;top:-1rem;text-align:center;width:100%;font-size:.75rem;color:#a4a7b0}.suis-chart__labels__item{margin-top:.25rem;font-size:.75rem;color:#a4a7b0;text-align:center}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SuisChartHeightPipe, name: "suisChartHeight" }, { kind: "pipe", type: SuisChartDataPipe, name: "suisChartData" }, { kind: "pipe", type: SuisNgClassPipe, name: "suisNgClass" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
54
+ }
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartComponent, decorators: [{
56
+ type: Component,
57
+ args: [{ selector: 'suis-chart', standalone: true, imports: [
58
+ NgForOf,
59
+ NgIf,
60
+ NgClass,
61
+ SuisChartHeightPipe,
62
+ SuisChartDataPipe,
63
+ SuisNgClassPipe,
64
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"suis-chart\">\n <div\n class=\"suis-chart__content\"\n [ngClass]=\"'suis-chart__content' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let item of data | suisChartData : compareData\"\n class=\"suis-chart__content__item\"\n [ngClass]=\"\n 'suis-chart__content__item'\n | suisNgClass\n : (item.compare ? item.color || compareColor : item.color || color)\n : (item.compare ? 'compare' : 'single')\n \"\n [style.height]=\"item.value | suisChartHeight : maxValue\"\n >\n <div class=\"suis-chart__content__item__value\">\n {{ item.value }}\n </div>\n </div>\n </div>\n <div\n class=\"suis-chart__labels\"\n [ngClass]=\"'suis-chart__labels' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let label of labels\"\n class=\"suis-chart__labels__item\"\n [class.suis-chart__labels__item--double]=\"compareData.length\"\n >\n {{ label }}\n </div>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block;height:100%}.suis-chart{height:100%}.suis-chart__content,.suis-chart__labels{display:flex;align-items:flex-end;justify-content:center}.suis-chart__content--xs .suis-chart__content__item,.suis-chart__content--xs .suis-chart__labels__item,.suis-chart__labels--xs .suis-chart__content__item,.suis-chart__labels--xs .suis-chart__labels__item{width:1rem}.suis-chart__content--xs .suis-chart__content__item:not(:last-child),.suis-chart__content--xs .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xs .suis-chart__content__item:not(:last-child),.suis-chart__labels--xs .suis-chart__labels__item:not(:last-child){margin-right:.5rem}.suis-chart__content--xs .suis-chart__content__item--compare,.suis-chart__content--xs .suis-chart__labels__item--compare,.suis-chart__labels--xs .suis-chart__content__item--compare,.suis-chart__labels--xs .suis-chart__labels__item--compare{margin-left:-.5rem}.suis-chart__content--xs .suis-chart__content__item--double,.suis-chart__content--xs .suis-chart__labels__item--double,.suis-chart__labels--xs .suis-chart__content__item--double,.suis-chart__labels--xs .suis-chart__labels__item--double{width:2rem}.suis-chart__content--sm .suis-chart__content__item,.suis-chart__content--sm .suis-chart__labels__item,.suis-chart__labels--sm .suis-chart__content__item,.suis-chart__labels--sm .suis-chart__labels__item{width:1.25rem}.suis-chart__content--sm .suis-chart__content__item:not(:last-child),.suis-chart__content--sm .suis-chart__labels__item:not(:last-child),.suis-chart__labels--sm .suis-chart__content__item:not(:last-child),.suis-chart__labels--sm .suis-chart__labels__item:not(:last-child){margin-right:.625rem}.suis-chart__content--sm .suis-chart__content__item--compare,.suis-chart__content--sm .suis-chart__labels__item--compare,.suis-chart__labels--sm .suis-chart__content__item--compare,.suis-chart__labels--sm .suis-chart__labels__item--compare{margin-left:-.625rem}.suis-chart__content--sm .suis-chart__content__item--double,.suis-chart__content--sm .suis-chart__labels__item--double,.suis-chart__labels--sm .suis-chart__content__item--double,.suis-chart__labels--sm .suis-chart__labels__item--double{width:2.5rem}.suis-chart__content--md .suis-chart__content__item,.suis-chart__content--md .suis-chart__labels__item,.suis-chart__labels--md .suis-chart__content__item,.suis-chart__labels--md .suis-chart__labels__item{width:1.5rem}.suis-chart__content--md .suis-chart__content__item:not(:last-child),.suis-chart__content--md .suis-chart__labels__item:not(:last-child),.suis-chart__labels--md .suis-chart__content__item:not(:last-child),.suis-chart__labels--md .suis-chart__labels__item:not(:last-child){margin-right:.75rem}.suis-chart__content--md .suis-chart__content__item--compare,.suis-chart__content--md .suis-chart__labels__item--compare,.suis-chart__labels--md .suis-chart__content__item--compare,.suis-chart__labels--md .suis-chart__labels__item--compare{margin-left:-.75rem}.suis-chart__content--md .suis-chart__content__item--double,.suis-chart__content--md .suis-chart__labels__item--double,.suis-chart__labels--md .suis-chart__content__item--double,.suis-chart__labels--md .suis-chart__labels__item--double{width:3rem}.suis-chart__content--lg .suis-chart__content__item,.suis-chart__content--lg .suis-chart__labels__item,.suis-chart__labels--lg .suis-chart__content__item,.suis-chart__labels--lg .suis-chart__labels__item{width:1.75rem}.suis-chart__content--lg .suis-chart__content__item:not(:last-child),.suis-chart__content--lg .suis-chart__labels__item:not(:last-child),.suis-chart__labels--lg .suis-chart__content__item:not(:last-child),.suis-chart__labels--lg .suis-chart__labels__item:not(:last-child){margin-right:.875rem}.suis-chart__content--lg .suis-chart__content__item--compare,.suis-chart__content--lg .suis-chart__labels__item--compare,.suis-chart__labels--lg .suis-chart__content__item--compare,.suis-chart__labels--lg .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--lg .suis-chart__content__item--double,.suis-chart__content--lg .suis-chart__labels__item--double,.suis-chart__labels--lg .suis-chart__content__item--double,.suis-chart__labels--lg .suis-chart__labels__item--double{width:3.5rem}.suis-chart__content--xl .suis-chart__content__item,.suis-chart__content--xl .suis-chart__labels__item,.suis-chart__labels--xl .suis-chart__content__item,.suis-chart__labels--xl .suis-chart__labels__item{width:2rem}.suis-chart__content--xl .suis-chart__content__item:not(:last-child),.suis-chart__content--xl .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xl .suis-chart__content__item:not(:last-child),.suis-chart__labels--xl .suis-chart__labels__item:not(:last-child){margin-right:1rem}.suis-chart__content--xl .suis-chart__content__item--compare,.suis-chart__content--xl .suis-chart__labels__item--compare,.suis-chart__labels--xl .suis-chart__content__item--compare,.suis-chart__labels--xl .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--xl .suis-chart__content__item--double,.suis-chart__content--xl .suis-chart__labels__item--double,.suis-chart__labels--xl .suis-chart__content__item--double,.suis-chart__labels--xl .suis-chart__labels__item--double{width:4rem}.suis-chart__content{height:100%}.suis-chart__content__item{background-color:#192a56;min-height:.0625rem;position:relative}.suis-chart__content__item--primary{background-color:#192a56}.suis-chart__content__item--secondary{background-color:#273c75}.suis-chart__content__item--tertiary{background-color:#dcdde1}.suis-chart__content__item--complementary{background-color:#f5f6fa}.suis-chart__content__item--success{background-color:#2ed573}.suis-chart__content__item--warning{background-color:#ffa502}.suis-chart__content__item--danger{background-color:#ff4757}.suis-chart__content__item--white{background-color:#fff}.suis-chart__content__item--gray{background-color:#bcbcbc}.suis-chart__content__item--dark{background-color:#000}.suis-chart__content__item__value{position:absolute;top:-1rem;text-align:center;width:100%;font-size:.75rem;color:#a4a7b0}.suis-chart__labels__item{margin-top:.25rem;font-size:.75rem;color:#a4a7b0;text-align:center}\n"] }]
65
+ }], propDecorators: { maxValue: [{
66
+ type: Input
67
+ }], labels: [{
68
+ type: Input
69
+ }], data: [{
70
+ type: Input
71
+ }], color: [{
72
+ type: Input
73
+ }], size: [{
74
+ type: Input
75
+ }], autoMax: [{
76
+ type: Input
77
+ }], compareData: [{
78
+ type: Input
79
+ }], compareColor: [{
80
+ type: Input
81
+ }] } });
82
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1jaGFydC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtY2hhcnQvc3Vpcy1jaGFydC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtY2hhcnQvc3Vpcy1jaGFydC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsd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iIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLWNoYXJ0L3N1aXMtY2hhcnQuaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3Vpc0NvbG9yIH0gZnJvbSAnLi4vLi4vdHlwZXMvc3Vpcy1jb2xvci50eXBlJztcblxuZXhwb3J0IGludGVyZmFjZSBTdWlzQ2hhcnREYXRhSXRlbSB7XG4gIHZhbHVlOiBudW1iZXI7XG4gIGNvbG9yPzogU3Vpc0NvbG9yO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFN1aXNDaGFydERhdGFDb21wYXJpc2lvbkl0ZW0ge1xuICB2YWx1ZTogbnVtYmVyO1xuICBjb2xvcj86IFN1aXNDb2xvcjtcbiAgY29tcGFyZT86IGJvb2xlYW47XG59XG4iXX0=
package/fesm2022/suis.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Pipe, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, Directive, signal, Injectable, inject, ChangeDetectorRef, ElementRef, forwardRef, ViewChild, HostListener, TemplateRef, ContentChild, NgModule, DestroyRef, ContentChildren } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
- import { NgClass, NgIf, NgFor, NgComponentOutlet, CommonModule, NgTemplateOutlet, NgSwitch, NgSwitchCase } from '@angular/common';
4
+ import { NgClass, NgIf, NgFor, NgForOf, NgComponentOutlet, CommonModule, NgTemplateOutlet, NgSwitch, NgSwitchCase } from '@angular/common';
5
5
  import * as i1 from '@angular/router';
6
6
  import { RouterModule } from '@angular/router';
7
7
  import * as i1$2 from '@angular/forms';
@@ -338,6 +338,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
338
338
  args: [{ selector: 'suis-button-outlined', standalone: true, imports: [NgIf, NgClass, SuisNgClassPipe, SuisSpinnerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n class=\"suis-button-outlined\"\n [class.suis-button-outlined--full-width]=\"fullWidth\"\n [ngClass]=\"'suis-button-outlined' | suisNgClass : color\"\n [attr.disabled]=\"disabled || loading ? true : undefined\"\n [attr.tabindex]=\"disabled || loading ? -1 : 0\"\n [attr.type]=\"type\"\n (click)=\"onClick()\"\n>\n <span\n class=\"suis-button-outlined__content\"\n [class.suis-button-outlined__content--loading]=\"loading\"\n >\n <ng-content></ng-content>\n </span>\n <suis-spinner *ngIf=\"loading\" size=\"xs\" [color]=\"color\"></suis-spinner>\n</button>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-button-outlined{width:-moz-fit-content;width:fit-content;display:flex;align-items:center;justify-content:center;padding:.375rem 1rem;border-radius:.25rem;text-align:center;text-decoration:none;transition:background-color .25s ease-in-out;font-size:.875rem;border-width:.125rem;border-style:solid;background-color:transparent}.suis-button-outlined--full-width{width:100%}.suis-button-outlined--disabled{opacity:.5}.suis-button-outlined__content{display:flex;align-items:center;justify-content:center}.suis-button-outlined__content--loading{visibility:hidden}.suis-button-outlined suis-spinner{position:absolute}.suis-button-outlined:disabled{opacity:.5}.suis-button-outlined:hover:not(:disabled){cursor:pointer}.suis-button-outlined:hover:disabled{cursor:not-allowed}.suis-button-outlined:focus,.suis-button-outlined:focus-within{outline:none}.suis-button-outlined--primary{border-color:#192a56;color:#192a56}.suis-button-outlined--primary:hover:not(:disabled){background-color:#192a56;color:#fff}.suis-button-outlined--primary:focus:not(:disabled){box-shadow:0 2px 5px #192a56bf}.suis-button-outlined--secondary{border-color:#273c75;color:#273c75}.suis-button-outlined--secondary:hover:not(:disabled){background-color:#273c75;color:#fff}.suis-button-outlined--secondary:focus:not(:disabled){box-shadow:0 2px 5px #273c75bf}.suis-button-outlined--tertiary{border-color:#dcdde1;color:#dcdde1}.suis-button-outlined--tertiary:hover:not(:disabled){background-color:#dcdde1;color:#2f3640}.suis-button-outlined--tertiary:focus:not(:disabled){box-shadow:0 2px 5px #dcdde1bf}.suis-button-outlined--complementary{border-color:#f5f6fa;color:#f5f6fa}.suis-button-outlined--complementary:hover:not(:disabled){background-color:#f5f6fa;color:#2f3640}.suis-button-outlined--complementary:focus:not(:disabled){box-shadow:0 2px 5px #f5f6fabf}.suis-button-outlined--success{border-color:#2ed573;color:#2ed573}.suis-button-outlined--success:hover:not(:disabled){background-color:#2ed573;color:#fff}.suis-button-outlined--success:focus:not(:disabled){box-shadow:0 2px 5px #2ed573bf}.suis-button-outlined--warning{border-color:#ffa502;color:#ffa502}.suis-button-outlined--warning:hover:not(:disabled){background-color:#ffa502;color:#fff}.suis-button-outlined--warning:focus:not(:disabled){box-shadow:0 2px 5px #ffa502bf}.suis-button-outlined--danger{border-color:#ff4757;color:#ff4757}.suis-button-outlined--danger:hover:not(:disabled){background-color:#ff4757;color:#fff}.suis-button-outlined--danger:focus:not(:disabled){box-shadow:0 2px 5px #ff4757bf}\n"] }]
339
339
  }] });
340
340
 
341
+ class SuisChartHeightPipe {
342
+ transform(value, maxValue) {
343
+ if (value > maxValue)
344
+ return '100%';
345
+ return `${(value / maxValue) * 100}%`;
346
+ }
347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartHeightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
348
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SuisChartHeightPipe, isStandalone: true, name: "suisChartHeight" }); }
349
+ }
350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartHeightPipe, decorators: [{
351
+ type: Pipe,
352
+ args: [{
353
+ name: 'suisChartHeight',
354
+ standalone: true,
355
+ }]
356
+ }] });
357
+
358
+ class SuisChartDataPipe {
359
+ transform(data, compareData) {
360
+ if (!compareData.length)
361
+ return data;
362
+ const combinedData = [];
363
+ data.forEach((item, index) => {
364
+ combinedData.push(item);
365
+ if (compareData.length - 1 >= index) {
366
+ combinedData.push({
367
+ ...compareData[index],
368
+ compare: true,
369
+ });
370
+ }
371
+ else {
372
+ combinedData.push({
373
+ value: 0,
374
+ compare: true,
375
+ });
376
+ }
377
+ });
378
+ return combinedData;
379
+ }
380
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartDataPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
381
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SuisChartDataPipe, isStandalone: true, name: "suisChartData" }); }
382
+ }
383
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartDataPipe, decorators: [{
384
+ type: Pipe,
385
+ args: [{
386
+ name: 'suisChartData',
387
+ standalone: true,
388
+ }]
389
+ }] });
390
+
391
+ class SuisChartComponent {
392
+ constructor() {
393
+ /** @internal */
394
+ this._maxValue = 100;
395
+ /**
396
+ * Array of the chart bars labels. By default set to empty array.
397
+ */
398
+ this.labels = [];
399
+ /**
400
+ * Array of data values and optionally colors. Type of SuisChartDataItem[]. By default set to empty array.
401
+ */
402
+ this.data = [];
403
+ /**
404
+ * Sets the default color of the chart bars. Type of SuisColor. By default set to 'primary'.
405
+ */
406
+ this.color = 'primary';
407
+ /**
408
+ * Adjusts the width of the chart bars. Type of SuisSize. By default set to 'md'.
409
+ */
410
+ this.size = 'md';
411
+ /**
412
+ * Sets the maximum value automatically based on data values. By default set to false.
413
+ */
414
+ this.autoMax = false;
415
+ /**
416
+ * Array of comparision data values and optionally colors. Type of SuisChartDataItem[]. By default set to empty array.
417
+ */
418
+ this.compareData = [];
419
+ /**
420
+ * Sets the default color of the comparision chart bars. Type of SuisColor. By default set to 'warning'.
421
+ */
422
+ this.compareColor = 'warning';
423
+ }
424
+ /** @internal */
425
+ get maxValue() {
426
+ if (!this.autoMax)
427
+ return this._maxValue;
428
+ return Math.max(...[...this.data, ...this.compareData].map((item) => item.value));
429
+ }
430
+ /**
431
+ * Set the maximum value of the chart bars. By default set to 100.
432
+ */
433
+ set maxValue(value) {
434
+ this._maxValue = value;
435
+ }
436
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
437
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SuisChartComponent, isStandalone: true, selector: "suis-chart", inputs: { maxValue: "maxValue", labels: "labels", data: "data", color: "color", size: "size", autoMax: "autoMax", compareData: "compareData", compareColor: "compareColor" }, ngImport: i0, template: "<div class=\"suis-chart\">\n <div\n class=\"suis-chart__content\"\n [ngClass]=\"'suis-chart__content' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let item of data | suisChartData : compareData\"\n class=\"suis-chart__content__item\"\n [ngClass]=\"\n 'suis-chart__content__item'\n | suisNgClass\n : (item.compare ? item.color || compareColor : item.color || color)\n : (item.compare ? 'compare' : 'single')\n \"\n [style.height]=\"item.value | suisChartHeight : maxValue\"\n >\n <div class=\"suis-chart__content__item__value\">\n {{ item.value }}\n </div>\n </div>\n </div>\n <div\n class=\"suis-chart__labels\"\n [ngClass]=\"'suis-chart__labels' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let label of labels\"\n class=\"suis-chart__labels__item\"\n [class.suis-chart__labels__item--double]=\"compareData.length\"\n >\n {{ label }}\n </div>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block;height:100%}.suis-chart{height:100%}.suis-chart__content,.suis-chart__labels{display:flex;align-items:flex-end;justify-content:center}.suis-chart__content--xs .suis-chart__content__item,.suis-chart__content--xs .suis-chart__labels__item,.suis-chart__labels--xs .suis-chart__content__item,.suis-chart__labels--xs .suis-chart__labels__item{width:1rem}.suis-chart__content--xs .suis-chart__content__item:not(:last-child),.suis-chart__content--xs .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xs .suis-chart__content__item:not(:last-child),.suis-chart__labels--xs .suis-chart__labels__item:not(:last-child){margin-right:.5rem}.suis-chart__content--xs .suis-chart__content__item--compare,.suis-chart__content--xs .suis-chart__labels__item--compare,.suis-chart__labels--xs .suis-chart__content__item--compare,.suis-chart__labels--xs .suis-chart__labels__item--compare{margin-left:-.5rem}.suis-chart__content--xs .suis-chart__content__item--double,.suis-chart__content--xs .suis-chart__labels__item--double,.suis-chart__labels--xs .suis-chart__content__item--double,.suis-chart__labels--xs .suis-chart__labels__item--double{width:2rem}.suis-chart__content--sm .suis-chart__content__item,.suis-chart__content--sm .suis-chart__labels__item,.suis-chart__labels--sm .suis-chart__content__item,.suis-chart__labels--sm .suis-chart__labels__item{width:1.25rem}.suis-chart__content--sm .suis-chart__content__item:not(:last-child),.suis-chart__content--sm .suis-chart__labels__item:not(:last-child),.suis-chart__labels--sm .suis-chart__content__item:not(:last-child),.suis-chart__labels--sm .suis-chart__labels__item:not(:last-child){margin-right:.625rem}.suis-chart__content--sm .suis-chart__content__item--compare,.suis-chart__content--sm .suis-chart__labels__item--compare,.suis-chart__labels--sm .suis-chart__content__item--compare,.suis-chart__labels--sm .suis-chart__labels__item--compare{margin-left:-.625rem}.suis-chart__content--sm .suis-chart__content__item--double,.suis-chart__content--sm .suis-chart__labels__item--double,.suis-chart__labels--sm .suis-chart__content__item--double,.suis-chart__labels--sm .suis-chart__labels__item--double{width:2.5rem}.suis-chart__content--md .suis-chart__content__item,.suis-chart__content--md .suis-chart__labels__item,.suis-chart__labels--md .suis-chart__content__item,.suis-chart__labels--md .suis-chart__labels__item{width:1.5rem}.suis-chart__content--md .suis-chart__content__item:not(:last-child),.suis-chart__content--md .suis-chart__labels__item:not(:last-child),.suis-chart__labels--md .suis-chart__content__item:not(:last-child),.suis-chart__labels--md .suis-chart__labels__item:not(:last-child){margin-right:.75rem}.suis-chart__content--md .suis-chart__content__item--compare,.suis-chart__content--md .suis-chart__labels__item--compare,.suis-chart__labels--md .suis-chart__content__item--compare,.suis-chart__labels--md .suis-chart__labels__item--compare{margin-left:-.75rem}.suis-chart__content--md .suis-chart__content__item--double,.suis-chart__content--md .suis-chart__labels__item--double,.suis-chart__labels--md .suis-chart__content__item--double,.suis-chart__labels--md .suis-chart__labels__item--double{width:3rem}.suis-chart__content--lg .suis-chart__content__item,.suis-chart__content--lg .suis-chart__labels__item,.suis-chart__labels--lg .suis-chart__content__item,.suis-chart__labels--lg .suis-chart__labels__item{width:1.75rem}.suis-chart__content--lg .suis-chart__content__item:not(:last-child),.suis-chart__content--lg .suis-chart__labels__item:not(:last-child),.suis-chart__labels--lg .suis-chart__content__item:not(:last-child),.suis-chart__labels--lg .suis-chart__labels__item:not(:last-child){margin-right:.875rem}.suis-chart__content--lg .suis-chart__content__item--compare,.suis-chart__content--lg .suis-chart__labels__item--compare,.suis-chart__labels--lg .suis-chart__content__item--compare,.suis-chart__labels--lg .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--lg .suis-chart__content__item--double,.suis-chart__content--lg .suis-chart__labels__item--double,.suis-chart__labels--lg .suis-chart__content__item--double,.suis-chart__labels--lg .suis-chart__labels__item--double{width:3.5rem}.suis-chart__content--xl .suis-chart__content__item,.suis-chart__content--xl .suis-chart__labels__item,.suis-chart__labels--xl .suis-chart__content__item,.suis-chart__labels--xl .suis-chart__labels__item{width:2rem}.suis-chart__content--xl .suis-chart__content__item:not(:last-child),.suis-chart__content--xl .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xl .suis-chart__content__item:not(:last-child),.suis-chart__labels--xl .suis-chart__labels__item:not(:last-child){margin-right:1rem}.suis-chart__content--xl .suis-chart__content__item--compare,.suis-chart__content--xl .suis-chart__labels__item--compare,.suis-chart__labels--xl .suis-chart__content__item--compare,.suis-chart__labels--xl .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--xl .suis-chart__content__item--double,.suis-chart__content--xl .suis-chart__labels__item--double,.suis-chart__labels--xl .suis-chart__content__item--double,.suis-chart__labels--xl .suis-chart__labels__item--double{width:4rem}.suis-chart__content{height:100%}.suis-chart__content__item{background-color:#192a56;min-height:.0625rem;position:relative}.suis-chart__content__item--primary{background-color:#192a56}.suis-chart__content__item--secondary{background-color:#273c75}.suis-chart__content__item--tertiary{background-color:#dcdde1}.suis-chart__content__item--complementary{background-color:#f5f6fa}.suis-chart__content__item--success{background-color:#2ed573}.suis-chart__content__item--warning{background-color:#ffa502}.suis-chart__content__item--danger{background-color:#ff4757}.suis-chart__content__item--white{background-color:#fff}.suis-chart__content__item--gray{background-color:#bcbcbc}.suis-chart__content__item--dark{background-color:#000}.suis-chart__content__item__value{position:absolute;top:-1rem;text-align:center;width:100%;font-size:.75rem;color:#a4a7b0}.suis-chart__labels__item{margin-top:.25rem;font-size:.75rem;color:#a4a7b0;text-align:center}\n"], dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SuisChartHeightPipe, name: "suisChartHeight" }, { kind: "pipe", type: SuisChartDataPipe, name: "suisChartData" }, { kind: "pipe", type: SuisNgClassPipe, name: "suisNgClass" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
438
+ }
439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuisChartComponent, decorators: [{
440
+ type: Component,
441
+ args: [{ selector: 'suis-chart', standalone: true, imports: [
442
+ NgForOf,
443
+ NgIf,
444
+ NgClass,
445
+ SuisChartHeightPipe,
446
+ SuisChartDataPipe,
447
+ SuisNgClassPipe,
448
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"suis-chart\">\n <div\n class=\"suis-chart__content\"\n [ngClass]=\"'suis-chart__content' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let item of data | suisChartData : compareData\"\n class=\"suis-chart__content__item\"\n [ngClass]=\"\n 'suis-chart__content__item'\n | suisNgClass\n : (item.compare ? item.color || compareColor : item.color || color)\n : (item.compare ? 'compare' : 'single')\n \"\n [style.height]=\"item.value | suisChartHeight : maxValue\"\n >\n <div class=\"suis-chart__content__item__value\">\n {{ item.value }}\n </div>\n </div>\n </div>\n <div\n class=\"suis-chart__labels\"\n [ngClass]=\"'suis-chart__labels' | suisNgClass : size\"\n >\n <div\n *ngFor=\"let label of labels\"\n class=\"suis-chart__labels__item\"\n [class.suis-chart__labels__item--double]=\"compareData.length\"\n >\n {{ label }}\n </div>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block;height:100%}.suis-chart{height:100%}.suis-chart__content,.suis-chart__labels{display:flex;align-items:flex-end;justify-content:center}.suis-chart__content--xs .suis-chart__content__item,.suis-chart__content--xs .suis-chart__labels__item,.suis-chart__labels--xs .suis-chart__content__item,.suis-chart__labels--xs .suis-chart__labels__item{width:1rem}.suis-chart__content--xs .suis-chart__content__item:not(:last-child),.suis-chart__content--xs .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xs .suis-chart__content__item:not(:last-child),.suis-chart__labels--xs .suis-chart__labels__item:not(:last-child){margin-right:.5rem}.suis-chart__content--xs .suis-chart__content__item--compare,.suis-chart__content--xs .suis-chart__labels__item--compare,.suis-chart__labels--xs .suis-chart__content__item--compare,.suis-chart__labels--xs .suis-chart__labels__item--compare{margin-left:-.5rem}.suis-chart__content--xs .suis-chart__content__item--double,.suis-chart__content--xs .suis-chart__labels__item--double,.suis-chart__labels--xs .suis-chart__content__item--double,.suis-chart__labels--xs .suis-chart__labels__item--double{width:2rem}.suis-chart__content--sm .suis-chart__content__item,.suis-chart__content--sm .suis-chart__labels__item,.suis-chart__labels--sm .suis-chart__content__item,.suis-chart__labels--sm .suis-chart__labels__item{width:1.25rem}.suis-chart__content--sm .suis-chart__content__item:not(:last-child),.suis-chart__content--sm .suis-chart__labels__item:not(:last-child),.suis-chart__labels--sm .suis-chart__content__item:not(:last-child),.suis-chart__labels--sm .suis-chart__labels__item:not(:last-child){margin-right:.625rem}.suis-chart__content--sm .suis-chart__content__item--compare,.suis-chart__content--sm .suis-chart__labels__item--compare,.suis-chart__labels--sm .suis-chart__content__item--compare,.suis-chart__labels--sm .suis-chart__labels__item--compare{margin-left:-.625rem}.suis-chart__content--sm .suis-chart__content__item--double,.suis-chart__content--sm .suis-chart__labels__item--double,.suis-chart__labels--sm .suis-chart__content__item--double,.suis-chart__labels--sm .suis-chart__labels__item--double{width:2.5rem}.suis-chart__content--md .suis-chart__content__item,.suis-chart__content--md .suis-chart__labels__item,.suis-chart__labels--md .suis-chart__content__item,.suis-chart__labels--md .suis-chart__labels__item{width:1.5rem}.suis-chart__content--md .suis-chart__content__item:not(:last-child),.suis-chart__content--md .suis-chart__labels__item:not(:last-child),.suis-chart__labels--md .suis-chart__content__item:not(:last-child),.suis-chart__labels--md .suis-chart__labels__item:not(:last-child){margin-right:.75rem}.suis-chart__content--md .suis-chart__content__item--compare,.suis-chart__content--md .suis-chart__labels__item--compare,.suis-chart__labels--md .suis-chart__content__item--compare,.suis-chart__labels--md .suis-chart__labels__item--compare{margin-left:-.75rem}.suis-chart__content--md .suis-chart__content__item--double,.suis-chart__content--md .suis-chart__labels__item--double,.suis-chart__labels--md .suis-chart__content__item--double,.suis-chart__labels--md .suis-chart__labels__item--double{width:3rem}.suis-chart__content--lg .suis-chart__content__item,.suis-chart__content--lg .suis-chart__labels__item,.suis-chart__labels--lg .suis-chart__content__item,.suis-chart__labels--lg .suis-chart__labels__item{width:1.75rem}.suis-chart__content--lg .suis-chart__content__item:not(:last-child),.suis-chart__content--lg .suis-chart__labels__item:not(:last-child),.suis-chart__labels--lg .suis-chart__content__item:not(:last-child),.suis-chart__labels--lg .suis-chart__labels__item:not(:last-child){margin-right:.875rem}.suis-chart__content--lg .suis-chart__content__item--compare,.suis-chart__content--lg .suis-chart__labels__item--compare,.suis-chart__labels--lg .suis-chart__content__item--compare,.suis-chart__labels--lg .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--lg .suis-chart__content__item--double,.suis-chart__content--lg .suis-chart__labels__item--double,.suis-chart__labels--lg .suis-chart__content__item--double,.suis-chart__labels--lg .suis-chart__labels__item--double{width:3.5rem}.suis-chart__content--xl .suis-chart__content__item,.suis-chart__content--xl .suis-chart__labels__item,.suis-chart__labels--xl .suis-chart__content__item,.suis-chart__labels--xl .suis-chart__labels__item{width:2rem}.suis-chart__content--xl .suis-chart__content__item:not(:last-child),.suis-chart__content--xl .suis-chart__labels__item:not(:last-child),.suis-chart__labels--xl .suis-chart__content__item:not(:last-child),.suis-chart__labels--xl .suis-chart__labels__item:not(:last-child){margin-right:1rem}.suis-chart__content--xl .suis-chart__content__item--compare,.suis-chart__content--xl .suis-chart__labels__item--compare,.suis-chart__labels--xl .suis-chart__content__item--compare,.suis-chart__labels--xl .suis-chart__labels__item--compare{margin-left:-1rem}.suis-chart__content--xl .suis-chart__content__item--double,.suis-chart__content--xl .suis-chart__labels__item--double,.suis-chart__labels--xl .suis-chart__content__item--double,.suis-chart__labels--xl .suis-chart__labels__item--double{width:4rem}.suis-chart__content{height:100%}.suis-chart__content__item{background-color:#192a56;min-height:.0625rem;position:relative}.suis-chart__content__item--primary{background-color:#192a56}.suis-chart__content__item--secondary{background-color:#273c75}.suis-chart__content__item--tertiary{background-color:#dcdde1}.suis-chart__content__item--complementary{background-color:#f5f6fa}.suis-chart__content__item--success{background-color:#2ed573}.suis-chart__content__item--warning{background-color:#ffa502}.suis-chart__content__item--danger{background-color:#ff4757}.suis-chart__content__item--white{background-color:#fff}.suis-chart__content__item--gray{background-color:#bcbcbc}.suis-chart__content__item--dark{background-color:#000}.suis-chart__content__item__value{position:absolute;top:-1rem;text-align:center;width:100%;font-size:.75rem;color:#a4a7b0}.suis-chart__labels__item{margin-top:.25rem;font-size:.75rem;color:#a4a7b0;text-align:center}\n"] }]
449
+ }], propDecorators: { maxValue: [{
450
+ type: Input
451
+ }], labels: [{
452
+ type: Input
453
+ }], data: [{
454
+ type: Input
455
+ }], color: [{
456
+ type: Input
457
+ }], size: [{
458
+ type: Input
459
+ }], autoMax: [{
460
+ type: Input
461
+ }], compareData: [{
462
+ type: Input
463
+ }], compareColor: [{
464
+ type: Input
465
+ }] } });
466
+
341
467
  class SuisChipComponent {
342
468
  constructor() {
343
469
  /**
@@ -2349,5 +2475,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2349
2475
  * Generated bundle index. Do not edit.
2350
2476
  */
2351
2477
 
2352
- export { SuisAccordionComponent, SuisAlertComponent, SuisBoxComponent, SuisBreadcrumbsComponent, SuisButtonComponent, SuisButtonLinkComponent, SuisButtonOutlinedComponent, SuisChipComponent, SuisContainerComponent, SuisDialogComponent, SuisDialogContainerComponent, SuisDialogService, SuisDividerComponent, SuisFormFieldComponent, SuisIconComponent, SuisInputCheckboxComponent, SuisInputChipsComponent, SuisInputComponent, SuisInputImageComponent, SuisInputNumberComponent, SuisInputRadioComponent, SuisItemComponent, SuisLabelComponent, SuisNavigationComponent, SuisNavigationGroupComponent, SuisNavigationGroupItemComponent, SuisNavigationItemComponent, SuisNavigationItemDirective, SuisNavigationModule, SuisNgClassPipe, SuisNotificationComponent, SuisNotificationService, SuisNotificationsComponent, SuisPaginationComponent, SuisProgressBarComponent, SuisSelectComponent, SuisSelectModule, SuisSelectMultiComponent, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent, SuisTabDirective, SuisTableCellDirective, SuisTableColumnDirective, SuisTableComponent, SuisTableModule, SuisTabsComponent, SuisTabsModule, SuisTextAreaComponent, SuisTitle, SuisTitleComponent, SuisToggleComponent, SuisToolbarComponent };
2478
+ export { SuisAccordionComponent, SuisAlertComponent, SuisBoxComponent, SuisBreadcrumbsComponent, SuisButtonComponent, SuisButtonLinkComponent, SuisButtonOutlinedComponent, SuisChartComponent, SuisChipComponent, SuisContainerComponent, SuisDialogComponent, SuisDialogContainerComponent, SuisDialogService, SuisDividerComponent, SuisFormFieldComponent, SuisIconComponent, SuisInputCheckboxComponent, SuisInputChipsComponent, SuisInputComponent, SuisInputImageComponent, SuisInputNumberComponent, SuisInputRadioComponent, SuisItemComponent, SuisLabelComponent, SuisNavigationComponent, SuisNavigationGroupComponent, SuisNavigationGroupItemComponent, SuisNavigationItemComponent, SuisNavigationItemDirective, SuisNavigationModule, SuisNgClassPipe, SuisNotificationComponent, SuisNotificationService, SuisNotificationsComponent, SuisPaginationComponent, SuisProgressBarComponent, SuisSelectComponent, SuisSelectModule, SuisSelectMultiComponent, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent, SuisTabDirective, SuisTableCellDirective, SuisTableColumnDirective, SuisTableComponent, SuisTableModule, SuisTabsComponent, SuisTabsModule, SuisTextAreaComponent, SuisTitle, SuisTitleComponent, SuisToggleComponent, SuisToolbarComponent };
2353
2479
  //# sourceMappingURL=suis.mjs.map