@angular/aria 21.0.0-rc.1 → 21.0.0-rc.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/_adev_assets/aria-accordion.json +439 -55
- package/_adev_assets/aria-combobox.json +343 -35
- package/_adev_assets/aria-grid.json +345 -77
- package/_adev_assets/aria-listbox.json +113 -33
- package/_adev_assets/aria-menu.json +366 -141
- package/_adev_assets/aria-tabs.json +261 -77
- package/_adev_assets/aria-toolbar.json +72 -33
- package/_adev_assets/aria-tree.json +169 -26
- package/fesm2022/_widget-chunk.mjs +388 -57
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +121 -68
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +132 -21
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +198 -61
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +42 -31
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +173 -67
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +415 -439
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +86 -55
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +13 -25
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +86 -44
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_grid-chunk.d.ts +216 -35
- package/types/accordion.d.ts +133 -34
- package/types/combobox.d.ts +145 -12
- package/types/grid.d.ts +149 -31
- package/types/listbox.d.ts +58 -26
- package/types/menu.d.ts +130 -46
- package/types/private.d.ts +210 -250
- package/types/tabs.d.ts +119 -39
- package/types/toolbar.d.ts +49 -29
- package/types/tree.d.ts +113 -41
package/types/tabs.d.ts
CHANGED
|
@@ -1,46 +1,54 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal, OnInit, OnDestroy } from '@angular/core';
|
|
3
1
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/aria/private';
|
|
5
5
|
import { TabPattern, TabPanelPattern, TabListPattern } from '@angular/aria/private';
|
|
6
6
|
|
|
7
7
|
interface HasElement {
|
|
8
|
-
element:
|
|
8
|
+
element: HTMLElement;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* A Tabs container.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* The `ngTabs` directive represents a set of layered sections of content. It acts as the
|
|
14
|
+
* overarching container for a tabbed interface, coordinating the behavior of `ngTabList`,
|
|
15
|
+
* `ngTab`, and `ngTabPanel` directives.
|
|
15
16
|
*
|
|
16
17
|
* ```html
|
|
17
18
|
* <div ngTabs>
|
|
18
|
-
* <ul ngTabList>
|
|
19
|
+
* <ul ngTabList [(selectedTab)]="selectedTabValue">
|
|
19
20
|
* <li ngTab value="tab1">Tab 1</li>
|
|
20
21
|
* <li ngTab value="tab2">Tab 2</li>
|
|
21
22
|
* <li ngTab value="tab3">Tab 3</li>
|
|
22
23
|
* </ul>
|
|
23
24
|
*
|
|
24
25
|
* <div ngTabPanel value="tab1">
|
|
25
|
-
* <ng-template ngTabContent>Tab
|
|
26
|
+
* <ng-template ngTabContent>Content for Tab 1</ng-template>
|
|
26
27
|
* </div>
|
|
27
28
|
* <div ngTabPanel value="tab2">
|
|
28
|
-
* <ng-template ngTabContent>Tab
|
|
29
|
+
* <ng-template ngTabContent>Content for Tab 2</ng-template>
|
|
29
30
|
* </div>
|
|
30
31
|
* <div ngTabPanel value="tab3">
|
|
31
|
-
* <ng-template ngTabContent>Tab
|
|
32
|
+
* <ng-template ngTabContent>Content for Tab 3</ng-template>
|
|
32
33
|
* </div>
|
|
34
|
+
* </div>
|
|
33
35
|
* ```
|
|
36
|
+
*
|
|
37
|
+
* @developerPreview 21.0
|
|
34
38
|
*/
|
|
35
39
|
declare class Tabs {
|
|
40
|
+
/** A reference to the host element. */
|
|
41
|
+
private readonly _elementRef;
|
|
42
|
+
/** A reference to the host element. */
|
|
43
|
+
readonly element: HTMLElement;
|
|
36
44
|
/** The TabList nested inside of the container. */
|
|
37
45
|
private readonly _tablist;
|
|
38
46
|
/** The TabPanels nested inside of the container. */
|
|
39
47
|
private readonly _unorderedPanels;
|
|
40
48
|
/** The Tab UIPattern of the child Tabs. */
|
|
41
|
-
|
|
49
|
+
readonly _tabPatterns: _angular_core.Signal<TabPattern[] | undefined>;
|
|
42
50
|
/** The TabPanel UIPattern of the child TabPanels. */
|
|
43
|
-
|
|
51
|
+
readonly _unorderedTabpanelPatterns: _angular_core.Signal<TabPanelPattern[]>;
|
|
44
52
|
register(child: TabList | TabPanel): void;
|
|
45
53
|
deregister(child: TabList | TabPanel): void;
|
|
46
54
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tabs, never>;
|
|
@@ -49,35 +57,57 @@ declare class Tabs {
|
|
|
49
57
|
/**
|
|
50
58
|
* A TabList container.
|
|
51
59
|
*
|
|
52
|
-
*
|
|
60
|
+
* The `ngTabList` directive controls a list of `ngTab` elements. It manages keyboard
|
|
61
|
+
* navigation, selection, and the overall orientation of the tabs. It should be placed
|
|
62
|
+
* within an `ngTabs` container.
|
|
63
|
+
*
|
|
64
|
+
* ```html
|
|
65
|
+
* <ul ngTabList [(selectedTab)]="mySelectedTab" orientation="horizontal" selectionMode="explicit">
|
|
66
|
+
* <li ngTab value="first">First Tab</li>
|
|
67
|
+
* <li ngTab value="second">Second Tab</li>
|
|
68
|
+
* </ul>
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @developerPreview 21.0
|
|
53
72
|
*/
|
|
54
73
|
declare class TabList implements OnInit, OnDestroy {
|
|
55
|
-
/** A reference to the
|
|
74
|
+
/** A reference to the host element. */
|
|
56
75
|
private readonly _elementRef;
|
|
76
|
+
/** A reference to the host element. */
|
|
77
|
+
readonly element: HTMLElement;
|
|
57
78
|
/** The parent Tabs. */
|
|
58
79
|
private readonly _tabs;
|
|
59
80
|
/** The Tabs nested inside of the TabList. */
|
|
60
81
|
private readonly _unorderedTabs;
|
|
61
|
-
/** The internal tab selection state. */
|
|
62
|
-
private readonly _selection;
|
|
63
82
|
/** Text direction. */
|
|
64
83
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
65
84
|
/** The Tab UIPatterns of the child Tabs. */
|
|
66
|
-
readonly
|
|
85
|
+
readonly _tabPatterns: _angular_core.Signal<TabPattern[]>;
|
|
67
86
|
/** Whether the tablist is vertically or horizontally oriented. */
|
|
68
87
|
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
69
88
|
/** Whether focus should wrap when navigating. */
|
|
70
89
|
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
71
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Whether to allow disabled items to receive focus. When `true`, disabled items are
|
|
92
|
+
* focusable but not interactive. When `false`, disabled items are skipped during navigation.
|
|
93
|
+
*/
|
|
72
94
|
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
73
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* The focus strategy used by the tablist.
|
|
97
|
+
* - `roving`: Focus is moved to the active tab using `tabindex`.
|
|
98
|
+
* - `activedescendant`: Focus remains on the tablist container, and `aria-activedescendant` is used to indicate the active tab.
|
|
99
|
+
*/
|
|
74
100
|
readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
|
|
75
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* The selection strategy used by the tablist.
|
|
103
|
+
* - `follow`: The focused tab is automatically selected.
|
|
104
|
+
* - `explicit`: Tabs are selected explicitly by the user (e.g., via click or spacebar).
|
|
105
|
+
*/
|
|
76
106
|
readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
|
|
77
|
-
/** Whether the tablist is disabled. */
|
|
78
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
79
107
|
/** The current selected tab. */
|
|
80
108
|
readonly selectedTab: _angular_core.ModelSignal<string | undefined>;
|
|
109
|
+
/** Whether the tablist is disabled. */
|
|
110
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
81
111
|
/** The TabList UIPattern. */
|
|
82
112
|
readonly _pattern: TabListPattern;
|
|
83
113
|
/** Whether the tree has received focus yet. */
|
|
@@ -88,65 +118,115 @@ declare class TabList implements OnInit, OnDestroy {
|
|
|
88
118
|
ngOnDestroy(): void;
|
|
89
119
|
register(child: Tab): void;
|
|
90
120
|
deregister(child: Tab): void;
|
|
121
|
+
/** Opens the tab panel with the specified value. */
|
|
122
|
+
open(value: string): boolean;
|
|
91
123
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabList, never>;
|
|
92
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabList, "[ngTabList]", ["ngTabList"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "
|
|
124
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabList, "[ngTabList]", ["ngTabList"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectedTab": { "alias": "selectedTab"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "selectedTab": "selectedTabChange"; }, never, never, true, never>;
|
|
93
125
|
}
|
|
94
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* A selectable tab in a TabList.
|
|
128
|
+
*
|
|
129
|
+
* The `ngTab` directive represents an individual tab control within an `ngTabList`. It
|
|
130
|
+
* requires a `value` that uniquely identifies it and links it to a corresponding `ngTabPanel`.
|
|
131
|
+
*
|
|
132
|
+
* ```html
|
|
133
|
+
* <li ngTab value="myTabId" [disabled]="isTabDisabled">
|
|
134
|
+
* My Tab Label
|
|
135
|
+
* </li>
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* @developerPreview 21.0
|
|
139
|
+
*/
|
|
95
140
|
declare class Tab implements HasElement, OnInit, OnDestroy {
|
|
96
|
-
/** A reference to the
|
|
141
|
+
/** A reference to the host element. */
|
|
97
142
|
private readonly _elementRef;
|
|
143
|
+
/** A reference to the host element. */
|
|
144
|
+
readonly element: HTMLElement;
|
|
98
145
|
/** The parent Tabs. */
|
|
99
146
|
private readonly _tabs;
|
|
100
147
|
/** The parent TabList. */
|
|
101
148
|
private readonly _tabList;
|
|
102
|
-
/** A
|
|
103
|
-
|
|
104
|
-
/** The host native element. */
|
|
105
|
-
readonly element: Signal<any>;
|
|
149
|
+
/** A unique identifier for the widget. */
|
|
150
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
106
151
|
/** The parent TabList UIPattern. */
|
|
107
|
-
readonly tablist: Signal<TabListPattern>;
|
|
152
|
+
readonly tablist: _angular_core.Signal<TabListPattern>;
|
|
108
153
|
/** The TabPanel UIPattern associated with the tab */
|
|
109
|
-
readonly tabpanel: Signal<TabPanelPattern | undefined>;
|
|
154
|
+
readonly tabpanel: _angular_core.Signal<TabPanelPattern | undefined>;
|
|
110
155
|
/** Whether a tab is disabled. */
|
|
111
156
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
112
|
-
/**
|
|
157
|
+
/** The remote tabpanel unique identifier. */
|
|
113
158
|
readonly value: _angular_core.InputSignal<string>;
|
|
159
|
+
/** Whether the tab is active. */
|
|
160
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
161
|
+
/** Whether the tab is selected. */
|
|
162
|
+
readonly selected: _angular_core.Signal<boolean>;
|
|
114
163
|
/** The Tab UIPattern. */
|
|
115
164
|
readonly _pattern: TabPattern;
|
|
165
|
+
/** Opens this tab panel. */
|
|
166
|
+
open(): void;
|
|
116
167
|
ngOnInit(): void;
|
|
117
168
|
ngOnDestroy(): void;
|
|
118
169
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tab, never>;
|
|
119
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tab, "[ngTab]", ["ngTab"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
170
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tab, "[ngTab]", ["ngTab"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
120
171
|
}
|
|
121
172
|
/**
|
|
122
173
|
* A TabPanel container for the resources of layered content associated with a tab.
|
|
123
174
|
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
175
|
+
* The `ngTabPanel` directive holds the content for a specific tab. It is linked to an
|
|
176
|
+
* `ngTab` by a matching `value`. If a tab panel is hidden, the `inert` attribute will be
|
|
177
|
+
* applied to remove it from the accessibility tree. Proper styling is required for visual hiding.
|
|
178
|
+
*
|
|
179
|
+
* ```html
|
|
180
|
+
* <div ngTabPanel value="myTabId">
|
|
181
|
+
* <ng-template ngTabContent>
|
|
182
|
+
* <!-- Content for the tab panel -->
|
|
183
|
+
* </ng-template>
|
|
184
|
+
* </div>
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* @developerPreview 21.0
|
|
128
188
|
*/
|
|
129
189
|
declare class TabPanel implements OnInit, OnDestroy {
|
|
190
|
+
/** A reference to the host element. */
|
|
191
|
+
private readonly _elementRef;
|
|
192
|
+
/** A reference to the host element. */
|
|
193
|
+
readonly element: HTMLElement;
|
|
130
194
|
/** The DeferredContentAware host directive. */
|
|
131
195
|
private readonly _deferredContentAware;
|
|
132
196
|
/** The parent Tabs. */
|
|
133
197
|
private readonly _Tabs;
|
|
134
198
|
/** A global unique identifier for the tab. */
|
|
135
|
-
|
|
199
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
136
200
|
/** The Tab UIPattern associated with the tabpanel */
|
|
137
|
-
readonly tab: Signal<TabPattern | undefined>;
|
|
201
|
+
readonly tab: _angular_core.Signal<TabPattern | undefined>;
|
|
138
202
|
/** A local unique identifier for the tabpanel. */
|
|
139
203
|
readonly value: _angular_core.InputSignal<string>;
|
|
204
|
+
/** Whether the tab panel is visible. */
|
|
205
|
+
readonly visible: _angular_core.Signal<boolean>;
|
|
140
206
|
/** The TabPanel UIPattern. */
|
|
141
207
|
readonly _pattern: TabPanelPattern;
|
|
142
208
|
constructor();
|
|
143
209
|
ngOnInit(): void;
|
|
144
210
|
ngOnDestroy(): void;
|
|
145
211
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabPanel, never>;
|
|
146
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
212
|
+
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 i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
147
213
|
}
|
|
148
214
|
/**
|
|
149
215
|
* A TabContent container for the lazy-loaded content.
|
|
216
|
+
*
|
|
217
|
+
* This structural directive should be applied to an `ng-template` within an `ngTabPanel`.
|
|
218
|
+
* It enables lazy loading of the tab's content, meaning the content is only rendered
|
|
219
|
+
* when the tab is activated for the first time.
|
|
220
|
+
*
|
|
221
|
+
* ```html
|
|
222
|
+
* <div ngTabPanel value="myTabId">
|
|
223
|
+
* <ng-template ngTabContent>
|
|
224
|
+
* <p>This content will be loaded when 'myTabId' is selected.</p>
|
|
225
|
+
* </ng-template>
|
|
226
|
+
* </div>
|
|
227
|
+
* ```
|
|
228
|
+
*
|
|
229
|
+
* @developerPreview 21.0
|
|
150
230
|
*/
|
|
151
231
|
declare class TabContent {
|
|
152
232
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabContent, never>;
|
package/types/toolbar.d.ts
CHANGED
|
@@ -1,38 +1,45 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
4
|
import { ToolbarWidgetPattern, ToolbarPattern, SignalLike, ToolbarWidgetGroupPattern } from '@angular/aria/private';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* A toolbar widget container
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* place of reference for focus and navigation. The Toolbar is meant to be used in conjunction
|
|
11
|
-
* with ToolbarWidget and RadioGroup as follows:
|
|
7
|
+
* A toolbar widget container for a group of interactive widgets, such as
|
|
8
|
+
* buttons or radio groups. It provides a single point of reference for keyboard navigation
|
|
9
|
+
* and focus management. It supports various orientations and disabled states.
|
|
12
10
|
*
|
|
13
11
|
* ```html
|
|
14
|
-
* <div ngToolbar>
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
12
|
+
* <div ngToolbar orientation="horizontal" [wrap]="true">
|
|
13
|
+
* <button ngToolbarWidget value="save">Save</button>
|
|
14
|
+
* <button ngToolbarWidget value="print">Print</button>
|
|
15
|
+
*
|
|
16
|
+
* <div ngToolbarWidgetGroup [(value)]="selectedAlignment">
|
|
17
|
+
* <button ngToolbarWidget value="left">Left</button>
|
|
18
|
+
* <button ngToolbarWidget value="center">Center</button>
|
|
19
|
+
* <button ngToolbarWidget value="right">Right</button>
|
|
20
|
+
* </div>
|
|
21
21
|
* </div>
|
|
22
22
|
* ```
|
|
23
|
+
*
|
|
24
|
+
* @developerPreview 21.0
|
|
23
25
|
*/
|
|
24
26
|
declare class Toolbar<V> {
|
|
25
|
-
/** A reference to the
|
|
27
|
+
/** A reference to the host element. */
|
|
26
28
|
private readonly _elementRef;
|
|
29
|
+
/** A reference to the host element. */
|
|
30
|
+
readonly element: HTMLElement;
|
|
27
31
|
/** The TabList nested inside of the container. */
|
|
28
32
|
private readonly _widgets;
|
|
29
33
|
/** Text direction. */
|
|
30
34
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
31
35
|
/** Sorted UIPatterns of the child widgets */
|
|
32
|
-
readonly items: Signal<ToolbarWidgetPattern<V>[]>;
|
|
36
|
+
readonly items: _angular_core.Signal<ToolbarWidgetPattern<V>[]>;
|
|
33
37
|
/** Whether the toolbar is vertically or horizontally oriented. */
|
|
34
38
|
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
35
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Whether to allow disabled items to receive focus. When `true`, disabled items are
|
|
41
|
+
* focusable but not interactive. When `false`, disabled items are skipped during navigation.
|
|
42
|
+
*/
|
|
36
43
|
softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
37
44
|
/** Whether the toolbar is disabled. */
|
|
38
45
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -54,32 +61,39 @@ declare class Toolbar<V> {
|
|
|
54
61
|
/**
|
|
55
62
|
* A widget within a toolbar.
|
|
56
63
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
64
|
+
* The `ngToolbarWidget` directive should be applied to any native HTML element that acts
|
|
65
|
+
* as an interactive widget within an `ngToolbar` or `ngToolbarWidgetGroup`. It enables
|
|
66
|
+
* keyboard navigation and selection within the toolbar.
|
|
67
|
+
*
|
|
68
|
+
* ```html
|
|
69
|
+
* <button ngToolbarWidget value="action-id" [disabled]="isDisabled">
|
|
70
|
+
* Perform Action
|
|
71
|
+
* </button>
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @developerPreview 21.0
|
|
59
75
|
*/
|
|
60
76
|
declare class ToolbarWidget<V> implements OnInit, OnDestroy {
|
|
61
|
-
/** A reference to the
|
|
77
|
+
/** A reference to the host element. */
|
|
62
78
|
private readonly _elementRef;
|
|
79
|
+
/** A reference to the host element. */
|
|
80
|
+
readonly element: HTMLElement;
|
|
63
81
|
/** The parent Toolbar. */
|
|
64
82
|
private readonly _toolbar;
|
|
65
83
|
/** A unique identifier for the widget. */
|
|
66
|
-
private readonly _generatedId;
|
|
67
|
-
/** A unique identifier for the widget. */
|
|
68
84
|
readonly id: _angular_core.InputSignal<string>;
|
|
69
85
|
/** The parent Toolbar UIPattern. */
|
|
70
|
-
readonly toolbar: Signal<ToolbarPattern<any>>;
|
|
71
|
-
/** A reference to the widget element to be focused on navigation. */
|
|
72
|
-
readonly element: Signal<any>;
|
|
86
|
+
readonly toolbar: _angular_core.Signal<ToolbarPattern<any>>;
|
|
73
87
|
/** Whether the widget is disabled. */
|
|
74
88
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
75
89
|
/** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */
|
|
76
|
-
readonly hardDisabled: Signal<boolean>;
|
|
90
|
+
readonly hardDisabled: _angular_core.Signal<boolean>;
|
|
77
91
|
/** The optional ToolbarWidgetGroup this widget belongs to. */
|
|
78
92
|
readonly _group: ToolbarWidgetGroup<any> | null;
|
|
79
93
|
/** The value associated with the widget. */
|
|
80
94
|
readonly value: _angular_core.InputSignal<V>;
|
|
81
95
|
/** Whether the widget is currently active (focused). */
|
|
82
|
-
readonly active: Signal<boolean>;
|
|
96
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
83
97
|
/** Whether the widget is selected (only relevant in a selection group). */
|
|
84
98
|
readonly selected: () => boolean;
|
|
85
99
|
readonly group: SignalLike<ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined>;
|
|
@@ -91,16 +105,22 @@ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
|
|
|
91
105
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidget<any>, "[ngToolbarWidget]", ["ngToolbarWidget"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
92
106
|
}
|
|
93
107
|
/**
|
|
94
|
-
* A directive that groups toolbar widgets, used for more complex widgets like radio groups
|
|
95
|
-
* have their own internal navigation.
|
|
108
|
+
* A directive that groups toolbar widgets, used for more complex widgets like radio groups
|
|
109
|
+
* that have their own internal navigation.
|
|
110
|
+
*
|
|
111
|
+
* @developerPreview 21.0
|
|
96
112
|
*/
|
|
97
113
|
declare class ToolbarWidgetGroup<V> {
|
|
114
|
+
/** A reference to the host element. */
|
|
115
|
+
private readonly _elementRef;
|
|
116
|
+
/** A reference to the host element. */
|
|
117
|
+
readonly element: HTMLElement;
|
|
98
118
|
/** The parent Toolbar. */
|
|
99
119
|
private readonly _toolbar;
|
|
100
120
|
/** The list of child widgets within the group. */
|
|
101
121
|
private readonly _widgets;
|
|
102
122
|
/** The parent Toolbar UIPattern. */
|
|
103
|
-
readonly toolbar: Signal<ToolbarPattern<any> | undefined>;
|
|
123
|
+
readonly toolbar: _angular_core.Signal<ToolbarPattern<any> | undefined>;
|
|
104
124
|
/** Whether the widget group is disabled. */
|
|
105
125
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
106
126
|
/** The list of toolbar items within the group. */
|
package/types/tree.d.ts
CHANGED
|
@@ -1,72 +1,99 @@
|
|
|
1
1
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { OnInit, OnDestroy, Signal } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/aria/private';
|
|
5
5
|
import { TreePattern, DeferredContentAware, TreeItemPattern } from '@angular/aria/private';
|
|
6
6
|
import { ComboboxPopup } from './combobox.js';
|
|
7
7
|
|
|
8
8
|
interface HasElement {
|
|
9
|
-
element:
|
|
9
|
+
element: HTMLElement;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* A
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* A container that transforms nested lists into an accessible, ARIA-compliant tree structure.
|
|
13
|
+
* It manages the overall state of the tree, including selection, expansion, and keyboard
|
|
14
|
+
* navigation.
|
|
15
15
|
*
|
|
16
16
|
* ```html
|
|
17
17
|
* <ul ngTree [(value)]="selectedItems" [multi]="true">
|
|
18
|
-
* <
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* <ng-template ngTreeItemGroupContent>
|
|
23
|
-
* <li ngTreeItem [value]="'child1.1'">Child Item 1.1</li>
|
|
24
|
-
* <li ngTreeItem [value]="'child1.2'">Child Item 1.2</li>
|
|
25
|
-
* </ng-template>
|
|
26
|
-
* </ul>
|
|
27
|
-
* </li>
|
|
28
|
-
* <li ngTreeItem [value]="'leaf2'" [disabled]="true">Disabled Leaf Item 2</li>
|
|
18
|
+
* <ng-template
|
|
19
|
+
* [ngTemplateOutlet]="treeNodes"
|
|
20
|
+
* [ngTemplateOutletContext]="{nodes: treeData, parent: tree}"
|
|
21
|
+
* />
|
|
29
22
|
* </ul>
|
|
23
|
+
*
|
|
24
|
+
* <ng-template #treeNodes let-nodes="nodes" let-parent="parent">
|
|
25
|
+
* @for (node of nodes; track node.name) {
|
|
26
|
+
* <li ngTreeItem [parent]="parent" [value]="node.name" [label]="node.name">
|
|
27
|
+
* {{ node.name }}
|
|
28
|
+
* @if (node.children) {
|
|
29
|
+
* <ul role="group">
|
|
30
|
+
* <ng-template ngTreeItemGroup [ownedBy]="treeItem" #group="ngTreeItemGroup">
|
|
31
|
+
* <ng-template
|
|
32
|
+
* [ngTemplateOutlet]="treeNodes"
|
|
33
|
+
* [ngTemplateOutletContext]="{nodes: node.children, parent: group}"
|
|
34
|
+
* />
|
|
35
|
+
* </ng-template>
|
|
36
|
+
* </ul>
|
|
37
|
+
* }
|
|
38
|
+
* </li>
|
|
39
|
+
* }
|
|
40
|
+
* </ng-template>
|
|
30
41
|
* ```
|
|
42
|
+
*
|
|
43
|
+
* @developerPreview 21.0
|
|
31
44
|
*/
|
|
32
45
|
declare class Tree<V> {
|
|
33
|
-
/** A
|
|
34
|
-
private readonly
|
|
35
|
-
/** A
|
|
36
|
-
|
|
46
|
+
/** A reference to the host element. */
|
|
47
|
+
private readonly _elementRef;
|
|
48
|
+
/** A reference to the host element. */
|
|
49
|
+
readonly element: HTMLElement;
|
|
37
50
|
/** A reference to the parent combobox popup, if one exists. */
|
|
38
51
|
private readonly _popup;
|
|
39
|
-
/** A reference to the tree element. */
|
|
40
|
-
private readonly _elementRef;
|
|
41
52
|
/** All TreeItem instances within this tree. */
|
|
42
53
|
private readonly _unorderedItems;
|
|
54
|
+
/** A unique identifier for the tree. */
|
|
55
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
43
56
|
/** Orientation of the tree. */
|
|
44
57
|
readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
45
58
|
/** Whether multi-selection is allowed. */
|
|
46
59
|
readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
47
60
|
/** Whether the tree is disabled. */
|
|
48
61
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
49
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* The selection strategy used by the tree.
|
|
64
|
+
* - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).
|
|
65
|
+
* - `follow`: The focused item is automatically selected.
|
|
66
|
+
*/
|
|
50
67
|
readonly selectionMode: _angular_core.InputSignal<"explicit" | "follow">;
|
|
51
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* The focus strategy used by the tree.
|
|
70
|
+
* - `roving`: Focus is moved to the active item using `tabindex`.
|
|
71
|
+
* - `activedescendant`: Focus remains on the tree container, and `aria-activedescendant` is used to indicate the active item.
|
|
72
|
+
*/
|
|
52
73
|
readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
|
|
53
74
|
/** Whether navigation wraps. */
|
|
54
75
|
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
55
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Whether to allow disabled items to receive focus. When `true`, disabled items are
|
|
78
|
+
* focusable but not interactive. When `false`, disabled items are skipped during navigation.
|
|
79
|
+
*/
|
|
56
80
|
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
57
|
-
/**
|
|
81
|
+
/** The delay in seconds before the typeahead search is reset. */
|
|
58
82
|
readonly typeaheadDelay: _angular_core.InputSignal<number>;
|
|
59
|
-
/**
|
|
60
|
-
readonly
|
|
83
|
+
/** The values of the currently selected items. */
|
|
84
|
+
readonly values: _angular_core.ModelSignal<V[]>;
|
|
61
85
|
/** Text direction. */
|
|
62
86
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
63
87
|
/** Whether the tree is in navigation mode. */
|
|
64
|
-
readonly nav: _angular_core.
|
|
65
|
-
/**
|
|
88
|
+
readonly nav: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
89
|
+
/**
|
|
90
|
+
* The `aria-current` type. It can be used in navigation trees to indicate the currently active item.
|
|
91
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-current for more details.
|
|
92
|
+
*/
|
|
66
93
|
readonly currentType: _angular_core.InputSignal<"page" | "step" | "location" | "date" | "time" | "true" | "false">;
|
|
67
94
|
/** The UI pattern for the tree. */
|
|
68
95
|
readonly _pattern: TreePattern<V>;
|
|
69
|
-
/** Whether the tree has received focus
|
|
96
|
+
/** Whether the tree has received focus since it was rendered. */
|
|
70
97
|
private _hasFocused;
|
|
71
98
|
constructor();
|
|
72
99
|
onFocus(): void;
|
|
@@ -74,20 +101,32 @@ declare class Tree<V> {
|
|
|
74
101
|
unregister(child: TreeItem<V>): void;
|
|
75
102
|
scrollActiveItemIntoView(options?: ScrollIntoViewOptions): void;
|
|
76
103
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tree<any>, never>;
|
|
77
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tree<any>, "[ngTree]", ["ngTree"], { "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; }; "
|
|
104
|
+
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: {}; }]>;
|
|
78
105
|
}
|
|
79
106
|
/**
|
|
80
|
-
* A selectable and expandable
|
|
107
|
+
* A selectable and expandable item in an `ngTree`.
|
|
108
|
+
*
|
|
109
|
+
* The `ngTreeItem` directive represents an individual node within an `ngTree`. It can be
|
|
110
|
+
* selected, expanded (if it has children), and disabled. The `parent` input establishes
|
|
111
|
+
* the hierarchical relationship within the tree.
|
|
112
|
+
*
|
|
113
|
+
* ```html
|
|
114
|
+
* <li ngTreeItem [parent]="parentTreeOrGroup" value="item-id" label="Item Label">
|
|
115
|
+
* Item Label
|
|
116
|
+
* </li>
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @developerPreview 21.0
|
|
81
120
|
*/
|
|
82
121
|
declare class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestroy, HasElement {
|
|
83
|
-
/** A reference to the
|
|
122
|
+
/** A reference to the host element. */
|
|
84
123
|
private readonly _elementRef;
|
|
85
|
-
/** A
|
|
86
|
-
|
|
124
|
+
/** A reference to the host element. */
|
|
125
|
+
readonly element: HTMLElement;
|
|
87
126
|
/** The owned tree item group. */
|
|
88
127
|
private readonly _group;
|
|
89
|
-
/**
|
|
90
|
-
readonly
|
|
128
|
+
/** A unique identifier for the tree item. */
|
|
129
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
91
130
|
/** The value of the tree item. */
|
|
92
131
|
readonly value: _angular_core.InputSignal<V>;
|
|
93
132
|
/** The parent tree root or tree item group. */
|
|
@@ -96,12 +135,24 @@ declare class TreeItem<V> extends DeferredContentAware implements OnInit, OnDest
|
|
|
96
135
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
97
136
|
/** Whether the tree item is selectable. */
|
|
98
137
|
readonly selectable: _angular_core.InputSignal<boolean>;
|
|
138
|
+
/** Whether the tree item is expanded. */
|
|
139
|
+
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
99
140
|
/** Optional label for typeahead. Defaults to the element's textContent. */
|
|
100
141
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
101
142
|
/** Search term for typeahead. */
|
|
102
|
-
readonly searchTerm: Signal<
|
|
143
|
+
readonly searchTerm: Signal<string>;
|
|
103
144
|
/** The tree root. */
|
|
104
145
|
readonly tree: Signal<Tree<V>>;
|
|
146
|
+
/** Whether the item is active. */
|
|
147
|
+
readonly active: Signal<boolean>;
|
|
148
|
+
/** The level of the current item in a tree. */
|
|
149
|
+
readonly level: Signal<number>;
|
|
150
|
+
/** Whether the item is selected. */
|
|
151
|
+
readonly selected: Signal<boolean | undefined>;
|
|
152
|
+
/** Whether this item is visible due to all of its parents being expanded. */
|
|
153
|
+
readonly visible: Signal<boolean>;
|
|
154
|
+
/** Whether the tree is expanded. Use this value for aria-expanded. */
|
|
155
|
+
protected readonly _expanded: Signal<boolean | undefined>;
|
|
105
156
|
/** The UI pattern for this item. */
|
|
106
157
|
_pattern: TreeItemPattern<V>;
|
|
107
158
|
constructor();
|
|
@@ -110,12 +161,33 @@ declare class TreeItem<V> extends DeferredContentAware implements OnInit, OnDest
|
|
|
110
161
|
register(group: TreeItemGroup<V>): void;
|
|
111
162
|
unregister(): void;
|
|
112
163
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeItem<any>, never>;
|
|
113
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeItem<any>, "[ngTreeItem]", ["ngTreeItem"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "parent": { "alias": "parent"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
164
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TreeItem<any>, "[ngTreeItem]", ["ngTreeItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "parent": { "alias": "parent"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
|
|
114
165
|
}
|
|
115
166
|
/**
|
|
116
|
-
*
|
|
167
|
+
* Group that contains children tree items.
|
|
168
|
+
*
|
|
169
|
+
* The `ngTreeItemGroup` structural directive should be applied to an `ng-template` that
|
|
170
|
+
* wraps the child `ngTreeItem` elements. It is used to define a group of children for an
|
|
171
|
+
* expandable `ngTreeItem`. The `ownedBy` input links the group to its parent `ngTreeItem`.
|
|
172
|
+
*
|
|
173
|
+
* ```html
|
|
174
|
+
* <li ngTreeItem [value]="'parent-id'">
|
|
175
|
+
* Parent Item
|
|
176
|
+
* <ul role="group">
|
|
177
|
+
* <ng-template ngTreeItemGroup [ownedBy]="parentTreeItemRef">
|
|
178
|
+
* <li ngTreeItem [value]="'child-id'">Child Item</li>
|
|
179
|
+
* </ng-template>
|
|
180
|
+
* </ul>
|
|
181
|
+
* </li>
|
|
182
|
+
* ```
|
|
183
|
+
*
|
|
184
|
+
* @developerPreview 21.0
|
|
117
185
|
*/
|
|
118
186
|
declare class TreeItemGroup<V> implements OnInit, OnDestroy {
|
|
187
|
+
/** A reference to the host element. */
|
|
188
|
+
private readonly _elementRef;
|
|
189
|
+
/** A reference to the host element. */
|
|
190
|
+
readonly element: HTMLElement;
|
|
119
191
|
/** The DeferredContent host directive. */
|
|
120
192
|
private readonly _deferredContent;
|
|
121
193
|
/** All groupable items that are descendants of the group. */
|