suis 1.0.1 → 1.2.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.
@@ -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';
@@ -0,0 +1,2 @@
1
+ export * from './suis-chart.component';
2
+ export * from './suis-chart.interfaces';
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { SuisChartDataItem, SuisChartDataComparisionItem } from './suis-chart.interfaces';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SuisChartDataPipe implements PipeTransform {
5
+ transform(data: SuisChartDataItem[], compareData: SuisChartDataItem[]): SuisChartDataComparisionItem[];
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<SuisChartDataPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<SuisChartDataPipe, "suisChartData", true>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SuisChartHeightPipe implements PipeTransform {
4
+ transform(value: number, maxValue: number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SuisChartHeightPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<SuisChartHeightPipe, "suisChartHeight", true>;
7
+ }
@@ -0,0 +1,43 @@
1
+ import { SuisColor, SuisSize } from '../../types';
2
+ import { SuisChartDataItem } from './suis-chart.interfaces';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SuisChartComponent {
5
+ /** @internal */
6
+ _maxValue: number;
7
+ /** @internal */
8
+ get maxValue(): number;
9
+ /**
10
+ * Set the maximum value of the chart bars. By default set to 100.
11
+ */
12
+ set maxValue(value: number);
13
+ /**
14
+ * Array of the chart bars labels. By default set to empty array.
15
+ */
16
+ labels: string[];
17
+ /**
18
+ * Array of data values and optionally colors. Type of SuisChartDataItem[]. By default set to empty array.
19
+ */
20
+ data: SuisChartDataItem[];
21
+ /**
22
+ * Sets the default color of the chart bars. Type of SuisColor. By default set to 'primary'.
23
+ */
24
+ color: SuisColor;
25
+ /**
26
+ * Adjusts the width of the chart bars. Type of SuisSize. By default set to 'md'.
27
+ */
28
+ size: SuisSize;
29
+ /**
30
+ * Sets the maximum value automatically based on data values. By default set to false.
31
+ */
32
+ autoMax: boolean;
33
+ /**
34
+ * Array of comparision data values and optionally colors. Type of SuisChartDataItem[]. By default set to empty array.
35
+ */
36
+ compareData: SuisChartDataItem[];
37
+ /**
38
+ * Sets the default color of the comparision chart bars. Type of SuisColor. By default set to 'warning'.
39
+ */
40
+ compareColor: SuisColor;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<SuisChartComponent, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<SuisChartComponent, "suis-chart", never, { "maxValue": { "alias": "maxValue"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "data": { "alias": "data"; "required": false; }; "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "autoMax": { "alias": "autoMax"; "required": false; }; "compareData": { "alias": "compareData"; "required": false; }; "compareColor": { "alias": "compareColor"; "required": false; }; }, {}, never, never, true, never>;
43
+ }
@@ -0,0 +1,10 @@
1
+ import { SuisColor } from '../../types/suis-color.type';
2
+ export interface SuisChartDataItem {
3
+ value: number;
4
+ color?: SuisColor;
5
+ }
6
+ export interface SuisChartDataComparisionItem {
7
+ value: number;
8
+ color?: SuisColor;
9
+ compare?: boolean;
10
+ }
@@ -1,14 +1,14 @@
1
1
  import { SuisColor, SuisSize } from '../../types';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class SuisProgressBarComponent {
4
- /** @internal */
5
- _value: number;
6
- /** @internal */
7
- get value(): number;
8
4
  /**
9
- * Width of the progress bar in percentage (value >= 0 && value <= 100). By default set to 0.
5
+ * The value corresponding to the progress bar. By default set to 0.
10
6
  */
11
- set value(value: number);
7
+ value: number;
8
+ /**
9
+ * Maximum value of the progress bar. By default set to 100.
10
+ */
11
+ maxValue: number;
12
12
  /**
13
13
  * Sets the color of the progress bar. Type of SuisColor. By default set to 'primary'.
14
14
  */
@@ -22,5 +22,5 @@ export declare class SuisProgressBarComponent {
22
22
  */
23
23
  size: SuisSize;
24
24
  static ɵfac: i0.ɵɵFactoryDeclaration<SuisProgressBarComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<SuisProgressBarComponent, "suis-progress-bar", never, { "value": { "alias": "value"; "required": false; }; "color": { "alias": "color"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<SuisProgressBarComponent, "suis-progress-bar", never, { "value": { "alias": "value"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "color": { "alias": "color"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
26
26
  }
@@ -1,7 +1,7 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class SuisProgressBarPipe implements PipeTransform {
4
- transform(value: number): string;
4
+ transform(value: number, maxValue: number): string;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<SuisProgressBarPipe, never>;
6
6
  static ɵpipe: i0.ɵɵPipeDeclaration<SuisProgressBarPipe, "suisProgressBar", true>;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suis",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "main": "src/index.ts",
5
5
  "author": "Karol Jaskółka",
6
6
  "description": "Angular 16+ Component Library",