@eagami/ui 5.47.1 → 5.49.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 +30 -107
- package/fesm2022/eagami-ui.mjs +160 -13
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +28 -6
package/README.md
CHANGED
|
@@ -11,93 +11,46 @@
|
|
|
11
11
|
<a href="https://eagami.com/ui/accessibility"><img src="https://img.shields.io/badge/WCAG%202.2%20AA-axe--core%20tested-0b7261" alt="WCAG 2.2 AA, tested with axe-core" /></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
`@eagami/ui` is a lightweight, accessible Angular component library. Sensible defaults out of the box, with a fully customizable design to fit any brand.
|
|
14
|
+
`@eagami/ui` is a lightweight, accessible Angular component library and design system. Sensible defaults out of the box, with a fully customizable design to fit any brand.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://eagami.com/ui">Documentation</a> · <a href="https://eagami.com/ui/components">Components</a> · <a href="https://eagami.com/ui/icons">Icons</a><br />
|
|
18
|
+
<a href="https://eagami.com/ui/design-tokens">Design tokens</a> · <a href="https://eagami.com/ui/theme-builder">Theme builder</a> · <a href="https://eagami.com/ui/i18n">Internationalization</a> · <a href="https://eagami.com/ui/accessibility">Accessibility</a>
|
|
19
|
+
</p>
|
|
19
20
|
|
|
20
21
|
## Why Eagami UI
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **Yours to own.** Plain Angular and CSS with no lock-in: read, copy, or fork any component like the rest of your app.
|
|
28
|
-
- **Modern Angular.** Signals, native control flow, and SSR-safe rendering throughout.
|
|
29
|
-
|
|
30
|
-
| | Eagami UI | Angular Material | PrimeNG | Spartan |
|
|
31
|
-
|---|---|---|---|---|
|
|
32
|
-
| Styling model | CSS custom properties | Sass / Material 3 tokens | Design tokens + presets | Tailwind, copy-paste |
|
|
33
|
-
| Re-skin to any brand | First-class | Within Material Design | Preset-based | You own the markup |
|
|
34
|
-
| Built-in text i18n | 15 languages, runtime | Provide your own | Provide your own | Your markup |
|
|
35
|
-
| Per-component a11y tests | Yes (axe-core) | Backed by the CDK | Varies by component | Your responsibility |
|
|
36
|
-
| Requires a CSS framework | No | No | No | Tailwind |
|
|
37
|
-
| Runtime dependencies | 1 (`tslib`) | Angular CDK | multiple | Tailwind |
|
|
23
|
+
- **THEMES TO YOUR BRAND.** Give it one color per role and it generates a full, contrast-checked palette.
|
|
24
|
+
- **LIGHTWEIGHT.** No runtime dependencies, no CSS framework, and standalone side-effect-free components, so your app bundles only what it imports.
|
|
25
|
+
- **ACCESSIBLE AND LOCALIZED.** Every component meets WCAG 2.2 AA with full keyboard support and its own axe-core test suite. Built-in text ships in 15 languages you can switch at runtime.
|
|
26
|
+
- **YOURS TO OWN.** Plain Angular and CSS with no lock-in: read, copy, or fork any component like the rest of your app.
|
|
27
|
+
- **MODERN ANGULAR.** Signals and native control flow throughout, with SSR-safe rendering, prerendering, and hydration.
|
|
38
28
|
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
The quickest way is the schematic, which installs the package and registers the global stylesheet and fonts for you:
|
|
29
|
+
## Install
|
|
42
30
|
|
|
43
31
|
```bash
|
|
44
32
|
ng add @eagami/ui
|
|
45
33
|
```
|
|
46
34
|
|
|
47
|
-
|
|
35
|
+
The schematic installs the package and registers the global stylesheet and fonts. To wire it up by hand, see [Setup](https://eagami.com/ui/setup).
|
|
48
36
|
|
|
49
|
-
|
|
50
|
-
npm install @eagami/ui
|
|
51
|
-
# or
|
|
52
|
-
pnpm add @eagami/ui
|
|
53
|
-
# or
|
|
54
|
-
yarn add @eagami/ui
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Then add the global stylesheet to your `angular.json`:
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
"styles": ["node_modules/@eagami/ui/src/styles/eagami-ui.scss"]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
See the [Setup](https://eagami.com/ui/setup) page for fonts and your first component import.
|
|
64
|
-
|
|
65
|
-
## What's included
|
|
66
|
-
|
|
67
|
-
- **Actions**: Button, Command Palette
|
|
68
|
-
- **Form controls**: Autocomplete, Avatar Editor, Checkbox, Code Input, Color Picker, Date Picker, Dropdown, File Uploader, Form Field, Input, Multi-Select, Number Input, Radio, Range Slider, Rating, Segmented, Slider, Switch, Textarea, Time Picker, Transfer List
|
|
69
|
-
- **Overlays**: Dialog, Drawer, Menu, Popover, Toast, Tooltip
|
|
70
|
-
- **Navigation**: Breadcrumbs, Paginator, Stepper, Tabs
|
|
71
|
-
- **Display**: Accordion, Alert, Avatar, Badge, Card, Data Table, Divider, Eagami Wordmark, Empty State, Progress Bar, Skeleton, Spinner, Tag, Timeline, Tree, Virtual List
|
|
72
|
-
|
|
73
|
-
Full API and live demos at [eagami.com/ui/components](https://eagami.com/ui/components).
|
|
74
|
-
|
|
75
|
-
## Icons
|
|
76
|
-
|
|
77
|
-
Standalone Angular components (`<ea-icon-*>`) that inherit their color and scale with `font-size`, so they render at any size. The library ships the [Feather Icons](https://feathericons.com/) set (286 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 additional line icons from [Lucide](https://lucide.dev/) (ISC License), a set of original Eagami UI additions (basic shapes, household objects, the Eagami brand mark), and a coloured brand-icon set for nominative use that includes marks from [Simple Icons](https://simpleicons.org/) (CC0).
|
|
78
|
-
|
|
79
|
-
Each icon component exposes `static readonly` metadata so consumers can build catalogues, search indices, or doc tables without importing every icon:
|
|
37
|
+
## Use
|
|
80
38
|
|
|
81
39
|
```ts
|
|
82
|
-
import {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
40
|
+
import { ButtonComponent } from '@eagami/ui';
|
|
41
|
+
|
|
42
|
+
@Component({
|
|
43
|
+
imports: [ButtonComponent],
|
|
44
|
+
template: `<ea-button (clicked)="save()">Save</ea-button>`,
|
|
45
|
+
})
|
|
46
|
+
export class MyComponent {
|
|
47
|
+
save() {}
|
|
48
|
+
}
|
|
88
49
|
```
|
|
89
50
|
|
|
90
|
-
|
|
51
|
+
## Theme
|
|
91
52
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
See [icons](https://eagami.com/ui/icons) for the full set, per-brand guideline links, and a searchable filter.
|
|
95
|
-
|
|
96
|
-
## Theming
|
|
97
|
-
|
|
98
|
-
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.
|
|
99
|
-
|
|
100
|
-
For the brand colour specifically, pass a single hex to `provideEagamiUi` and the library derives a full ten-shade scale (50 through 900) in [OKLCH](https://www.w3.org/TR/css-color-4/#ok-lab) space:
|
|
53
|
+
Pass one color per role to `provideEagamiUi`:
|
|
101
54
|
|
|
102
55
|
```ts
|
|
103
56
|
bootstrapApplication(AppComponent, {
|
|
@@ -112,50 +65,20 @@ bootstrapApplication(AppComponent, {
|
|
|
112
65
|
});
|
|
113
66
|
```
|
|
114
67
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
## Internationalization
|
|
118
|
-
|
|
119
|
-
Built-in strings ship in 15 languages, with runtime switching via `EagamiI18nService`. English is bundled by default; register the other languages you use with `provideEagamiUi({ locales: [...] })` (or pass `EAGAMI_ALL_LOCALES` for all of them) so you ship only what you need, or register `localeLoaders` instead to fetch dictionaries on demand the first time a language is activated. See [internationalization](https://eagami.com/ui/i18n) for setup, lazy loading, and per-string overrides.
|
|
120
|
-
|
|
121
|
-
## Accessibility
|
|
122
|
-
|
|
123
|
-
Every component adheres to WCAG 2.2 Level AA and follows the matching [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/) pattern: correct roles and states, full keyboard support with roving tabindex and RTL-aware arrows, focus trapping and restoration in modal surfaces, and live-region announcements for toasts, alerts, and validation errors, localized in all 15 languages. Conformance is self-assessed and continuously verified: each component has an axe-core (vitest-axe) test suite that runs on every change, so regressions in roles, names, contrast, or ARIA usage fail the build. Components that render no visible text expose `aria-label` inputs (with localized defaults for built-in controls), which is the one piece the consuming app must supply. See [accessibility](https://eagami.com/ui/accessibility) for an overview.
|
|
124
|
-
|
|
125
|
-
## Server-side rendering
|
|
126
|
-
|
|
127
|
-
The library is SSR-safe and renders on the server (Angular Universal / `@angular/ssr`) without reaching for `window` or `document`. Browser-only work (focus management, the native `<dialog>`, overlay positioning, resize/intersection observers) is deferred to the client via `afterNextRender` and `isPlatformBrowser` guards, so prerendering, streaming SSR, and hydration work with no extra configuration.
|
|
68
|
+
Everything else is a CSS custom property you can override. See [Design tokens](https://eagami.com/ui/design-tokens).
|
|
128
69
|
|
|
129
70
|
## Testing
|
|
130
71
|
|
|
131
|
-
|
|
72
|
+
`<ea-dialog>` and `<ea-drawer>` are built on the native `<dialog>` element, and `@eagami/ui/testing` keeps them working in jsdom, which lacks `showModal()` and `close()`. Call `installNativeDialogShim()` once from your test setup file:
|
|
132
73
|
|
|
133
74
|
```ts
|
|
134
|
-
// test-setup.ts
|
|
135
75
|
import { installNativeDialogShim } from '@eagami/ui/testing';
|
|
136
76
|
|
|
137
77
|
installNativeDialogShim();
|
|
138
78
|
```
|
|
139
79
|
|
|
140
|
-
##
|
|
141
|
-
|
|
142
|
-
`@eagami/ui` is Angular-only, but its design tokens are framework-agnostic. Self-contained copy-and-paste guides and a machine-readable token export are published with the docs and kept in sync with the token source on every release:
|
|
143
|
-
|
|
144
|
-
- **[React integration guide](https://eagami.com/assets/eagami-ui-react.md)**
|
|
145
|
-
- **[Flutter integration guide](https://eagami.com/assets/eagami-ui-flutter.md)**
|
|
146
|
-
- **[Design tokens as JSON](https://eagami.com/assets/eagami-ui-tokens.json)** (W3C Design Tokens format where practical)
|
|
147
|
-
|
|
148
|
-
## Stability and support
|
|
149
|
-
|
|
150
|
-
Eagami UI follows [Semantic Versioning](https://semver.org). Breaking changes ship only in major releases, are listed under a **Breaking** heading in the [changelog](CHANGELOG.md), and are preceded by a deprecation period wherever practical. See [SUPPORT.md](https://github.com/mwiraszka/eagami/blob/main/SUPPORT.md) for the versioning policy, supported versions, deprecation policy, and how to get help.
|
|
80
|
+
## Links
|
|
151
81
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|---|---|
|
|
156
|
-
| Angular | `^21.0.0 || ^22.0.0` (peer dep) |
|
|
157
|
-
| Node | `>= 20` for build/dev tooling |
|
|
158
|
-
| Rendering | Browser, SSR / prerender (Angular Universal), hydration |
|
|
159
|
-
| Browsers | Last 2 stable versions of Chrome, Edge, Firefox (plus current ESR), Safari |
|
|
160
|
-
|
|
161
|
-
> **Upgrading across a major version?** See [MIGRATION.md](MIGRATION.md).
|
|
82
|
+
<p align="center">
|
|
83
|
+
<a href="CHANGELOG.md">Changelog</a> · <a href="MIGRATION.md">v4.x migration guide</a> · <a href="https://github.com/mwiraszka/eagami/blob/main/SUPPORT.md">Support</a> · <a href="https://github.com/mwiraszka/eagami/blob/main/LICENSE">License</a>
|
|
84
|
+
</p>
|