@area8975/ui 0.2.2-dev.49 → 0.2.2-dev.50

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.
Files changed (182) hide show
  1. package/README.md +3 -2
  2. package/fesm2022/area8975-ui-alert.mjs +113 -0
  3. package/fesm2022/area8975-ui-alert.mjs.map +1 -0
  4. package/fesm2022/area8975-ui-avatar.mjs +157 -0
  5. package/fesm2022/area8975-ui-avatar.mjs.map +1 -0
  6. package/fesm2022/area8975-ui-badge.mjs +116 -0
  7. package/fesm2022/area8975-ui-badge.mjs.map +1 -0
  8. package/fesm2022/area8975-ui-button.mjs +314 -0
  9. package/fesm2022/area8975-ui-button.mjs.map +1 -0
  10. package/fesm2022/area8975-ui-calendar.mjs +549 -0
  11. package/fesm2022/area8975-ui-calendar.mjs.map +1 -0
  12. package/fesm2022/area8975-ui-card-header.mjs +96 -0
  13. package/fesm2022/area8975-ui-card-header.mjs.map +1 -0
  14. package/fesm2022/area8975-ui-card.mjs +73 -0
  15. package/fesm2022/area8975-ui-card.mjs.map +1 -0
  16. package/fesm2022/area8975-ui-chart-palette.mjs +225 -0
  17. package/fesm2022/area8975-ui-chart-palette.mjs.map +1 -0
  18. package/fesm2022/area8975-ui-charts.mjs +2813 -0
  19. package/fesm2022/area8975-ui-charts.mjs.map +1 -0
  20. package/fesm2022/area8975-ui-checkbox.mjs +202 -0
  21. package/fesm2022/area8975-ui-checkbox.mjs.map +1 -0
  22. package/fesm2022/area8975-ui-colour.mjs +200 -0
  23. package/fesm2022/area8975-ui-colour.mjs.map +1 -0
  24. package/fesm2022/area8975-ui-container.mjs +40 -0
  25. package/fesm2022/area8975-ui-container.mjs.map +1 -0
  26. package/fesm2022/area8975-ui-counter.mjs +246 -0
  27. package/fesm2022/area8975-ui-counter.mjs.map +1 -0
  28. package/fesm2022/area8975-ui-date-range-picker.mjs +554 -0
  29. package/fesm2022/area8975-ui-date-range-picker.mjs.map +1 -0
  30. package/fesm2022/area8975-ui-datepicker.mjs +547 -0
  31. package/fesm2022/area8975-ui-datepicker.mjs.map +1 -0
  32. package/fesm2022/area8975-ui-disclosure.mjs +279 -0
  33. package/fesm2022/area8975-ui-disclosure.mjs.map +1 -0
  34. package/fesm2022/area8975-ui-drawer.mjs +106 -0
  35. package/fesm2022/area8975-ui-drawer.mjs.map +1 -0
  36. package/fesm2022/area8975-ui-dropdown-button.mjs +141 -0
  37. package/fesm2022/area8975-ui-dropdown-button.mjs.map +1 -0
  38. package/fesm2022/area8975-ui-dropdown-menu.mjs +96 -0
  39. package/fesm2022/area8975-ui-dropdown-menu.mjs.map +1 -0
  40. package/fesm2022/area8975-ui-dropdown.mjs +208 -0
  41. package/fesm2022/area8975-ui-dropdown.mjs.map +1 -0
  42. package/fesm2022/area8975-ui-dropzone.mjs +332 -0
  43. package/fesm2022/area8975-ui-dropzone.mjs.map +1 -0
  44. package/fesm2022/area8975-ui-field.mjs +191 -0
  45. package/fesm2022/area8975-ui-field.mjs.map +1 -0
  46. package/fesm2022/area8975-ui-file-input.mjs +340 -0
  47. package/fesm2022/area8975-ui-file-input.mjs.map +1 -0
  48. package/fesm2022/area8975-ui-file.mjs +47 -0
  49. package/fesm2022/area8975-ui-file.mjs.map +1 -0
  50. package/fesm2022/area8975-ui-format.mjs +70 -0
  51. package/fesm2022/area8975-ui-format.mjs.map +1 -0
  52. package/fesm2022/area8975-ui-input-addon.mjs +42 -0
  53. package/fesm2022/area8975-ui-input-addon.mjs.map +1 -0
  54. package/fesm2022/area8975-ui-input-group.mjs +86 -0
  55. package/fesm2022/area8975-ui-input-group.mjs.map +1 -0
  56. package/fesm2022/area8975-ui-input.mjs +682 -0
  57. package/fesm2022/area8975-ui-input.mjs.map +1 -0
  58. package/fesm2022/area8975-ui-kpi.mjs +167 -0
  59. package/fesm2022/area8975-ui-kpi.mjs.map +1 -0
  60. package/fesm2022/area8975-ui-layout.mjs +63 -0
  61. package/fesm2022/area8975-ui-layout.mjs.map +1 -0
  62. package/fesm2022/area8975-ui-loading.mjs +76 -0
  63. package/fesm2022/area8975-ui-loading.mjs.map +1 -0
  64. package/fesm2022/area8975-ui-modal-close-btn.mjs +89 -0
  65. package/fesm2022/area8975-ui-modal-close-btn.mjs.map +1 -0
  66. package/fesm2022/area8975-ui-modal.mjs +235 -0
  67. package/fesm2022/area8975-ui-modal.mjs.map +1 -0
  68. package/fesm2022/area8975-ui-money.mjs +230 -0
  69. package/fesm2022/area8975-ui-money.mjs.map +1 -0
  70. package/fesm2022/area8975-ui-overlay.mjs +317 -0
  71. package/fesm2022/area8975-ui-overlay.mjs.map +1 -0
  72. package/fesm2022/area8975-ui-pagination.mjs +152 -0
  73. package/fesm2022/area8975-ui-pagination.mjs.map +1 -0
  74. package/fesm2022/area8975-ui-private.mjs +63 -0
  75. package/fesm2022/area8975-ui-private.mjs.map +1 -0
  76. package/fesm2022/area8975-ui-progress.mjs +307 -0
  77. package/fesm2022/area8975-ui-progress.mjs.map +1 -0
  78. package/fesm2022/area8975-ui-radio.mjs +199 -0
  79. package/fesm2022/area8975-ui-radio.mjs.map +1 -0
  80. package/fesm2022/area8975-ui-rich-text-editor.mjs +778 -0
  81. package/fesm2022/area8975-ui-rich-text-editor.mjs.map +1 -0
  82. package/fesm2022/area8975-ui-search.mjs +266 -0
  83. package/fesm2022/area8975-ui-search.mjs.map +1 -0
  84. package/fesm2022/area8975-ui-segmented.mjs +118 -0
  85. package/fesm2022/area8975-ui-segmented.mjs.map +1 -0
  86. package/fesm2022/area8975-ui-select.mjs +926 -0
  87. package/fesm2022/area8975-ui-select.mjs.map +1 -0
  88. package/fesm2022/area8975-ui-sidebar-group.mjs +60 -0
  89. package/fesm2022/area8975-ui-sidebar-group.mjs.map +1 -0
  90. package/fesm2022/area8975-ui-sidebar-item.mjs +107 -0
  91. package/fesm2022/area8975-ui-sidebar-item.mjs.map +1 -0
  92. package/fesm2022/area8975-ui-sidebar.mjs +109 -0
  93. package/fesm2022/area8975-ui-sidebar.mjs.map +1 -0
  94. package/fesm2022/area8975-ui-skeleton.mjs +116 -0
  95. package/fesm2022/area8975-ui-skeleton.mjs.map +1 -0
  96. package/fesm2022/area8975-ui-stat.mjs +55 -0
  97. package/fesm2022/area8975-ui-stat.mjs.map +1 -0
  98. package/fesm2022/area8975-ui-switch.mjs +132 -0
  99. package/fesm2022/area8975-ui-switch.mjs.map +1 -0
  100. package/fesm2022/area8975-ui-tab.mjs +217 -0
  101. package/fesm2022/area8975-ui-tab.mjs.map +1 -0
  102. package/fesm2022/area8975-ui-table-filters.mjs +499 -0
  103. package/fesm2022/area8975-ui-table-filters.mjs.map +1 -0
  104. package/fesm2022/area8975-ui-table.mjs +1237 -0
  105. package/fesm2022/area8975-ui-table.mjs.map +1 -0
  106. package/fesm2022/area8975-ui-textarea.mjs +375 -0
  107. package/fesm2022/area8975-ui-textarea.mjs.map +1 -0
  108. package/fesm2022/area8975-ui-theme.mjs +246 -0
  109. package/fesm2022/area8975-ui-theme.mjs.map +1 -0
  110. package/fesm2022/area8975-ui-time-select.mjs +170 -0
  111. package/fesm2022/area8975-ui-time-select.mjs.map +1 -0
  112. package/fesm2022/area8975-ui-toast.mjs +269 -0
  113. package/fesm2022/area8975-ui-toast.mjs.map +1 -0
  114. package/fesm2022/area8975-ui-toaster.mjs +117 -0
  115. package/fesm2022/area8975-ui-toaster.mjs.map +1 -0
  116. package/fesm2022/area8975-ui-tooltip.mjs +196 -0
  117. package/fesm2022/area8975-ui-tooltip.mjs.map +1 -0
  118. package/fesm2022/area8975-ui-user-menu.mjs +186 -0
  119. package/fesm2022/area8975-ui-user-menu.mjs.map +1 -0
  120. package/fesm2022/area8975-ui.mjs +0 -16520
  121. package/package.json +237 -1
  122. package/types/area8975-ui-alert.d.ts +25 -0
  123. package/types/area8975-ui-avatar.d.ts +40 -0
  124. package/types/area8975-ui-badge.d.ts +31 -0
  125. package/types/area8975-ui-button.d.ts +129 -0
  126. package/types/area8975-ui-calendar.d.ts +177 -0
  127. package/types/area8975-ui-card-header.d.ts +28 -0
  128. package/types/area8975-ui-card.d.ts +18 -0
  129. package/types/area8975-ui-chart-palette.d.ts +176 -0
  130. package/types/area8975-ui-charts.d.ts +747 -0
  131. package/types/area8975-ui-checkbox.d.ts +61 -0
  132. package/types/area8975-ui-colour.d.ts +31 -0
  133. package/types/area8975-ui-container.d.ts +5 -0
  134. package/types/area8975-ui-counter.d.ts +43 -0
  135. package/types/area8975-ui-date-range-picker.d.ts +132 -0
  136. package/types/area8975-ui-datepicker.d.ts +124 -0
  137. package/types/area8975-ui-disclosure.d.ts +79 -0
  138. package/types/area8975-ui-drawer.d.ts +25 -0
  139. package/types/area8975-ui-dropdown-button.d.ts +32 -0
  140. package/types/area8975-ui-dropdown-menu.d.ts +25 -0
  141. package/types/area8975-ui-dropdown.d.ts +56 -0
  142. package/types/area8975-ui-dropzone.d.ts +96 -0
  143. package/types/area8975-ui-field.d.ts +72 -0
  144. package/types/area8975-ui-file-input.d.ts +72 -0
  145. package/types/area8975-ui-file.d.ts +21 -0
  146. package/types/area8975-ui-format.d.ts +37 -0
  147. package/types/area8975-ui-input-addon.d.ts +10 -0
  148. package/types/area8975-ui-input-group.d.ts +18 -0
  149. package/types/area8975-ui-input.d.ts +224 -0
  150. package/types/area8975-ui-kpi.d.ts +36 -0
  151. package/types/area8975-ui-layout.d.ts +7 -0
  152. package/types/area8975-ui-loading.d.ts +16 -0
  153. package/types/area8975-ui-modal-close-btn.d.ts +14 -0
  154. package/types/area8975-ui-modal.d.ts +45 -0
  155. package/types/area8975-ui-money.d.ts +77 -0
  156. package/types/area8975-ui-overlay.d.ts +75 -0
  157. package/types/area8975-ui-pagination.d.ts +27 -0
  158. package/types/area8975-ui-private.d.ts +20 -0
  159. package/types/area8975-ui-progress.d.ts +127 -0
  160. package/types/area8975-ui-radio.d.ts +61 -0
  161. package/types/area8975-ui-rich-text-editor.d.ts +165 -0
  162. package/types/area8975-ui-search.d.ts +56 -0
  163. package/types/area8975-ui-segmented.d.ts +41 -0
  164. package/types/area8975-ui-select.d.ts +293 -0
  165. package/types/area8975-ui-sidebar-group.d.ts +15 -0
  166. package/types/area8975-ui-sidebar-item.d.ts +20 -0
  167. package/types/area8975-ui-sidebar.d.ts +16 -0
  168. package/types/area8975-ui-skeleton.d.ts +35 -0
  169. package/types/area8975-ui-stat.d.ts +13 -0
  170. package/types/area8975-ui-switch.d.ts +32 -0
  171. package/types/area8975-ui-tab.d.ts +45 -0
  172. package/types/area8975-ui-table-filters.d.ts +138 -0
  173. package/types/area8975-ui-table.d.ts +371 -0
  174. package/types/area8975-ui-textarea.d.ts +126 -0
  175. package/types/area8975-ui-theme.d.ts +61 -0
  176. package/types/area8975-ui-time-select.d.ts +35 -0
  177. package/types/area8975-ui-toast.d.ts +78 -0
  178. package/types/area8975-ui-toaster.d.ts +23 -0
  179. package/types/area8975-ui-tooltip.d.ts +47 -0
  180. package/types/area8975-ui-user-menu.d.ts +39 -0
  181. package/types/area8975-ui.d.ts +1 -4546
  182. package/fesm2022/area8975-ui.mjs.map +0 -1
