@forgeroute/ui 0.3.4 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeroute/ui",
3
- "version": "0.3.4",
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
+ }
@@ -1767,7 +1767,8 @@ export declare class ToastComponent {
1767
1767
  export type ProgressBarVariant = 'blue' | 'green' | 'amber' | 'red' | 'slate';
1768
1768
  /**
1769
1769
  * Horizontal progress bar with an optional trailing label (e.g. "3/5").
1770
- * Pass `value` and `max`; the fill width is clamped to 0–100%.
1770
+ * Pass `value` and `max`; the fill width is clamped to 0–100%, rounded to whole percents, and a value above 0 is never drawn narrower
1771
+ * than 2% (so 1 of 300 is a visible sliver, not an empty bar). A value of 0 draws no fill.
1771
1772
  *
1772
1773
  * The fill color is built in and follows completion, in four bands: red up to 25%, amber up to 50%, blue up to 75%,
1773
1774
  * green above 75% (full = green). Nothing needs to be passed. `variant` is an optional override for a bar whose
@@ -1786,6 +1787,7 @@ export declare class ProgressBarComponent {
1786
1787
  readonly tooltip: import("@angular/core").InputSignal<string>;
1787
1788
  readonly ariaLabel: import("@angular/core").InputSignal<string>;
1788
1789
  protected readonly clampedValue: import("@angular/core").Signal<number>;
1790
+ /** Fill width in %: the rounded share, but never less than MIN_VISIBLE_PERCENT while the value is above 0 (1 of 300 would round to 0% and look empty). */
1789
1791
  protected readonly percent: import("@angular/core").Signal<number>;
1790
1792
  /** The override when given, else the completion band: up to 25% red, up to 50% amber, up to 75% blue, above 75% green. */
1791
1793
  protected readonly effectiveVariant: import("@angular/core").Signal<ProgressBarVariant>;
@@ -1823,99 +1825,6 @@ export declare class ProgressBarComponent {
1823
1825
  };
1824
1826
  }, {}, never, never, true, never>;
1825
1827
  }
1826
- /**
1827
- * Bar chart of one series (e.g. calls per day). Pass the category `labels` and the matching `values`.
1828
- *
1829
- * <ui-bar-chart [labels]="['8/1', '8/2']" [values]="[3, 0]" ariaLabel="Daily call volume"
1830
- * unitSingular="call" unitPlural="calls" />
1831
- *
1832
- * - Bars show their value above them (`showValues`, a 0 bar shows nothing), the y axis starts at 0 and counts whole numbers.
1833
- * - The tooltip reads "<value> <unit>" (`unitSingular` for 1, `unitPlural` otherwise; no unit = just the number).
1834
- * - The canvas is an image for assistive tech (`role="img"` + `ariaLabel`); render the same figures as text next to it
1835
- * (e.g. a visually hidden list) when the exact values matter.
1836
- * - Height is `height` px (shorter on phones: 200px up to 768px wide, 160px up to 480px wide, when the default 240 is used);
1837
- * the width follows the container. Needs the optional peer dependency `chart.js` (>= 4).
1838
- */
1839
- export declare class BarChartComponent {
1840
- /** Category labels, left to right (one per bar). */
1841
- readonly labels: import("@angular/core").InputSignal<string[]>;
1842
- /** The bar values, in the order of `labels`. */
1843
- readonly values: import("@angular/core").InputSignal<number[]>;
1844
- /** Bar colour (any CSS colour). */
1845
- readonly color: import("@angular/core").InputSignal<string>;
1846
- /** Bar colour while hovered. */
1847
- readonly hoverColor: import("@angular/core").InputSignal<string>;
1848
- /** Chart height in px. */
1849
- readonly height: import("@angular/core").InputSignal<number>;
1850
- /** Spoken description of the chart. */
1851
- readonly ariaLabel: import("@angular/core").InputSignal<string>;
1852
- /** Show each bar's value above it. */
1853
- readonly showValues: import("@angular/core").InputSignal<boolean>;
1854
- /** Tooltip unit for exactly 1 (e.g. "call"). */
1855
- readonly unitSingular: import("@angular/core").InputSignal<string>;
1856
- /** Tooltip unit for any other value (e.g. "calls"). */
1857
- readonly unitPlural: import("@angular/core").InputSignal<string>;
1858
- private readonly canvas;
1859
- private readonly zone;
1860
- private chart;
1861
- private readonly tooltipText;
1862
- protected readonly series: import("@angular/core").Signal<{
1863
- labels: string[];
1864
- data: number[];
1865
- color: string;
1866
- hoverColor: string;
1867
- showValues: boolean;
1868
- }>;
1869
- constructor();
1870
- static ɵfac: i0.ɵɵFactoryDeclaration<BarChartComponent, never>;
1871
- static ɵcmp: i0.ɵɵComponentDeclaration<BarChartComponent, "ui-bar-chart", never, {
1872
- "labels": {
1873
- "alias": "labels";
1874
- "required": false;
1875
- "isSignal": true;
1876
- };
1877
- "values": {
1878
- "alias": "values";
1879
- "required": false;
1880
- "isSignal": true;
1881
- };
1882
- "color": {
1883
- "alias": "color";
1884
- "required": false;
1885
- "isSignal": true;
1886
- };
1887
- "hoverColor": {
1888
- "alias": "hoverColor";
1889
- "required": false;
1890
- "isSignal": true;
1891
- };
1892
- "height": {
1893
- "alias": "height";
1894
- "required": false;
1895
- "isSignal": true;
1896
- };
1897
- "ariaLabel": {
1898
- "alias": "ariaLabel";
1899
- "required": false;
1900
- "isSignal": true;
1901
- };
1902
- "showValues": {
1903
- "alias": "showValues";
1904
- "required": false;
1905
- "isSignal": true;
1906
- };
1907
- "unitSingular": {
1908
- "alias": "unitSingular";
1909
- "required": false;
1910
- "isSignal": true;
1911
- };
1912
- "unitPlural": {
1913
- "alias": "unitPlural";
1914
- "required": false;
1915
- "isSignal": true;
1916
- };
1917
- }, {}, never, never, true, never>;
1918
- }
1919
1828
  export declare class SkeletonComponent {
1920
1829
  readonly height: import("@angular/core").InputSignal<number>;
1921
1830
  readonly width: import("@angular/core").InputSignal<string>;
@@ -2150,6 +2059,10 @@ export declare class CheckboxComponent implements ControlValueAccessor, Validato
2150
2059
  }
