@angular/aria 22.2.0-next.3 → 22.2.0-next.4
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/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_menu-chunk.mjs +6 -4
- package/fesm2022/_menu-chunk.mjs.map +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +34 -53
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +12 -12
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +11 -10
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +12 -12
- package/fesm2022/listbox.mjs +6 -6
- package/fesm2022/menu.mjs +18 -18
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +6 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +15 -15
- package/fesm2022/toolbar.mjs +11 -86
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +9 -9
- package/package.json +2 -2
- package/types/_menu-chunk.d.ts +15 -11
- package/types/_toolbar-chunk.d.ts +52 -48
- package/types/menu.d.ts +4 -4
- package/types/private.d.ts +6 -0
- package/types/toolbar.d.ts +26 -35
package/fesm2022/toolbar.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, computed, input, booleanAttribute,
|
|
2
|
+
import { inject, ElementRef, computed, input, booleanAttribute, signal, afterRenderEffect, afterNextRender, Directive, InjectionToken, contentChildren } from '@angular/core';
|
|
3
3
|
import { Directionality } from '@angular/cdk/bidi';
|
|
4
4
|
import { ToolbarPattern, ToolbarWidgetPattern, ToolbarWidgetGroupPattern } from './_toolbar-widget-group-chunk.mjs';
|
|
5
5
|
import { SortedCollection, reportViolations } from './_violations-chunk.mjs';
|
|
6
6
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
7
7
|
import '@angular/cdk/platform';
|
|
8
|
-
import './_list-chunk.mjs';
|
|
9
8
|
import './_list-navigation-chunk.mjs';
|
|
10
|
-
import './_list-typeahead-chunk.mjs';
|
|
11
9
|
import '@angular/core/primitives/signals';
|
|
12
10
|
|
|
13
11
|
class Toolbar {
|
|
@@ -39,29 +37,18 @@ class Toolbar {
|
|
|
39
37
|
} : {}),
|
|
40
38
|
transform: booleanAttribute
|
|
41
39
|
});
|
|
42
|
-
value = model([], ...(ngDevMode ? [{
|
|
43
|
-
debugName: "value"
|
|
44
|
-
}] : []));
|
|
45
40
|
_pattern = new ToolbarPattern({
|
|
46
41
|
...this,
|
|
47
42
|
items: this._itemPatterns,
|
|
48
43
|
activeItem: signal(undefined),
|
|
49
44
|
textDirection: this.textDirection,
|
|
50
45
|
element: () => this._elementRef.nativeElement,
|
|
51
|
-
getItem: e => this._getItem(e)
|
|
52
|
-
value: this.value
|
|
46
|
+
getItem: e => this._getItem(e)
|
|
53
47
|
});
|
|
54
48
|
constructor() {
|
|
55
49
|
afterRenderEffect({
|
|
56
50
|
write: () => this._pattern.setDefaultStateEffect()
|
|
57
51
|
});
|
|
58
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
59
|
-
afterRenderEffect({
|
|
60
|
-
read: () => {
|
|
61
|
-
reportViolations(this._pattern.validate(), this.element);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
52
|
afterNextRender(() => {
|
|
66
53
|
this._collection.startObserving(this.element);
|
|
67
54
|
});
|
|
@@ -74,7 +61,7 @@ class Toolbar {
|
|
|
74
61
|
}
|
|
75
62
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
76
63
|
minVersion: "12.0.0",
|
|
77
|
-
version: "22.2.0-next.
|
|
64
|
+
version: "22.2.0-next.4",
|
|
78
65
|
ngImport: i0,
|
|
79
66
|
type: Toolbar,
|
|
80
67
|
deps: [],
|
|
@@ -82,7 +69,7 @@ class Toolbar {
|
|
|
82
69
|
});
|
|
83
70
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
84
71
|
minVersion: "17.1.0",
|
|
85
|
-
version: "22.2.0-next.
|
|
72
|
+
version: "22.2.0-next.4",
|
|
86
73
|
type: Toolbar,
|
|
87
74
|
isStandalone: true,
|
|
88
75
|
selector: "[ngToolbar]",
|
|
@@ -114,18 +101,8 @@ class Toolbar {
|
|
|
114
101
|
isSignal: true,
|
|
115
102
|
isRequired: false,
|
|
116
103
|
transformFunction: null
|
|
117
|
-
},
|
|
118
|
-
value: {
|
|
119
|
-
classPropertyName: "value",
|
|
120
|
-
publicName: "value",
|
|
121
|
-
isSignal: true,
|
|
122
|
-
isRequired: false,
|
|
123
|
-
transformFunction: null
|
|
124
104
|
}
|
|
125
105
|
},
|
|
126
|
-
outputs: {
|
|
127
|
-
value: "valueChange"
|
|
128
|
-
},
|
|
129
106
|
host: {
|
|
130
107
|
attributes: {
|
|
131
108
|
"role": "toolbar"
|
|
@@ -148,7 +125,7 @@ class Toolbar {
|
|
|
148
125
|
}
|
|
149
126
|
i0.ɵɵngDeclareClassMetadata({
|
|
150
127
|
minVersion: "12.0.0",
|
|
151
|
-
version: "22.2.0-next.
|
|
128
|
+
version: "22.2.0-next.4",
|
|
152
129
|
ngImport: i0,
|
|
153
130
|
type: Toolbar,
|
|
154
131
|
decorators: [{
|
|
@@ -201,17 +178,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
201
178
|
alias: "wrap",
|
|
202
179
|
required: false
|
|
203
180
|
}]
|
|
204
|
-
}],
|
|
205
|
-
value: [{
|
|
206
|
-
type: i0.Input,
|
|
207
|
-
args: [{
|
|
208
|
-
isSignal: true,
|
|
209
|
-
alias: "value",
|
|
210
|
-
required: false
|
|
211
|
-
}]
|
|
212
|
-
}, {
|
|
213
|
-
type: i0.Output,
|
|
214
|
-
args: ["valueChange"]
|
|
215
181
|
}]
|
|
216
182
|
}
|
|
217
183
|
});
|
|
@@ -240,20 +206,15 @@ class ToolbarWidget {
|
|
|
240
206
|
_group = inject(TOOLBAR_WIDGET_GROUP, {
|
|
241
207
|
optional: true
|
|
242
208
|
});
|
|
243
|
-
value = input.required(...(ngDevMode ? [{
|
|
244
|
-
debugName: "value"
|
|
245
|
-
}] : []));
|
|
246
209
|
active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
|
|
247
210
|
debugName: "active"
|
|
248
211
|
}] : []));
|
|
249
|
-
selected = () => this._pattern.selected();
|
|
250
212
|
_groupPattern = () => this._group?._pattern;
|
|
251
213
|
_pattern = new ToolbarWidgetPattern({
|
|
252
214
|
...this,
|
|
253
215
|
group: this._groupPattern,
|
|
254
216
|
toolbar: this._toolbarPattern,
|
|
255
217
|
id: this.id,
|
|
256
|
-
value: this.value,
|
|
257
218
|
element: () => this.element
|
|
258
219
|
});
|
|
259
220
|
ngOnInit() {
|
|
@@ -264,7 +225,7 @@ class ToolbarWidget {
|
|
|
264
225
|
}
|
|
265
226
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
266
227
|
minVersion: "12.0.0",
|
|
267
|
-
version: "22.2.0-next.
|
|
228
|
+
version: "22.2.0-next.4",
|
|
268
229
|
ngImport: i0,
|
|
269
230
|
type: ToolbarWidget,
|
|
270
231
|
deps: [],
|
|
@@ -272,7 +233,7 @@ class ToolbarWidget {
|
|
|
272
233
|
});
|
|
273
234
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
274
235
|
minVersion: "17.1.0",
|
|
275
|
-
version: "22.2.0-next.
|
|
236
|
+
version: "22.2.0-next.4",
|
|
276
237
|
type: ToolbarWidget,
|
|
277
238
|
isStandalone: true,
|
|
278
239
|
selector: "[ngToolbarWidget]",
|
|
@@ -290,13 +251,6 @@ class ToolbarWidget {
|
|
|
290
251
|
isSignal: true,
|
|
291
252
|
isRequired: false,
|
|
292
253
|
transformFunction: null
|
|
293
|
-
},
|
|
294
|
-
value: {
|
|
295
|
-
classPropertyName: "value",
|
|
296
|
-
publicName: "value",
|
|
297
|
-
isSignal: true,
|
|
298
|
-
isRequired: true,
|
|
299
|
-
transformFunction: null
|
|
300
254
|
}
|
|
301
255
|
},
|
|
302
256
|
host: {
|
|
@@ -318,7 +272,7 @@ class ToolbarWidget {
|
|
|
318
272
|
}
|
|
319
273
|
i0.ɵɵngDeclareClassMetadata({
|
|
320
274
|
minVersion: "12.0.0",
|
|
321
|
-
version: "22.2.0-next.
|
|
275
|
+
version: "22.2.0-next.4",
|
|
322
276
|
ngImport: i0,
|
|
323
277
|
type: ToolbarWidget,
|
|
324
278
|
decorators: [{
|
|
@@ -353,14 +307,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
353
307
|
alias: "disabled",
|
|
354
308
|
required: false
|
|
355
309
|
}]
|
|
356
|
-
}],
|
|
357
|
-
value: [{
|
|
358
|
-
type: i0.Input,
|
|
359
|
-
args: [{
|
|
360
|
-
isSignal: true,
|
|
361
|
-
alias: "value",
|
|
362
|
-
required: true
|
|
363
|
-
}]
|
|
364
310
|
}]
|
|
365
311
|
}
|
|
366
312
|
});
|
|
@@ -387,12 +333,6 @@ class ToolbarWidgetGroup {
|
|
|
387
333
|
transform: booleanAttribute
|
|
388
334
|
});
|
|
389
335
|
_itemPatterns = () => this._widgets().map(w => w._pattern);
|
|
390
|
-
multi = input(false, {
|
|
391
|
-
...(ngDevMode ? {
|
|
392
|
-
debugName: "multi"
|
|
393
|
-
} : {}),
|
|
394
|
-
transform: booleanAttribute
|
|
395
|
-
});
|
|
396
336
|
_pattern = new ToolbarWidgetGroupPattern({
|
|
397
337
|
...this,
|
|
398
338
|
items: this._itemPatterns,
|
|
@@ -413,7 +353,7 @@ class ToolbarWidgetGroup {
|
|
|
413
353
|
}
|
|
414
354
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
415
355
|
minVersion: "12.0.0",
|
|
416
|
-
version: "22.2.0-next.
|
|
356
|
+
version: "22.2.0-next.4",
|
|
417
357
|
ngImport: i0,
|
|
418
358
|
type: ToolbarWidgetGroup,
|
|
419
359
|
deps: [],
|
|
@@ -421,7 +361,7 @@ class ToolbarWidgetGroup {
|
|
|
421
361
|
});
|
|
422
362
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
423
363
|
minVersion: "17.2.0",
|
|
424
|
-
version: "22.2.0-next.
|
|
364
|
+
version: "22.2.0-next.4",
|
|
425
365
|
type: ToolbarWidgetGroup,
|
|
426
366
|
isStandalone: true,
|
|
427
367
|
selector: "[ngToolbarWidgetGroup]",
|
|
@@ -432,13 +372,6 @@ class ToolbarWidgetGroup {
|
|
|
432
372
|
isSignal: true,
|
|
433
373
|
isRequired: false,
|
|
434
374
|
transformFunction: null
|
|
435
|
-
},
|
|
436
|
-
multi: {
|
|
437
|
-
classPropertyName: "multi",
|
|
438
|
-
publicName: "multi",
|
|
439
|
-
isSignal: true,
|
|
440
|
-
isRequired: false,
|
|
441
|
-
transformFunction: null
|
|
442
375
|
}
|
|
443
376
|
},
|
|
444
377
|
providers: [{
|
|
@@ -457,7 +390,7 @@ class ToolbarWidgetGroup {
|
|
|
457
390
|
}
|
|
458
391
|
i0.ɵɵngDeclareClassMetadata({
|
|
459
392
|
minVersion: "12.0.0",
|
|
460
|
-
version: "22.2.0-next.
|
|
393
|
+
version: "22.2.0-next.4",
|
|
461
394
|
ngImport: i0,
|
|
462
395
|
type: ToolbarWidgetGroup,
|
|
463
396
|
decorators: [{
|
|
@@ -489,14 +422,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
489
422
|
alias: "disabled",
|
|
490
423
|
required: false
|
|
491
424
|
}]
|
|
492
|
-
}],
|
|
493
|
-
multi: [{
|
|
494
|
-
type: i0.Input,
|
|
495
|
-
args: [{
|
|
496
|
-
isSignal: true,
|
|
497
|
-
alias: "multi",
|
|
498
|
-
required: false
|
|
499
|
-
}]
|
|
500
425
|
}]
|
|
501
426
|
}
|
|
502
427
|
});
|
package/fesm2022/toolbar.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget-group.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 {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n signal,\n} from '@angular/core';\nimport {ToolbarPattern, ToolbarWidgetPattern, SortedCollection, reportViolations} from '../private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport type {ToolbarWidget} from './toolbar-widget';\n\n/**\n * A toolbar widget container for a group of interactive widgets, such as\n * buttons or radio groups. It provides a single point of reference for keyboard navigation\n * and focus management. It supports various orientations and disabled states.\n *\n * ```html\n * <div ngToolbar orientation=\"horizontal\" [wrap]=\"true\">\n * <button ngToolbarWidget value=\"save\">Save</button>\n * <button ngToolbarWidget value=\"print\">Print</button>\n *\n * <div ngToolbarWidgetGroup [(value)]=\"selectedAlignment\">\n * <button ngToolbarWidget value=\"left\">Left</button>\n * <button ngToolbarWidget value=\"center\">Center</button>\n * <button ngToolbarWidget value=\"right\">Right</button>\n * </div>\n * </div>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbar]',\n exportAs: 'ngToolbar',\n host: {\n 'role': 'toolbar',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-orientation]': '_pattern.orientation()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class Toolbar<V> implements OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The collection of widgets in the toolbar. */\n readonly _collection = new SortedCollection<ToolbarWidget<V>>();\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Sorted UIPatterns of the child widgets */\n readonly _itemPatterns = computed<ToolbarWidgetPattern<V>[]>(() =>\n this._collection.orderedItems().map(widget => widget._pattern),\n );\n\n /** Whether the toolbar is vertically or horizontally oriented. */\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** Whether the toolbar is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The values of the selected widgets within the toolbar. */\n readonly value = model<V[]>([]);\n\n /** The toolbar UIPattern. */\n readonly _pattern: ToolbarPattern<V> = new ToolbarPattern<V>({\n ...this,\n items: this._itemPatterns,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n getItem: e => this._getItem(e),\n value: this.value,\n });\n\n constructor() {\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Finds the toolbar item associated with a given element. */\n private _getItem(element: Element) {\n return this._itemPatterns().find(item => item.element()?.contains(element));\n }\n}\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 {InjectionToken} from '@angular/core';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/** Token used to provide the `ToolbarWidgetGroup` directive. */\nexport const TOOLBAR_WIDGET_GROUP = new InjectionToken<ToolbarWidgetGroup<unknown>>(\n 'TOOLBAR_WIDGET_GROUP',\n);\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 {\n Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {\n ToolbarWidgetPattern,\n ToolbarWidgetGroupPattern,\n SignalLike,\n ToolbarPattern,\n} from '../private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Toolbar} from './toolbar';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/**\n * A widget within a toolbar.\n *\n * The `ngToolbarWidget` directive should be applied to any native HTML element that acts\n * as an interactive widget within an `ngToolbar` or `ngToolbarWidgetGroup`. It enables\n * keyboard navigation and selection within the toolbar.\n *\n * ```html\n * <button ngToolbarWidget value=\"action-id\" [disabled]=\"isDisabled\">\n * Perform Action\n * </button>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidget]',\n exportAs: 'ngToolbarWidget',\n host: {\n // Ensure the attribute is applied even when used as a host directive.\n 'ngToolbarWidget': '',\n '[attr.data-active]': 'active()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.inert]': 'hardDisabled() ? true : null',\n '[attr.disabled]': 'hardDisabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[id]': '_pattern.id()',\n },\n})\nexport class ToolbarWidget<V> implements OnInit, OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The parent Toolbar. */\n private readonly _toolbar = inject<Toolbar<V>>(Toolbar);\n\n /** A unique identifier for the widget. */\n readonly id = input(inject(_IdGenerator).getId('ng-toolbar-widget-', true));\n\n /** The parent Toolbar UIPattern. */\n readonly _toolbarPattern = computed<ToolbarPattern<V>>(() => this._toolbar._pattern);\n\n /** Whether the widget is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */\n readonly hardDisabled = computed(() => this._pattern.disabled() && !this._toolbar.softDisabled());\n\n /** The optional ToolbarWidgetGroup this widget belongs to. */\n readonly _group = inject<ToolbarWidgetGroup<V>>(TOOLBAR_WIDGET_GROUP, {optional: true});\n\n /** The value associated with the widget. */\n readonly value = input.required<V>();\n\n /** Whether the widget is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** Whether the widget is selected (only relevant in a selection group). */\n readonly selected = () => this._pattern.selected();\n\n private readonly _groupPattern: SignalLike<\n ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined\n > = () => this._group?._pattern;\n\n /** The ToolbarWidget UIPattern. */\n readonly _pattern = new ToolbarWidgetPattern<V>({\n ...this,\n group: this._groupPattern,\n toolbar: this._toolbarPattern,\n id: this.id,\n value: this.value,\n element: () => this.element,\n });\n\n ngOnInit() {\n this._toolbar._collection.register(this);\n }\n\n ngOnDestroy() {\n this._toolbar._collection.unregister(this);\n }\n}\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 {\n Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n contentChildren,\n afterRenderEffect,\n} from '@angular/core';\nimport {ToolbarWidgetPattern, ToolbarWidgetGroupPattern, reportViolations} from '../private';\nimport {Toolbar} from './toolbar';\nimport {ToolbarWidget} from './toolbar-widget';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\n\n/**\n * A directive that groups toolbar widgets, used for more complex widgets like radio groups\n * that have their own internal navigation.\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidgetGroup]',\n exportAs: 'ngToolbarWidgetGroup',\n providers: [{provide: TOOLBAR_WIDGET_GROUP, useExisting: ToolbarWidgetGroup}],\n})\nexport class ToolbarWidgetGroup<V> {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The parent Toolbar. */\n private readonly _toolbar = inject<Toolbar<V>>(Toolbar, {optional: true});\n\n /** The list of child widgets within the group. */\n private readonly _widgets = contentChildren<ToolbarWidget<V>>(ToolbarWidget, {descendants: true});\n\n /** The parent Toolbar UIPattern. */\n private readonly _toolbarPattern = computed(() => this._toolbar?._pattern);\n\n /** Whether the widget group is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The list of toolbar items within the group. */\n private readonly _itemPatterns = () => this._widgets().map(w => w._pattern);\n\n /** Whether the group allows multiple widgets to be selected. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** The ToolbarWidgetGroup UIPattern. */\n readonly _pattern = new ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V>({\n ...this,\n items: this._itemPatterns,\n toolbar: this._toolbarPattern,\n });\n\n constructor() {\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n if (!this._toolbar) {\n violations.push('ngToolbarWidgetGroup must be placed inside an ngToolbar container.');\n }\n reportViolations(violations, this.element);\n },\n });\n }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AAAA,IAAA,QAAA,EAAA,CAAA;MAAA,IAAA,EAAA,EAAA,CAAA,KAAA;AAAA,MAAA,IAAA,EAAA,CAAA;AAAA,QAAA,QAAA,EAAA,IAAA;AAAA,QAAA,KAAA,EAAA,UAAA;AAAA,QAAA,QAAA,EAAA;OAAA;AAAA,KAAA,CAAA;AAAA,IAAA,KAAA,EAAA,CAAA;MAAA,IAAA,EAAA,EAAA,CAAA,KAAA;AAAA,MAAA,IAAA,EAAA,CAAA;AAAA,QAAA,QAAA,EAAA,IAAA;AAAA,QAAA,KAAA,EAAA,OAAA;AAAA,QAAA,QAAA,EAAA;OAAA;KAAA;AAAA;AAAA,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"toolbar.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/toolbar/toolbar-widget-group.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 {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n signal,\n} from '@angular/core';\nimport {ToolbarPattern, ToolbarWidgetPattern, SortedCollection} from '../private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport type {ToolbarWidget} from './toolbar-widget';\n\n/**\n * A toolbar widget container for a group of interactive widgets, such as\n * buttons or radio groups. It provides a single point of reference for keyboard navigation\n * and focus management. It supports various orientations and disabled states.\n *\n * ```html\n * <div ngToolbar orientation=\"horizontal\" [wrap]=\"true\">\n * <button ngToolbarWidget>Save</button>\n * <button ngToolbarWidget>Print</button>\n *\n * <div ngToolbarWidgetGroup>\n * <button ngToolbarWidget>Left</button>\n * <button ngToolbarWidget>Center</button>\n * <button ngToolbarWidget>Right</button>\n * </div>\n * </div>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbar]',\n exportAs: 'ngToolbar',\n host: {\n 'role': 'toolbar',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-orientation]': '_pattern.orientation()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n})\nexport class Toolbar implements OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The collection of widgets in the toolbar. */\n readonly _collection = new SortedCollection<ToolbarWidget>();\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Sorted UIPatterns of the child widgets */\n readonly _itemPatterns = computed<ToolbarWidgetPattern[]>(() =>\n this._collection.orderedItems().map(widget => widget._pattern),\n );\n\n /** Whether the toolbar is vertically or horizontally oriented. */\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** Whether the toolbar is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n readonly wrap = input(true, {transform: booleanAttribute});\n\n /** The toolbar UIPattern. */\n readonly _pattern: ToolbarPattern = new ToolbarPattern({\n ...this,\n items: this._itemPatterns,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n getItem: e => this._getItem(e),\n });\n\n constructor() {\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Finds the toolbar item associated with a given element. */\n private _getItem(element: Element) {\n return this._itemPatterns().find(item => item.element()?.contains(element));\n }\n}\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 {InjectionToken} from '@angular/core';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/** Token used to provide the `ToolbarWidgetGroup` directive. */\nexport const TOOLBAR_WIDGET_GROUP = new InjectionToken<ToolbarWidgetGroup>('TOOLBAR_WIDGET_GROUP');\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 {\n Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {\n ToolbarWidgetPattern,\n ToolbarWidgetGroupPattern,\n SignalLike,\n ToolbarPattern,\n} from '../private';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {Toolbar} from './toolbar';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\nimport type {ToolbarWidgetGroup} from './toolbar-widget-group';\n\n/**\n * A widget within a toolbar.\n *\n * The `ngToolbarWidget` directive should be applied to any native HTML element that acts\n * as an interactive widget within an `ngToolbar` or `ngToolbarWidgetGroup`. It enables\n * keyboard navigation within the toolbar.\n *\n * ```html\n * <button ngToolbarWidget [disabled]=\"isDisabled\">\n * Perform Action\n * </button>\n * ```\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidget]',\n exportAs: 'ngToolbarWidget',\n host: {\n // Ensure the attribute is applied even when used as a host directive.\n 'ngToolbarWidget': '',\n '[attr.data-active]': 'active()',\n '[attr.tabindex]': '_pattern.tabIndex()',\n '[attr.inert]': 'hardDisabled() ? true : null',\n '[attr.disabled]': 'hardDisabled() ? true : null',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[id]': '_pattern.id()',\n },\n})\nexport class ToolbarWidget implements OnInit, OnDestroy {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The parent Toolbar. */\n private readonly _toolbar = inject<Toolbar>(Toolbar);\n\n /** A unique identifier for the widget. */\n readonly id = input(inject(_IdGenerator).getId('ng-toolbar-widget-', true));\n\n /** The parent Toolbar UIPattern. */\n readonly _toolbarPattern = computed<ToolbarPattern>(() => this._toolbar._pattern);\n\n /** Whether the widget is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */\n readonly hardDisabled = computed(() => this._pattern.disabled() && !this._toolbar.softDisabled());\n\n /** The optional ToolbarWidgetGroup this widget belongs to. */\n readonly _group = inject<ToolbarWidgetGroup>(TOOLBAR_WIDGET_GROUP, {optional: true});\n\n /** Whether the widget is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n private readonly _groupPattern: SignalLike<ToolbarWidgetGroupPattern | undefined> = () =>\n this._group?._pattern;\n\n /** The ToolbarWidget UIPattern. */\n readonly _pattern = new ToolbarWidgetPattern({\n ...this,\n group: this._groupPattern,\n toolbar: this._toolbarPattern,\n id: this.id,\n element: () => this.element,\n });\n\n ngOnInit() {\n this._toolbar._collection.register(this);\n }\n\n ngOnDestroy() {\n this._toolbar._collection.unregister(this);\n }\n}\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 {\n Directive,\n ElementRef,\n inject,\n computed,\n input,\n booleanAttribute,\n contentChildren,\n afterRenderEffect,\n} from '@angular/core';\nimport {ToolbarWidgetGroupPattern, reportViolations} from '../private';\nimport {Toolbar} from './toolbar';\nimport {ToolbarWidget} from './toolbar-widget';\nimport {TOOLBAR_WIDGET_GROUP} from './toolbar-tokens';\n\n/**\n * A directive that groups toolbar widgets, used for more complex widgets like radio groups\n * that have their own internal navigation.\n *\n * @see [Toolbar](guide/aria/toolbar)\n */\n@Directive({\n selector: '[ngToolbarWidgetGroup]',\n exportAs: 'ngToolbarWidgetGroup',\n providers: [{provide: TOOLBAR_WIDGET_GROUP, useExisting: ToolbarWidgetGroup}],\n})\nexport class ToolbarWidgetGroup {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The parent Toolbar. */\n private readonly _toolbar = inject<Toolbar>(Toolbar, {optional: true});\n\n /** The list of child widgets within the group. */\n private readonly _widgets = contentChildren<ToolbarWidget>(ToolbarWidget, {descendants: true});\n\n /** The parent Toolbar UIPattern. */\n private readonly _toolbarPattern = computed(() => this._toolbar?._pattern);\n\n /** Whether the widget group is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The list of toolbar items within the group. */\n private readonly _itemPatterns = () => this._widgets().map(w => w._pattern);\n\n /** The ToolbarWidgetGroup UIPattern. */\n readonly _pattern = new ToolbarWidgetGroupPattern({\n ...this,\n items: this._itemPatterns,\n toolbar: this._toolbarPattern,\n });\n\n constructor() {\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n if (!this._toolbar) {\n violations.push('ngToolbarWidgetGroup must be placed inside an ngToolbar container.');\n }\n reportViolations(violations, this.element);\n },\n });\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;MA0Da,OAAO,CAAA;AAED,EAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAGxC,EAAA,OAAO,GA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AA,MAAA,IAAA,EAAA,CAAA;AAAA,QAAA,QAAA,EAAA,IAAA;AAAA,QAAA,KAAA,EAAA,UAAA;AAAA,QAAA,QAAA,EAAA;OAAA;KAAA;AAAA;AAAA,CAAA,CAAA;;;;"}
|
package/fesm2022/tree.mjs
CHANGED
|
@@ -124,7 +124,7 @@ class Tree {
|
|
|
124
124
|
}
|
|
125
125
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
126
126
|
minVersion: "12.0.0",
|
|
127
|
-
version: "22.2.0-next.
|
|
127
|
+
version: "22.2.0-next.4",
|
|
128
128
|
ngImport: i0,
|
|
129
129
|
type: Tree,
|
|
130
130
|
deps: [],
|
|
@@ -132,7 +132,7 @@ class Tree {
|
|
|
132
132
|
});
|
|
133
133
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
134
134
|
minVersion: "17.1.0",
|
|
135
|
-
version: "22.2.0-next.
|
|
135
|
+
version: "22.2.0-next.4",
|
|
136
136
|
type: Tree,
|
|
137
137
|
isStandalone: true,
|
|
138
138
|
selector: "[ngTree]",
|
|
@@ -256,7 +256,7 @@ class Tree {
|
|
|
256
256
|
}
|
|
257
257
|
i0.ɵɵngDeclareClassMetadata({
|
|
258
258
|
minVersion: "12.0.0",
|
|
259
|
-
version: "22.2.0-next.
|
|
259
|
+
version: "22.2.0-next.4",
|
|
260
260
|
ngImport: i0,
|
|
261
261
|
type: Tree,
|
|
262
262
|
decorators: [{
|
|
@@ -420,7 +420,7 @@ class TreeItemGroup {
|
|
|
420
420
|
}
|
|
421
421
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
422
422
|
minVersion: "12.0.0",
|
|
423
|
-
version: "22.2.0-next.
|
|
423
|
+
version: "22.2.0-next.4",
|
|
424
424
|
ngImport: i0,
|
|
425
425
|
type: TreeItemGroup,
|
|
426
426
|
deps: [],
|
|
@@ -428,7 +428,7 @@ class TreeItemGroup {
|
|
|
428
428
|
});
|
|
429
429
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
430
430
|
minVersion: "17.1.0",
|
|
431
|
-
version: "22.2.0-next.
|
|
431
|
+
version: "22.2.0-next.4",
|
|
432
432
|
type: TreeItemGroup,
|
|
433
433
|
isStandalone: true,
|
|
434
434
|
selector: "ng-template[ngTreeItemGroup]",
|
|
@@ -450,7 +450,7 @@ class TreeItemGroup {
|
|
|
450
450
|
}
|
|
451
451
|
i0.ɵɵngDeclareClassMetadata({
|
|
452
452
|
minVersion: "12.0.0",
|
|
453
|
-
version: "22.2.0-next.
|
|
453
|
+
version: "22.2.0-next.4",
|
|
454
454
|
ngImport: i0,
|
|
455
455
|
type: TreeItemGroup,
|
|
456
456
|
decorators: [{
|
|
@@ -578,7 +578,7 @@ class TreeItem extends DeferredContentAware {
|
|
|
578
578
|
}
|
|
579
579
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
580
580
|
minVersion: "12.0.0",
|
|
581
|
-
version: "22.2.0-next.
|
|
581
|
+
version: "22.2.0-next.4",
|
|
582
582
|
ngImport: i0,
|
|
583
583
|
type: TreeItem,
|
|
584
584
|
deps: [],
|
|
@@ -586,7 +586,7 @@ class TreeItem extends DeferredContentAware {
|
|
|
586
586
|
});
|
|
587
587
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
588
588
|
minVersion: "17.1.0",
|
|
589
|
-
version: "22.2.0-next.
|
|
589
|
+
version: "22.2.0-next.4",
|
|
590
590
|
type: TreeItem,
|
|
591
591
|
isStandalone: true,
|
|
592
592
|
selector: "[ngTreeItem]",
|
|
@@ -668,7 +668,7 @@ class TreeItem extends DeferredContentAware {
|
|
|
668
668
|
}
|
|
669
669
|
i0.ɵɵngDeclareClassMetadata({
|
|
670
670
|
minVersion: "12.0.0",
|
|
671
|
-
version: "22.2.0-next.
|
|
671
|
+
version: "22.2.0-next.4",
|
|
672
672
|
ngImport: i0,
|
|
673
673
|
type: TreeItem,
|
|
674
674
|
decorators: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/aria",
|
|
3
|
-
"version": "22.2.0-next.
|
|
3
|
+
"version": "22.2.0-next.4",
|
|
4
4
|
"description": "Angular Aria",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/angular/components#readme",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@angular/cdk": "22.2.0-next.
|
|
15
|
+
"@angular/cdk": "22.2.0-next.4",
|
|
16
16
|
"@angular/core": "^22.0.0-0 || ^22.1.0-0 || ^22.2.0-0 || ^22.3.0-0 || ^23.0.0-0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
package/types/_menu-chunk.d.ts
CHANGED
|
@@ -3,16 +3,16 @@ import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
|
3
3
|
import { ListInputs, ListItem, List } from './_list-chunk.js';
|
|
4
4
|
|
|
5
5
|
/** The inputs for the MenuBarPattern class. */
|
|
6
|
-
interface MenuBarInputs<V> extends ListInputs<MenuItemPattern<V>, V> {
|
|
6
|
+
interface MenuBarInputs<V> extends ListInputs<MenuItemPattern<V>, V | undefined> {
|
|
7
7
|
/** The menu items contained in the menu. */
|
|
8
8
|
items: SignalLike<MenuItemPattern<V>[]>;
|
|
9
9
|
/** Callback function triggered when a menu item is selected. */
|
|
10
|
-
itemSelected?: (value: V) => void;
|
|
10
|
+
itemSelected?: (value: V | undefined) => void;
|
|
11
11
|
/** The text direction of the menu bar. */
|
|
12
12
|
textDirection: SignalLike<'ltr' | 'rtl'>;
|
|
13
13
|
}
|
|
14
14
|
/** The inputs for the MenuPattern class. */
|
|
15
|
-
interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value'> {
|
|
15
|
+
interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V | undefined>, 'value'> {
|
|
16
16
|
/** The unique ID of the menu. */
|
|
17
17
|
id: SignalLike<string>;
|
|
18
18
|
/** The menu items contained in the menu. */
|
|
@@ -20,7 +20,7 @@ interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value'>
|
|
|
20
20
|
/** A reference to the parent menu or menu trigger. */
|
|
21
21
|
parent: SignalLike<MenuTriggerPattern<V> | MenuItemPattern<V> | undefined>;
|
|
22
22
|
/** Callback function triggered when a menu item is selected. */
|
|
23
|
-
itemSelected?: (value: V) => void;
|
|
23
|
+
itemSelected?: (value: V | undefined) => void;
|
|
24
24
|
/** The text direction of the menu bar. */
|
|
25
25
|
textDirection: SignalLike<'ltr' | 'rtl'>;
|
|
26
26
|
/** The delay in milliseconds before expanding sub-menus on hover. */
|
|
@@ -38,7 +38,9 @@ interface MenuTriggerInputs<V> {
|
|
|
38
38
|
disabled: SignalLike<boolean>;
|
|
39
39
|
}
|
|
40
40
|
/** The inputs for the MenuItemPattern class. */
|
|
41
|
-
interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
|
|
41
|
+
interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable' | 'value'> {
|
|
42
|
+
/** The value of the menu item. */
|
|
43
|
+
value?: SignalLike<V | undefined>;
|
|
42
44
|
/** A reference to the parent menu or menu trigger. */
|
|
43
45
|
parent: SignalLike<MenuPattern<V> | MenuBarPattern<V> | undefined>;
|
|
44
46
|
/** A reference to the submenu associated with the menu item. */
|
|
@@ -58,17 +60,19 @@ declare class MenuPattern<V> {
|
|
|
58
60
|
/** Whether the menu is visible. */
|
|
59
61
|
readonly visible: SignalLike<boolean>;
|
|
60
62
|
/** Controls list behavior for the menu items. */
|
|
61
|
-
readonly listBehavior: List<MenuItemPattern<V>, V>;
|
|
63
|
+
readonly listBehavior: List<MenuItemPattern<V>, V | undefined>;
|
|
62
64
|
/** Whether the menu or any of its child elements are currently focused. */
|
|
63
65
|
readonly isFocused: WritableSignalLike<boolean>;
|
|
64
66
|
/** Whether the menu has received interaction. */
|
|
65
67
|
readonly hasBeenInteracted: WritableSignalLike<boolean>;
|
|
66
68
|
/** Whether the menu trigger has been hovered. */
|
|
67
69
|
readonly hasBeenHovered: WritableSignalLike<boolean>;
|
|
70
|
+
/** Items currently inside the menu. */
|
|
71
|
+
readonly items: () => MenuItemPattern<V>[];
|
|
68
72
|
/** Timeout used to open sub-menus on hover. */
|
|
69
|
-
_openTimeout
|
|
73
|
+
private _openTimeout;
|
|
70
74
|
/** Timeout used to close sub-menus on hover out. */
|
|
71
|
-
_closeTimeout
|
|
75
|
+
private _closeTimeout;
|
|
72
76
|
/** The tab index of the menu. */
|
|
73
77
|
readonly tabIndex: () => -1 | 0;
|
|
74
78
|
/** Whether the menu should be focused on mouse over. */
|
|
@@ -139,7 +143,7 @@ declare class MenuPattern<V> {
|
|
|
139
143
|
declare class MenuBarPattern<V> {
|
|
140
144
|
readonly inputs: MenuBarInputs<V>;
|
|
141
145
|
/** Controls list behavior for the menu items. */
|
|
142
|
-
readonly listBehavior: List<MenuItemPattern<V>, V>;
|
|
146
|
+
readonly listBehavior: List<MenuItemPattern<V>, V | undefined>;
|
|
143
147
|
/** The tab index of the menu. */
|
|
144
148
|
readonly tabIndex: () => -1 | 0;
|
|
145
149
|
/** The key used to navigate to the next item. */
|
|
@@ -227,10 +231,10 @@ declare class MenuTriggerPattern<V> {
|
|
|
227
231
|
}): void;
|
|
228
232
|
}
|
|
229
233
|
/** The menu item ui pattern class. */
|
|
230
|
-
declare class MenuItemPattern<V> implements ListItem<V> {
|
|
234
|
+
declare class MenuItemPattern<V> implements ListItem<V | undefined> {
|
|
231
235
|
readonly inputs: MenuItemInputs<V>;
|
|
232
236
|
/** The value of the menu item. */
|
|
233
|
-
readonly value: SignalLike<V>;
|
|
237
|
+
readonly value: SignalLike<V | undefined>;
|
|
234
238
|
/** The unique ID of the menu item. */
|
|
235
239
|
readonly id: SignalLike<string>;
|
|
236
240
|
/** Whether the menu item is disabled. */
|