@angular/aria 21.0.0-rc.0 → 21.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_adev_assets/aria-accordion.json +14 -14
- package/_adev_assets/aria-combobox.json +10 -10
- package/_adev_assets/aria-grid.json +81 -12
- package/_adev_assets/aria-listbox.json +3 -3
- package/_adev_assets/aria-menu.json +174 -74
- package/_adev_assets/aria-tabs.json +22 -22
- package/_adev_assets/aria-toolbar.json +99 -120
- package/_adev_assets/aria-tree.json +20 -16
- package/fesm2022/_widget-chunk.mjs +266 -144
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +12 -13
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +9 -7
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +61 -12
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +14 -15
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +117 -61
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +390 -399
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +16 -17
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +79 -44
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +22 -19
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -10
- package/types/_grid-chunk.d.ts +115 -53
- package/types/accordion.d.ts +4 -4
- package/types/combobox.d.ts +2 -2
- package/types/grid.d.ts +12 -3
- package/types/listbox.d.ts +3 -4
- package/types/menu.d.ts +33 -21
- package/types/private.d.ts +263 -341
- package/types/tabs.d.ts +4 -4
- package/types/toolbar.d.ts +29 -26
- package/types/tree.d.ts +5 -6
- package/_adev_assets/aria-radio-group.json +0 -389
- package/fesm2022/deferred-content.mjs +0 -99
- package/fesm2022/deferred-content.mjs.map +0 -1
- package/fesm2022/radio-group.mjs +0 -338
- package/fesm2022/radio-group.mjs.map +0 -1
- package/types/deferred-content.d.ts +0 -38
- package/types/radio-group.d.ts +0 -84
package/types/private.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal } from '@angular/core';
|
|
2
|
+
import { Signal, OnDestroy } from '@angular/core';
|
|
3
3
|
import { SignalLike, WritableSignalLike, KeyboardEventManager, PointerEventManager } from './_grid-chunk.js';
|
|
4
4
|
export { GridCellInputs, GridCellPattern, GridCellWidgetInputs, GridCellWidgetPattern, GridInputs, GridPattern, GridRowInputs, GridRowPattern, convertGetterSetterToWritableSignalLike } from './_grid-chunk.js';
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ interface ListFocusItem {
|
|
|
8
8
|
/** A unique identifier for the item. */
|
|
9
9
|
id: SignalLike<string>;
|
|
10
10
|
/** The html element that should receive focus. */
|
|
11
|
-
element: SignalLike<HTMLElement>;
|
|
11
|
+
element: SignalLike<HTMLElement | undefined>;
|
|
12
12
|
/** Whether an item is disabled. */
|
|
13
13
|
disabled: SignalLike<boolean>;
|
|
14
14
|
/** The index of the item in the list. */
|
|
@@ -24,8 +24,8 @@ interface ListFocusInputs<T extends ListFocusItem> {
|
|
|
24
24
|
items: SignalLike<T[]>;
|
|
25
25
|
/** The active item. */
|
|
26
26
|
activeItem: WritableSignalLike<T | undefined>;
|
|
27
|
-
/** Whether disabled items in the list should be
|
|
28
|
-
|
|
27
|
+
/** Whether disabled items in the list should be focusable. */
|
|
28
|
+
softDisabled: SignalLike<boolean>;
|
|
29
29
|
element: SignalLike<HTMLElement | undefined>;
|
|
30
30
|
}
|
|
31
31
|
/** Controls focus for a list of items. */
|
|
@@ -42,10 +42,10 @@ declare class ListFocus<T extends ListFocusItem> {
|
|
|
42
42
|
isListDisabled(): boolean;
|
|
43
43
|
/** The id of the current active item. */
|
|
44
44
|
getActiveDescendant(): string | undefined;
|
|
45
|
-
/** The
|
|
46
|
-
|
|
47
|
-
/** Returns the
|
|
48
|
-
|
|
45
|
+
/** The tab index for the list. */
|
|
46
|
+
getListTabIndex(): -1 | 0;
|
|
47
|
+
/** Returns the tab index for the given item. */
|
|
48
|
+
getItemTabIndex(item: T): -1 | 0;
|
|
49
49
|
/** Moves focus to the given item if it is focusable. */
|
|
50
50
|
focus(item: T, opts?: {
|
|
51
51
|
focusElement?: boolean;
|
|
@@ -98,6 +98,10 @@ declare class ListNavigation<T extends ListNavigationItem> {
|
|
|
98
98
|
last(opts?: {
|
|
99
99
|
focusElement?: boolean;
|
|
100
100
|
}): boolean;
|
|
101
|
+
/** Gets the first focusable item from the given list of items. */
|
|
102
|
+
peekFirst(items?: T[]): T | undefined;
|
|
103
|
+
/** Gets the last focusable item from the given list of items. */
|
|
104
|
+
peekLast(items?: T[]): T | undefined;
|
|
101
105
|
/** Advances to the next or previous focusable item in the list based on the given delta. */
|
|
102
106
|
private _advance;
|
|
103
107
|
/** Peeks the next or previous focusable item in the list based on the given delta. */
|
|
@@ -139,9 +143,9 @@ declare class ListSelection<T extends ListSelectionItem<V>, V> {
|
|
|
139
143
|
anchor: boolean;
|
|
140
144
|
}): void;
|
|
141
145
|
/** Deselects the item at the current active index. */
|
|
142
|
-
deselect(item?:
|
|
146
|
+
deselect(item?: ListSelectionItem<V>): void;
|
|
143
147
|
/** Toggles the item at the current active index. */
|
|
144
|
-
toggle(): void;
|
|
148
|
+
toggle(item?: ListSelectionItem<V>): void;
|
|
145
149
|
/** Toggles only the item at the current active index. */
|
|
146
150
|
toggleOne(): void;
|
|
147
151
|
/** Selects all items in the list. */
|
|
@@ -240,9 +244,9 @@ declare class List<T extends ListItem<V>, V> {
|
|
|
240
244
|
/** Whether the list is disabled. */
|
|
241
245
|
disabled: _angular_core.Signal<boolean>;
|
|
242
246
|
/** The id of the current active item. */
|
|
243
|
-
|
|
244
|
-
/** The
|
|
245
|
-
|
|
247
|
+
activeDescendant: _angular_core.Signal<string | undefined>;
|
|
248
|
+
/** The tab index of the list. */
|
|
249
|
+
tabIndex: _angular_core.Signal<0 | -1>;
|
|
246
250
|
/** The index of the currently active item in the list. */
|
|
247
251
|
activeIndex: _angular_core.Signal<number>;
|
|
248
252
|
/**
|
|
@@ -261,7 +265,7 @@ declare class List<T extends ListItem<V>, V> {
|
|
|
261
265
|
/** Whether the list should wrap. Used to disable wrapping while range selecting. */
|
|
262
266
|
private _wrap;
|
|
263
267
|
constructor(inputs: ListInputs<T, V>);
|
|
264
|
-
/** Returns the
|
|
268
|
+
/** Returns the tab index for the given item. */
|
|
265
269
|
getItemTabindex(item: T): 0 | -1;
|
|
266
270
|
/** Navigates to the first option in the list. */
|
|
267
271
|
first(opts?: NavOptions): void;
|
|
@@ -286,11 +290,11 @@ declare class List<T extends ListItem<V>, V> {
|
|
|
286
290
|
/** Sets the selection to only the current active item. */
|
|
287
291
|
selectOne(): void;
|
|
288
292
|
/** Deselects the currently active item in the list. */
|
|
289
|
-
deselect(): void;
|
|
293
|
+
deselect(item?: T): void;
|
|
290
294
|
/** Deselects all items in the list. */
|
|
291
295
|
deselectAll(): void;
|
|
292
296
|
/** Toggles the currently active item in the list. */
|
|
293
|
-
toggle(): void;
|
|
297
|
+
toggle(item?: T): void;
|
|
294
298
|
/** Toggles the currently active item in the list, deselecting all other items. */
|
|
295
299
|
toggleOne(): void;
|
|
296
300
|
/** Toggles the selection of all items in the list. */
|
|
@@ -338,12 +342,16 @@ interface ComboboxListboxControls<T extends ListItem<V>, V> {
|
|
|
338
342
|
id: () => string;
|
|
339
343
|
/** The ARIA role for the popup. */
|
|
340
344
|
role: SignalLike<'listbox' | 'tree' | 'grid'>;
|
|
345
|
+
/** Whether multiple items in the popup can be selected at once. */
|
|
346
|
+
multi: SignalLike<boolean>;
|
|
341
347
|
/** The ID of the active item in the popup. */
|
|
342
348
|
activeId: SignalLike<string | undefined>;
|
|
343
349
|
/** The list of items in the popup. */
|
|
344
350
|
items: SignalLike<T[]>;
|
|
345
351
|
/** Navigates to the given item in the popup. */
|
|
346
|
-
focus: (item: T
|
|
352
|
+
focus: (item: T, opts?: {
|
|
353
|
+
focusElement?: boolean;
|
|
354
|
+
}) => void;
|
|
347
355
|
/** Navigates to the next item in the popup. */
|
|
348
356
|
next: () => void;
|
|
349
357
|
/** Navigates to the previous item in the popup. */
|
|
@@ -354,14 +362,16 @@ interface ComboboxListboxControls<T extends ListItem<V>, V> {
|
|
|
354
362
|
last: () => void;
|
|
355
363
|
/** Selects the current item in the popup. */
|
|
356
364
|
select: (item?: T) => void;
|
|
365
|
+
/** Toggles the selection state of the given item in the popup. */
|
|
366
|
+
toggle: (item?: T) => void;
|
|
357
367
|
/** Clears the selection state of the popup. */
|
|
358
368
|
clearSelection: () => void;
|
|
359
369
|
/** Removes focus from any item in the popup. */
|
|
360
370
|
unfocus: () => void;
|
|
361
371
|
/** Returns the item corresponding to the given event. */
|
|
362
372
|
getItem: (e: PointerEvent) => T | undefined;
|
|
363
|
-
/** Returns the currently selected
|
|
364
|
-
|
|
373
|
+
/** Returns the currently selected items in the popup. */
|
|
374
|
+
getSelectedItems: () => T[];
|
|
365
375
|
/** Sets the value of the combobox based on the selected item. */
|
|
366
376
|
setValue: (value: V | undefined) => void;
|
|
367
377
|
}
|
|
@@ -373,11 +383,15 @@ interface ComboboxTreeControls<T extends ListItem<V>, V> extends ComboboxListbox
|
|
|
373
383
|
/** Collapses the currently active item in the popup. */
|
|
374
384
|
collapseItem: () => void;
|
|
375
385
|
/** Checks if the currently active item in the popup is expandable. */
|
|
376
|
-
isItemExpandable: () => boolean;
|
|
386
|
+
isItemExpandable: (item?: T) => boolean;
|
|
377
387
|
/** Expands all nodes in the tree. */
|
|
378
388
|
expandAll: () => void;
|
|
379
389
|
/** Collapses all nodes in the tree. */
|
|
380
390
|
collapseAll: () => void;
|
|
391
|
+
/** Toggles the expansion state of the currently active item in the popup. */
|
|
392
|
+
toggleExpansion: (item?: T) => void;
|
|
393
|
+
/** Whether the current active item is selectable. */
|
|
394
|
+
isItemSelectable: (item?: T) => boolean;
|
|
381
395
|
}
|
|
382
396
|
/** Controls the state of a combobox. */
|
|
383
397
|
declare class ComboboxPattern<T extends ListItem<V>, V> {
|
|
@@ -385,7 +399,7 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
|
|
|
385
399
|
/** Whether the combobox is expanded. */
|
|
386
400
|
expanded: _angular_core.WritableSignal<boolean>;
|
|
387
401
|
/** The ID of the active item in the combobox. */
|
|
388
|
-
|
|
402
|
+
activeDescendant: _angular_core.Signal<string | null>;
|
|
389
403
|
/** The currently highlighted item in the combobox. */
|
|
390
404
|
highlightedItem: _angular_core.WritableSignal<T | undefined>;
|
|
391
405
|
/** Whether the most recent input event was a deletion. */
|
|
@@ -402,8 +416,8 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
|
|
|
402
416
|
autocomplete: _angular_core.Signal<"both" | "list">;
|
|
403
417
|
/** The ARIA role of the popup associated with the combobox. */
|
|
404
418
|
hasPopup: _angular_core.Signal<"listbox" | "tree" | "grid" | null>;
|
|
405
|
-
/** Whether the combobox is
|
|
406
|
-
|
|
419
|
+
/** Whether the combobox is read-only. */
|
|
420
|
+
readonly: _angular_core.Signal<true | null>;
|
|
407
421
|
/** The keydown event manager for the combobox. */
|
|
408
422
|
keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
409
423
|
/** The pointerup event manager for the combobox. */
|
|
@@ -426,11 +440,14 @@ declare class ComboboxPattern<T extends ListItem<V>, V> {
|
|
|
426
440
|
/** Highlights the currently selected item in the combobox. */
|
|
427
441
|
highlight(): void;
|
|
428
442
|
/** Closes the combobox. */
|
|
429
|
-
close(
|
|
443
|
+
close(opts?: {
|
|
444
|
+
reset: boolean;
|
|
445
|
+
}): void;
|
|
430
446
|
/** Opens the combobox. */
|
|
431
447
|
open(nav?: {
|
|
432
448
|
first?: boolean;
|
|
433
449
|
last?: boolean;
|
|
450
|
+
selected?: boolean;
|
|
434
451
|
}): void;
|
|
435
452
|
/** Navigates to the next focusable item in the combobox popup. */
|
|
436
453
|
next(): void;
|
|
@@ -488,10 +505,10 @@ declare class OptionPattern<V> {
|
|
|
488
505
|
searchTerm: SignalLike<string>;
|
|
489
506
|
/** A reference to the parent listbox. */
|
|
490
507
|
listbox: SignalLike<ListboxPattern$1<V> | undefined>;
|
|
491
|
-
/** The
|
|
492
|
-
|
|
508
|
+
/** The tab index of the option. */
|
|
509
|
+
tabIndex: _angular_core.Signal<0 | -1 | undefined>;
|
|
493
510
|
/** The html element that should receive focus. */
|
|
494
|
-
element: SignalLike<HTMLElement>;
|
|
511
|
+
element: SignalLike<HTMLElement | undefined>;
|
|
495
512
|
constructor(args: OptionInputs<V>);
|
|
496
513
|
}
|
|
497
514
|
|
|
@@ -512,10 +529,10 @@ declare class ListboxPattern<V> {
|
|
|
512
529
|
disabled: _angular_core.Signal<boolean>;
|
|
513
530
|
/** Whether the listbox is readonly. */
|
|
514
531
|
readonly: SignalLike<boolean>;
|
|
515
|
-
/** The
|
|
516
|
-
|
|
532
|
+
/** The tab index of the listbox. */
|
|
533
|
+
tabIndex: SignalLike<-1 | 0>;
|
|
517
534
|
/** The id of the current active item. */
|
|
518
|
-
|
|
535
|
+
activeDescendant: _angular_core.Signal<string | undefined>;
|
|
519
536
|
/** Whether multiple items in the list can be selected at once. */
|
|
520
537
|
multi: SignalLike<boolean>;
|
|
521
538
|
/** The number of items in the listbox. */
|
|
@@ -570,8 +587,10 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
|
|
|
570
587
|
activeId: _angular_core.Signal<string | undefined>;
|
|
571
588
|
/** The list of options in the listbox. */
|
|
572
589
|
items: SignalLike<OptionPattern<V>[]>;
|
|
573
|
-
/** The
|
|
574
|
-
|
|
590
|
+
/** The tab index for the listbox. Always -1 because the combobox handles focus. */
|
|
591
|
+
tabIndex: SignalLike<-1 | 0>;
|
|
592
|
+
/** Whether multiple items in the list can be selected at once. */
|
|
593
|
+
multi: _angular_core.Signal<boolean>;
|
|
575
594
|
constructor(inputs: ComboboxListboxInputs<V>);
|
|
576
595
|
/** Noop. The combobox handles keydown events. */
|
|
577
596
|
onKeydown(_: KeyboardEvent): void;
|
|
@@ -580,7 +599,9 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
|
|
|
580
599
|
/** Noop. The combobox controls the open state. */
|
|
581
600
|
setDefaultState(): void;
|
|
582
601
|
/** Navigates to the specified item in the listbox. */
|
|
583
|
-
focus: (item: OptionPattern<V
|
|
602
|
+
focus: (item: OptionPattern<V>, opts?: {
|
|
603
|
+
focusElement?: boolean;
|
|
604
|
+
}) => void;
|
|
584
605
|
/** Navigates to the next focusable item in the listbox. */
|
|
585
606
|
next: () => void;
|
|
586
607
|
/** Navigates to the previous focusable item in the listbox. */
|
|
@@ -593,12 +614,14 @@ declare class ComboboxListboxPattern<V> extends ListboxPattern<V> implements Com
|
|
|
593
614
|
unfocus: () => void;
|
|
594
615
|
/** Selects the specified item in the listbox. */
|
|
595
616
|
select: (item?: OptionPattern<V>) => void;
|
|
617
|
+
/** Toggles the selection state of the given item in the listbox. */
|
|
618
|
+
toggle: (item?: OptionPattern<V>) => void;
|
|
596
619
|
/** Clears the selection in the listbox. */
|
|
597
620
|
clearSelection: () => void;
|
|
598
621
|
/** Retrieves the OptionPattern associated with a pointer event. */
|
|
599
622
|
getItem: (e: PointerEvent) => OptionPattern<V> | undefined;
|
|
600
|
-
/** Retrieves the currently selected
|
|
601
|
-
|
|
623
|
+
/** Retrieves the currently selected items in the listbox. */
|
|
624
|
+
getSelectedItems: () => OptionPattern<V>[];
|
|
602
625
|
/** Sets the value of the combobox listbox. */
|
|
603
626
|
setValue: (value: V | undefined) => void;
|
|
604
627
|
}
|
|
@@ -608,7 +631,9 @@ interface MenuBarInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'disa
|
|
|
608
631
|
/** The menu items contained in the menu. */
|
|
609
632
|
items: SignalLike<MenuItemPattern<V>[]>;
|
|
610
633
|
/** Callback function triggered when a menu item is selected. */
|
|
611
|
-
|
|
634
|
+
onSelect?: (value: V) => void;
|
|
635
|
+
/** The text direction of the menu bar. */
|
|
636
|
+
textDirection: SignalLike<'ltr' | 'rtl'>;
|
|
612
637
|
}
|
|
613
638
|
/** The inputs for the MenuPattern class. */
|
|
614
639
|
interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value' | 'disabled'> {
|
|
@@ -619,16 +644,18 @@ interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'value'
|
|
|
619
644
|
/** A reference to the parent menu or menu trigger. */
|
|
620
645
|
parent: SignalLike<MenuTriggerPattern<V> | MenuItemPattern<V> | undefined>;
|
|
621
646
|
/** Callback function triggered when a menu item is selected. */
|
|
622
|
-
|
|
647
|
+
onSelect?: (value: V) => void;
|
|
648
|
+
/** The text direction of the menu bar. */
|
|
649
|
+
textDirection: SignalLike<'ltr' | 'rtl'>;
|
|
623
650
|
}
|
|
624
651
|
/** The inputs for the MenuTriggerPattern class. */
|
|
625
652
|
interface MenuTriggerInputs<V> {
|
|
626
653
|
/** A reference to the menu trigger element. */
|
|
627
654
|
element: SignalLike<HTMLElement | undefined>;
|
|
628
|
-
/** A reference to the
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
|
|
655
|
+
/** A reference to the menu associated with the trigger. */
|
|
656
|
+
menu: SignalLike<MenuPattern<V> | undefined>;
|
|
657
|
+
/** The text direction of the menu bar. */
|
|
658
|
+
textDirection: SignalLike<'ltr' | 'rtl'>;
|
|
632
659
|
}
|
|
633
660
|
/** The inputs for the MenuItemPattern class. */
|
|
634
661
|
interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {
|
|
@@ -752,10 +779,10 @@ declare class MenuTriggerPattern<V> {
|
|
|
752
779
|
role: () => string;
|
|
753
780
|
/** Whether the menu trigger has a popup. */
|
|
754
781
|
hasPopup: () => boolean;
|
|
755
|
-
/** The
|
|
756
|
-
|
|
757
|
-
/** The
|
|
758
|
-
|
|
782
|
+
/** The menu associated with the trigger. */
|
|
783
|
+
menu: SignalLike<MenuPattern<V> | undefined>;
|
|
784
|
+
/** The tab index of the menu trigger. */
|
|
785
|
+
tabIndex: Signal<-1 | 0>;
|
|
759
786
|
/** Handles keyboard events for the menu trigger. */
|
|
760
787
|
keydownManager: Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
761
788
|
constructor(inputs: MenuTriggerInputs<V>);
|
|
@@ -787,11 +814,11 @@ declare class MenuItemPattern<V> implements ListItem<V> {
|
|
|
787
814
|
/** The search term for the menu item. */
|
|
788
815
|
searchTerm: SignalLike<string>;
|
|
789
816
|
/** The element of the menu item. */
|
|
790
|
-
element: SignalLike<HTMLElement>;
|
|
817
|
+
element: SignalLike<HTMLElement | undefined>;
|
|
791
818
|
/** Whether the menu item is active. */
|
|
792
819
|
isActive: Signal<boolean>;
|
|
793
|
-
/** The
|
|
794
|
-
|
|
820
|
+
/** The tab index of the menu item. */
|
|
821
|
+
tabIndex: Signal<0 | -1>;
|
|
795
822
|
/** The position of the menu item in the menu. */
|
|
796
823
|
index: Signal<number>;
|
|
797
824
|
/** Whether the menu item is expanded. */
|
|
@@ -820,274 +847,6 @@ declare class MenuItemPattern<V> implements ListItem<V> {
|
|
|
820
847
|
}): void;
|
|
821
848
|
}
|
|
822
849
|
|
|
823
|
-
/** Represents the required inputs for a radio button in a radio group. */
|
|
824
|
-
interface RadioButtonInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index' | 'selectable'> {
|
|
825
|
-
/** A reference to the parent radio group. */
|
|
826
|
-
group: SignalLike<RadioGroupPattern<V> | undefined>;
|
|
827
|
-
}
|
|
828
|
-
/** Represents a radio button within a radio group. */
|
|
829
|
-
declare class RadioButtonPattern<V> {
|
|
830
|
-
readonly inputs: RadioButtonInputs<V>;
|
|
831
|
-
/** A unique identifier for the radio button. */
|
|
832
|
-
readonly id: SignalLike<string>;
|
|
833
|
-
/** The value associated with the radio button. */
|
|
834
|
-
readonly value: SignalLike<V>;
|
|
835
|
-
/** The position of the radio button within the group. */
|
|
836
|
-
readonly index: SignalLike<number>;
|
|
837
|
-
/** Whether the radio button is currently the active one (focused). */
|
|
838
|
-
readonly active: _angular_core.Signal<boolean>;
|
|
839
|
-
/** Whether the radio button is selected. */
|
|
840
|
-
readonly selected: SignalLike<boolean>;
|
|
841
|
-
/** Whether the radio button is selectable. */
|
|
842
|
-
readonly selectable: () => boolean;
|
|
843
|
-
/** Whether the radio button is disabled. */
|
|
844
|
-
readonly disabled: SignalLike<boolean>;
|
|
845
|
-
/** A reference to the parent radio group. */
|
|
846
|
-
readonly group: SignalLike<RadioGroupPattern<V> | undefined>;
|
|
847
|
-
/** The tabindex of the radio button. */
|
|
848
|
-
readonly tabindex: _angular_core.Signal<0 | -1 | undefined>;
|
|
849
|
-
/** The HTML element associated with the radio button. */
|
|
850
|
-
readonly element: SignalLike<HTMLElement>;
|
|
851
|
-
/** The search term for typeahead. */
|
|
852
|
-
readonly searchTerm: () => string;
|
|
853
|
-
constructor(inputs: RadioButtonInputs<V>);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
/** Represents the required inputs for a radio group. */
|
|
857
|
-
type RadioGroupInputs<V> = Omit<ListInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode' | 'wrap' | 'typeaheadDelay'> & {
|
|
858
|
-
/** Whether the radio group is disabled. */
|
|
859
|
-
disabled: SignalLike<boolean>;
|
|
860
|
-
/** Whether the radio group is readonly. */
|
|
861
|
-
readonly: SignalLike<boolean>;
|
|
862
|
-
/** A function that returns the radio button associated with a given element. */
|
|
863
|
-
getItem: (e: PointerEvent) => RadioButtonPattern<V> | undefined;
|
|
864
|
-
};
|
|
865
|
-
/** Controls the state of a radio group. */
|
|
866
|
-
declare class RadioGroupPattern<V> {
|
|
867
|
-
readonly inputs: RadioGroupInputs<V>;
|
|
868
|
-
/** The list behavior for the radio group. */
|
|
869
|
-
readonly listBehavior: List<RadioButtonPattern<V>, V>;
|
|
870
|
-
/** Whether the radio group is vertically or horizontally oriented. */
|
|
871
|
-
readonly orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
872
|
-
/** Whether focus should wrap when navigating. */
|
|
873
|
-
readonly wrap: _angular_core.WritableSignal<boolean>;
|
|
874
|
-
/** The selection strategy used by the radio group. */
|
|
875
|
-
readonly selectionMode: _angular_core.WritableSignal<"follow" | "explicit">;
|
|
876
|
-
/** Whether the radio group is disabled. */
|
|
877
|
-
readonly disabled: _angular_core.Signal<boolean>;
|
|
878
|
-
/** The currently selected radio button. */
|
|
879
|
-
readonly selectedItem: _angular_core.Signal<RadioButtonPattern<V>>;
|
|
880
|
-
/** Whether the radio group is readonly. */
|
|
881
|
-
readonly readonly: _angular_core.Signal<boolean>;
|
|
882
|
-
/** The tabindex of the radio group. */
|
|
883
|
-
readonly tabindex: _angular_core.Signal<0 | -1>;
|
|
884
|
-
/** The id of the current active radio button (if using activedescendant). */
|
|
885
|
-
readonly activedescendant: _angular_core.Signal<string | undefined>;
|
|
886
|
-
/** The key used to navigate to the previous radio button. */
|
|
887
|
-
private readonly _prevKey;
|
|
888
|
-
/** The key used to navigate to the next radio button. */
|
|
889
|
-
private readonly _nextKey;
|
|
890
|
-
/** The keydown event manager for the radio group. */
|
|
891
|
-
readonly keydown: _angular_core.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
892
|
-
/** The pointerdown event manager for the radio group. */
|
|
893
|
-
readonly pointerdown: _angular_core.Signal<PointerEventManager<PointerEvent>>;
|
|
894
|
-
constructor(inputs: RadioGroupInputs<V>);
|
|
895
|
-
/** Handles keydown events for the radio group. */
|
|
896
|
-
onKeydown(event: KeyboardEvent): void;
|
|
897
|
-
/** Handles pointerdown events for the radio group. */
|
|
898
|
-
onPointerdown(event: PointerEvent): void;
|
|
899
|
-
/**
|
|
900
|
-
* Sets the radio group to its default initial state.
|
|
901
|
-
*
|
|
902
|
-
* Sets the active index to the selected radio button if one exists and is focusable.
|
|
903
|
-
* Otherwise, sets the active index to the first focusable radio button.
|
|
904
|
-
*/
|
|
905
|
-
setDefaultState(): void;
|
|
906
|
-
/** Validates the state of the radio group and returns a list of accessibility violations. */
|
|
907
|
-
validate(): string[];
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
/** Represents the required inputs for a toolbar widget in a toolbar. */
|
|
911
|
-
interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index' | 'selectable'> {
|
|
912
|
-
/** A reference to the parent toolbar. */
|
|
913
|
-
toolbar: SignalLike<ToolbarPattern<V>>;
|
|
914
|
-
}
|
|
915
|
-
declare class ToolbarWidgetPattern<V> implements ListItem<V> {
|
|
916
|
-
readonly inputs: ToolbarWidgetInputs<V>;
|
|
917
|
-
/** A unique identifier for the widget. */
|
|
918
|
-
readonly id: SignalLike<string>;
|
|
919
|
-
/** The html element that should receive focus. */
|
|
920
|
-
readonly element: SignalLike<HTMLElement>;
|
|
921
|
-
/** Whether the widget is disabled. */
|
|
922
|
-
readonly disabled: SignalLike<boolean>;
|
|
923
|
-
/** A reference to the parent toolbar. */
|
|
924
|
-
readonly toolbar: SignalLike<ToolbarPattern<V>>;
|
|
925
|
-
/** The tabindex of the widgdet. */
|
|
926
|
-
readonly tabindex: _angular_core.Signal<0 | -1>;
|
|
927
|
-
/** The text used by the typeahead search. */
|
|
928
|
-
readonly searchTerm: () => string;
|
|
929
|
-
/** The value associated with the widget. */
|
|
930
|
-
readonly value: () => V;
|
|
931
|
-
/** Whether the widget is selectable. */
|
|
932
|
-
readonly selectable: () => boolean;
|
|
933
|
-
/** The position of the widget within the toolbar. */
|
|
934
|
-
readonly index: _angular_core.Signal<number>;
|
|
935
|
-
/** Whether the widget is currently the active one (focused). */
|
|
936
|
-
readonly active: _angular_core.Signal<boolean>;
|
|
937
|
-
constructor(inputs: ToolbarWidgetInputs<V>);
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
/** An interface that allows sub patterns to expose the necessary controls for the toolbar. */
|
|
941
|
-
interface ToolbarWidgetGroupControls {
|
|
942
|
-
/** Whether the widget group is currently on the first item. */
|
|
943
|
-
isOnFirstItem(): boolean;
|
|
944
|
-
/** Whether the widget group is currently on the last item. */
|
|
945
|
-
isOnLastItem(): boolean;
|
|
946
|
-
/** Navigates to the next widget in the group. */
|
|
947
|
-
next(wrap: boolean): void;
|
|
948
|
-
/** Navigates to the previous widget in the group. */
|
|
949
|
-
prev(wrap: boolean): void;
|
|
950
|
-
/** Navigates to the first widget in the group. */
|
|
951
|
-
first(): void;
|
|
952
|
-
/** Navigates to the last widget in the group. */
|
|
953
|
-
last(): void;
|
|
954
|
-
/** Removes focus from the widget group. */
|
|
955
|
-
unfocus(): void;
|
|
956
|
-
/** Triggers the action of the currently active widget in the group. */
|
|
957
|
-
trigger(): void;
|
|
958
|
-
/** Navigates to the widget targeted by a pointer event. */
|
|
959
|
-
goto(event: PointerEvent): void;
|
|
960
|
-
/** Sets the widget group to its default initial state. */
|
|
961
|
-
setDefaultState(): void;
|
|
962
|
-
}
|
|
963
|
-
/** Represents the required inputs for a toolbar widget group. */
|
|
964
|
-
interface ToolbarWidgetGroupInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'value' | 'index' | 'selectable'> {
|
|
965
|
-
/** A reference to the parent toolbar. */
|
|
966
|
-
toolbar: SignalLike<ToolbarPattern<V> | undefined>;
|
|
967
|
-
/** The controls for the sub patterns associated with the toolbar. */
|
|
968
|
-
controls: SignalLike<ToolbarWidgetGroupControls | undefined>;
|
|
969
|
-
}
|
|
970
|
-
/** A group of widgets within a toolbar that provides nested navigation. */
|
|
971
|
-
declare class ToolbarWidgetGroupPattern<V> implements ListItem<V> {
|
|
972
|
-
readonly inputs: ToolbarWidgetGroupInputs<V>;
|
|
973
|
-
/** A unique identifier for the widget. */
|
|
974
|
-
readonly id: SignalLike<string>;
|
|
975
|
-
/** The html element that should receive focus. */
|
|
976
|
-
readonly element: SignalLike<HTMLElement>;
|
|
977
|
-
/** Whether the widget is disabled. */
|
|
978
|
-
readonly disabled: SignalLike<boolean>;
|
|
979
|
-
/** A reference to the parent toolbar. */
|
|
980
|
-
readonly toolbar: SignalLike<ToolbarPattern<V> | undefined>;
|
|
981
|
-
/** The text used by the typeahead search. */
|
|
982
|
-
readonly searchTerm: () => string;
|
|
983
|
-
/** The value associated with the widget. */
|
|
984
|
-
readonly value: () => V;
|
|
985
|
-
/** Whether the widget is selectable. */
|
|
986
|
-
readonly selectable: () => boolean;
|
|
987
|
-
/** The position of the widget within the toolbar. */
|
|
988
|
-
readonly index: _angular_core.Signal<number>;
|
|
989
|
-
/** The actions that can be performed on the widget group. */
|
|
990
|
-
readonly controls: SignalLike<ToolbarWidgetGroupControls>;
|
|
991
|
-
/** Default toolbar widget group controls when no controls provided. */
|
|
992
|
-
private readonly _defaultControls;
|
|
993
|
-
constructor(inputs: ToolbarWidgetGroupInputs<V>);
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
/** Represents the required inputs for a toolbar. */
|
|
997
|
-
type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'value' | 'selectionMode' | 'focusMode'> & {
|
|
998
|
-
/** A function that returns the toolbar item associated with a given element. */
|
|
999
|
-
getItem: (e: Element) => ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V> | undefined;
|
|
1000
|
-
};
|
|
1001
|
-
/** Controls the state of a toolbar. */
|
|
1002
|
-
declare class ToolbarPattern<V> {
|
|
1003
|
-
readonly inputs: ToolbarInputs<V>;
|
|
1004
|
-
/** The list behavior for the toolbar. */
|
|
1005
|
-
readonly listBehavior: List<ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>, V>;
|
|
1006
|
-
/** Whether the tablist is vertically or horizontally oriented. */
|
|
1007
|
-
readonly orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
1008
|
-
/** Whether disabled items in the group should be skipped when navigating. */
|
|
1009
|
-
readonly skipDisabled: SignalLike<boolean>;
|
|
1010
|
-
/** Whether the toolbar is disabled. */
|
|
1011
|
-
readonly disabled: _angular_core.Signal<boolean>;
|
|
1012
|
-
/** The tabindex of the toolbar (if using activedescendant). */
|
|
1013
|
-
readonly tabindex: _angular_core.Signal<0 | -1>;
|
|
1014
|
-
/** The id of the current active widget (if using activedescendant). */
|
|
1015
|
-
readonly activedescendant: _angular_core.Signal<string | undefined>;
|
|
1016
|
-
/** The key used to navigate to the previous widget. */
|
|
1017
|
-
private readonly _prevKey;
|
|
1018
|
-
/** The key used to navigate to the next widget. */
|
|
1019
|
-
private readonly _nextKey;
|
|
1020
|
-
/** The alternate key used to navigate to the previous widget. */
|
|
1021
|
-
private readonly _altPrevKey;
|
|
1022
|
-
/** The alternate key used to navigate to the next widget. */
|
|
1023
|
-
private readonly _altNextKey;
|
|
1024
|
-
/** The keydown event manager for the toolbar. */
|
|
1025
|
-
private readonly _keydown;
|
|
1026
|
-
/** The pointerdown event manager for the toolbar. */
|
|
1027
|
-
private readonly _pointerdown;
|
|
1028
|
-
/** Navigates to the next widget in the toolbar. */
|
|
1029
|
-
private _next;
|
|
1030
|
-
/** Navigates to the previous widget in the toolbar. */
|
|
1031
|
-
private _prev;
|
|
1032
|
-
private _groupNext;
|
|
1033
|
-
private _groupPrev;
|
|
1034
|
-
/** Triggers the action of the currently active widget. */
|
|
1035
|
-
private _trigger;
|
|
1036
|
-
/** Navigates to the first widget in the toolbar. */
|
|
1037
|
-
private _first;
|
|
1038
|
-
/** Navigates to the last widget in the toolbar. */
|
|
1039
|
-
private _last;
|
|
1040
|
-
/** Navigates to the widget targeted by a pointer event. */
|
|
1041
|
-
private _goto;
|
|
1042
|
-
constructor(inputs: ToolbarInputs<V>);
|
|
1043
|
-
/** Handles keydown events for the toolbar. */
|
|
1044
|
-
onKeydown(event: KeyboardEvent): void;
|
|
1045
|
-
/** Handles pointerdown events for the toolbar. */
|
|
1046
|
-
onPointerdown(event: PointerEvent): void;
|
|
1047
|
-
/**
|
|
1048
|
-
* Sets the toolbar to its default initial state.
|
|
1049
|
-
*
|
|
1050
|
-
* Sets the active index to the selected widget if one exists and is focusable.
|
|
1051
|
-
* Otherwise, sets the active index to the first focusable widget.
|
|
1052
|
-
*/
|
|
1053
|
-
setDefaultState(): void;
|
|
1054
|
-
/** Validates the state of the toolbar and returns a list of accessibility violations. */
|
|
1055
|
-
validate(): string[];
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
/** Represents the required inputs for a toolbar controlled radio group. */
|
|
1059
|
-
type ToolbarRadioGroupInputs<V> = RadioGroupInputs<V> & {
|
|
1060
|
-
/** The toolbar controlling the radio group. */
|
|
1061
|
-
toolbar: SignalLike<ToolbarPattern<V> | undefined>;
|
|
1062
|
-
};
|
|
1063
|
-
/** Controls the state of a radio group in a toolbar. */
|
|
1064
|
-
declare class ToolbarRadioGroupPattern<V> extends RadioGroupPattern<V> implements ToolbarWidgetGroupControls {
|
|
1065
|
-
readonly inputs: ToolbarRadioGroupInputs<V>;
|
|
1066
|
-
constructor(inputs: ToolbarRadioGroupInputs<V>);
|
|
1067
|
-
/** Noop. The toolbar handles keydown events. */
|
|
1068
|
-
onKeydown(_: KeyboardEvent): void;
|
|
1069
|
-
/** Noop. The toolbar handles pointerdown events. */
|
|
1070
|
-
onPointerdown(_: PointerEvent): void;
|
|
1071
|
-
/** Whether the radio group is currently on the first item. */
|
|
1072
|
-
isOnFirstItem(): boolean;
|
|
1073
|
-
/** Whether the radio group is currently on the last item. */
|
|
1074
|
-
isOnLastItem(): boolean;
|
|
1075
|
-
/** Navigates to the next radio button in the group. */
|
|
1076
|
-
next(wrap: boolean): void;
|
|
1077
|
-
/** Navigates to the previous radio button in the group. */
|
|
1078
|
-
prev(wrap: boolean): void;
|
|
1079
|
-
/** Navigates to the first radio button in the group. */
|
|
1080
|
-
first(): void;
|
|
1081
|
-
/** Navigates to the last radio button in the group. */
|
|
1082
|
-
last(): void;
|
|
1083
|
-
/** Removes focus from the radio group. */
|
|
1084
|
-
unfocus(): void;
|
|
1085
|
-
/** Triggers the action of the currently active radio button in the group. */
|
|
1086
|
-
trigger(): void;
|
|
1087
|
-
/** Navigates to the radio button targeted by a pointer event. */
|
|
1088
|
-
goto(e: PointerEvent): void;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
850
|
/** Represents an item that can be expanded or collapsed. */
|
|
1092
851
|
interface ExpansionItem {
|
|
1093
852
|
/** Whether the item is expandable. */
|
|
@@ -1197,7 +956,7 @@ declare class TabPattern {
|
|
|
1197
956
|
/** Whether the tab is disabled. */
|
|
1198
957
|
readonly disabled: SignalLike<boolean>;
|
|
1199
958
|
/** The html element that should receive focus. */
|
|
1200
|
-
readonly element: SignalLike<HTMLElement>;
|
|
959
|
+
readonly element: SignalLike<HTMLElement | undefined>;
|
|
1201
960
|
/** Whether the tab is selectable. */
|
|
1202
961
|
readonly selectable: () => boolean;
|
|
1203
962
|
/** The text used by the typeahead search. */
|
|
@@ -1212,8 +971,8 @@ declare class TabPattern {
|
|
|
1212
971
|
readonly active: _angular_core.Signal<boolean>;
|
|
1213
972
|
/** Whether the tab is selected. */
|
|
1214
973
|
readonly selected: _angular_core.Signal<boolean>;
|
|
1215
|
-
/** The
|
|
1216
|
-
readonly
|
|
974
|
+
/** The tab index of the tab. */
|
|
975
|
+
readonly tabIndex: _angular_core.Signal<0 | -1>;
|
|
1217
976
|
/** The id of the tabpanel associated with the tab. */
|
|
1218
977
|
readonly controls: _angular_core.Signal<string | undefined>;
|
|
1219
978
|
constructor(inputs: TabInputs);
|
|
@@ -1235,8 +994,8 @@ declare class TabPanelPattern {
|
|
|
1235
994
|
readonly labelManager: LabelControl;
|
|
1236
995
|
/** Whether the tabpanel is hidden. */
|
|
1237
996
|
readonly hidden: _angular_core.Signal<boolean>;
|
|
1238
|
-
/** The
|
|
1239
|
-
readonly
|
|
997
|
+
/** The tab index of this tabpanel. */
|
|
998
|
+
readonly tabIndex: _angular_core.Signal<0 | -1>;
|
|
1240
999
|
/** The aria-labelledby value for this tabpanel. */
|
|
1241
1000
|
readonly labelledBy: _angular_core.Signal<string | undefined>;
|
|
1242
1001
|
constructor(inputs: TabPanelInputs);
|
|
@@ -1254,10 +1013,10 @@ declare class TabListPattern {
|
|
|
1254
1013
|
readonly orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
1255
1014
|
/** Whether the tablist is disabled. */
|
|
1256
1015
|
readonly disabled: SignalLike<boolean>;
|
|
1257
|
-
/** The
|
|
1258
|
-
readonly
|
|
1016
|
+
/** The tab index of the tablist. */
|
|
1017
|
+
readonly tabIndex: _angular_core.Signal<0 | -1>;
|
|
1259
1018
|
/** The id of the current active tab. */
|
|
1260
|
-
readonly
|
|
1019
|
+
readonly activeDescendant: _angular_core.Signal<string | undefined>;
|
|
1261
1020
|
/** Whether selection should follow focus. */
|
|
1262
1021
|
readonly followFocus: _angular_core.Signal<boolean>;
|
|
1263
1022
|
/** The key used to navigate to the previous tab in the tablist. */
|
|
@@ -1286,6 +1045,125 @@ declare class TabListPattern {
|
|
|
1286
1045
|
private _getItem;
|
|
1287
1046
|
}
|
|
1288
1047
|
|
|
1048
|
+
/** Represents the required inputs for a toolbar widget group. */
|
|
1049
|
+
interface ToolbarWidgetGroupInputs<T extends ListItem<V>, V> {
|
|
1050
|
+
/** A reference to the parent toolbar. */
|
|
1051
|
+
toolbar: SignalLike<ToolbarPattern<V> | undefined>;
|
|
1052
|
+
/** Whether the widget group is disabled. */
|
|
1053
|
+
disabled: SignalLike<boolean>;
|
|
1054
|
+
/** The list of items within the widget group. */
|
|
1055
|
+
items: SignalLike<T[]>;
|
|
1056
|
+
/** Whether the group allows multiple widgets to be selected. */
|
|
1057
|
+
multi: SignalLike<boolean>;
|
|
1058
|
+
}
|
|
1059
|
+
/** A group of widgets within a toolbar that provides nested navigation. */
|
|
1060
|
+
declare class ToolbarWidgetGroupPattern<T extends ListItem<V>, V> {
|
|
1061
|
+
readonly inputs: ToolbarWidgetGroupInputs<T, V>;
|
|
1062
|
+
/** Whether the widget is disabled. */
|
|
1063
|
+
readonly disabled: () => boolean;
|
|
1064
|
+
/** A reference to the parent toolbar. */
|
|
1065
|
+
readonly toolbar: () => ToolbarPattern<V> | undefined;
|
|
1066
|
+
/** Whether the group allows multiple widgets to be selected. */
|
|
1067
|
+
readonly multi: () => boolean;
|
|
1068
|
+
readonly searchTerm: () => string;
|
|
1069
|
+
readonly value: () => V;
|
|
1070
|
+
readonly selectable: () => boolean;
|
|
1071
|
+
readonly element: () => undefined;
|
|
1072
|
+
constructor(inputs: ToolbarWidgetGroupInputs<T, V>);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/** Represents the required inputs for a toolbar widget in a toolbar. */
|
|
1076
|
+
interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index' | 'selectable'> {
|
|
1077
|
+
/** A reference to the parent toolbar. */
|
|
1078
|
+
toolbar: SignalLike<ToolbarPattern<V>>;
|
|
1079
|
+
/** A reference to the parent widget group. */
|
|
1080
|
+
group: SignalLike<ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined>;
|
|
1081
|
+
}
|
|
1082
|
+
declare class ToolbarWidgetPattern<V> implements ListItem<V> {
|
|
1083
|
+
readonly inputs: ToolbarWidgetInputs<V>;
|
|
1084
|
+
/** A unique identifier for the widget. */
|
|
1085
|
+
readonly id: () => string;
|
|
1086
|
+
/** The html element that should receive focus. */
|
|
1087
|
+
readonly element: () => HTMLElement | undefined;
|
|
1088
|
+
/** Whether the widget is disabled. */
|
|
1089
|
+
readonly disabled: () => boolean;
|
|
1090
|
+
/** A reference to the parent toolbar. */
|
|
1091
|
+
readonly group: () => ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined;
|
|
1092
|
+
/** A reference to the toolbar containing the widget. */
|
|
1093
|
+
readonly toolbar: () => ToolbarPattern<V>;
|
|
1094
|
+
/** The tabindex of the widget. */
|
|
1095
|
+
readonly tabIndex: _angular_core.Signal<0 | -1>;
|
|
1096
|
+
/** The text used by the typeahead search. */
|
|
1097
|
+
readonly searchTerm: () => string;
|
|
1098
|
+
/** The value associated with the widget. */
|
|
1099
|
+
readonly value: () => V;
|
|
1100
|
+
/** Whether the widget is selectable. */
|
|
1101
|
+
readonly selectable: () => boolean;
|
|
1102
|
+
/** The position of the widget within the toolbar. */
|
|
1103
|
+
readonly index: _angular_core.Signal<number>;
|
|
1104
|
+
/** Whether the widget is selected (only relevant in a selection group). */
|
|
1105
|
+
readonly selected: _angular_core.Signal<boolean>;
|
|
1106
|
+
/** Whether the widget is currently the active one (focused). */
|
|
1107
|
+
readonly active: SignalLike<boolean>;
|
|
1108
|
+
constructor(inputs: ToolbarWidgetInputs<V>);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
/** Represents the required inputs for a toolbar. */
|
|
1112
|
+
type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'value' | 'selectionMode' | 'focusMode'> & {
|
|
1113
|
+
/** A function that returns the toolbar item associated with a given element. */
|
|
1114
|
+
getItem: (e: Element) => ToolbarWidgetPattern<V> | undefined;
|
|
1115
|
+
};
|
|
1116
|
+
/** Controls the state of a toolbar. */
|
|
1117
|
+
declare class ToolbarPattern<V> {
|
|
1118
|
+
readonly inputs: ToolbarInputs<V>;
|
|
1119
|
+
/** The list behavior for the toolbar. */
|
|
1120
|
+
readonly listBehavior: List<ToolbarWidgetPattern<V>, V>;
|
|
1121
|
+
/** Whether the tablist is vertically or horizontally oriented. */
|
|
1122
|
+
readonly orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
1123
|
+
/** Whether disabled items in the group should be focusable. */
|
|
1124
|
+
readonly softDisabled: SignalLike<boolean>;
|
|
1125
|
+
/** Whether the toolbar is disabled. */
|
|
1126
|
+
readonly disabled: _angular_core.Signal<boolean>;
|
|
1127
|
+
/** The tab index of the toolbar (if using activedescendant). */
|
|
1128
|
+
readonly tabIndex: _angular_core.Signal<0 | -1>;
|
|
1129
|
+
/** The id of the current active widget (if using activedescendant). */
|
|
1130
|
+
readonly activeDescendant: _angular_core.Signal<string | undefined>;
|
|
1131
|
+
/** The currently active item in the toolbar. */
|
|
1132
|
+
readonly activeItem: () => ToolbarWidgetPattern<V> | undefined;
|
|
1133
|
+
/** The key used to navigate to the previous widget. */
|
|
1134
|
+
private readonly _prevKey;
|
|
1135
|
+
/** The key used to navigate to the next widget. */
|
|
1136
|
+
private readonly _nextKey;
|
|
1137
|
+
/** The alternate key used to navigate to the previous widget. */
|
|
1138
|
+
private readonly _altPrevKey;
|
|
1139
|
+
/** The alternate key used to navigate to the next widget. */
|
|
1140
|
+
private readonly _altNextKey;
|
|
1141
|
+
/** The keydown event manager for the toolbar. */
|
|
1142
|
+
private readonly _keydown;
|
|
1143
|
+
/** Navigates to the next widget in a widget group. */
|
|
1144
|
+
private _groupNext;
|
|
1145
|
+
/** Navigates to the previous widget in a widget group. */
|
|
1146
|
+
private _groupPrev;
|
|
1147
|
+
/** Navigates to the widget targeted by a pointer event. */
|
|
1148
|
+
private _goto;
|
|
1149
|
+
select(): void;
|
|
1150
|
+
constructor(inputs: ToolbarInputs<V>);
|
|
1151
|
+
/** Handles keydown events for the toolbar. */
|
|
1152
|
+
onKeydown(event: KeyboardEvent): void;
|
|
1153
|
+
onPointerdown(event: PointerEvent): void;
|
|
1154
|
+
/** Handles click events for the toolbar. */
|
|
1155
|
+
onClick(event: MouseEvent): void;
|
|
1156
|
+
/**
|
|
1157
|
+
* Sets the toolbar to its default initial state.
|
|
1158
|
+
*
|
|
1159
|
+
* Sets the active index to the selected widget if one exists and is focusable.
|
|
1160
|
+
* Otherwise, sets the active index to the first focusable widget.
|
|
1161
|
+
*/
|
|
1162
|
+
setDefaultState(): void;
|
|
1163
|
+
/** Validates the state of the toolbar and returns a list of accessibility violations. */
|
|
1164
|
+
validate(): string[];
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1289
1167
|
/** Inputs of the AccordionGroupPattern. */
|
|
1290
1168
|
type AccordionGroupInputs = Omit<ListNavigationInputs<AccordionTriggerPattern> & ListFocusInputs<AccordionTriggerPattern> & Omit<ListExpansionInputs, 'items'>, 'focusMode'>;
|
|
1291
1169
|
interface AccordionGroupPattern extends AccordionGroupInputs {
|
|
@@ -1327,8 +1205,8 @@ declare class AccordionTriggerPattern {
|
|
|
1327
1205
|
active: _angular_core.Signal<boolean>;
|
|
1328
1206
|
/** Id of the accordion panel controlled by the trigger. */
|
|
1329
1207
|
controls: _angular_core.Signal<string | undefined>;
|
|
1330
|
-
/** The
|
|
1331
|
-
|
|
1208
|
+
/** The tab index of the trigger. */
|
|
1209
|
+
tabIndex: _angular_core.Signal<-1 | 0>;
|
|
1332
1210
|
/** Whether the trigger is disabled. Disabling an accordion group disables all the triggers. */
|
|
1333
1211
|
disabled: _angular_core.Signal<boolean>;
|
|
1334
1212
|
/** The index of the trigger within its accordion group. */
|
|
@@ -1390,7 +1268,7 @@ declare class TreeItemPattern<V> implements ListItem<V>, ExpansionItem {
|
|
|
1390
1268
|
/** The value of this item. */
|
|
1391
1269
|
readonly value: SignalLike<V>;
|
|
1392
1270
|
/** A reference to the item element. */
|
|
1393
|
-
readonly element: SignalLike<HTMLElement>;
|
|
1271
|
+
readonly element: SignalLike<HTMLElement | undefined>;
|
|
1394
1272
|
/** Whether the item is disabled. */
|
|
1395
1273
|
readonly disabled: SignalLike<boolean>;
|
|
1396
1274
|
/** The text used by the typeahead search. */
|
|
@@ -1418,15 +1296,15 @@ declare class TreeItemPattern<V> implements ListItem<V>, ExpansionItem {
|
|
|
1418
1296
|
/** Whether this item is currently expanded. */
|
|
1419
1297
|
readonly expanded: _angular_core.Signal<boolean>;
|
|
1420
1298
|
/** Whether this item is visible. */
|
|
1421
|
-
readonly visible:
|
|
1299
|
+
readonly visible: SignalLike<boolean>;
|
|
1422
1300
|
/** The number of items under the same parent at the same level. */
|
|
1423
1301
|
readonly setsize: _angular_core.Signal<number>;
|
|
1424
1302
|
/** The position of this item among its siblings (1-based). */
|
|
1425
1303
|
readonly posinset: _angular_core.Signal<number>;
|
|
1426
1304
|
/** Whether the item is active. */
|
|
1427
1305
|
readonly active: _angular_core.Signal<boolean>;
|
|
1428
|
-
/** The
|
|
1429
|
-
readonly
|
|
1306
|
+
/** The tab index of the item. */
|
|
1307
|
+
readonly tabIndex: _angular_core.Signal<0 | -1>;
|
|
1430
1308
|
/** Whether the item is selected. */
|
|
1431
1309
|
readonly selected: SignalLike<boolean | undefined>;
|
|
1432
1310
|
/** The current type of this item. */
|
|
@@ -1464,10 +1342,12 @@ declare class TreePattern<V> {
|
|
|
1464
1342
|
readonly level: () => number;
|
|
1465
1343
|
/** The root is always expanded. */
|
|
1466
1344
|
readonly expanded: () => boolean;
|
|
1467
|
-
/** The
|
|
1468
|
-
readonly
|
|
1345
|
+
/** The roow is always visible. */
|
|
1346
|
+
readonly visible: () => boolean;
|
|
1347
|
+
/** The tab index of the tree. */
|
|
1348
|
+
readonly tabIndex: SignalLike<-1 | 0>;
|
|
1469
1349
|
/** The id of the current active item. */
|
|
1470
|
-
readonly
|
|
1350
|
+
readonly activeDescendant: _angular_core.Signal<string | undefined>;
|
|
1471
1351
|
/** The direct children of the root (top-level tree items). */
|
|
1472
1352
|
readonly children: _angular_core.Signal<TreeItemPattern<V>[]>;
|
|
1473
1353
|
/** All currently visible tree items. An item is visible if their parent is expanded. */
|
|
@@ -1502,8 +1382,8 @@ declare class TreePattern<V> {
|
|
|
1502
1382
|
disabled: SignalLike<boolean>;
|
|
1503
1383
|
/** The currently active item in the tree. */
|
|
1504
1384
|
activeItem: WritableSignalLike<TreeItemPattern<V> | undefined>;
|
|
1505
|
-
/** Whether disabled items should be
|
|
1506
|
-
|
|
1385
|
+
/** Whether disabled items should be focusable. */
|
|
1386
|
+
softDisabled: SignalLike<boolean>;
|
|
1507
1387
|
/** Whether the focus should wrap when navigating past the first or last item. */
|
|
1508
1388
|
wrap: SignalLike<boolean>;
|
|
1509
1389
|
/** The orientation of the tree. */
|
|
@@ -1557,8 +1437,8 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
|
|
|
1557
1437
|
activeId: _angular_core.Signal<string | undefined>;
|
|
1558
1438
|
/** The list of items in the tree. */
|
|
1559
1439
|
items: _angular_core.Signal<TreeItemPattern<V>[]>;
|
|
1560
|
-
/** The
|
|
1561
|
-
|
|
1440
|
+
/** The tab index for the tree. Always -1 because the combobox handles focus. */
|
|
1441
|
+
tabIndex: SignalLike<-1 | 0>;
|
|
1562
1442
|
constructor(inputs: ComboboxTreeInputs<V>);
|
|
1563
1443
|
/** Noop. The combobox handles keydown events. */
|
|
1564
1444
|
onKeydown(_: KeyboardEvent): void;
|
|
@@ -1580,12 +1460,14 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
|
|
|
1580
1460
|
unfocus: () => void;
|
|
1581
1461
|
/** Selects the specified item in the tree or the current active item if not provided. */
|
|
1582
1462
|
select: (item?: TreeItemPattern<V>) => void;
|
|
1463
|
+
/** Toggles the selection state of the given item in the tree or the current active item if not provided. */
|
|
1464
|
+
toggle: (item?: TreeItemPattern<V>) => void;
|
|
1583
1465
|
/** Clears the selection in the tree. */
|
|
1584
1466
|
clearSelection: () => void;
|
|
1585
1467
|
/** Retrieves the TreeItemPattern associated with a pointer event. */
|
|
1586
1468
|
getItem: (e: PointerEvent) => TreeItemPattern<V> | undefined;
|
|
1587
|
-
/** Retrieves the currently selected
|
|
1588
|
-
|
|
1469
|
+
/** Retrieves the currently selected items in the tree */
|
|
1470
|
+
getSelectedItems: () => TreeItemPattern<V>[];
|
|
1589
1471
|
/** Sets the value of the combobox tree. */
|
|
1590
1472
|
setValue: (value: V | undefined) => void;
|
|
1591
1473
|
/** Expands the currently focused item if it is expandable. */
|
|
@@ -1598,7 +1480,47 @@ declare class ComboboxTreePattern<V> extends TreePattern<V> implements ComboboxT
|
|
|
1598
1480
|
expandAll: () => void;
|
|
1599
1481
|
/** Collapses all of the tree items. */
|
|
1600
1482
|
collapseAll: () => void;
|
|
1483
|
+
/** Whether the currently active item is selectable. */
|
|
1484
|
+
isItemSelectable: (item?: TreeItemPattern<V> | undefined) => boolean;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* A container directive controls the visibility of its content.
|
|
1489
|
+
*/
|
|
1490
|
+
declare class DeferredContentAware {
|
|
1491
|
+
readonly contentVisible: _angular_core.WritableSignal<boolean>;
|
|
1492
|
+
readonly preserveContent: _angular_core.ModelSignal<boolean>;
|
|
1493
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContentAware, never>;
|
|
1494
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContentAware, never, never, { "preserveContent": { "alias": "preserveContent"; "required": false; "isSignal": true; }; }, { "preserveContent": "preserveContentChange"; }, never, never, true, never>;
|
|
1495
|
+
}
|
|
1496
|
+
/**
|
|
1497
|
+
* DeferredContent loads/unloads the content based on the visibility.
|
|
1498
|
+
* The visibilty signal is sent from a parent directive implements
|
|
1499
|
+
* DeferredContentAware.
|
|
1500
|
+
*
|
|
1501
|
+
* Use this directive as a host directive. For example:
|
|
1502
|
+
*
|
|
1503
|
+
* ```ts
|
|
1504
|
+
* @Directive({
|
|
1505
|
+
* selector: 'ng-template[AccordionContent]',
|
|
1506
|
+
* hostDirectives: [DeferredContent],
|
|
1507
|
+
* })
|
|
1508
|
+
* class AccordionContent {}
|
|
1509
|
+
* ```
|
|
1510
|
+
*/
|
|
1511
|
+
declare class DeferredContent implements OnDestroy {
|
|
1512
|
+
private readonly _deferredContentAware;
|
|
1513
|
+
private readonly _templateRef;
|
|
1514
|
+
private readonly _viewContainerRef;
|
|
1515
|
+
private _currentViewRef;
|
|
1516
|
+
private _isRendered;
|
|
1517
|
+
readonly deferredContentAware: _angular_core.WritableSignal<DeferredContentAware | null>;
|
|
1518
|
+
constructor();
|
|
1519
|
+
ngOnDestroy(): void;
|
|
1520
|
+
private _destroyContent;
|
|
1521
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContent, never>;
|
|
1522
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContent, never, never, {}, {}, never, never, true, never>;
|
|
1601
1523
|
}
|
|
1602
1524
|
|
|
1603
|
-
export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern, ComboboxListboxPattern, ComboboxPattern, ComboboxTreePattern, ListboxPattern, MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern, OptionPattern,
|
|
1604
|
-
export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs, ComboboxInputs, ComboboxListboxControls, ComboboxListboxInputs, ComboboxTreeControls, ComboboxTreeInputs, ListboxInputs, MenuBarInputs, MenuInputs, MenuItemInputs, MenuTriggerInputs, OptionInputs,
|
|
1525
|
+
export { AccordionGroupPattern, AccordionPanelPattern, AccordionTriggerPattern, ComboboxListboxPattern, ComboboxPattern, ComboboxTreePattern, DeferredContent, DeferredContentAware, ListboxPattern, MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern, OptionPattern, SignalLike, TabListPattern, TabPanelPattern, TabPattern, ToolbarPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern, TreeItemPattern, TreePattern, WritableSignalLike };
|
|
1526
|
+
export type { AccordionGroupInputs, AccordionPanelInputs, AccordionTriggerInputs, ComboboxInputs, ComboboxListboxControls, ComboboxListboxInputs, ComboboxTreeControls, ComboboxTreeInputs, ListboxInputs, MenuBarInputs, MenuInputs, MenuItemInputs, MenuTriggerInputs, OptionInputs, TabInputs, TabListInputs, TabPanelInputs, ToolbarInputs, ToolbarWidgetGroupInputs, ToolbarWidgetInputs, TreeInputs, TreeItemInputs };
|