2151
2060
  export declare class ButtonComponent {
2152
2061
  readonly variant: import("@angular/core").InputSignal<"primary" | "secondary" | "danger" | "warning" | "link" | "ghost" | "tab" | "icon" | "icon-danger">;
2062
+ /** Renders an anchor to this route instead of a button (use with `variant="link"` for an inline text link). `['/settings']` or `'/settings'`. */
2063
+ readonly routerLink: import("@angular/core").InputSignal<string | readonly unknown[] | null>;
2064
+ /** Query params of the `routerLink` (e.g. `{ section: 'deal-defaults' }`). */
2065
+ readonly queryParams: import("@angular/core").InputSignal<Record<string, unknown> | null>;
2153
2066
  readonly color: import("@angular/core").InputSignal<string | undefined>;
2154
2067
  readonly active: import("@angular/core").InputSignal<boolean>;
2155
2068
  readonly size: import("@angular/core").InputSignal<"sm" | "md" | "xs" | "lg">;
@@ -2171,6 +2084,16 @@ export declare class ButtonComponent {
2171
2084
  "required": false;
2172
2085
  "isSignal": true;
2173
2086
  };
2087
+ "routerLink": {
2088
+ "alias": "routerLink";
2089
+ "required": false;
2090
+ "isSignal": true;
2091
+ };
2092
+ "queryParams": {
2093
+ "alias": "queryParams";
2094
+ "required": false;
2095
+ "isSignal": true;
2096
+ };
2174
2097
  "color": {
2175
2098
  "alias": "color";
2176
2099
  "required": false;
@@ -5632,6 +5555,8 @@ export declare class DateRangePickerComponent {
5632
5555
  readonly activePreset: import("@angular/core").InputSignal<DatePreset>;
5633
5556
  readonly showPresets: import("@angular/core").InputSignal<boolean>;
5634
5557
  readonly includeAllTime: import("@angular/core").InputSignal<boolean>;
5558
+ /** Accessible name of the preset tab list (screen readers announce it when the tabs get focus). */
5559
+ readonly ariaLabel: import("@angular/core").InputSignal<string>;
5635
5560
  readonly rangeChange: import("@angular/core").OutputEmitterRef<DateRange>;
5636
5561
  /** Follows `activePreset` from the host, and the user's own picks in between. */
5637
5562
  protected readonly selectedPreset: import("@angular/core").WritableSignal<DatePreset>;
@@ -5657,6 +5582,11 @@ export declare class DateRangePickerComponent {
5657
5582
  "required": false;
5658
5583
  "isSignal": true;
5659
5584
  };
5585
+ "ariaLabel": {
5586
+ "alias": "ariaLabel";
5587
+ "required": false;
5588
+ "isSignal": true;
5589
+ };
5660
5590
  }, {
5661
5591
  "rangeChange": "rangeChange";
5662
5592
  }, never, never, true, never>;