@eagami/ui 1.2.1 → 1.4.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 +31 -13
- package/fesm2022/eagami-ui.mjs +19901 -2005
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +3211 -840
package/README.md
CHANGED
|
@@ -9,10 +9,19 @@
|
|
|
9
9
|
<a href="https://github.com/mwiraszka/eagami/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@eagami/ui.svg" alt="license" /></a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
`@eagami/ui` is a lightweight, accessible Angular component library. Sensible defaults out of the box, with a fully customizable design to fit any brand.
|
|
13
13
|
|
|
14
14
|
**Live documentation:** [eagami.com/ui](https://eagami.com/ui)
|
|
15
15
|
|
|
16
|
+
## Design principles
|
|
17
|
+
|
|
18
|
+
- **Accessible.** Keyboard navigation, focus management, screen-reader support, and reduced-motion handling are built into every component.
|
|
19
|
+
- **Lightweight.** Each component imports independently and the bundle only ships what you use.
|
|
20
|
+
- **Themeable.** Fully customizable with [design tokens](https://eagami.com/ui/design-tokens) while maintaining a unified look across every page. Light and dark variants ship together and default to the user's system preference.
|
|
21
|
+
- **Localized.** Built-in component text ships in English, French, Greek, Polish, and Spanish.
|
|
22
|
+
- **Modern.** Regularly updated with the latest Angular features and modern web standards.
|
|
23
|
+
- **Unlocked.** Every component is plain Angular and CSS with no vendor lock-in, so the source can be read, copied, or modified like any other code in your project.
|
|
24
|
+
|
|
16
25
|
## Installation
|
|
17
26
|
|
|
18
27
|
```bash
|
|
@@ -31,27 +40,36 @@ Add the global stylesheet to your `angular.json`:
|
|
|
31
40
|
|
|
32
41
|
See the [Setup](https://eagami.com/ui/setup) page for fonts and your first component import.
|
|
33
42
|
|
|
34
|
-
## Features
|
|
35
|
-
|
|
36
|
-
- Standalone components; no `NgModule` boilerplate
|
|
37
|
-
- Signal-based APIs (`input()`, `model()`, `output()`)
|
|
38
|
-
- Tree-shakeable; ~70 KB gzipped for the whole library
|
|
39
|
-
- Themed via CSS custom properties on `:root`
|
|
40
|
-
- Dark mode automatic via `prefers-color-scheme`
|
|
41
|
-
- Accessible: ARIA, keyboard, focus management, reduced motion
|
|
42
|
-
- Localized in English, French, Greek, Polish, Spanish
|
|
43
|
-
- `ControlValueAccessor` on every form control
|
|
44
|
-
|
|
45
43
|
## What's included
|
|
46
44
|
|
|
47
45
|
- **Form controls**: Input, Textarea, Checkbox, Switch, Radio, Dropdown, Autocomplete, Date picker, Slider, Code input, Segmented, Avatar editor
|
|
48
46
|
- **Overlays**: Dialog, Drawer, Tooltip, Menu, Toast
|
|
49
47
|
- **Navigation**: Tabs, Breadcrumbs, Paginator, Accordion
|
|
50
48
|
- **Display**: Card, Badge, Tag, Alert, Avatar, Skeleton, Spinner, Progress bar, Empty state, Divider, Eagami wordmark, Data table
|
|
51
|
-
- **Icons**: 100 stroke-based SVG icon components (`<ea-icon-*>`)
|
|
52
49
|
|
|
53
50
|
Full API and live demos at [eagami.com/ui/components](https://eagami.com/ui/components).
|
|
54
51
|
|
|
52
|
+
## Icons
|
|
53
|
+
|
|
54
|
+
Standalone Angular components (`<ea-icon-*>`) that inherit their color and scale with `font-size`, so they render at any size. The library ships the full [Feather Icons](https://feathericons.com/) set (287 icons at their canonical slugs) by [Cole Bemis](https://github.com/colebemis), used under the [MIT License](https://github.com/feathericons/feather/blob/master/LICENSE), plus a set of original Eagami UI additions (basic shapes, household objects, the Eagami brand mark) and a small coloured brand-icon set for nominative use.
|
|
55
|
+
|
|
56
|
+
Each icon component exposes `static readonly` metadata so consumers can build catalogues, search indices, or doc tables without importing every icon:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { GithubIconComponent } from '@eagami/ui';
|
|
60
|
+
|
|
61
|
+
GithubIconComponent.slug; // 'github'
|
|
62
|
+
GithubIconComponent.category; // 'feather'
|
|
63
|
+
GithubIconComponent.isBrand; // true
|
|
64
|
+
GithubIconComponent.tags; // ['github', 'git', 'repository', ...]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The shape of this metadata is described by the exported `IconCategory`, `IconMeta`, and `IconComponentType` types. Every icon component extends the abstract `IconComponentBase` directive, which contributes the shared `display: inline-flex; width: 1em; height: 1em` host bindings.
|
|
68
|
+
|
|
69
|
+
For catalogue-style use cases, import the `ICONS` array (a slug-sorted, `ReadonlyArray<IconComponentType>` of every non-deprecated icon) and the `iconDisplayName(iconOrSlug)` helper that resolves the human-readable label with the correct casing for acronyms and brand marks (`GitHub`, `npm`, `CodePen`, `X (Twitter)`, etc.). Importing `ICONS` pulls every icon into the bundle, so apps that only render a handful should keep importing the components they use directly.
|
|
70
|
+
|
|
71
|
+
See [icons](https://eagami.com/ui/icons) for the full set, per-brand guideline links, and a searchable filter.
|
|
72
|
+
|
|
55
73
|
## Theming
|
|
56
74
|
|
|
57
75
|
Every visual property is a CSS custom property on `:root`, so overriding any token retunes the whole library. See [design tokens](https://eagami.com/ui/design-tokens) for the full reference and theming examples.
|