@@ -0,0 +1,28 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class UiCardHeaderComponent {
3
+ readonly heading: import("@angular/core").InputSignal<string>;
4
+ readonly subtitle: import("@angular/core").InputSignal<string>;
5
+ /** Pick the level that fits the page's outline, it doesn't change the look. */
6
+ readonly headingLevel: import("@angular/core").InputSignal<2 | 3 | 4>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiCardHeaderComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiCardHeaderComponent, "ui-card-header", never, {
9
+ "heading": {
10
+ "alias": "heading";
11
+ "required": true;
12
+ "isSignal": true;
13
+ };
14
+ "subtitle": {
15
+ "alias": "subtitle";
16
+ "required": false;
17
+ "isSignal": true;
18
+ };
19
+ "headingLevel": {
20
+ "alias": "headingLevel";
21
+ "required": false;
22
+ "isSignal": true;
23
+ };
24
+ }, {}, never, ["*"], true, never>;
25
+ }
26
+ export declare const CardHeadingLevels: readonly [2, 3, 4];
27
+ /** @see {@link CardHeadingLevels} */
28
+ export type CardHeadingLevel = typeof CardHeadingLevels[number];
@@ -0,0 +1,18 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class UiCardComponent {
3
+ readonly radius: import("@angular/core").InputSignal<"none" | "sm" | "md" | "lg" | "xl">;
4
+ readonly generatedClasses: import("@angular/core").Signal<string>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiCardComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiCardComponent, "ui-card", never, {
7
+ "radius": {
8
+ "alias": "radius";
9
+ "required": false;
10
+ "isSignal": true;
11
+ };
12
+ }, {}, never, ["*"], true, never>;
13
+ }
14
+ /** The radius that a card can hold. Maps directly to tailwindcss' rounded classes. */
15
+ export declare const CardRadii: readonly ["none", "sm", "md", "lg", "xl"];
16
+ /** @see {@link CardRadii} */
17
+ export type CardRadius = typeof CardRadii[number];
18
+ export declare const radiusClasses: Record<CardRadius, string>;
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Categorical colours for chart series, in a fixed order that was checked for
3
+ * colour blindness (adjacent pairs stay apart for protan, deutan and tritan).
4
+ * Keep the order, a series takes the next slot, never a generated colour.
5
+ */
6
+ export declare const CHART_PALETTE: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
7
+ /** Violet and green are lightened to keep 3:1 contrast on a dark card. */
8
+ export declare const CHART_PALETTE_DARK: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#2e9e2e", "#8a7cf0", "#e34948"];
9
+ /** A colour someone picks for a thing, e.g. a category, that every chart then draws it in. */
10
+ export interface ChartColour {
11
+ /** Stable, safe to store. Never rename or reuse one. */
12
+ readonly key: string;
13
+ /** What to call it in a picker, and for screen readers. */
14
+ readonly label: string;
15
+ /** On a light card (`CHART_INK.surface`), at least 3:1. */
16
+ readonly light: string;
17
+ /** On a dark card (`CHART_INK_DARK.surface`), at least 3:1. */
18
+ readonly dark: string;
19
+ }
20
+ /**
21
+ * Every colour that can be picked, the automatic palette first. Too many to tell
22
+ * apart by colour alone for everyone, so always show a label alongside.
23
+ */
24
+ export declare const CHART_COLOURS: readonly [{
25
+ readonly key: "blue";
26
+ readonly label: "Blue";
27
+ readonly light: "#2a78d6";
28
+ readonly dark: "#2a78d6";
29
+ }, {
30
+ readonly key: "orange";
31
+ readonly label: "Orange";
32
+ readonly light: "#eb6834";
33
+ readonly dark: "#eb6834";
34
+ }, {
35
+ readonly key: "teal";
36
+ readonly label: "Teal";
37
+ readonly light: "#1baf7a";
38
+ readonly dark: "#1baf7a";
39
+ }, {
40
+ readonly key: "amber";
41
+ readonly label: "Amber";
42
+ readonly light: "#eda100";
43
+ readonly dark: "#eda100";
44
+ }, {
45
+ readonly key: "pink";
46
+ readonly label: "Pink";
47
+ readonly light: "#e87ba4";
48
+ readonly dark: "#e87ba4";
49
+ }, {
50
+ readonly key: "green";
51
+ readonly label: "Green";
52
+ readonly light: "#008300";
53
+ readonly dark: "#2e9e2e";
54
+ }, {
55
+ readonly key: "violet";
56
+ readonly label: "Violet";
57
+ readonly light: "#4a3aa7";
58
+ readonly dark: "#8a7cf0";
59
+ }, {
60
+ readonly key: "red";
61
+ readonly label: "Red";
62
+ readonly light: "#e34948";
63
+ readonly dark: "#e34948";
64
+ }, {
65
+ readonly key: "magenta";
66
+ readonly label: "Magenta";
67
+ readonly light: "#7e147e";
68
+ readonly dark: "#ab46aa";
69
+ }, {
70
+ readonly key: "dark-yellow";
71
+ readonly label: "Dark yellow";
72
+ readonly light: "#a16d03";
73
+ readonly dark: "#a16d03";
74
+ }, {
75
+ readonly key: "dark-cyan";
76
+ readonly label: "Dark cyan";
77
+ readonly light: "#046971";
78
+ readonly dark: "#247b83";
79
+ }, {
80
+ readonly key: "mauve";
81
+ readonly label: "Mauve";
82
+ readonly light: "#693c5f";
83
+ readonly dark: "#916185";
84
+ }, {
85
+ readonly key: "cyan";
86
+ readonly label: "Cyan";
87
+ readonly light: "#309fb3";
88
+ readonly dark: "#309fb3";
89
+ }, {
90
+ readonly key: "light-purple";
91
+ readonly label: "Light purple";
92
+ readonly light: "#cb65e1";
93
+ readonly dark: "#cb65e1";
94
+ }, {
95
+ readonly key: "lilac";
96
+ readonly label: "Lilac";
97
+ readonly light: "#ad87b6";
98
+ readonly dark: "#ad87b6";
99
+ }, {
100
+ readonly key: "olive";
101
+ readonly label: "Olive";
102
+ readonly light: "#989401";
103
+ readonly dark: "#989401";
104
+ }, {
105
+ readonly key: "dark-red";
106
+ readonly label: "Dark red";
107
+ readonly light: "#842e26";
108
+ readonly dark: "#ae544a";
109
+ }, {
110
+ readonly key: "dark-green";
111
+ readonly label: "Dark green";
112
+ readonly light: "#406020";
113
+ readonly dark: "#597b3a";
114
+ }, {
115
+ readonly key: "tan";
116
+ readonly label: "Tan";
117
+ readonly light: "#bd8a66";
118
+ readonly dark: "#bd8a66";
119
+ }, {
120
+ readonly key: "purple";
121
+ readonly label: "Purple";
122
+ readonly light: "#7845ce";
123
+ readonly dark: "#8452db";
124
+ }, {
125
+ readonly key: "deep-pink";
126
+ readonly label: "Deep pink";
127
+ readonly light: "#db4594";
128
+ readonly dark: "#db4594";
129
+ }, {
130
+ readonly key: "grey-blue";
131
+ readonly label: "Grey blue";
132
+ readonly light: "#6f7db0";
133
+ readonly dark: "#6f7db0";
134
+ }];
135
+ export type ChartColourKey = typeof CHART_COLOURS[number]['key'];
136
+ /** The shade of a picked colour for the current theme. */
137
+ export declare function pickedChartColour(key: ChartColourKey, dark?: boolean): string;
138
+ /** Past eight series, fold the rest into "Other" instead of reusing a colour. */
139
+ export declare const CHART_MAX_SERIES: 8;
140
+ /** Lines can go to sixteen, the second eight reuse the colours dashed. */
141
+ export declare const CHART_MAX_LINE_SERIES: number;
142
+ /** Chart chrome, apex needs real colours so these can't be CSS variables. */
143
+ export interface ChartInk {
144
+ text: string;
145
+ muted: string;
146
+ grid: string;
147
+ surface: string;
148
+ context: string;
149
+ }
150
+ export declare const CHART_INK: ChartInk;
151
+ export declare const CHART_INK_DARK: ChartInk;
152
+ export declare function chartInk(dark: boolean): ChartInk;
153
+ export interface ChartSeriesStyle {
154
+ colour: string;
155
+ dashed: boolean;
156
+ }
157
+ /** Past the eighth slot a series goes grey, reusing a colour would make two series look the same. */
158
+ export declare function chartColour(index: number, dark?: boolean): string;
159
+ /**
160
+ * Colour plus line style for a slot. With `dashes` the ninth to sixteenth
161
+ * slots reuse the colours as dashed lines, colour and dash together keep
162
+ * them apart. Anything past that is grey.
163
+ */
164
+ export declare function chartSeriesStyle(index: number, dashes: boolean, dark?: boolean): ChartSeriesStyle;
165
+ /**
166
+ * Blends `colour` towards `towards`, keeping `strength` of the original: 1 leaves
167
+ * it as it is, 0 gives `towards`. Apex can't parse color-mix(), so it's done
168
+ * here. Both must be six digit hex, anything else gives null.
169
+ */
170
+ export declare function mixChartColours(colour: string, towards: string, strength: number): string | null;
171
+ /**
172
+ * Dark or light text, whichever reads better on a mark filled with `background`.
173
+ * Judged by APCA, the contrast model drafted for WCAG 3: the WCAG 2 ratio
174
+ * puts black text on saturated orange and red, where white reads far better.
175
+ */
176
+ export declare function chartLabelInk(background: string): string;