@area8975/ui 0.2.1-dev.28 → 0.2.1

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": "@area8975/ui",
3
- "version": "0.2.1-dev.28",
3
+ "version": "0.2.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.0.0",
6
6
  "@angular/core": "^22.0.0",
@@ -33,4 +33,4 @@
33
33
  "module": "fesm2022/area8975-ui.mjs",
34
34
  "typings": "types/area8975-ui.d.ts",
35
35
  "type": "module"
36
- }
36
+ }
@@ -32,6 +32,135 @@ export type ChartLegendPosition = 'auto' | 'none';
32
32
  export declare const CHART_PALETTE: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
33
33
  /** Violet and green are lightened to keep 3:1 contrast on a dark card. */
34
34
  export declare const CHART_PALETTE_DARK: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#2e9e2e", "#8a7cf0", "#e34948"];
35
+ /** A colour someone picks for a thing, e.g. a category, that every chart then draws it in. */
36
+ export interface ChartColour {
37
+ /** Stable, safe to store. Never rename or reuse one. */
38
+ readonly key: string;
39
+ /** What to call it in a picker, and for screen readers. */
40
+ readonly label: string;
41
+ /** On a light card (`CHART_INK.surface`), at least 3:1. */
42
+ readonly light: string;
43
+ /** On a dark card (`CHART_INK_DARK.surface`), at least 3:1. */
44
+ readonly dark: string;
45
+ }
46
+ /**
47
+ * Every colour that can be picked, the automatic palette first. Too many to tell
48
+ * apart by colour alone for everyone, so always show a label alongside.
49
+ */
50
+ export declare const CHART_COLOURS: readonly [{
51
+ readonly key: "blue";
52
+ readonly label: "Blue";
53
+ readonly light: "#2a78d6";
54
+ readonly dark: "#2a78d6";
55
+ }, {
56
+ readonly key: "orange";
57
+ readonly label: "Orange";
58
+ readonly light: "#eb6834";
59
+ readonly dark: "#eb6834";
60
+ }, {
61
+ readonly key: "teal";
62
+ readonly label: "Teal";
63
+ readonly light: "#1baf7a";
64
+ readonly dark: "#1baf7a";
65
+ }, {
66
+ readonly key: "amber";
67
+ readonly label: "Amber";
68
+ readonly light: "#eda100";
69
+ readonly dark: "#eda100";
70
+ }, {
71
+ readonly key: "pink";
72
+ readonly label: "Pink";
73
+ readonly light: "#e87ba4";
74
+ readonly dark: "#e87ba4";
75
+ }, {
76
+ readonly key: "green";
77
+ readonly label: "Green";
78
+ readonly light: "#008300";
79
+ readonly dark: "#2e9e2e";
80
+ }, {
81
+ readonly key: "violet";
82
+ readonly label: "Violet";
83
+ readonly light: "#4a3aa7";
84
+ readonly dark: "#8a7cf0";
85
+ }, {
86
+ readonly key: "red";
87
+ readonly label: "Red";
88
+ readonly light: "#e34948";
89
+ readonly dark: "#e34948";
90
+ }, {
91
+ readonly key: "magenta";
92
+ readonly label: "Magenta";
93
+ readonly light: "#7e147e";
94
+ readonly dark: "#ab46aa";
95
+ }, {
96
+ readonly key: "dark-yellow";
97
+ readonly label: "Dark yellow";
98
+ readonly light: "#a16d03";
99
+ readonly dark: "#a16d03";
100
+ }, {
101
+ readonly key: "dark-cyan";
102
+ readonly label: "Dark cyan";
103
+ readonly light: "#046971";
104
+ readonly dark: "#247b83";
105
+ }, {
106
+ readonly key: "mauve";
107
+ readonly label: "Mauve";
108
+ readonly light: "#693c5f";
109
+ readonly dark: "#916185";
110
+ }, {
111
+ readonly key: "cyan";
112
+ readonly label: "Cyan";
113
+ readonly light: "#309fb3";
114
+ readonly dark: "#309fb3";
115
+ }, {
116
+ readonly key: "light-purple";
117
+ readonly label: "Light purple";
118
+ readonly light: "#cb65e1";
119
+ readonly dark: "#cb65e1";
120
+ }, {
121
+ readonly key: "lilac";
122
+ readonly label: "Lilac";
123
+ readonly light: "#ad87b6";
124
+ readonly dark: "#ad87b6";
125
+ }, {
126
+ readonly key: "olive";
127
+ readonly label: "Olive";
128
+ readonly light: "#989401";
129
+ readonly dark: "#989401";
130
+ }, {
131
+ readonly key: "dark-red";
132
+ readonly label: "Dark red";
133
+ readonly light: "#842e26";
134
+ readonly dark: "#ae544a";
135
+ }, {
136
+ readonly key: "dark-green";
137
+ readonly label: "Dark green";
138
+ readonly light: "#406020";
139
+ readonly dark: "#597b3a";
140
+ }, {
141
+ readonly key: "tan";
142
+ readonly label: "Tan";
143
+ readonly light: "#bd8a66";
144
+ readonly dark: "#bd8a66";
145
+ }, {
146
+ readonly key: "purple";
147
+ readonly label: "Purple";
148
+ readonly light: "#7845ce";
149
+ readonly dark: "#8452db";
150
+ }, {
151
+ readonly key: "deep-pink";
152
+ readonly label: "Deep pink";
153
+ readonly light: "#db4594";
154
+ readonly dark: "#db4594";
155
+ }, {
156
+ readonly key: "grey-blue";
157
+ readonly label: "Grey blue";
158
+ readonly light: "#6f7db0";
159
+ readonly dark: "#6f7db0";
160
+ }];
161
+ export type ChartColourKey = typeof CHART_COLOURS[number]['key'];
162
+ /** The shade of a picked colour for the current theme. */
163
+ export declare function pickedChartColour(key: ChartColourKey, dark?: boolean): string;
35
164
  /** Past eight series, fold the rest into "Other" instead of reusing a colour. */
36
165
  export declare const CHART_MAX_SERIES: 8;
37
166
  /** Lines can go to sixteen, the second eight reuse the colours dashed. */