@angular/aria 21.0.3 → 21.0.5
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/_accordion-chunk.mjs +108 -0
- package/fesm2022/_accordion-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-chunk.mjs +2 -2
- package/fesm2022/_combobox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-listbox-chunk.mjs +4 -286
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-tree-chunk.mjs +331 -0
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -0
- package/fesm2022/_deferred-content-chunk.mjs +124 -0
- package/fesm2022/_deferred-content-chunk.mjs.map +1 -0
- package/fesm2022/_expansion-chunk.mjs +41 -0
- package/fesm2022/_expansion-chunk.mjs.map +1 -0
- package/fesm2022/_list-chunk.mjs +287 -0
- package/fesm2022/_list-chunk.mjs.map +1 -0
- package/fesm2022/_list-navigation-chunk.mjs +1 -1
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
- package/fesm2022/_menu-chunk.mjs +515 -0
- package/fesm2022/_menu-chunk.mjs.map +1 -0
- package/fesm2022/_pointer-event-manager-chunk.mjs +2 -82
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -1
- package/fesm2022/_signal-like-chunk.mjs +118 -0
- package/fesm2022/_signal-like-chunk.mjs.map +1 -0
- package/fesm2022/_tabs-chunk.mjs +159 -0
- package/fesm2022/_tabs-chunk.mjs.map +1 -0
- package/fesm2022/_toolbar-widget-group-chunk.mjs +148 -0
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +3 -2
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +57 -52
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +77 -40
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +70 -68
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +49 -47
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +69 -65
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +13 -1402
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +49 -41
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +49 -45
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +52 -44
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_accordion-chunk.d.ts +100 -0
- package/types/_combobox-chunk.d.ts +187 -91
- package/types/_deferred-content-chunk.d.ts +42 -0
- package/types/_expansion-chunk.d.ts +40 -0
- package/types/_grid-chunk.d.ts +41 -41
- package/types/_keyboard-event-manager-chunk.d.ts +68 -0
- package/types/_list-chunk.d.ts +8 -9
- package/types/_list-navigation-chunk.d.ts +8 -101
- package/types/_listbox-chunk.d.ts +17 -16
- package/types/_menu-chunk.d.ts +267 -0
- package/types/_pointer-event-manager-chunk.d.ts +34 -0
- package/types/_tabs-chunk.d.ts +153 -0
- package/types/_toolbar-chunk.d.ts +124 -0
- package/types/_tree-chunk.d.ts +185 -0
- package/types/accordion.d.ts +13 -5
- package/types/aria.d.ts +1 -1
- package/types/combobox.d.ts +122 -6
- package/types/grid.d.ts +10 -0
- package/types/listbox.d.ts +17 -5
- package/types/menu.d.ts +23 -5
- package/types/private.d.ts +25 -885
- package/types/tabs.d.ts +24 -8
- package/types/toolbar.d.ts +12 -4
- package/types/tree.d.ts +16 -5
- package/fesm2022/_combobox-popup-chunk.mjs +0 -46
- package/fesm2022/_combobox-popup-chunk.mjs.map +0 -1
- package/types/_combobox-chunk.d2.ts +0 -193
package/types/tabs.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as _angular_aria_private from '@angular/aria/private';
|
|
4
|
+
import * as _angular_aria_private_public_api from '@angular/aria/private/public-api';
|
|
5
5
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
6
|
+
import { TabPattern, TabListPattern, TabPanelPattern } from './_tabs-chunk.js';
|
|
7
|
+
import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
|
|
8
|
+
import './_keyboard-event-manager-chunk.js';
|
|
9
|
+
import './_list-navigation-chunk.js';
|
|
10
|
+
import './_pointer-event-manager-chunk.js';
|
|
11
|
+
import './_expansion-chunk.js';
|
|
6
12
|
|
|
7
13
|
interface HasElement {
|
|
8
14
|
element: HTMLElement;
|
|
@@ -21,6 +27,8 @@ interface HasElement {
|
|
|
21
27
|
* ```
|
|
22
28
|
*
|
|
23
29
|
* @developerPreview 21.0
|
|
30
|
+
*
|
|
31
|
+
* @see [Tabs](guide/aria/tabs)
|
|
24
32
|
*/
|
|
25
33
|
declare class Tab implements HasElement, OnInit, OnDestroy {
|
|
26
34
|
/** A reference to the host element. */
|
|
@@ -70,6 +78,8 @@ declare class Tab implements HasElement, OnInit, OnDestroy {
|
|
|
70
78
|
* ```
|
|
71
79
|
*
|
|
72
80
|
* @developerPreview 21.0
|
|
81
|
+
*
|
|
82
|
+
* @see [Tabs](guide/aria/tabs)
|
|
73
83
|
*/
|
|
74
84
|
declare class TabList implements OnInit, OnDestroy {
|
|
75
85
|
/** A reference to the host element. */
|
|
@@ -83,7 +93,7 @@ declare class TabList implements OnInit, OnDestroy {
|
|
|
83
93
|
/** Text direction. */
|
|
84
94
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
85
95
|
/** The Tab UIPatterns of the child Tabs. */
|
|
86
|
-
readonly _tabPatterns: _angular_core.Signal<
|
|
96
|
+
readonly _tabPatterns: _angular_core.Signal<_angular_aria_private_public_api.TabPattern[]>;
|
|
87
97
|
/** Whether the tablist is vertically or horizontally oriented. */
|
|
88
98
|
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
89
99
|
/** Whether focus should wrap when navigating. */
|
|
@@ -141,6 +151,8 @@ declare class TabList implements OnInit, OnDestroy {
|
|
|
141
151
|
* ```
|
|
142
152
|
*
|
|
143
153
|
* @developerPreview 21.0
|
|
154
|
+
*
|
|
155
|
+
* @see [Tabs](guide/aria/tabs)
|
|
144
156
|
*/
|
|
145
157
|
declare class TabPanel implements OnInit, OnDestroy {
|
|
146
158
|
/** A reference to the host element. */
|
|
@@ -165,7 +177,7 @@ declare class TabPanel implements OnInit, OnDestroy {
|
|
|
165
177
|
ngOnInit(): void;
|
|
166
178
|
ngOnDestroy(): void;
|
|
167
179
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabPanel, never>;
|
|
168
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof
|
|
180
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
169
181
|
}
|
|
170
182
|
|
|
171
183
|
/**
|
|
@@ -196,6 +208,8 @@ declare class TabPanel implements OnInit, OnDestroy {
|
|
|
196
208
|
* ```
|
|
197
209
|
*
|
|
198
210
|
* @developerPreview 21.0
|
|
211
|
+
*
|
|
212
|
+
* @see [Tabs](guide/aria/tabs)
|
|
199
213
|
*/
|
|
200
214
|
declare class Tabs {
|
|
201
215
|
/** A reference to the host element. */
|
|
@@ -207,9 +221,9 @@ declare class Tabs {
|
|
|
207
221
|
/** The TabPanels nested inside of the container. */
|
|
208
222
|
private readonly _unorderedPanels;
|
|
209
223
|
/** The Tab UIPattern of the child Tabs. */
|
|
210
|
-
readonly _tabPatterns: _angular_core.Signal<
|
|
224
|
+
readonly _tabPatterns: _angular_core.Signal<_angular_aria_private.TabPattern[] | undefined>;
|
|
211
225
|
/** The TabPanel UIPattern of the child TabPanels. */
|
|
212
|
-
readonly _unorderedTabpanelPatterns: _angular_core.Signal<
|
|
226
|
+
readonly _unorderedTabpanelPatterns: _angular_core.Signal<_angular_aria_private.TabPanelPattern[]>;
|
|
213
227
|
_register(child: TabList | TabPanel): void;
|
|
214
228
|
_unregister(child: TabList | TabPanel): void;
|
|
215
229
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tabs, never>;
|
|
@@ -232,10 +246,12 @@ declare class Tabs {
|
|
|
232
246
|
* ```
|
|
233
247
|
*
|
|
234
248
|
* @developerPreview 21.0
|
|
249
|
+
*
|
|
250
|
+
* @see [Tabs](guide/aria/tabs)
|
|
235
251
|
*/
|
|
236
252
|
declare class TabContent {
|
|
237
253
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabContent, never>;
|
|
238
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabContent, "ng-template[ngTabContent]", ["ngTabContent"], {}, {}, never, never, true, [{ directive: typeof
|
|
254
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabContent, "ng-template[ngTabContent]", ["ngTabContent"], {}, {}, never, never, true, [{ directive: typeof DeferredContent; inputs: {}; outputs: {}; }]>;
|
|
239
255
|
}
|
|
240
256
|
|
|
241
|
-
export { Tab, TabContent, TabList, TabPanel, Tabs };
|
|
257
|
+
export { Tab, TabContent, TabList, TabPanel, Tabs, DeferredContent as ɵɵDeferredContent, DeferredContentAware as ɵɵDeferredContentAware };
|
package/types/toolbar.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ToolbarWidgetGroupPattern, ToolbarWidgetPattern, ToolbarPattern } from '@angular/aria/private';
|
|
1
|
+
import * as _angular_aria_private_public_api from '@angular/aria/private/public-api';
|
|
3
2
|
import * as _angular_core from '@angular/core';
|
|
4
3
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
5
4
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
5
|
+
import { ToolbarWidgetGroupPattern, ToolbarWidgetPattern, ToolbarPattern } from './_toolbar-chunk.js';
|
|
6
|
+
import './_list-navigation-chunk.js';
|
|
7
|
+
import './_list-chunk.js';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* A directive that groups toolbar widgets, used for more complex widgets like radio groups
|
|
9
11
|
* that have their own internal navigation.
|
|
10
12
|
*
|
|
11
13
|
* @developerPreview 21.0
|
|
14
|
+
*
|
|
15
|
+
* @see [Toolbar](guide/aria/toolbar)
|
|
12
16
|
*/
|
|
13
17
|
declare class ToolbarWidgetGroup<V> {
|
|
14
18
|
/** A reference to the host element. */
|
|
@@ -47,6 +51,8 @@ declare class ToolbarWidgetGroup<V> {
|
|
|
47
51
|
* ```
|
|
48
52
|
*
|
|
49
53
|
* @developerPreview 21.0
|
|
54
|
+
*
|
|
55
|
+
* @see [Toolbar](guide/aria/toolbar)
|
|
50
56
|
*/
|
|
51
57
|
declare class ToolbarWidget<V> implements OnInit, OnDestroy {
|
|
52
58
|
/** A reference to the host element. */
|
|
@@ -58,7 +64,7 @@ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
|
|
|
58
64
|
/** A unique identifier for the widget. */
|
|
59
65
|
readonly id: _angular_core.InputSignal<string>;
|
|
60
66
|
/** The parent Toolbar UIPattern. */
|
|
61
|
-
readonly _toolbarPattern: _angular_core.Signal<
|
|
67
|
+
readonly _toolbarPattern: _angular_core.Signal<_angular_aria_private_public_api.ToolbarPattern<V>>;
|
|
62
68
|
/** Whether the widget is disabled. */
|
|
63
69
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
64
70
|
/** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */
|
|
@@ -99,6 +105,8 @@ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
|
|
|
99
105
|
* ```
|
|
100
106
|
*
|
|
101
107
|
* @developerPreview 21.0
|
|
108
|
+
*
|
|
109
|
+
* @see [Toolbar](guide/aria/toolbar)
|
|
102
110
|
*/
|
|
103
111
|
declare class Toolbar<V> {
|
|
104
112
|
/** A reference to the host element. */
|
|
@@ -110,7 +118,7 @@ declare class Toolbar<V> {
|
|
|
110
118
|
/** Text direction. */
|
|
111
119
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
112
120
|
/** Sorted UIPatterns of the child widgets */
|
|
113
|
-
readonly _itemPatterns: _angular_core.Signal<
|
|
121
|
+
readonly _itemPatterns: _angular_core.Signal<_angular_aria_private_public_api.ToolbarWidgetPattern<V>[]>;
|
|
114
122
|
/** Whether the toolbar is vertically or horizontally oriented. */
|
|
115
123
|
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
116
124
|
/**
|
package/types/tree.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { OnInit, OnDestroy, Signal } from '@angular/core';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { ComboboxPopup } from './
|
|
4
|
+
import { TreeItemPattern, TreePattern } from './_tree-chunk.js';
|
|
5
|
+
import { DeferredContent, DeferredContentAware } from './_deferred-content-chunk.js';
|
|
6
|
+
import { ComboboxPopup } from './combobox.js';
|
|
7
|
+
export { Combobox as ɵɵCombobox, ComboboxDialog as ɵɵComboboxDialog, ComboboxInput as ɵɵComboboxInput, ComboboxPopupContainer as ɵɵComboboxPopupContainer } from './combobox.js';
|
|
8
|
+
import './_list-navigation-chunk.js';
|
|
9
|
+
import './_list-chunk.js';
|
|
10
|
+
import './_expansion-chunk.js';
|
|
11
|
+
import './_keyboard-event-manager-chunk.js';
|
|
12
|
+
import './_pointer-event-manager-chunk.js';
|
|
13
|
+
import './_combobox-chunk.js';
|
|
7
14
|
|
|
8
15
|
/**
|
|
9
16
|
* Group that contains children tree items.
|
|
@@ -24,6 +31,8 @@ import { ComboboxPopup } from './_combobox-chunk.js';
|
|
|
24
31
|
* ```
|
|
25
32
|
*
|
|
26
33
|
* @developerPreview 21.0
|
|
34
|
+
*
|
|
35
|
+
* @see [Tree](guide/aria/tree)
|
|
27
36
|
*/
|
|
28
37
|
declare class TreeItemGroup<V> implements OnInit, OnDestroy {
|
|
29
38
|
/** A reference to the host element. */
|
|
@@ -43,7 +52,7 @@ declare class TreeItemGroup<V> implements OnInit, OnDestroy {
|
|
|
43
52
|
_register(child: TreeItem<V>): void;
|
|
44
53
|
_unregister(child: TreeItem<V>): void;
|
|
45
54
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeItemGroup<any>, never>;
|
|
46
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeItemGroup<any>, "ng-template[ngTreeItemGroup]", ["ngTreeItemGroup"], { "ownedBy": { "alias": "ownedBy"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof
|
|
55
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeItemGroup<any>, "ng-template[ngTreeItemGroup]", ["ngTreeItemGroup"], { "ownedBy": { "alias": "ownedBy"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContent; inputs: {}; outputs: {}; }]>;
|
|
47
56
|
}
|
|
48
57
|
|
|
49
58
|
interface HasElement {
|
|
@@ -144,6 +153,8 @@ declare class TreeItem<V> extends DeferredContentAware implements OnInit, OnDest
|
|
|
144
153
|
* ```
|
|
145
154
|
*
|
|
146
155
|
* @developerPreview 21.0
|
|
156
|
+
*
|
|
157
|
+
* @see [Tree](guide/aria/tree)
|
|
147
158
|
*/
|
|
148
159
|
declare class Tree<V> {
|
|
149
160
|
/** A reference to the host element. */
|
|
@@ -207,4 +218,4 @@ declare class Tree<V> {
|
|
|
207
218
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tree<any>, "[ngTree]", ["ngTree"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "nav": { "alias": "nav"; "required": false; "isSignal": true; }; "currentType": { "alias": "currentType"; "required": false; "isSignal": true; }; }, { "values": "valuesChange"; }, never, never, true, [{ directive: typeof ComboboxPopup; inputs: {}; outputs: {}; }]>;
|
|
208
219
|
}
|
|
209
220
|
|
|
210
|
-
export { Tree, TreeItem, TreeItemGroup };
|
|
221
|
+
export { Tree, TreeItem, TreeItemGroup, ComboboxPopup as ɵɵComboboxPopup, DeferredContent as ɵɵDeferredContent };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, signal, Directive } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
const COMBOBOX = new InjectionToken('COMBOBOX');
|
|
5
|
-
|
|
6
|
-
class ComboboxPopup {
|
|
7
|
-
combobox = inject(COMBOBOX, {
|
|
8
|
-
optional: true
|
|
9
|
-
});
|
|
10
|
-
_controls = signal(undefined, ...(ngDevMode ? [{
|
|
11
|
-
debugName: "_controls"
|
|
12
|
-
}] : []));
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
14
|
-
minVersion: "12.0.0",
|
|
15
|
-
version: "21.0.0",
|
|
16
|
-
ngImport: i0,
|
|
17
|
-
type: ComboboxPopup,
|
|
18
|
-
deps: [],
|
|
19
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
20
|
-
});
|
|
21
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
22
|
-
minVersion: "14.0.0",
|
|
23
|
-
version: "21.0.0",
|
|
24
|
-
type: ComboboxPopup,
|
|
25
|
-
isStandalone: true,
|
|
26
|
-
selector: "[ngComboboxPopup]",
|
|
27
|
-
exportAs: ["ngComboboxPopup"],
|
|
28
|
-
ngImport: i0
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
32
|
-
minVersion: "12.0.0",
|
|
33
|
-
version: "21.0.0",
|
|
34
|
-
ngImport: i0,
|
|
35
|
-
type: ComboboxPopup,
|
|
36
|
-
decorators: [{
|
|
37
|
-
type: Directive,
|
|
38
|
-
args: [{
|
|
39
|
-
selector: '[ngComboboxPopup]',
|
|
40
|
-
exportAs: 'ngComboboxPopup'
|
|
41
|
-
}]
|
|
42
|
-
}]
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export { COMBOBOX, ComboboxPopup };
|
|
46
|
-
//# sourceMappingURL=_combobox-popup-chunk.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_combobox-popup-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/combobox/combobox-popup.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {Combobox} from './combobox';\n\n/** Token used to provide the combobox to child components. */\nexport const COMBOBOX = new InjectionToken<Combobox<unknown>>('COMBOBOX');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive, inject, signal} from '@angular/core';\nimport {\n ComboboxListboxControls,\n ComboboxTreeControls,\n ComboboxDialogPattern,\n} from '@angular/aria/private';\nimport type {Combobox} from './combobox';\nimport {COMBOBOX} from './combobox-tokens';\n\n/**\n * Identifies an element as a popup for an `ngCombobox`.\n *\n * This directive acts as a bridge, allowing the `ngCombobox` to discover and interact\n * with the underlying control (e.g., `ngListbox`, `ngTree`, or `ngComboboxDialog`) that\n * manages the options. It's primarily used as a host directive and is responsible for\n * exposing the popup's control pattern to the parent combobox.\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngComboboxPopup]',\n exportAs: 'ngComboboxPopup',\n})\nexport class ComboboxPopup<V> {\n /** The combobox that the popup belongs to. */\n readonly combobox = inject<Combobox<V>>(COMBOBOX, {optional: true});\n\n /** The popup controls exposed to the combobox. */\n readonly _controls = signal<\n | ComboboxListboxControls<any, V>\n | ComboboxTreeControls<any, V>\n | ComboboxDialogPattern\n | undefined\n >(undefined);\n}\n"],"names":["COMBOBOX","InjectionToken","ComboboxPopup","combobox","inject","optional","_controls","signal","undefined","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","exportAs","ngImport","decorators","args"],"mappings":";;;MAYaA,QAAQ,GAAG,IAAIC,cAAc,CAAoB,UAAU;;MCmB3DC,aAAa,CAAA;AAEfC,EAAAA,QAAQ,GAAGC,MAAM,CAAcJ,QAAQ,EAAE;AAACK,IAAAA,QAAQ,EAAE;AAAK,GAAA,CAAC;EAG1DC,SAAS,GAAGC,MAAM,CAKzBC,SAAS;;WAAC;;;;;UAVDN,aAAa;AAAAO,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;;;;UAAbX,aAAa;AAAAY,IAAAA,YAAA,EAAA,IAAA;AAAAC,IAAAA,QAAA,EAAA,mBAAA;IAAAC,QAAA,EAAA,CAAA,iBAAA,CAAA;AAAAC,IAAAA,QAAA,EAAAN;AAAA,GAAA,CAAA;;;;;;QAAbT,aAAa;AAAAgB,EAAAA,UAAA,EAAA,CAAA;UAJzBL,SAAS;AAACM,IAAAA,IAAA,EAAA,CAAA;AACTJ,MAAAA,QAAQ,EAAE,mBAAmB;AAC7BC,MAAAA,QAAQ,EAAE;KACX;;;;;;"}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { SignalLike, WritableSignalLike, KeyboardEventManager, PointerEventManager } from './_list-navigation-chunk.js';
|
|
3
|
-
import { ListItem } from './_list-chunk.js';
|
|
4
|
-
|
|
5
|
-
/** Represents the required inputs for a combobox. */
|
|
6
|
-
interface ComboboxInputs<T extends ListItem<V>, V> {
|
|
7
|
-
/** The controls for the popup associated with the combobox. */
|
|
8
|
-
popupControls: SignalLike<ComboboxListboxControls<T, V> | ComboboxTreeControls<T, V> | ComboboxDialogPattern | undefined>;
|
|
9
|
-
/** The HTML input element that serves as the combobox input. */
|
|
10
|
-
inputEl: SignalLike<HTMLInputElement | undefined>;
|
|
11
|
-
/** The HTML element that serves as the combobox container. */
|
|
12
|
-
containerEl: SignalLike<HTMLElement | undefined>;
|
|
13
|
-
/** The filtering mode for the combobox. */
|
|
14
|
-
filterMode: SignalLike<'manual' | 'auto-select' | 'highlight'>;
|
|
15
|
-
/** The current value of the combobox. */
|
|
16
|
-
inputValue?: WritableSignalLike<string>;
|
|
17
|
-
/** The value of the first matching item in the popup. */
|
|
18
|
-
firstMatch: SignalLike<V | undefined>;
|
|
19
|
-
/** Whether the combobox is disabled. */
|
|
20
|
-
disabled: SignalLike<boolean>;
|
|
21
|
-
/** Whether the combobox is read-only. */
|
|
22
|
-
readonly: SignalLike<boolean>;
|
|
23
|
-
/** Whether the combobox is in a right-to-left context. */
|
|
24
|
-
textDirection: SignalLike<'rtl' | 'ltr'>;
|
|
25
|
-
/** Whether the combobox is always expanded. */
|
|
26
|
-
alwaysExpanded: SignalLike<boolean>;
|
|
27
|
-
}
|
|
28
|
-
/** An interface that allows combobox popups to expose the necessary controls for the combobox. */
|
|
29
|
-
interface ComboboxListboxControls<T extends ListItem<V>, V> {
|
|
30
|
-
/** A unique identifier for the popup. */
|
|
31
|
-
id: () => string;
|
|
32
|
-
/** The ARIA role for the popup. */
|
|
33
|
-
role: SignalLike<'listbox' | 'tree' | 'grid'>;
|
|
34
|
-
/** Whether multiple items in the popup can be selected at once. */
|
|
35
|
-
multi: SignalLike<boolean>;
|
|
36
|
-
/** The ID of the active item in the popup. */
|
|
37
|
-
activeId: SignalLike<string | undefined>;
|
|
38
|
-
/** The list of items in the popup. */
|
|
39
|
-
items: SignalLike<T[]>;
|
|
40
|
-
/** Navigates to the given item in the popup. */
|
|
41
|
-
focus: (item: T, opts?: {
|
|
42
|
-
focusElement?: boolean;
|
|
43
|
-
}) => void;
|
|
44
|
-
/** Navigates to the next item in the popup. */
|
|
45
|
-
next: () => void;
|
|
46
|
-
/** Navigates to the previous item in the popup. */
|
|
47
|
-
prev: () => void;
|
|
48
|
-
/** Navigates to the first item in the popup. */
|
|
49
|
-
first: () => void;
|
|
50
|
-
/** Navigates to the last item in the popup. */
|
|
51
|
-
last: () => void;
|
|
52
|
-
/** Selects the current item in the popup. */
|
|
53
|
-
select: (item?: T) => void;
|
|
54
|
-
/** Toggles the selection state of the given item in the popup. */
|
|
55
|
-
toggle: (item?: T) => void;
|
|
56
|
-
/** Clears the selection state of the popup. */
|
|
57
|
-
clearSelection: () => void;
|
|
58
|
-
/** Removes focus from any item in the popup. */
|
|
59
|
-
unfocus: () => void;
|
|
60
|
-
/** Returns the item corresponding to the given event. */
|
|
61
|
-
getItem: (e: PointerEvent) => T | undefined;
|
|
62
|
-
/** Returns the currently active (focused) item in the popup. */
|
|
63
|
-
getActiveItem: () => T | undefined;
|
|
64
|
-
/** Returns the currently selected items in the popup. */
|
|
65
|
-
getSelectedItems: () => T[];
|
|
66
|
-
/** Sets the value of the combobox based on the selected item. */
|
|
67
|
-
setValue: (value: V | undefined) => void;
|
|
68
|
-
}
|
|
69
|
-
interface ComboboxTreeControls<T extends ListItem<V>, V> extends ComboboxListboxControls<T, V> {
|
|
70
|
-
/** Whether the currently active item in the popup is collapsible. */
|
|
71
|
-
isItemCollapsible: () => boolean;
|
|
72
|
-
/** Expands the currently active item in the popup. */
|
|
73
|
-
expandItem: () => void;
|
|
74
|
-
/** Collapses the currently active item in the popup. */
|
|
75
|
-
collapseItem: () => void;
|
|
76
|
-
/** Checks if the currently active item in the popup is expandable. */
|
|
77
|
-
isItemExpandable: (item?: T) => boolean;
|
|
78
|
-
/** Expands all nodes in the tree. */
|
|
79
|
-
expandAll: () => void;
|
|
80
|
-
/** Collapses all nodes in the tree. */
|
|
81
|
-
collapseAll: () => void;
|
|
82
|
-
/** Toggles the expansion state of the currently active item in the popup. */
|
|
83
|
-
toggleExpansion: (item?: T) => void;
|
|
84
|
-
/** Whether the current active item is selectable. */
|
|
85
|
-
isItemSelectable: (item?: T) => boolean;
|
|
86
|
-
}
|
|
87
|
-
/** Controls the state of a combobox. */
|
|
88
|
-
declare class ComboboxPattern<T extends ListItem<V>, V> {
|
|
89
|
-
readonly inputs: ComboboxInputs<T, V>;
|
|
90
|
-
/** Whether the combobox is expanded. */
|
|
91
|
-
expanded: _angular_core.WritableSignal<boolean>;
|
|
92
|
-
/** Whether the combobox is disabled. */
|
|
93
|
-
disabled: () => boolean;
|
|
94
|
-
/** The ID of the active item in the combobox. */
|
|
95
|
-
activeDescendant: _angular_core.Signal<string | null>;
|
|
96
|
-
/** The currently highlighted item in the combobox. */
|
|
97
|
-
highlightedItem: _angular_core.WritableSignal<T | undefined>;
|
|
98
|
-
/** Whether the most recent input event was a deletion. */
|
|
99
|
-
isDeleting: boolean;
|
|
100
|
-
/** Whether the combobox is focused. */
|
|
101
|
-
isFocused: _angular_core.WritableSignal<boolean>;
|
|
102
|
-
/** Whether the combobox has ever been focused. */
|
|
103
|
-
hasBeenFocused: _angular_core.WritableSignal<boolean>;
|
|
104
|
-
/** The key used to navigate to the previous item in the list. */
|
|
105
|
-
expandKey: _angular_core.Signal<"ArrowLeft" | "ArrowRight">;
|
|
106
|
-
/** The key used to navigate to the next item in the list. */
|
|
107
|
-
collapseKey: _angular_core.Signal<"ArrowLeft" | "ArrowRight">;
|
|
108
|
-
/** The ID of the popup associated with the combobox. */
|
|
109
|
-
popupId: _angular_core.Signal<string | null>;
|
|
110
|
-
/** The autocomplete behavior of the combobox. */
|
|
111
|
-
autocomplete: _angular_core.Signal<"both" | "list">;
|
|
112
|
-
/** The ARIA role of the popup associated with the combobox. */
|
|
113
|
-
hasPopup: _angular_core.Signal<"listbox" | "tree" | "grid" | "dialog" | null>;
|
|
114
|
-
/** Whether the combobox is read-only. */
|
|
115
|
-
readonly: _angular_core.Signal<true | null>;
|
|
116
|
-
/** Returns the listbox controls for the combobox. */
|
|
117
|
-
listControls: () => ComboboxListboxControls<T, V> | null | undefined;
|
|
118
|
-
/** Returns the tree controls for the combobox. */
|
|
119
|
-
treeControls: () => ComboboxTreeControls<T, V> | null;
|
|
120
|
-
/** The keydown event manager for the combobox. */
|
|
121
|
-
keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
122
|
-
/** The click event manager for the combobox. */
|
|
123
|
-
click: _angular_core.Signal<PointerEventManager<PointerEvent>>;
|
|
124
|
-
constructor(inputs: ComboboxInputs<T, V>);
|
|
125
|
-
/** Handles keydown events for the combobox. */
|
|
126
|
-
onKeydown(event: KeyboardEvent): void;
|
|
127
|
-
/** Handles click events for the combobox. */
|
|
128
|
-
onClick(event: MouseEvent): void;
|
|
129
|
-
/** Handles input events for the combobox. */
|
|
130
|
-
onInput(event: Event): void;
|
|
131
|
-
/** Handles focus in events for the combobox. */
|
|
132
|
-
onFocusIn(): void;
|
|
133
|
-
/** Handles focus out events for the combobox. */
|
|
134
|
-
onFocusOut(event: FocusEvent): void;
|
|
135
|
-
/** The first matching item in the combobox. */
|
|
136
|
-
firstMatch: _angular_core.Signal<T | undefined>;
|
|
137
|
-
/** Handles filtering logic for the combobox. */
|
|
138
|
-
onFilter(): void;
|
|
139
|
-
/** Highlights the currently selected item in the combobox. */
|
|
140
|
-
highlight(): void;
|
|
141
|
-
/** Closes the combobox. */
|
|
142
|
-
close(opts?: {
|
|
143
|
-
reset: boolean;
|
|
144
|
-
}): void;
|
|
145
|
-
/** Opens the combobox. */
|
|
146
|
-
open(nav?: {
|
|
147
|
-
first?: boolean;
|
|
148
|
-
last?: boolean;
|
|
149
|
-
selected?: boolean;
|
|
150
|
-
}): void;
|
|
151
|
-
/** Navigates to the next focusable item in the combobox popup. */
|
|
152
|
-
next(): void;
|
|
153
|
-
/** Navigates to the previous focusable item in the combobox popup. */
|
|
154
|
-
prev(): void;
|
|
155
|
-
/** Navigates to the first focusable item in the combobox popup. */
|
|
156
|
-
first(): void;
|
|
157
|
-
/** Navigates to the last focusable item in the combobox popup. */
|
|
158
|
-
last(): void;
|
|
159
|
-
/** Collapses the currently focused item in the combobox. */
|
|
160
|
-
collapseItem(): void;
|
|
161
|
-
/** Expands the currently focused item in the combobox. */
|
|
162
|
-
expandItem(): void;
|
|
163
|
-
/** Selects an item in the combobox popup. */
|
|
164
|
-
select(opts?: {
|
|
165
|
-
item?: T;
|
|
166
|
-
commit?: boolean;
|
|
167
|
-
close?: boolean;
|
|
168
|
-
}): void;
|
|
169
|
-
/** Updates the value of the input based on the currently selected item. */
|
|
170
|
-
commit(): void;
|
|
171
|
-
/** Navigates and handles additional actions based on filter mode. */
|
|
172
|
-
private _navigate;
|
|
173
|
-
}
|
|
174
|
-
declare class ComboboxDialogPattern {
|
|
175
|
-
readonly inputs: {
|
|
176
|
-
combobox: ComboboxPattern<any, any>;
|
|
177
|
-
element: SignalLike<HTMLDialogElement>;
|
|
178
|
-
id: SignalLike<string>;
|
|
179
|
-
};
|
|
180
|
-
id: () => string;
|
|
181
|
-
role: () => "dialog";
|
|
182
|
-
keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
183
|
-
constructor(inputs: {
|
|
184
|
-
combobox: ComboboxPattern<any, any>;
|
|
185
|
-
element: SignalLike<HTMLDialogElement>;
|
|
186
|
-
id: SignalLike<string>;
|
|
187
|
-
});
|
|
188
|
-
onKeydown(event: KeyboardEvent): void;
|
|
189
|
-
onClick(event: MouseEvent): void;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export { ComboboxDialogPattern, ComboboxPattern };
|
|
193
|
-
export type { ComboboxInputs, ComboboxListboxControls, ComboboxTreeControls };
|