@eagami/ui 5.56.0 → 5.57.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/fesm2022/eagami-ui.mjs +317 -46
- package/fesm2022/eagami-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eagami-ui.d.ts +59 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagami/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.57.0",
|
|
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
|
@@ -135,6 +135,10 @@ export interface EagamiMessages {
|
|
|
135
135
|
};
|
|
136
136
|
dropdown: {
|
|
137
137
|
placeholder: string;
|
|
138
|
+
clear: string;
|
|
139
|
+
dialogLabel: string;
|
|
140
|
+
searchPlaceholder: string;
|
|
141
|
+
searchEmpty: string;
|
|
138
142
|
};
|
|
139
143
|
fieldLabel: {
|
|
140
144
|
/** Accessible name of the button that reveals a field label's help. */
|
|
@@ -4146,12 +4150,16 @@ export type DropdownSize = EaSize;
|
|
|
4146
4150
|
* Single-select dropdown with a custom popup list. Supports keyboard
|
|
4147
4151
|
* navigation (arrow keys, Enter/Space to select, Escape to close), closes
|
|
4148
4152
|
* on outside click or viewport scroll/resize, and integrates with Angular
|
|
4149
|
-
* forms via `ControlValueAccessor`.
|
|
4150
|
-
*
|
|
4153
|
+
* forms via `ControlValueAccessor`. Optionally offers a clear button on the
|
|
4154
|
+
* trigger and a search field above the options. Positioning, dismissal, and
|
|
4155
|
+
* SSR-safe scroll handling are provided by `<ea-popover>`.
|
|
4151
4156
|
*/
|
|
4152
4157
|
export declare class DropdownComponent implements ControlValueAccessor {
|
|
4153
4158
|
private readonly elRef;
|
|
4154
|
-
private readonly
|
|
4159
|
+
private readonly popover;
|
|
4160
|
+
private readonly searchEl;
|
|
4161
|
+
protected readonly i18n: EagamiI18nService;
|
|
4162
|
+
private readonly injector;
|
|
4155
4163
|
readonly label: import("@angular/core").InputSignal<string | undefined>;
|
|
4156
4164
|
/** Optional icon component rendered before the label text. */
|
|
4157
4165
|
readonly labelIcon: import("@angular/core").InputSignal<Type<unknown> | undefined>;
|
|
@@ -4164,16 +4172,21 @@ export declare class DropdownComponent implements ControlValueAccessor {
|
|
|
4164
4172
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
4165
4173
|
readonly readonly: import("@angular/core").InputSignal<boolean>;
|
|
4166
4174
|
readonly required: import("@angular/core").InputSignal<boolean>;
|
|
4175
|
+
/** Shows a clear button on the trigger while an option is selected. */
|
|
4176
|
+
readonly clearable: import("@angular/core").InputSignal<boolean>;
|
|
4177
|
+
/** Adds a search field above the options that filters them as the user types. */
|
|
4178
|
+
readonly searchable: import("@angular/core").InputSignal<boolean>;
|
|
4167
4179
|
readonly hint: import("@angular/core").InputSignal<string | undefined>;
|
|
4168
4180
|
readonly errorMsg: import("@angular/core").InputSignal<string | undefined>;
|
|
4169
4181
|
/** Per-validator-key message overrides for a bound form control (e.g. `{ required: '...' }`). */
|
|
4170
4182
|
readonly errorMessages: import("@angular/core").InputSignal<Partial<Record<string, string>> | undefined>;
|
|
4171
4183
|
readonly id: import("@angular/core").InputSignal<string>;
|
|
4172
4184
|
readonly value: import("@angular/core").ModelSignal<string>;
|
|
4173
|
-
/** Fires with the new value when the user selects an option. */
|
|
4185
|
+
/** Fires with the new value when the user selects an option or clears the selection. */
|
|
4174
4186
|
readonly changed: import("@angular/core").OutputEmitterRef<string>;
|
|
4175
4187
|
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
4176
4188
|
readonly focusedIndex: import("@angular/core").WritableSignal<number>;
|
|
4189
|
+
protected readonly searchTerm: import("@angular/core").WritableSignal<string>;
|
|
4177
4190
|
private readonly _formDisabled;
|
|
4178
4191
|
private typeaheadQuery;
|
|
4179
4192
|
private typeaheadTimer;
|
|
@@ -4189,21 +4202,29 @@ export declare class DropdownComponent implements ControlValueAccessor {
|
|
|
4189
4202
|
private readonly optionGroups;
|
|
4190
4203
|
/** Whether the consumer supplied groups, which the list exposes as ARIA groups. */
|
|
4191
4204
|
protected readonly grouped: import("@angular/core").Signal<boolean>;
|
|
4192
|
-
/** Every option in the order given, flattened across groups
|
|
4205
|
+
/** Every option in the order given, flattened across groups. */
|
|
4193
4206
|
private readonly flatOptions;
|
|
4194
|
-
|
|
4207
|
+
private readonly filteredGroups;
|
|
4208
|
+
/** Options matching the search text, flattened across groups; drives all index maths. */
|
|
4209
|
+
protected readonly filteredOptions: import("@angular/core").Signal<SelectOption[]>;
|
|
4210
|
+
/** Groups to render, each option carrying its index into the filtered list. */
|
|
4195
4211
|
protected readonly renderedGroups: import("@angular/core").Signal<RenderedGroup[]>;
|
|
4196
4212
|
protected readonly selectedIndex: import("@angular/core").Signal<number>;
|
|
4197
4213
|
readonly selectedLabel: import("@angular/core").Signal<string>;
|
|
4198
4214
|
/** Placeholder text, falling back to the active locale's translation. */
|
|
4199
4215
|
readonly resolvedPlaceholder: import("@angular/core").Signal<string>;
|
|
4200
4216
|
readonly triggerLabelledBy: import("@angular/core").Signal<string | null>;
|
|
4217
|
+
protected readonly showClear: import("@angular/core").Signal<boolean>;
|
|
4218
|
+
protected readonly listboxId: import("@angular/core").Signal<string>;
|
|
4219
|
+
/** Id of the keyboard-focused option, for `aria-activedescendant`. */
|
|
4220
|
+
protected readonly activeOptionId: import("@angular/core").Signal<string | null>;
|
|
4201
4221
|
readonly triggerClasses: import("@angular/core").Signal<{
|
|
4202
4222
|
[x: string]: boolean;
|
|
4203
4223
|
'ea-dropdown__trigger--error': boolean;
|
|
4204
4224
|
'ea-dropdown__trigger--open': boolean;
|
|
4205
4225
|
'ea-dropdown__trigger--disabled': boolean;
|
|
4206
4226
|
'ea-dropdown__trigger--readonly': boolean;
|
|
4227
|
+
'ea-dropdown__trigger--clearable': boolean;
|
|
4207
4228
|
}>;
|
|
4208
4229
|
readonly menuClasses: import("@angular/core").Signal<{
|
|
4209
4230
|
[x: string]: boolean;
|
|
@@ -4218,15 +4239,23 @@ export declare class DropdownComponent implements ControlValueAccessor {
|
|
|
4218
4239
|
select(option: SelectOption): void;
|
|
4219
4240
|
/** Closes the dropdown list without changing the current value. */
|
|
4220
4241
|
close(): void;
|
|
4242
|
+
protected clear(): void;
|
|
4221
4243
|
/** Moves keyboard focus to the dropdown trigger. */
|
|
4222
4244
|
focus(): void;
|
|
4223
4245
|
/** Called by `<ea-popover>` when the user clicks outside the dropdown. */
|
|
4224
4246
|
onPopoverCloseRequested(): void;
|
|
4225
4247
|
handleKeydown(event: KeyboardEvent): void;
|
|
4248
|
+
protected onSearchInput(term: string): void;
|
|
4249
|
+
protected handleSearchKeydown(event: KeyboardEvent): void;
|
|
4250
|
+
protected onMenuMousedown(event: MouseEvent): void;
|
|
4251
|
+
private commit;
|
|
4252
|
+
private startSearch;
|
|
4253
|
+
private focusFirstMatch;
|
|
4226
4254
|
private selectFocusedOrOpen;
|
|
4227
4255
|
private focusEdge;
|
|
4228
4256
|
/** Keeps the keyboard-focused option visible inside the scrolling listbox. */
|
|
4229
4257
|
private setFocusedIndex;
|
|
4258
|
+
private scrollOptionIntoView;
|
|
4230
4259
|
private handleTypeahead;
|
|
4231
4260
|
private moveFocus;
|
|
4232
4261
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
|
|
@@ -4276,6 +4305,16 @@ export declare class DropdownComponent implements ControlValueAccessor {
|
|
|
4276
4305
|
"required": false;
|
|
4277
4306
|
"isSignal": true;
|
|
4278
4307
|
};
|
|
4308
|
+
"clearable": {
|
|
4309
|
+
"alias": "clearable";
|
|
4310
|
+
"required": false;
|
|
4311
|
+
"isSignal": true;
|
|
4312
|
+
};
|
|
4313
|
+
"searchable": {
|
|
4314
|
+
"alias": "searchable";
|
|
4315
|
+
"required": false;
|
|
4316
|
+
"isSignal": true;
|
|
4317
|
+
};
|
|
4279
4318
|
"hint": {
|
|
4280
4319
|
"alias": "hint";
|
|
4281
4320
|
"required": false;
|
|
@@ -7864,6 +7903,12 @@ export declare class TooltipDirective implements OnDestroy {
|
|
|
7864
7903
|
* to the viewport, which no value can push the bubble past.
|
|
7865
7904
|
*/
|
|
7866
7905
|
readonly maxWidth: import("@angular/core").InputSignal<number | undefined>;
|
|
7906
|
+
/**
|
|
7907
|
+
* Wait in ms before the bubble appears on hover or keyboard focus, so a
|
|
7908
|
+
* pointer passing over the trigger does not flash it. Leaving the trigger
|
|
7909
|
+
* within the wait cancels the bubble.
|
|
7910
|
+
*/
|
|
7911
|
+
readonly showDelay: import("@angular/core").InputSignal<number>;
|
|
7867
7912
|
/**
|
|
7868
7913
|
* Grace period in ms before a bubble the viewport clamp made scrollable hides
|
|
7869
7914
|
* after the pointer leaves, long enough to cross the gap onto the bubble and
|
|
@@ -7881,6 +7926,7 @@ export declare class TooltipDirective implements OnDestroy {
|
|
|
7881
7926
|
private placedPosition;
|
|
7882
7927
|
private templateView;
|
|
7883
7928
|
private scrollable;
|
|
7929
|
+
private showTimer;
|
|
7884
7930
|
private hideTimer;
|
|
7885
7931
|
private pointerInside;
|
|
7886
7932
|
private readonly tooltipId;
|
|
@@ -7903,6 +7949,8 @@ export declare class TooltipDirective implements OnDestroy {
|
|
|
7903
7949
|
private controlled;
|
|
7904
7950
|
ngOnDestroy(): void;
|
|
7905
7951
|
private syncPointerListeners;
|
|
7952
|
+
private requestShow;
|
|
7953
|
+
private cancelPendingShow;
|
|
7906
7954
|
private show;
|
|
7907
7955
|
private shrinkToContent;
|
|
7908
7956
|
private requestHide;
|
|
@@ -7943,6 +7991,11 @@ export declare class TooltipDirective implements OnDestroy {
|
|
|
7943
7991
|
"required": false;
|
|
7944
7992
|
"isSignal": true;
|
|
7945
7993
|
};
|
|
7994
|
+
"showDelay": {
|
|
7995
|
+
"alias": "showDelay";
|
|
7996
|
+
"required": false;
|
|
7997
|
+
"isSignal": true;
|
|
7998
|
+
};
|
|
7946
7999
|
"dismissDelay": {
|
|
7947
8000
|
"alias": "dismissDelay";
|
|
7948
8001
|
"required": false;
|