@forgeroute/ui 0.3.5 → 0.3.6
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/fesm2022/forgeroute-ui-charts.mjs +323 -0
- package/fesm2022/forgeroute-ui-charts.mjs.map +1 -0
- package/fesm2022/forgeroute-ui.mjs +2 -320
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/types/forgeroute-ui-charts.d.ts +95 -0
- package/types/forgeroute-ui.d.ts +3 -97
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgeroute/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=22.0.0",
|
|
6
6
|
"@angular/core": ">=22.0.0",
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
".": {
|
|
37
37
|
"types": "./types/forgeroute-ui.d.ts",
|
|
38
38
|
"default": "./fesm2022/forgeroute-ui.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./charts": {
|
|
41
|
+
"types": "./types/forgeroute-ui-charts.d.ts",
|
|
42
|
+
"default": "./fesm2022/forgeroute-ui-charts.mjs"
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
"sideEffects": false,
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Bar chart of one series (e.g. calls per day). Pass the category `labels` and the matching `values`.
|
|
4
|
+
*
|
|
5
|
+
* <ui-bar-chart [labels]="['8/1', '8/2']" [values]="[3, 0]" ariaLabel="Daily call volume"
|
|
6
|
+
* unitSingular="call" unitPlural="calls" />
|
|
7
|
+
*
|
|
8
|
+
* - Bars show their value above them (`showValues`, a 0 bar shows nothing), the y axis starts at 0 and counts whole numbers.
|
|
9
|
+
* - The tooltip reads "<value> <unit>" (`unitSingular` for 1, `unitPlural` otherwise; no unit = just the number).
|
|
10
|
+
* - With an `ariaLabel` the chart is an image for assistive tech (`role="img"` + that label; without a label no role is set, as an
|
|
11
|
+
* unnamed image is an accessibility error); render the same figures as text next to it
|
|
12
|
+
* (e.g. a visually hidden list) when the exact values matter.
|
|
13
|
+
* - Height is `height` px (shorter on phones: 200px up to 768px wide, 160px up to 480px wide, when the default 240 is used);
|
|
14
|
+
* the width follows the container. Needs the optional peer dependency `chart.js` (>= 4).
|
|
15
|
+
*/
|
|
16
|
+
export declare class BarChartComponent {
|
|
17
|
+
/** Category labels, left to right (one per bar). */
|
|
18
|
+
readonly labels: import("@angular/core").InputSignal<string[]>;
|
|
19
|
+
/** The bar values, in the order of `labels`. */
|
|
20
|
+
readonly values: import("@angular/core").InputSignal<number[]>;
|
|
21
|
+
/** Bar colour (any CSS colour). */
|
|
22
|
+
readonly color: import("@angular/core").InputSignal<string>;
|
|
23
|
+
/** Bar colour while hovered. */
|
|
24
|
+
readonly hoverColor: import("@angular/core").InputSignal<string>;
|
|
25
|
+
/** Chart height in px. */
|
|
26
|
+
readonly height: import("@angular/core").InputSignal<number>;
|
|
27
|
+
/** Spoken description of the chart. */
|
|
28
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
29
|
+
/** Show each bar's value above it. */
|
|
30
|
+
readonly showValues: import("@angular/core").InputSignal<boolean>;
|
|
31
|
+
/** Tooltip unit for exactly 1 (e.g. "call"). */
|
|
32
|
+
readonly unitSingular: import("@angular/core").InputSignal<string>;
|
|
33
|
+
/** Tooltip unit for any other value (e.g. "calls"). */
|
|
34
|
+
readonly unitPlural: import("@angular/core").InputSignal<string>;
|
|
35
|
+
private readonly canvas;
|
|
36
|
+
private readonly zone;
|
|
37
|
+
private chart;
|
|
38
|
+
private readonly tooltipText;
|
|
39
|
+
protected readonly series: import("@angular/core").Signal<{
|
|
40
|
+
labels: string[];
|
|
41
|
+
data: number[];
|
|
42
|
+
color: string;
|
|
43
|
+
hoverColor: string;
|
|
44
|
+
showValues: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
constructor();
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BarChartComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BarChartComponent, "ui-bar-chart", never, {
|
|
49
|
+
"labels": {
|
|
50
|
+
"alias": "labels";
|
|
51
|
+
"required": false;
|
|
52
|
+
"isSignal": true;
|
|
53
|
+
};
|
|
54
|
+
"values": {
|
|
55
|
+
"alias": "values";
|
|
56
|
+
"required": false;
|
|
57
|
+
"isSignal": true;
|
|
58
|
+
};
|
|
59
|
+
"color": {
|
|
60
|
+
"alias": "color";
|
|
61
|
+
"required": false;
|
|
62
|
+
"isSignal": true;
|
|
63
|
+
};
|
|
64
|
+
"hoverColor": {
|
|
65
|
+
"alias": "hoverColor";
|
|
66
|
+
"required": false;
|
|
67
|
+
"isSignal": true;
|
|
68
|
+
};
|
|
69
|
+
"height": {
|
|
70
|
+
"alias": "height";
|
|
71
|
+
"required": false;
|
|
72
|
+
"isSignal": true;
|
|
73
|
+
};
|
|
74
|
+
"ariaLabel": {
|
|
75
|
+
"alias": "ariaLabel";
|
|
76
|
+
"required": false;
|
|
77
|
+
"isSignal": true;
|
|
78
|
+
};
|
|
79
|
+
"showValues": {
|
|
80
|
+
"alias": "showValues";
|
|
81
|
+
"required": false;
|
|
82
|
+
"isSignal": true;
|
|
83
|
+
};
|
|
84
|
+
"unitSingular": {
|
|
85
|
+
"alias": "unitSingular";
|
|
86
|
+
"required": false;
|
|
87
|
+
"isSignal": true;
|
|
88
|
+
};
|
|
89
|
+
"unitPlural": {
|
|
90
|
+
"alias": "unitPlural";
|
|
91
|
+
"required": false;
|
|
92
|
+
"isSignal": true;
|
|
93
|
+
};
|
|
94
|
+
}, {}, never, never, true, never>;
|
|
95
|
+
}
|
package/types/forgeroute-ui.d.ts
CHANGED
|
@@ -834,7 +834,7 @@ export declare class SelectComponent implements ControlValueAccessor, Validator,
|
|
|
834
834
|
readonly error: import("@angular/core").InputSignal<string>;
|
|
835
835
|
/** Reveal the built-in error messages now (e.g. after a failed Save click), without waiting for blur. */
|
|
836
836
|
readonly showErrors: import("@angular/core").InputSignal<boolean>;
|
|
837
|
-
readonly size: import("@angular/core").InputSignal<"
|
|
837
|
+
readonly size: import("@angular/core").InputSignal<"default" | "sm">;
|
|
838
838
|
readonly _disabledInput: import("@angular/core").InputSignal<boolean>;
|
|
839
839
|
private readonly _cvaDisabled;
|
|
840
840
|
protected readonly disabled: import("@angular/core").Signal<boolean>;
|
|
@@ -1825,100 +1825,6 @@ export declare class ProgressBarComponent {
|
|
|
1825
1825
|
};
|
|
1826
1826
|
}, {}, never, never, true, never>;
|
|
1827
1827
|
}
|
|
1828
|
-
/**
|
|
1829
|
-
* Bar chart of one series (e.g. calls per day). Pass the category `labels` and the matching `values`.
|
|
1830
|
-
*
|
|
1831
|
-
* <ui-bar-chart [labels]="['8/1', '8/2']" [values]="[3, 0]" ariaLabel="Daily call volume"
|
|
1832
|
-
* unitSingular="call" unitPlural="calls" />
|
|
1833
|
-
*
|
|
1834
|
-
* - Bars show their value above them (`showValues`, a 0 bar shows nothing), the y axis starts at 0 and counts whole numbers.
|
|
1835
|
-
* - The tooltip reads "<value> <unit>" (`unitSingular` for 1, `unitPlural` otherwise; no unit = just the number).
|
|
1836
|
-
* - With an `ariaLabel` the chart is an image for assistive tech (`role="img"` + that label; without a label no role is set, as an
|
|
1837
|
-
* unnamed image is an accessibility error); render the same figures as text next to it
|
|
1838
|
-
* (e.g. a visually hidden list) when the exact values matter.
|
|
1839
|
-
* - Height is `height` px (shorter on phones: 200px up to 768px wide, 160px up to 480px wide, when the default 240 is used);
|
|
1840
|
-
* the width follows the container. Needs the optional peer dependency `chart.js` (>= 4).
|
|
1841
|
-
*/
|
|
1842
|
-
export declare class BarChartComponent {
|
|
1843
|
-
/** Category labels, left to right (one per bar). */
|
|
1844
|
-
readonly labels: import("@angular/core").InputSignal<string[]>;
|
|
1845
|
-
/** The bar values, in the order of `labels`. */
|
|
1846
|
-
readonly values: import("@angular/core").InputSignal<number[]>;
|
|
1847
|
-
/** Bar colour (any CSS colour). */
|
|
1848
|
-
readonly color: import("@angular/core").InputSignal<string>;
|
|
1849
|
-
/** Bar colour while hovered. */
|
|
1850
|
-
readonly hoverColor: import("@angular/core").InputSignal<string>;
|
|
1851
|
-
/** Chart height in px. */
|
|
1852
|
-
readonly height: import("@angular/core").InputSignal<number>;
|
|
1853
|
-
/** Spoken description of the chart. */
|
|
1854
|
-
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
1855
|
-
/** Show each bar's value above it. */
|
|
1856
|
-
readonly showValues: import("@angular/core").InputSignal<boolean>;
|
|
1857
|
-
/** Tooltip unit for exactly 1 (e.g. "call"). */
|
|
1858
|
-
readonly unitSingular: import("@angular/core").InputSignal<string>;
|
|
1859
|
-
/** Tooltip unit for any other value (e.g. "calls"). */
|
|
1860
|
-
readonly unitPlural: import("@angular/core").InputSignal<string>;
|
|
1861
|
-
private readonly canvas;
|
|
1862
|
-
private readonly zone;
|
|
1863
|
-
private chart;
|
|
1864
|
-
private readonly tooltipText;
|
|
1865
|
-
protected readonly series: import("@angular/core").Signal<{
|
|
1866
|
-
labels: string[];
|
|
1867
|
-
data: number[];
|
|
1868
|
-
color: string;
|
|
1869
|
-
hoverColor: string;
|
|
1870
|
-
showValues: boolean;
|
|
1871
|
-
}>;
|
|
1872
|
-
constructor();
|
|
1873
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BarChartComponent, never>;
|
|
1874
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BarChartComponent, "ui-bar-chart", never, {
|
|
1875
|
-
"labels": {
|
|
1876
|
-
"alias": "labels";
|
|
1877
|
-
"required": false;
|
|
1878
|
-
"isSignal": true;
|
|
1879
|
-
};
|
|
1880
|
-
"values": {
|
|
1881
|
-
"alias": "values";
|
|
1882
|
-
"required": false;
|
|
1883
|
-
"isSignal": true;
|
|
1884
|
-
};
|
|
1885
|
-
"color": {
|
|
1886
|
-
"alias": "color";
|
|
1887
|
-
"required": false;
|
|
1888
|
-
"isSignal": true;
|
|
1889
|
-
};
|
|
1890
|
-
"hoverColor": {
|
|
1891
|
-
"alias": "hoverColor";
|
|
1892
|
-
"required": false;
|
|
1893
|
-
"isSignal": true;
|
|
1894
|
-
};
|
|
1895
|
-
"height": {
|
|
1896
|
-
"alias": "height";
|
|
1897
|
-
"required": false;
|
|
1898
|
-
"isSignal": true;
|
|
1899
|
-
};
|
|
1900
|
-
"ariaLabel": {
|
|
1901
|
-
"alias": "ariaLabel";
|
|
1902
|
-
"required": false;
|
|
1903
|
-
"isSignal": true;
|
|
1904
|
-
};
|
|
1905
|
-
"showValues": {
|
|
1906
|
-
"alias": "showValues";
|
|
1907
|
-
"required": false;
|
|
1908
|
-
"isSignal": true;
|
|
1909
|
-
};
|
|
1910
|
-
"unitSingular": {
|
|
1911
|
-
"alias": "unitSingular";
|
|
1912
|
-
"required": false;
|
|
1913
|
-
"isSignal": true;
|
|
1914
|
-
};
|
|
1915
|
-
"unitPlural": {
|
|
1916
|
-
"alias": "unitPlural";
|
|
1917
|
-
"required": false;
|
|
1918
|
-
"isSignal": true;
|
|
1919
|
-
};
|
|
1920
|
-
}, {}, never, never, true, never>;
|
|
1921
|
-
}
|
|
1922
1828
|
export declare class SkeletonComponent {
|
|
1923
1829
|
readonly height: import("@angular/core").InputSignal<number>;
|
|
1924
1830
|
readonly width: import("@angular/core").InputSignal<string>;
|
|
@@ -1957,7 +1863,7 @@ export declare class TooltipDirective {
|
|
|
1957
1863
|
/** Tooltip text; empty or null disables the tooltip. */
|
|
1958
1864
|
readonly uiTooltip: import("@angular/core").InputSignal<string | null | undefined>;
|
|
1959
1865
|
/** Preferred side; flips to the other side when there is no room. */
|
|
1960
|
-
readonly tooltipPosition: import("@angular/core").InputSignal<"
|
|
1866
|
+
readonly tooltipPosition: import("@angular/core").InputSignal<"top" | "bottom">;
|
|
1961
1867
|
private readonly host;
|
|
1962
1868
|
private readonly doc;
|
|
1963
1869
|
private bubble;
|
|
@@ -6195,7 +6101,7 @@ export declare class DetailCardComponent {
|
|
|
6195
6101
|
/** Bold uppercase title. Empty = no title text. */
|
|
6196
6102
|
readonly title: import("@angular/core").InputSignal<string>;
|
|
6197
6103
|
/** 1-6 makes the title a real heading for screen readers (role=heading, aria-level); null keeps it plain text. */
|
|
6198
|
-
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 |
|
|
6104
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 3 | 4 | 5 | 6 | null>;
|
|
6199
6105
|
/** Optional id for the title text; the card is then labelled by it. Without it the title is the card's aria-label. */
|
|
6200
6106
|
readonly titleId: import("@angular/core").InputSignal<string>;
|
|
6201
6107
|
/** Grey line under the title. */
|