@eagami/ui 5.12.1 → 5.12.2
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/fesm2022/eagami-ui.mjs +266 -72
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +67 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagami/ui",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.2",
|
|
4
4
|
"description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
|
|
5
5
|
"author": "Michal Wiraszka <michal@eagami.com>",
|
|
6
6
|
"license": "MIT",
|
package/types/eagami-ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, EnvironmentProviders, Signal, Type, OnDestroy, ElementRef, TemplateRef, OnInit } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders, Signal, Type, OnDestroy, ElementRef, TemplateRef, AfterContentChecked, OnInit } from '@angular/core';
|
|
3
3
|
import * as _eagami_ui from '@eagami/ui';
|
|
4
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
5
5
|
|
|
@@ -1195,6 +1195,11 @@ declare class CommandPaletteComponent {
|
|
|
1195
1195
|
protected onQueryInput(event: Event): void;
|
|
1196
1196
|
protected clearQuery(): void;
|
|
1197
1197
|
protected onSearchKeydown(event: KeyboardEvent): void;
|
|
1198
|
+
/** Wrapping arrow-key move that skips disabled items. */
|
|
1199
|
+
private moveActive;
|
|
1200
|
+
/** Home/End move to the first enabled item from the given end. */
|
|
1201
|
+
private edgeActive;
|
|
1202
|
+
private setActiveByKeyboard;
|
|
1198
1203
|
protected onItemClick(item: CommandPaletteItem): void;
|
|
1199
1204
|
protected onItemMouseEnter(flatIndex: number): void;
|
|
1200
1205
|
protected onListMouseLeave(): void;
|
|
@@ -1663,8 +1668,9 @@ type DialogWidth = EaWidth;
|
|
|
1663
1668
|
* and exposes `header`, default, and `footer` content slots. The `open` state
|
|
1664
1669
|
* is a two-way `model()` binding.
|
|
1665
1670
|
*/
|
|
1666
|
-
declare class DialogComponent {
|
|
1671
|
+
declare class DialogComponent implements AfterContentChecked {
|
|
1667
1672
|
private readonly dialogEl;
|
|
1673
|
+
private readonly headerEl;
|
|
1668
1674
|
private previouslyFocused;
|
|
1669
1675
|
protected readonly i18n: EagamiI18nService;
|
|
1670
1676
|
private readonly isBrowser;
|
|
@@ -1682,6 +1688,9 @@ declare class DialogComponent {
|
|
|
1682
1688
|
readonly panelClasses: _angular_core.Signal<{
|
|
1683
1689
|
[x: string]: boolean;
|
|
1684
1690
|
}>;
|
|
1691
|
+
/** Whether the header slot received content, so labelledby never points at an empty node. */
|
|
1692
|
+
protected readonly hasHeader: _angular_core.WritableSignal<boolean>;
|
|
1693
|
+
ngAfterContentChecked(): void;
|
|
1685
1694
|
constructor();
|
|
1686
1695
|
handleClose(): void;
|
|
1687
1696
|
handleBackdropClick(event: MouseEvent): void;
|
|
@@ -1739,9 +1748,10 @@ type DrawerAnimation = 'none' | 'linear' | 'eased';
|
|
|
1739
1748
|
* slots. The `open` state is a two-way `model()` binding. In `push` mode it
|
|
1740
1749
|
* opens non-modally and reflows the page content aside instead of overlaying it.
|
|
1741
1750
|
*/
|
|
1742
|
-
declare class DrawerComponent {
|
|
1751
|
+
declare class DrawerComponent implements AfterContentChecked {
|
|
1743
1752
|
private readonly drawerEl;
|
|
1744
1753
|
private readonly panelEl;
|
|
1754
|
+
private readonly headerEl;
|
|
1745
1755
|
private previouslyFocused;
|
|
1746
1756
|
private pushedTarget;
|
|
1747
1757
|
private pushCleanupTimer;
|
|
@@ -1785,6 +1795,9 @@ declare class DrawerComponent {
|
|
|
1785
1795
|
readonly panelClasses: _angular_core.Signal<{
|
|
1786
1796
|
[x: string]: boolean;
|
|
1787
1797
|
}>;
|
|
1798
|
+
/** Whether the header slot received content, so labelledby never points at an empty node. */
|
|
1799
|
+
protected readonly hasHeader: _angular_core.WritableSignal<boolean>;
|
|
1800
|
+
ngAfterContentChecked(): void;
|
|
1788
1801
|
constructor();
|
|
1789
1802
|
private showDialog;
|
|
1790
1803
|
private enter;
|
|
@@ -1879,6 +1892,8 @@ declare class DropdownComponent implements ControlValueAccessor {
|
|
|
1879
1892
|
handleKeydown(event: KeyboardEvent): void;
|
|
1880
1893
|
private selectFocusedOrOpen;
|
|
1881
1894
|
private focusEdge;
|
|
1895
|
+
/** Keeps the keyboard-focused option visible inside the scrolling listbox. */
|
|
1896
|
+
private setFocusedIndex;
|
|
1882
1897
|
private handleTypeahead;
|
|
1883
1898
|
private moveFocus;
|
|
1884
1899
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownComponent, never>;
|
|
@@ -2391,6 +2406,12 @@ declare class MultiSelectComponent implements ControlValueAccessor {
|
|
|
2391
2406
|
readonly selectedOptions: _angular_core.Signal<readonly SelectOption[]>;
|
|
2392
2407
|
readonly hasValue: _angular_core.Signal<boolean>;
|
|
2393
2408
|
readonly listboxId: _angular_core.Signal<string>;
|
|
2409
|
+
/** Whether the Select-all row renders as the first option in the listbox. */
|
|
2410
|
+
protected readonly selectAllVisible: _angular_core.Signal<boolean>;
|
|
2411
|
+
/** Row-index offset the Select-all row adds ahead of the filtered options. */
|
|
2412
|
+
protected readonly selectAllOffset: _angular_core.Signal<1 | 0>;
|
|
2413
|
+
private readonly rowCount;
|
|
2414
|
+
protected readonly selectAllAriaChecked: _angular_core.Signal<"true" | "mixed" | "false">;
|
|
2394
2415
|
/** Id of the keyboard-focused option, for `aria-activedescendant`. */
|
|
2395
2416
|
readonly activeOptionId: _angular_core.Signal<string | null>;
|
|
2396
2417
|
/** Chips visible inside the trigger, capped by `maxVisibleChips`. */
|
|
@@ -2424,7 +2445,16 @@ declare class MultiSelectComponent implements ControlValueAccessor {
|
|
|
2424
2445
|
onPopoverCloseRequested(): void;
|
|
2425
2446
|
/** Toggle one option's membership in the selection. */
|
|
2426
2447
|
toggleOption(opt: SelectOption): void;
|
|
2448
|
+
/**
|
|
2449
|
+
* Clicks on the bordered box (trigger, padding, chevron) all toggle; the
|
|
2450
|
+
* clear button and chip remove buttons stop propagation before reaching
|
|
2451
|
+
* here. The combobox element only takes focus natively when clicked
|
|
2452
|
+
* directly, so focus is restored explicitly for the activedescendant model.
|
|
2453
|
+
*/
|
|
2454
|
+
protected onTriggerAreaClick(): void;
|
|
2427
2455
|
protected onOptionClick(opt: SelectOption, index: number): void;
|
|
2456
|
+
protected onSelectAllClick(): void;
|
|
2457
|
+
private restoreTypingFocus;
|
|
2428
2458
|
/**
|
|
2429
2459
|
* Remove a single chip from the trigger. `<ea-tag>` already stops the
|
|
2430
2460
|
* click from bubbling to the trigger's `(click)`, so no event handling
|
|
@@ -2448,6 +2478,9 @@ declare class MultiSelectComponent implements ControlValueAccessor {
|
|
|
2448
2478
|
*/
|
|
2449
2479
|
handlePopoverKeydown(event: KeyboardEvent): void;
|
|
2450
2480
|
private focusSearchWhenReady;
|
|
2481
|
+
private moveFocusedRow;
|
|
2482
|
+
/** Enter/Space on the focused row: row 0 is Select-all when visible. */
|
|
2483
|
+
private activateRow;
|
|
2451
2484
|
/** Reorder a value-set against the input `options` array. */
|
|
2452
2485
|
private orderedValues;
|
|
2453
2486
|
private resetEditState;
|
|
@@ -2515,6 +2548,7 @@ declare class NumberInputComponent implements ControlValueAccessor {
|
|
|
2515
2548
|
private readonly errorState;
|
|
2516
2549
|
readonly errorText: _angular_core.Signal<string | null>;
|
|
2517
2550
|
readonly hasError: _angular_core.Signal<boolean>;
|
|
2551
|
+
readonly showError: _angular_core.Signal<boolean>;
|
|
2518
2552
|
readonly showHint: _angular_core.Signal<boolean>;
|
|
2519
2553
|
readonly canIncrement: _angular_core.Signal<boolean>;
|
|
2520
2554
|
readonly canDecrement: _angular_core.Signal<boolean>;
|
|
@@ -3590,6 +3624,13 @@ declare class TimePickerComponent implements ControlValueAccessor {
|
|
|
3590
3624
|
handleTriggerKeydown(event: KeyboardEvent): void;
|
|
3591
3625
|
/** Stepper button or keyboard arrow nudges one column up or down. */
|
|
3592
3626
|
step(unit: Unit, direction: 1 | -1): void;
|
|
3627
|
+
/**
|
|
3628
|
+
* Keyboard activation of a stepper button dispatches only a click, never the
|
|
3629
|
+
* pointer events that drive the hold repeat. `detail` is 0 for those
|
|
3630
|
+
* synthetic clicks, so pointer presses (already handled by startHold) are
|
|
3631
|
+
* ignored here.
|
|
3632
|
+
*/
|
|
3633
|
+
onStepClick(unit: Unit, direction: 1 | -1, event: MouseEvent): void;
|
|
3593
3634
|
/**
|
|
3594
3635
|
* Begin a long-press repeat on a chevron button. Fires once immediately,
|
|
3595
3636
|
* then after a `HOLD_INITIAL_DELAY` pause repeats at `HOLD_INTERVAL_MS`,
|
|
@@ -3706,9 +3747,20 @@ interface ToastOptions {
|
|
|
3706
3747
|
*/
|
|
3707
3748
|
declare class ToastService {
|
|
3708
3749
|
private nextId;
|
|
3750
|
+
private readonly timers;
|
|
3751
|
+
private paused;
|
|
3709
3752
|
readonly toasts: _angular_core.WritableSignal<Toast[]>;
|
|
3710
3753
|
/** Shows a toast and returns its id; pass `duration: 0` to disable auto-dismiss. */
|
|
3711
3754
|
show(message: string, options?: ToastOptions): number;
|
|
3755
|
+
/**
|
|
3756
|
+
* Suspends every auto-dismiss countdown, keeping the time each toast has
|
|
3757
|
+
* left. The `<ea-toast />` outlet calls this while the pointer or keyboard
|
|
3758
|
+
* focus is on the stack so users get time to read or reach the dismiss
|
|
3759
|
+
* button.
|
|
3760
|
+
*/
|
|
3761
|
+
pause(): void;
|
|
3762
|
+
/** Resumes auto-dismiss countdowns suspended by {@link pause}. */
|
|
3763
|
+
resume(): void;
|
|
3712
3764
|
/** Shows a `success` toast and returns its id. */
|
|
3713
3765
|
success(message: string, duration?: number): number;
|
|
3714
3766
|
/** Shows an `error` toast and returns its id. */
|
|
@@ -3737,6 +3789,9 @@ type ToastSize = EaSize;
|
|
|
3737
3789
|
declare class ToastComponent {
|
|
3738
3790
|
protected readonly toastService: ToastService;
|
|
3739
3791
|
protected readonly i18n: EagamiI18nService;
|
|
3792
|
+
private readonly containerEl;
|
|
3793
|
+
private hovered;
|
|
3794
|
+
private focused;
|
|
3740
3795
|
/** Viewport corner or edge the toast stack is pinned to. */
|
|
3741
3796
|
readonly position: _angular_core.InputSignal<ToastPosition>;
|
|
3742
3797
|
/** Visual size applied to every toast in the stack. */
|
|
@@ -3744,6 +3799,13 @@ declare class ToastComponent {
|
|
|
3744
3799
|
/** Show a dismiss button on each toast. */
|
|
3745
3800
|
readonly clearable: _angular_core.InputSignal<boolean>;
|
|
3746
3801
|
protected readonly containerClass: _angular_core.Signal<string>;
|
|
3802
|
+
/** Errors and warnings interrupt like `ea-alert`; the rest wait politely. */
|
|
3803
|
+
protected toastRole(variant: string): 'alert' | 'status';
|
|
3804
|
+
protected onMouseEnter(): void;
|
|
3805
|
+
protected onMouseLeave(): void;
|
|
3806
|
+
protected onFocusIn(): void;
|
|
3807
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
3808
|
+
private syncPause;
|
|
3747
3809
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastComponent, never>;
|
|
3748
3810
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToastComponent, "ea-toast", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3749
3811
|
}
|
|
@@ -3993,6 +4055,8 @@ interface VirtualListItemContext<T = unknown> {
|
|
|
3993
4055
|
* `aria-posinset` using the projected `index` if needed.
|
|
3994
4056
|
*/
|
|
3995
4057
|
declare class VirtualListComponent {
|
|
4058
|
+
private readonly hostRole;
|
|
4059
|
+
protected readonly viewportTabindex: number | null;
|
|
3996
4060
|
readonly items: _angular_core.InputSignal<readonly unknown[]>;
|
|
3997
4061
|
/** Pixel height of each item. Must be > 0. */
|
|
3998
4062
|
readonly itemHeight: _angular_core.InputSignal<number>;
|