@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 CHANGED
@@ -1,7 +1,8 @@
1
1
  # @leta-io/icons
2
2
 
3
- Material Symbols-backed icon registry for the LETA design system. Every icon
4
- ships both a filled and an outlined variant; outlined is the default.
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
- - The registry is a single module containing every icon, so importing one
22
- currently pulls in all of them. Fine for an app; something to be aware of if
23
- you are optimising a small bundle.
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