@angular/aria 21.0.3 → 21.1.0-next.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/_adev_assets/aria-accordion.json +743 -0
- package/_adev_assets/aria-combobox.json +603 -0
- package/_adev_assets/aria-grid.json +893 -0
- package/_adev_assets/aria-listbox.json +540 -0
- package/_adev_assets/aria-menu.json +1049 -0
- package/_adev_assets/aria-tabs.json +880 -0
- package/_adev_assets/aria-toolbar.json +545 -0
- package/_adev_assets/aria-tree.json +853 -0
- package/fesm2022/_widget-chunk.mjs +246 -4
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +4 -17
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +120 -96
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +201 -225
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +161 -173
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +238 -256
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +932 -7
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +168 -182
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +3 -15
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +2 -4
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +3 -3
- package/types/_grid-chunk.d.ts +210 -3
- package/types/accordion.d.ts +49 -52
- package/types/combobox.d.ts +111 -25
- package/types/grid.d.ts +32 -37
- package/types/listbox.d.ts +5 -8
- package/types/menu.d.ts +113 -113
- package/types/private.d.ts +498 -10
- package/types/tabs.d.ts +84 -89
- package/types/toolbar.d.ts +66 -69
- package/types/tree.d.ts +103 -106
- package/fesm2022/_combobox-chunk.mjs +0 -425
- package/fesm2022/_combobox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-listbox-chunk.mjs +0 -522
- package/fesm2022/_combobox-listbox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-popup-chunk.mjs +0 -46
- package/fesm2022/_combobox-popup-chunk.mjs.map +0 -1
- package/fesm2022/_list-navigation-chunk.mjs +0 -116
- package/fesm2022/_list-navigation-chunk.mjs.map +0 -1
- package/fesm2022/_pointer-event-manager-chunk.mjs +0 -134
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +0 -1
- package/types/_combobox-chunk.d.ts +0 -98
- package/types/_combobox-chunk.d2.ts +0 -193
- package/types/_list-chunk.d.ts +0 -212
- package/types/_list-navigation-chunk.d.ts +0 -212
- package/types/_listbox-chunk.d.ts +0 -106
package/types/menu.d.ts
CHANGED
|
@@ -2,115 +2,53 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
4
|
import * as i1 from '@angular/aria/private';
|
|
5
|
-
import {
|
|
5
|
+
import { MenuTriggerPattern, MenuPattern, SignalLike, MenuBarPattern, MenuItemPattern } from '@angular/aria/private';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* A
|
|
8
|
+
* A trigger for a menu.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* The `ngMenuTrigger` directive is used to open and close menus. It can be applied to
|
|
11
|
+
* any interactive element (e.g., a button) to associate it with a `ngMenu` instance.
|
|
12
|
+
* It also supports linking to sub-menus when applied to a `ngMenuItem`.
|
|
13
13
|
*
|
|
14
14
|
* ```html
|
|
15
|
-
* <
|
|
16
|
-
* <button ngMenuTrigger [menu]="fileMenu">File</button>
|
|
17
|
-
* <button ngMenuTrigger [menu]="editMenu">Edit</button>
|
|
18
|
-
* </div>
|
|
19
|
-
*
|
|
20
|
-
* <div ngMenu #fileMenu="ngMenu">
|
|
21
|
-
* <div ngMenuItem>New</div>
|
|
22
|
-
* <div ngMenuItem>Open</div>
|
|
23
|
-
* </div>
|
|
15
|
+
* <button ngMenuTrigger [menu]="myMenu">Open Menu</button>
|
|
24
16
|
*
|
|
25
|
-
* <div ngMenu #
|
|
26
|
-
* <div ngMenuItem>
|
|
27
|
-
* <div ngMenuItem>
|
|
17
|
+
* <div ngMenu #myMenu="ngMenu">
|
|
18
|
+
* <div ngMenuItem>Item 1</div>
|
|
19
|
+
* <div ngMenuItem>Item 2</div>
|
|
28
20
|
* </div>
|
|
29
21
|
* ```
|
|
30
22
|
*
|
|
31
23
|
* @developerPreview 21.0
|
|
32
24
|
*/
|
|
33
|
-
declare class
|
|
34
|
-
/** The menu items contained in the menubar. */
|
|
35
|
-
readonly _allItems: _angular_core.Signal<readonly MenuItem<V>[]>;
|
|
36
|
-
readonly _items: SignalLike<MenuItem<V>[]>;
|
|
25
|
+
declare class MenuTrigger<V> {
|
|
37
26
|
/** A reference to the host element. */
|
|
38
27
|
private readonly _elementRef;
|
|
39
28
|
/** A reference to the host element. */
|
|
40
29
|
readonly element: HTMLElement;
|
|
41
|
-
/** Whether the menubar is disabled. */
|
|
42
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
43
|
-
/** Whether the menubar is soft disabled. */
|
|
44
|
-
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
45
30
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
46
31
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
47
|
-
/** The
|
|
48
|
-
|
|
49
|
-
/** Whether the menu should wrap its items. */
|
|
50
|
-
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
51
|
-
/** The delay in milliseconds before the typeahead buffer is cleared. */
|
|
52
|
-
readonly typeaheadDelay: _angular_core.InputSignal<number>;
|
|
53
|
-
/** The menu ui pattern instance. */
|
|
54
|
-
readonly _pattern: MenuBarPattern<V>;
|
|
55
|
-
/** The menu items as a writable signal. */
|
|
56
|
-
private readonly _itemPatterns;
|
|
57
|
-
/** A callback function triggered when a menu item is selected. */
|
|
58
|
-
onSelect: _angular_core.OutputEmitterRef<V>;
|
|
59
|
-
constructor();
|
|
60
|
-
/** Closes the menubar. */
|
|
61
|
-
close(): void;
|
|
62
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuBar<any>, never>;
|
|
63
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuBar<any>, "[ngMenuBar]", ["ngMenuBar"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; }, { "values": "valuesChange"; "onSelect": "onSelect"; }, ["_allItems"], never, true, never>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* An item in a Menu.
|
|
68
|
-
*
|
|
69
|
-
* `ngMenuItem` directives can be used in `ngMenu` and `ngMenuBar` to represent a choice
|
|
70
|
-
* or action a user can take. They can also act as triggers for sub-menus.
|
|
71
|
-
*
|
|
72
|
-
* ```html
|
|
73
|
-
* <div ngMenuItem (onSelect)="doAction()">Action Item</div>
|
|
74
|
-
*
|
|
75
|
-
* <div ngMenuItem [submenu]="anotherMenu">Submenu Trigger</div>
|
|
76
|
-
* ```
|
|
77
|
-
*
|
|
78
|
-
* @developerPreview 21.0
|
|
79
|
-
*/
|
|
80
|
-
declare class MenuItem<V> {
|
|
81
|
-
/** A reference to the host element. */
|
|
82
|
-
private readonly _elementRef;
|
|
83
|
-
/** A reference to the host element. */
|
|
84
|
-
readonly element: HTMLElement;
|
|
85
|
-
/** The unique ID of the menu item. */
|
|
86
|
-
readonly id: _angular_core.InputSignal<string>;
|
|
87
|
-
/** The value of the menu item. */
|
|
88
|
-
readonly value: _angular_core.InputSignal<V>;
|
|
89
|
-
/** Whether the menu item is disabled. */
|
|
90
|
-
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
91
|
-
/** The search term associated with the menu item. */
|
|
92
|
-
readonly searchTerm: _angular_core.ModelSignal<string>;
|
|
93
|
-
/** A reference to the parent menu or menubar. */
|
|
94
|
-
readonly parent: Menu<V> | MenuBar<V> | null;
|
|
95
|
-
/** The submenu associated with the menu item. */
|
|
96
|
-
readonly submenu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
97
|
-
/** Whether the menu item is active. */
|
|
98
|
-
readonly active: _angular_core.Signal<boolean>;
|
|
32
|
+
/** The menu associated with the trigger. */
|
|
33
|
+
menu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
99
34
|
/** Whether the menu is expanded. */
|
|
100
|
-
readonly expanded:
|
|
101
|
-
/** Whether the menu
|
|
102
|
-
readonly hasPopup:
|
|
103
|
-
/**
|
|
104
|
-
readonly
|
|
35
|
+
readonly expanded: Signal<boolean>;
|
|
36
|
+
/** Whether the menu trigger has a popup. */
|
|
37
|
+
readonly hasPopup: Signal<boolean>;
|
|
38
|
+
/** Whether the menu trigger is disabled. */
|
|
39
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
40
|
+
/** Whether the menu trigger is soft disabled. */
|
|
41
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
42
|
+
/** The menu trigger ui pattern instance. */
|
|
43
|
+
_pattern: MenuTriggerPattern<V>;
|
|
105
44
|
constructor();
|
|
106
|
-
/** Opens the
|
|
45
|
+
/** Opens the menu focusing on the first menu item. */
|
|
107
46
|
open(): void;
|
|
108
|
-
/** Closes the
|
|
47
|
+
/** Closes the menu. */
|
|
109
48
|
close(): void;
|
|
110
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
111
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
49
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuTrigger<any>, never>;
|
|
50
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuTrigger<any>, "button[ngMenuTrigger]", ["ngMenuTrigger"], { "menu": { "alias": "menu"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
112
51
|
}
|
|
113
|
-
|
|
114
52
|
/**
|
|
115
53
|
* A list of menu items.
|
|
116
54
|
*
|
|
@@ -182,53 +120,115 @@ declare class Menu<V> {
|
|
|
182
120
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Menu<any>, never>;
|
|
183
121
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Menu<any>, "[ngMenu]", ["ngMenu"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expansionDelay": { "alias": "expansionDelay"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, ["_allItems"], never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
184
122
|
}
|
|
185
|
-
|
|
186
123
|
/**
|
|
187
|
-
* A
|
|
124
|
+
* A menu bar of menu items.
|
|
188
125
|
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
126
|
+
* Like the `ngMenu`, a `ngMenuBar` is used to offer a list of menu item choices to users.
|
|
127
|
+
* However, a menubar is used to display a persistent, top-level, always-visible set of
|
|
128
|
+
* menu item choices, typically found at the top of an application window.
|
|
192
129
|
*
|
|
193
130
|
* ```html
|
|
194
|
-
* <
|
|
131
|
+
* <div ngMenuBar>
|
|
132
|
+
* <button ngMenuTrigger [menu]="fileMenu">File</button>
|
|
133
|
+
* <button ngMenuTrigger [menu]="editMenu">Edit</button>
|
|
134
|
+
* </div>
|
|
195
135
|
*
|
|
196
|
-
* <div ngMenu #
|
|
197
|
-
* <div ngMenuItem>
|
|
198
|
-
* <div ngMenuItem>
|
|
136
|
+
* <div ngMenu #fileMenu="ngMenu">
|
|
137
|
+
* <div ngMenuItem>New</div>
|
|
138
|
+
* <div ngMenuItem>Open</div>
|
|
139
|
+
* </div>
|
|
140
|
+
*
|
|
141
|
+
* <div ngMenu #editMenu="ngMenu">
|
|
142
|
+
* <div ngMenuItem>Cut</div>
|
|
143
|
+
* <div ngMenuItem>Copy</div>
|
|
199
144
|
* </div>
|
|
200
145
|
* ```
|
|
201
146
|
*
|
|
202
147
|
* @developerPreview 21.0
|
|
203
148
|
*/
|
|
204
|
-
declare class
|
|
149
|
+
declare class MenuBar<V> {
|
|
150
|
+
/** The menu items contained in the menubar. */
|
|
151
|
+
readonly _allItems: Signal<readonly MenuItem<V>[]>;
|
|
152
|
+
readonly _items: SignalLike<MenuItem<V>[]>;
|
|
205
153
|
/** A reference to the host element. */
|
|
206
154
|
private readonly _elementRef;
|
|
207
155
|
/** A reference to the host element. */
|
|
208
156
|
readonly element: HTMLElement;
|
|
157
|
+
/** Whether the menubar is disabled. */
|
|
158
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
159
|
+
/** Whether the menubar is soft disabled. */
|
|
160
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
209
161
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
210
162
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
211
|
-
/** The
|
|
212
|
-
|
|
163
|
+
/** The values of the currently selected menu items. */
|
|
164
|
+
readonly values: _angular_core.ModelSignal<V[]>;
|
|
165
|
+
/** Whether the menu should wrap its items. */
|
|
166
|
+
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
167
|
+
/** The delay in milliseconds before the typeahead buffer is cleared. */
|
|
168
|
+
readonly typeaheadDelay: _angular_core.InputSignal<number>;
|
|
169
|
+
/** The menu ui pattern instance. */
|
|
170
|
+
readonly _pattern: MenuBarPattern<V>;
|
|
171
|
+
/** The menu items as a writable signal. */
|
|
172
|
+
private readonly _itemPatterns;
|
|
173
|
+
/** A callback function triggered when a menu item is selected. */
|
|
174
|
+
onSelect: _angular_core.OutputEmitterRef<V>;
|
|
175
|
+
constructor();
|
|
176
|
+
/** Closes the menubar. */
|
|
177
|
+
close(): void;
|
|
178
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuBar<any>, never>;
|
|
179
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuBar<any>, "[ngMenuBar]", ["ngMenuBar"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; }, { "values": "valuesChange"; "onSelect": "onSelect"; }, ["_allItems"], never, true, never>;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* An item in a Menu.
|
|
183
|
+
*
|
|
184
|
+
* `ngMenuItem` directives can be used in `ngMenu` and `ngMenuBar` to represent a choice
|
|
185
|
+
* or action a user can take. They can also act as triggers for sub-menus.
|
|
186
|
+
*
|
|
187
|
+
* ```html
|
|
188
|
+
* <div ngMenuItem (onSelect)="doAction()">Action Item</div>
|
|
189
|
+
*
|
|
190
|
+
* <div ngMenuItem [submenu]="anotherMenu">Submenu Trigger</div>
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @developerPreview 21.0
|
|
194
|
+
*/
|
|
195
|
+
declare class MenuItem<V> {
|
|
196
|
+
/** A reference to the host element. */
|
|
197
|
+
private readonly _elementRef;
|
|
198
|
+
/** A reference to the host element. */
|
|
199
|
+
readonly element: HTMLElement;
|
|
200
|
+
/** The unique ID of the menu item. */
|
|
201
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
202
|
+
/** The value of the menu item. */
|
|
203
|
+
readonly value: _angular_core.InputSignal<V>;
|
|
204
|
+
/** Whether the menu item is disabled. */
|
|
205
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
206
|
+
/** The search term associated with the menu item. */
|
|
207
|
+
readonly searchTerm: _angular_core.ModelSignal<string>;
|
|
208
|
+
/** A reference to the parent menu. */
|
|
209
|
+
private readonly _menu;
|
|
210
|
+
/** A reference to the parent menu bar. */
|
|
211
|
+
private readonly _menuBar;
|
|
212
|
+
/** A reference to the parent menu or menubar. */
|
|
213
|
+
readonly parent: Menu<V> | MenuBar<V> | null;
|
|
214
|
+
/** The submenu associated with the menu item. */
|
|
215
|
+
readonly submenu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
216
|
+
/** Whether the menu item is active. */
|
|
217
|
+
readonly active: Signal<boolean>;
|
|
213
218
|
/** Whether the menu is expanded. */
|
|
214
|
-
readonly expanded:
|
|
215
|
-
/** Whether the menu
|
|
216
|
-
readonly hasPopup:
|
|
217
|
-
/**
|
|
218
|
-
readonly
|
|
219
|
-
/** Whether the menu trigger is soft disabled. */
|
|
220
|
-
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
221
|
-
/** The menu trigger ui pattern instance. */
|
|
222
|
-
_pattern: MenuTriggerPattern<V>;
|
|
219
|
+
readonly expanded: Signal<boolean | null>;
|
|
220
|
+
/** Whether the menu item has a popup. */
|
|
221
|
+
readonly hasPopup: Signal<boolean>;
|
|
222
|
+
/** The menu item ui pattern instance. */
|
|
223
|
+
readonly _pattern: MenuItemPattern<V>;
|
|
223
224
|
constructor();
|
|
224
|
-
/** Opens the
|
|
225
|
+
/** Opens the submenu focusing on the first menu item. */
|
|
225
226
|
open(): void;
|
|
226
|
-
/** Closes the
|
|
227
|
+
/** Closes the submenu. */
|
|
227
228
|
close(): void;
|
|
228
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
229
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
229
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuItem<any>, never>;
|
|
230
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
|
|
230
231
|
}
|
|
231
|
-
|
|
232
232
|
/**
|
|
233
233
|
* Defers the rendering of the menu content.
|
|
234
234
|
*
|