@eagami/ui 0.7.3 → 0.8.1
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 +272 -175
- package/fesm2022/eagami-ui.mjs +2187 -267
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +269 -10
package/README.md
CHANGED
|
@@ -81,113 +81,100 @@ No modules to register, no providers to configure. Every component works the sam
|
|
|
81
81
|
|
|
82
82
|
## Components
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
<details>
|
|
85
|
+
<summary><strong>Accordion</strong> — expandable content sections</summary>
|
|
85
86
|
|
|
86
|
-
|
|
87
|
+
Supports single or `multi` expand mode. Built-in chevron animation and disabled state.
|
|
87
88
|
|
|
88
89
|
```html
|
|
89
|
-
<ea-
|
|
90
|
-
|
|
91
|
-
</ea-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<img src="docs/images/button.png" alt="Button component" width="560" />
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
### Input
|
|
99
|
-
|
|
100
|
-
Full `ControlValueAccessor` support. Types: `text` | `email` | `password` | `number` | `search` | `tel` | `url`. Built-in password visibility toggle.
|
|
101
|
-
|
|
102
|
-
```html
|
|
103
|
-
<ea-input
|
|
104
|
-
label="Email"
|
|
105
|
-
type="email"
|
|
106
|
-
placeholder="you@example.com"
|
|
107
|
-
hint="We'll never share your email"
|
|
108
|
-
[(value)]="email" />
|
|
90
|
+
<ea-accordion>
|
|
91
|
+
<ea-accordion-item label="Section 1">Content for section 1</ea-accordion-item>
|
|
92
|
+
<ea-accordion-item label="Section 2">Content for section 2</ea-accordion-item>
|
|
93
|
+
</ea-accordion>
|
|
109
94
|
```
|
|
110
95
|
|
|
111
|
-
<img src="docs/images/
|
|
96
|
+
<img src="docs/images/accordion.png" alt="Accordion component" width="560" />
|
|
112
97
|
|
|
113
|
-
|
|
98
|
+
</details>
|
|
114
99
|
|
|
115
|
-
|
|
100
|
+
<details>
|
|
101
|
+
<summary><strong>Alert</strong> — semantic alert banners with optional dismiss</summary>
|
|
116
102
|
|
|
117
|
-
|
|
103
|
+
Variants: `default` | `success` | `warning` | `error` | `info`. Two-way `visible` binding.
|
|
118
104
|
|
|
119
105
|
```html
|
|
120
|
-
<ea-
|
|
121
|
-
|
|
122
|
-
placeholder="Enter your message…"
|
|
123
|
-
hint="Maximum 500 characters"
|
|
124
|
-
[rows]="4"
|
|
125
|
-
[(value)]="message" />
|
|
106
|
+
<ea-alert variant="success">Changes saved successfully.</ea-alert>
|
|
107
|
+
<ea-alert variant="error" [dismissible]="true">Something went wrong.</ea-alert>
|
|
126
108
|
```
|
|
127
109
|
|
|
128
|
-
<img src="docs/images/
|
|
110
|
+
<img src="docs/images/alert.png" alt="Alert component" width="560" />
|
|
129
111
|
|
|
130
|
-
|
|
112
|
+
</details>
|
|
131
113
|
|
|
132
|
-
|
|
114
|
+
<details>
|
|
115
|
+
<summary><strong>Avatar</strong> — image with initials or icon fallback</summary>
|
|
133
116
|
|
|
134
|
-
`
|
|
117
|
+
Sizes: `xs` | `sm` | `md` | `lg` | `xl`. Shapes: `circle` | `square`.
|
|
135
118
|
|
|
136
119
|
```html
|
|
137
|
-
<ea-
|
|
120
|
+
<ea-avatar src="/photo.jpg" alt="User" size="lg" />
|
|
121
|
+
<ea-avatar initials="MW" shape="square" />
|
|
122
|
+
<ea-avatar /> <!-- shows fallback user icon -->
|
|
138
123
|
```
|
|
139
124
|
|
|
140
|
-
<img src="docs/images/
|
|
125
|
+
<img src="docs/images/avatar.png" alt="Avatar component" width="560" />
|
|
141
126
|
|
|
142
|
-
|
|
127
|
+
</details>
|
|
143
128
|
|
|
144
|
-
|
|
129
|
+
<details>
|
|
130
|
+
<summary><strong>Avatar Editor</strong> — canvas-based image editor with pan, zoom, and crop</summary>
|
|
145
131
|
|
|
146
|
-
|
|
132
|
+
Drag-and-drop upload, zoom via slider or scroll wheel. Outputs a `Blob` and data URL.
|
|
147
133
|
|
|
148
134
|
```html
|
|
149
|
-
<ea-
|
|
135
|
+
<ea-avatar-editor
|
|
136
|
+
shape="circle"
|
|
137
|
+
[canvasSize]="200"
|
|
138
|
+
(cropped)="onCropped($event)" />
|
|
150
139
|
```
|
|
151
140
|
|
|
152
|
-
<img src="docs/images/
|
|
141
|
+
<img src="docs/images/avatar-editor.png" alt="Avatar editor component" width="560" />
|
|
153
142
|
|
|
154
|
-
|
|
143
|
+
</details>
|
|
155
144
|
|
|
156
|
-
|
|
145
|
+
<details>
|
|
146
|
+
<summary><strong>Badge</strong> — semantic status indicators</summary>
|
|
157
147
|
|
|
158
|
-
|
|
148
|
+
Variants: `default` | `success` | `warning` | `error` | `info`. Sizes: `sm` | `md` | `lg`.
|
|
159
149
|
|
|
160
150
|
```html
|
|
161
|
-
<ea-
|
|
162
|
-
|
|
163
|
-
<ea-radio value="pro" label="Pro" />
|
|
164
|
-
<ea-radio value="enterprise" label="Enterprise" />
|
|
165
|
-
</ea-radio-group>
|
|
151
|
+
<ea-badge variant="success">Active</ea-badge>
|
|
152
|
+
<ea-badge variant="error">Failed</ea-badge>
|
|
166
153
|
```
|
|
167
154
|
|
|
168
|
-
<img src="docs/images/
|
|
155
|
+
<img src="docs/images/badge.png" alt="Badge component" width="560" />
|
|
169
156
|
|
|
170
|
-
|
|
157
|
+
</details>
|
|
171
158
|
|
|
172
|
-
|
|
159
|
+
<details>
|
|
160
|
+
<summary><strong>Button</strong> — primary, secondary, ghost, danger variants with loading state</summary>
|
|
173
161
|
|
|
174
|
-
|
|
162
|
+
Sizes: `sm` | `md` | `lg`. Supports `loading`, `disabled`, and `fullWidth` states.
|
|
175
163
|
|
|
176
164
|
```html
|
|
177
|
-
<ea-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
[options]="countries"
|
|
181
|
-
[(value)]="selectedCountry" />
|
|
165
|
+
<ea-button variant="primary" size="md" [loading]="isSaving" (clicked)="save()">
|
|
166
|
+
Save changes
|
|
167
|
+
</ea-button>
|
|
182
168
|
```
|
|
183
169
|
|
|
184
|
-
<img src="docs/images/
|
|
170
|
+
<img src="docs/images/button.png" alt="Button component" width="560" />
|
|
185
171
|
|
|
186
|
-
|
|
172
|
+
</details>
|
|
187
173
|
|
|
188
|
-
|
|
174
|
+
<details>
|
|
175
|
+
<summary><strong>Card</strong> — content container with elevated, outlined, and filled variants</summary>
|
|
189
176
|
|
|
190
|
-
|
|
177
|
+
Padding: `none` | `sm` | `md` | `lg` | `xl`. Customizable shadow via `--ea-card-shadow`.
|
|
191
178
|
|
|
192
179
|
```html
|
|
193
180
|
<ea-card variant="elevated">
|
|
@@ -202,65 +189,77 @@ Content container with variants: `elevated` | `outlined` | `filled`. Padding: `n
|
|
|
202
189
|
|
|
203
190
|
<img src="docs/images/card.png" alt="Card component" width="560" />
|
|
204
191
|
|
|
205
|
-
|
|
192
|
+
</details>
|
|
206
193
|
|
|
207
|
-
|
|
194
|
+
<details>
|
|
195
|
+
<summary><strong>Checkbox</strong> — with indeterminate state and ControlValueAccessor</summary>
|
|
208
196
|
|
|
209
|
-
|
|
197
|
+
Sizes: `sm` | `md` | `lg`.
|
|
210
198
|
|
|
211
199
|
```html
|
|
212
|
-
<ea-
|
|
213
|
-
<ea-avatar initials="MW" shape="square" />
|
|
214
|
-
<ea-avatar /> <!-- shows fallback user icon -->
|
|
200
|
+
<ea-checkbox label="Accept terms and conditions" [(checked)]="accepted" />
|
|
215
201
|
```
|
|
216
202
|
|
|
217
|
-
<img src="docs/images/
|
|
203
|
+
<img src="docs/images/checkbox.png" alt="Checkbox component" width="560" />
|
|
218
204
|
|
|
219
|
-
|
|
205
|
+
</details>
|
|
220
206
|
|
|
221
|
-
|
|
207
|
+
<details>
|
|
208
|
+
<summary><strong>Code Input</strong> — verification code entry with auto-advance and paste support</summary>
|
|
222
209
|
|
|
223
|
-
|
|
210
|
+
Configurable `length` (default 6). Full `ControlValueAccessor` support.
|
|
224
211
|
|
|
225
212
|
```html
|
|
226
|
-
<ea-
|
|
227
|
-
shape="circle"
|
|
228
|
-
[canvasSize]="200"
|
|
229
|
-
(cropped)="onCropped($event)" />
|
|
213
|
+
<ea-code-input [(value)]="code" [length]="6" (completed)="verify()" />
|
|
230
214
|
```
|
|
231
215
|
|
|
232
|
-
<img src="docs/images/
|
|
216
|
+
<img src="docs/images/code-input.png" alt="Code input component" width="560" />
|
|
233
217
|
|
|
234
|
-
|
|
218
|
+
</details>
|
|
235
219
|
|
|
236
|
-
|
|
220
|
+
<details>
|
|
221
|
+
<summary><strong>Data Table</strong> — sortable columns, sticky headers, density modes</summary>
|
|
237
222
|
|
|
238
|
-
|
|
223
|
+
Striped, bordered, and hoverable rows. Custom cell templates via `ng-template`. Density: `compact` | `comfortable` | `spacious`. Two-way `sort` binding.
|
|
239
224
|
|
|
240
225
|
```html
|
|
241
|
-
<ea-
|
|
242
|
-
|
|
226
|
+
<ea-data-table
|
|
227
|
+
[columns]="columns"
|
|
228
|
+
[data]="users"
|
|
229
|
+
[stickyHeader]="true"
|
|
230
|
+
[striped]="true"
|
|
231
|
+
[(sort)]="sortState"
|
|
232
|
+
trackBy="id" />
|
|
243
233
|
```
|
|
244
234
|
|
|
245
|
-
<img src="docs/images/
|
|
235
|
+
<img src="docs/images/data-table.png" alt="Data table component" width="560" />
|
|
246
236
|
|
|
247
|
-
|
|
237
|
+
</details>
|
|
248
238
|
|
|
249
|
-
|
|
239
|
+
<details>
|
|
240
|
+
<summary><strong>Dialog</strong> — native dialog element with focus trapping</summary>
|
|
250
241
|
|
|
251
|
-
|
|
242
|
+
Sizes: `sm` | `md` | `lg` | `full`. Two-way `open` binding.
|
|
252
243
|
|
|
253
244
|
```html
|
|
254
|
-
<ea-
|
|
255
|
-
```
|
|
245
|
+
<ea-button (clicked)="dialogOpen.set(true)">Open</ea-button>
|
|
256
246
|
|
|
257
|
-
<
|
|
247
|
+
<ea-dialog [(open)]="dialogOpen" size="md">
|
|
248
|
+
<span slot="header">Confirm</span>
|
|
249
|
+
<p>Are you sure?</p>
|
|
250
|
+
<span slot="footer">
|
|
251
|
+
<ea-button variant="secondary" (clicked)="dialogOpen.set(false)">Cancel</ea-button>
|
|
252
|
+
<ea-button (clicked)="confirm()">Confirm</ea-button>
|
|
253
|
+
</span>
|
|
254
|
+
</ea-dialog>
|
|
255
|
+
```
|
|
258
256
|
|
|
259
|
-
|
|
257
|
+
</details>
|
|
260
258
|
|
|
261
|
-
|
|
259
|
+
<details>
|
|
260
|
+
<summary><strong>Divider</strong> — visual separator with optional label</summary>
|
|
262
261
|
|
|
263
|
-
|
|
262
|
+
Orientation: `horizontal` | `vertical`.
|
|
264
263
|
|
|
265
264
|
```html
|
|
266
265
|
<ea-divider />
|
|
@@ -270,82 +269,135 @@ Visual separator with optional label. Orientation: `horizontal` | `vertical`.
|
|
|
270
269
|
|
|
271
270
|
<img src="docs/images/divider.png" alt="Divider component" width="560" />
|
|
272
271
|
|
|
273
|
-
|
|
272
|
+
</details>
|
|
274
273
|
|
|
275
|
-
|
|
274
|
+
<details>
|
|
275
|
+
<summary><strong>Dropdown</strong> — select with ControlValueAccessor and keyboard navigation</summary>
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
Arrow keys, Enter/Space to select, Escape to close. Sizes: `sm` | `md` | `lg`.
|
|
278
278
|
|
|
279
279
|
```html
|
|
280
|
-
<ea-
|
|
280
|
+
<ea-dropdown
|
|
281
|
+
label="Country"
|
|
282
|
+
placeholder="Select a country…"
|
|
283
|
+
[options]="countries"
|
|
284
|
+
[(value)]="selectedCountry" />
|
|
285
|
+
```
|
|
281
286
|
|
|
282
|
-
<
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
<img src="docs/images/dropdown.png" alt="Dropdown component" width="560" />
|
|
288
|
+
|
|
289
|
+
</details>
|
|
290
|
+
|
|
291
|
+
<details>
|
|
292
|
+
<summary><strong>Input</strong> — text field with ControlValueAccessor and password toggle</summary>
|
|
293
|
+
|
|
294
|
+
Types: `text` | `email` | `password` | `number` | `search` | `tel` | `url`. Sizes: `sm` | `md` | `lg`.
|
|
295
|
+
|
|
296
|
+
```html
|
|
297
|
+
<ea-input
|
|
298
|
+
label="Email"
|
|
299
|
+
type="email"
|
|
300
|
+
placeholder="you@example.com"
|
|
301
|
+
hint="We'll never share your email"
|
|
302
|
+
[(value)]="email" />
|
|
290
303
|
```
|
|
291
304
|
|
|
292
|
-
|
|
305
|
+
<img src="docs/images/input.png" alt="Input component" width="560" />
|
|
306
|
+
|
|
307
|
+
</details>
|
|
293
308
|
|
|
294
|
-
|
|
309
|
+
<details>
|
|
310
|
+
<summary><strong>Paginator</strong> — page navigation with configurable page sizes</summary>
|
|
295
311
|
|
|
296
|
-
|
|
312
|
+
Placement: `left` | `center` | `right`. Emits `pageChange` events with current page, page size, and total.
|
|
297
313
|
|
|
298
314
|
```html
|
|
299
|
-
<ea-
|
|
315
|
+
<ea-paginator
|
|
316
|
+
[total]="100"
|
|
317
|
+
[pageSize]="10"
|
|
318
|
+
placement="center"
|
|
319
|
+
(pageChange)="onPageChange($event)" />
|
|
300
320
|
```
|
|
301
321
|
|
|
302
|
-
|
|
322
|
+
</details>
|
|
303
323
|
|
|
304
|
-
|
|
324
|
+
<details>
|
|
325
|
+
<summary><strong>Progress Bar</strong> — determinate and indeterminate linear indicator</summary>
|
|
305
326
|
|
|
306
|
-
|
|
327
|
+
Variants: `default` | `success` | `warning` | `error` | `info`. Sizes: `sm` | `md` | `lg`. Optional `label` and `showValue` display.
|
|
307
328
|
|
|
308
|
-
```
|
|
309
|
-
|
|
329
|
+
```html
|
|
330
|
+
<ea-progress-bar [value]="72" label="Uploading" [showValue]="true" />
|
|
331
|
+
<ea-progress-bar variant="success" [value]="100" />
|
|
332
|
+
<ea-progress-bar [indeterminate]="true" label="Processing…" />
|
|
333
|
+
```
|
|
310
334
|
|
|
311
|
-
|
|
312
|
-
private toast = inject(ToastService);
|
|
335
|
+
<img src="docs/images/progress-bar.png" alt="Progress bar component" width="560" />
|
|
313
336
|
|
|
314
|
-
|
|
315
|
-
this.toast.success('Changes saved');
|
|
316
|
-
}
|
|
337
|
+
</details>
|
|
317
338
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
339
|
+
<details>
|
|
340
|
+
<summary><strong>Radio Group</strong> — composite pattern with ControlValueAccessor</summary>
|
|
341
|
+
|
|
342
|
+
Supports `vertical` and `horizontal` orientation. Sizes: `sm` | `md` | `lg`.
|
|
343
|
+
|
|
344
|
+
```html
|
|
345
|
+
<ea-radio-group [(value)]="plan">
|
|
346
|
+
<ea-radio value="free" label="Free" />
|
|
347
|
+
<ea-radio value="pro" label="Pro" />
|
|
348
|
+
<ea-radio value="enterprise" label="Enterprise" />
|
|
349
|
+
</ea-radio-group>
|
|
322
350
|
```
|
|
323
351
|
|
|
324
|
-
|
|
352
|
+
<img src="docs/images/radio.png" alt="Radio group component" width="560" />
|
|
353
|
+
|
|
354
|
+
</details>
|
|
355
|
+
|
|
356
|
+
<details>
|
|
357
|
+
<summary><strong>Skeleton</strong> — loading placeholder with animated pulse</summary>
|
|
358
|
+
|
|
359
|
+
Variants: `text` | `circle` | `rect`. Custom `width` and `height`. Respects `prefers-reduced-motion`.
|
|
325
360
|
|
|
326
361
|
```html
|
|
327
|
-
<ea-
|
|
362
|
+
<ea-skeleton variant="text" width="200px" />
|
|
363
|
+
<ea-skeleton variant="circle" width="48px" height="48px" />
|
|
364
|
+
<ea-skeleton variant="rect" width="100%" height="120px" />
|
|
328
365
|
```
|
|
329
366
|
|
|
330
|
-
<img src="docs/images/
|
|
367
|
+
<img src="docs/images/skeleton.png" alt="Skeleton component" width="560" />
|
|
331
368
|
|
|
332
|
-
|
|
369
|
+
</details>
|
|
333
370
|
|
|
334
|
-
|
|
371
|
+
<details>
|
|
372
|
+
<summary><strong>Spinner</strong> — SVG loading indicator with accessible role</summary>
|
|
335
373
|
|
|
336
|
-
|
|
374
|
+
Sizes: `sm` | `md` | `lg`.
|
|
337
375
|
|
|
338
376
|
```html
|
|
339
|
-
<ea-
|
|
377
|
+
<ea-spinner size="md" label="Loading data" />
|
|
340
378
|
```
|
|
341
379
|
|
|
342
|
-
<img src="docs/images/
|
|
380
|
+
<img src="docs/images/spinner.png" alt="Spinner component" width="560" />
|
|
381
|
+
|
|
382
|
+
</details>
|
|
383
|
+
|
|
384
|
+
<details>
|
|
385
|
+
<summary><strong>Switch</strong> — toggle with ControlValueAccessor</summary>
|
|
386
|
+
|
|
387
|
+
Sizes: `sm` | `md` | `lg`.
|
|
388
|
+
|
|
389
|
+
```html
|
|
390
|
+
<ea-switch label="Enable notifications" [(checked)]="notificationsOn" />
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
<img src="docs/images/switch.png" alt="Switch component" width="560" />
|
|
343
394
|
|
|
344
|
-
|
|
395
|
+
</details>
|
|
345
396
|
|
|
346
|
-
|
|
397
|
+
<details>
|
|
398
|
+
<summary><strong>Tabs</strong> — tab navigation with keyboard support</summary>
|
|
347
399
|
|
|
348
|
-
|
|
400
|
+
Variants: `underline` | `filled`. Sizes: `sm` | `md` | `lg`.
|
|
349
401
|
|
|
350
402
|
```html
|
|
351
403
|
<ea-tabs activeTab="account" variant="underline">
|
|
@@ -356,97 +408,142 @@ Tab navigation with keyboard support (Arrow keys, Home/End). Variants: `underlin
|
|
|
356
408
|
|
|
357
409
|
<img src="docs/images/tabs.png" alt="Tabs component" width="560" />
|
|
358
410
|
|
|
359
|
-
|
|
411
|
+
</details>
|
|
360
412
|
|
|
361
|
-
|
|
413
|
+
<details>
|
|
414
|
+
<summary><strong>Tag</strong> — inline label with optional remove button</summary>
|
|
362
415
|
|
|
363
|
-
|
|
416
|
+
Variants: `default` | `primary` | `success` | `warning` | `error` | `info`. Sizes: `sm` | `md` | `lg`.
|
|
364
417
|
|
|
365
418
|
```html
|
|
366
|
-
<ea-
|
|
367
|
-
<ea-
|
|
419
|
+
<ea-tag variant="primary">TypeScript</ea-tag>
|
|
420
|
+
<ea-tag variant="success" [removable]="true" (removed)="onRemove()">Active</ea-tag>
|
|
368
421
|
```
|
|
369
422
|
|
|
370
|
-
<img src="docs/images/
|
|
423
|
+
<img src="docs/images/tag.png" alt="Tag component" width="560" />
|
|
371
424
|
|
|
372
|
-
|
|
425
|
+
</details>
|
|
373
426
|
|
|
374
|
-
|
|
427
|
+
<details>
|
|
428
|
+
<summary><strong>Textarea</strong> — multiline text with ControlValueAccessor</summary>
|
|
375
429
|
|
|
376
|
-
|
|
430
|
+
Mirrors the Input API. Configurable `rows`, `resize` (`none` | `vertical` | `horizontal` | `both`), and `maxlength`.
|
|
377
431
|
|
|
378
432
|
```html
|
|
379
|
-
<ea-
|
|
380
|
-
|
|
381
|
-
|
|
433
|
+
<ea-textarea
|
|
434
|
+
label="Message"
|
|
435
|
+
placeholder="Enter your message…"
|
|
436
|
+
hint="Maximum 500 characters"
|
|
437
|
+
[rows]="4"
|
|
438
|
+
[(value)]="message" />
|
|
382
439
|
```
|
|
383
440
|
|
|
384
|
-
<img src="docs/images/
|
|
441
|
+
<img src="docs/images/textarea.png" alt="Textarea component" width="560" />
|
|
385
442
|
|
|
386
|
-
|
|
443
|
+
</details>
|
|
387
444
|
|
|
388
|
-
|
|
445
|
+
<details>
|
|
446
|
+
<summary><strong>Toast</strong> — notification system via injectable ToastService</summary>
|
|
389
447
|
|
|
390
|
-
|
|
448
|
+
Variants: `default` | `success` | `warning` | `error` | `info`. Auto-dismiss with configurable duration. Full-width on mobile, independent widths on desktop.
|
|
391
449
|
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
<ea-accordion-item label="Section 1">Content for section 1</ea-accordion-item>
|
|
395
|
-
<ea-accordion-item label="Section 2">Content for section 2</ea-accordion-item>
|
|
396
|
-
</ea-accordion>
|
|
397
|
-
```
|
|
450
|
+
```typescript
|
|
451
|
+
import { ToastService } from '@eagami/ui';
|
|
398
452
|
|
|
399
|
-
|
|
453
|
+
export class MyComponent {
|
|
454
|
+
private toast = inject(ToastService);
|
|
455
|
+
|
|
456
|
+
save() {
|
|
457
|
+
this.toast.success('Changes saved');
|
|
458
|
+
}
|
|
400
459
|
|
|
401
|
-
|
|
460
|
+
handleError() {
|
|
461
|
+
this.toast.error('Something went wrong');
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
```
|
|
402
465
|
|
|
403
|
-
|
|
466
|
+
Add the toast outlet once in your root template:
|
|
404
467
|
|
|
405
468
|
```html
|
|
406
|
-
<ea-
|
|
407
|
-
<ea-progress-bar variant="success" [value]="100" />
|
|
408
|
-
<ea-progress-bar [indeterminate]="true" label="Processing…" />
|
|
469
|
+
<ea-toast />
|
|
409
470
|
```
|
|
410
471
|
|
|
411
|
-
<img src="docs/images/
|
|
472
|
+
<img src="docs/images/toast.png" alt="Toast component" width="560" />
|
|
412
473
|
|
|
413
|
-
|
|
474
|
+
</details>
|
|
414
475
|
|
|
415
|
-
|
|
476
|
+
<details>
|
|
477
|
+
<summary><strong>Tooltip</strong> — positioned tooltip on hover and focus</summary>
|
|
416
478
|
|
|
417
|
-
|
|
479
|
+
Positions: `top` | `bottom` | `left` | `right`.
|
|
418
480
|
|
|
419
481
|
```html
|
|
420
|
-
<ea-
|
|
421
|
-
<ea-tag variant="success" [removable]="true" (removed)="onRemove()">Active</ea-tag>
|
|
482
|
+
<ea-button eaTooltip="Save your changes" tooltipPosition="top">Save</ea-button>
|
|
422
483
|
```
|
|
423
484
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
---
|
|
485
|
+
</details>
|
|
427
486
|
|
|
428
487
|
## Icons
|
|
429
488
|
|
|
430
|
-
|
|
489
|
+
<details>
|
|
490
|
+
<summary><strong>51 built-in SVG icon components</strong> — Feather-style (24x24, stroke-based, inherits <code>currentColor</code>)</summary>
|
|
431
491
|
|
|
432
492
|
| Tag | Preview |
|
|
433
493
|
|---|---|
|
|
434
494
|
| `<ea-icon-alert-circle />` | <img src="docs/images/icons/alert-circle.png" width="48" height="48" alt="alert-circle" /> |
|
|
495
|
+
| `<ea-icon-alert-triangle />` | <img src="docs/images/icons/alert-triangle.png" width="48" height="48" alt="alert-triangle" /> |
|
|
496
|
+
| `<ea-icon-apple />` | <img src="docs/images/icons/apple.png" width="48" height="48" alt="apple" /> |
|
|
497
|
+
| `<ea-icon-arrow-down />` | <img src="docs/images/icons/arrow-down.png" width="48" height="48" alt="arrow-down" /> |
|
|
498
|
+
| `<ea-icon-arrow-left />` | <img src="docs/images/icons/arrow-left.png" width="48" height="48" alt="arrow-left" /> |
|
|
499
|
+
| `<ea-icon-arrow-right />` | <img src="docs/images/icons/arrow-right.png" width="48" height="48" alt="arrow-right" /> |
|
|
500
|
+
| `<ea-icon-arrow-up />` | <img src="docs/images/icons/arrow-up.png" width="48" height="48" alt="arrow-up" /> |
|
|
501
|
+
| `<ea-icon-bell />` | <img src="docs/images/icons/bell.png" width="48" height="48" alt="bell" /> |
|
|
502
|
+
| `<ea-icon-calendar />` | <img src="docs/images/icons/calendar.png" width="48" height="48" alt="calendar" /> |
|
|
435
503
|
| `<ea-icon-camera />` | <img src="docs/images/icons/camera.png" width="48" height="48" alt="camera" /> |
|
|
436
|
-
| `<ea-icon-chevron-down />` | <img src="docs/images/icons/chevron-down.png" width="48" height="48" alt="chevron-down" /> |
|
|
437
504
|
| `<ea-icon-check />` | <img src="docs/images/icons/check.png" width="48" height="48" alt="check" /> |
|
|
505
|
+
| `<ea-icon-check-circle />` | <img src="docs/images/icons/check-circle.png" width="48" height="48" alt="check-circle" /> |
|
|
506
|
+
| `<ea-icon-chevron-down />` | <img src="docs/images/icons/chevron-down.png" width="48" height="48" alt="chevron-down" /> |
|
|
507
|
+
| `<ea-icon-chevron-left />` | <img src="docs/images/icons/chevron-left.png" width="48" height="48" alt="chevron-left" /> |
|
|
508
|
+
| `<ea-icon-chevron-right />` | <img src="docs/images/icons/chevron-right.png" width="48" height="48" alt="chevron-right" /> |
|
|
509
|
+
| `<ea-icon-chevron-up />` | <img src="docs/images/icons/chevron-up.png" width="48" height="48" alt="chevron-up" /> |
|
|
510
|
+
| `<ea-icon-chevrons-up-down />` | <img src="docs/images/icons/chevrons-up-down.png" width="48" height="48" alt="chevrons-up-down" /> |
|
|
511
|
+
| `<ea-icon-clock />` | <img src="docs/images/icons/clock.png" width="48" height="48" alt="clock" /> |
|
|
512
|
+
| `<ea-icon-copy />` | <img src="docs/images/icons/copy.png" width="48" height="48" alt="copy" /> |
|
|
513
|
+
| `<ea-icon-download />` | <img src="docs/images/icons/download.png" width="48" height="48" alt="download" /> |
|
|
514
|
+
| `<ea-icon-external-link />` | <img src="docs/images/icons/external-link.png" width="48" height="48" alt="external-link" /> |
|
|
438
515
|
| `<ea-icon-eye />` | <img src="docs/images/icons/eye.png" width="48" height="48" alt="eye" /> |
|
|
439
516
|
| `<ea-icon-eye-off />` | <img src="docs/images/icons/eye-off.png" width="48" height="48" alt="eye-off" /> |
|
|
517
|
+
| `<ea-icon-facebook />` | <img src="docs/images/icons/facebook.png" width="48" height="48" alt="facebook" /> |
|
|
518
|
+
| `<ea-icon-file />` | <img src="docs/images/icons/file.png" width="48" height="48" alt="file" /> |
|
|
519
|
+
| `<ea-icon-filter />` | <img src="docs/images/icons/filter.png" width="48" height="48" alt="filter" /> |
|
|
520
|
+
| `<ea-icon-github />` | <img src="docs/images/icons/github.png" width="48" height="48" alt="github" /> |
|
|
440
521
|
| `<ea-icon-google />` | <img src="docs/images/icons/google.png" width="48" height="48" alt="google" /> |
|
|
522
|
+
| `<ea-icon-heart />` | <img src="docs/images/icons/heart.png" width="48" height="48" alt="heart" /> |
|
|
523
|
+
| `<ea-icon-image />` | <img src="docs/images/icons/image.png" width="48" height="48" alt="image" /> |
|
|
441
524
|
| `<ea-icon-info />` | <img src="docs/images/icons/info.png" width="48" height="48" alt="info" /> |
|
|
525
|
+
| `<ea-icon-link />` | <img src="docs/images/icons/link.png" width="48" height="48" alt="link" /> |
|
|
442
526
|
| `<ea-icon-loader />` | <img src="docs/images/icons/loader.png" width="48" height="48" alt="loader" /> |
|
|
527
|
+
| `<ea-icon-log-out />` | <img src="docs/images/icons/log-out.png" width="48" height="48" alt="log-out" /> |
|
|
528
|
+
| `<ea-icon-mail />` | <img src="docs/images/icons/mail.png" width="48" height="48" alt="mail" /> |
|
|
529
|
+
| `<ea-icon-menu />` | <img src="docs/images/icons/menu.png" width="48" height="48" alt="menu" /> |
|
|
530
|
+
| `<ea-icon-microsoft />` | <img src="docs/images/icons/microsoft.png" width="48" height="48" alt="microsoft" /> |
|
|
443
531
|
| `<ea-icon-minus />` | <img src="docs/images/icons/minus.png" width="48" height="48" alt="minus" /> |
|
|
532
|
+
| `<ea-icon-more-horizontal />` | <img src="docs/images/icons/more-horizontal.png" width="48" height="48" alt="more-horizontal" /> |
|
|
533
|
+
| `<ea-icon-pencil />` | <img src="docs/images/icons/pencil.png" width="48" height="48" alt="pencil" /> |
|
|
444
534
|
| `<ea-icon-plus />` | <img src="docs/images/icons/plus.png" width="48" height="48" alt="plus" /> |
|
|
445
535
|
| `<ea-icon-rotate-ccw />` | <img src="docs/images/icons/rotate-ccw.png" width="48" height="48" alt="rotate-ccw" /> |
|
|
536
|
+
| `<ea-icon-search />` | <img src="docs/images/icons/search.png" width="48" height="48" alt="search" /> |
|
|
537
|
+
| `<ea-icon-settings />` | <img src="docs/images/icons/settings.png" width="48" height="48" alt="settings" /> |
|
|
538
|
+
| `<ea-icon-star />` | <img src="docs/images/icons/star.png" width="48" height="48" alt="star" /> |
|
|
446
539
|
| `<ea-icon-trash />` | <img src="docs/images/icons/trash.png" width="48" height="48" alt="trash" /> |
|
|
447
540
|
| `<ea-icon-upload />` | <img src="docs/images/icons/upload.png" width="48" height="48" alt="upload" /> |
|
|
448
541
|
| `<ea-icon-user />` | <img src="docs/images/icons/user.png" width="48" height="48" alt="user" /> |
|
|
449
542
|
| `<ea-icon-x />` | <img src="docs/images/icons/x.png" width="48" height="48" alt="x" /> |
|
|
543
|
+
| `<ea-icon-x-circle />` | <img src="docs/images/icons/x-circle.png" width="48" height="48" alt="x-circle" /> |
|
|
544
|
+
| `<ea-icon-x-twitter />` | <img src="docs/images/icons/x-twitter.png" width="48" height="48" alt="x-twitter" /> |
|
|
545
|
+
|
|
546
|
+
</details>
|
|
450
547
|
|
|
451
548
|
## Theming
|
|
452
549
|
|
|
@@ -483,7 +580,7 @@ See [`src/styles/tokens/`](src/styles/tokens/) for the full token reference.
|
|
|
483
580
|
|
|
484
581
|
```bash
|
|
485
582
|
pnpm install # Install dependencies
|
|
486
|
-
pnpm
|
|
583
|
+
pnpm sandbox # Run sandbox dev app
|
|
487
584
|
pnpm storybook # Run Storybook
|
|
488
585
|
pnpm test # Run tests
|
|
489
586
|
pnpm build # Build the library
|