@leta-io/icons 0.1.0 → 0.2.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/README.md +12 -6
- package/dist/index.d.ts +18 -1048
- package/dist/index.js +630 -1066
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# @leta-io/icons
|
|
2
2
|
|
|
3
|
-
Material Symbols-backed icon registry for the LETA design system.
|
|
4
|
-
|
|
3
|
+
Material Symbols-backed icon registry for the LETA design system. Outlined is the
|
|
4
|
+
default; 105 of the 261 icons also ship a filled variant, and names that have only
|
|
5
|
+
one glyph fall back to it automatically, so `outlined` is always safe to pass.
|
|
5
6
|
|
|
6
7
|
```bash
|
|
7
8
|
npm install @leta-io/icons
|
|
@@ -17,10 +18,15 @@ import { Icon } from '@leta-io/icons';
|
|
|
17
18
|
## Notes
|
|
18
19
|
|
|
19
20
|
- `IconName` is exported as a union of all available names, so the set is
|
|
20
|
-
typo-proof at compile time.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
typo-proof at compile time. It is declared independently of the registry value,
|
|
22
|
+
so importing only the type costs you nothing — the published declarations are
|
|
23
|
+
~6 KB, not the size of the glyph data.
|
|
24
|
+
- The registry is a single module containing every icon, so importing one pulls in
|
|
25
|
+
all of them (~327 KB). That is a consequence of the API: icons are selected by
|
|
26
|
+
*name* at runtime, so the full set has to be present. Fine for an app; worth
|
|
27
|
+
knowing if you are optimising a small bundle.
|
|
28
|
+
- Glyphs are stored pre-stripped of their `<svg>` wrapper — `Icon` supplies its own,
|
|
29
|
+
so it can control size, fill and aria consistently.
|
|
24
30
|
|
|
25
31
|
Part of the LETA design system, alongside
|
|
26
32
|
[`@leta-io/components`](https://www.npmjs.com/package/@leta-io/components) and
|