@thalassic/ui 22.5.1 → 22.7.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.
- package/fesm2022/thalassic-ui-fontawesome.mjs +44 -0
- package/fesm2022/thalassic-ui-fontawesome.mjs.map +1 -0
- package/fesm2022/thalassic-ui.mjs +1311 -123
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/types/thalassic-ui-fontawesome.d.ts +32 -0
- package/types/thalassic-ui.d.ts +472 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thalassic/ui",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/aria": "^22.0.0",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"./charts": {
|
|
36
36
|
"types": "./types/thalassic-ui-charts.d.ts",
|
|
37
37
|
"default": "./fesm2022/thalassic-ui-charts.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./fontawesome": {
|
|
40
|
+
"types": "./types/thalassic-ui-fontawesome.d.ts",
|
|
41
|
+
"default": "./fesm2022/thalassic-ui-fontawesome.mjs"
|
|
38
42
|
}
|
|
39
43
|
},
|
|
40
44
|
"type": "module",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { systemIcon } from '@thalassic/ui';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Structural shape of a FontAwesome `IconDefinition`, matched by its `icon`
|
|
6
|
+
* tuple `[width, height, ligatures, unicode, pathData]`.
|
|
7
|
+
*/
|
|
8
|
+
type fontAwesomeIcon = {
|
|
9
|
+
icon: [number, number, unknown, unknown, string | string[]];
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Override the library's built-in {@link systemIcon}s with FontAwesome icons.
|
|
14
|
+
* Each FontAwesome definition is converted to inline SVG (with
|
|
15
|
+
* `fill="currentColor"`, so it inherits color and box sizing like the defaults)
|
|
16
|
+
* and registered through `provideThalassicIcons`. Names left unset keep the
|
|
17
|
+
* library defaults.
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { faXmark, faChevronDown } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
+
* import { provideFontAwesomeIcons } from '@thalassic/ui/fontawesome';
|
|
22
|
+
*
|
|
23
|
+
* provideFontAwesomeIcons({
|
|
24
|
+
* close: faXmark,
|
|
25
|
+
* 'chevron-down': faChevronDown,
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function provideFontAwesomeIcons(icons: Partial<Record<systemIcon, fontAwesomeIcon>>): EnvironmentProviders;
|
|
30
|
+
|
|
31
|
+
export { provideFontAwesomeIcons };
|
|
32
|
+
export type { fontAwesomeIcon };
|