@angular/aria 21.1.0-next.2 → 21.1.0-next.3

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.
Files changed (76) hide show
  1. package/fesm2022/_accordion-chunk.mjs +108 -0
  2. package/fesm2022/_accordion-chunk.mjs.map +1 -0
  3. package/fesm2022/_combobox-chunk.mjs +2 -2
  4. package/fesm2022/_combobox-chunk.mjs.map +1 -1
  5. package/fesm2022/_combobox-listbox-chunk.mjs +4 -286
  6. package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
  7. package/fesm2022/_combobox-tree-chunk.mjs +331 -0
  8. package/fesm2022/_combobox-tree-chunk.mjs.map +1 -0
  9. package/fesm2022/_deferred-content-chunk.mjs +124 -0
  10. package/fesm2022/_deferred-content-chunk.mjs.map +1 -0
  11. package/fesm2022/_expansion-chunk.mjs +41 -0
  12. package/fesm2022/_expansion-chunk.mjs.map +1 -0
  13. package/fesm2022/_list-chunk.mjs +287 -0
  14. package/fesm2022/_list-chunk.mjs.map +1 -0
  15. package/fesm2022/_list-navigation-chunk.mjs +1 -1
  16. package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
  17. package/fesm2022/_menu-chunk.mjs +515 -0
  18. package/fesm2022/_menu-chunk.mjs.map +1 -0
  19. package/fesm2022/_pointer-event-manager-chunk.mjs +2 -82
  20. package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -1
  21. package/fesm2022/_signal-like-chunk.mjs +118 -0
  22. package/fesm2022/_signal-like-chunk.mjs.map +1 -0
  23. package/fesm2022/_tabs-chunk.mjs +159 -0
  24. package/fesm2022/_tabs-chunk.mjs.map +1 -0
  25. package/fesm2022/_toolbar-widget-group-chunk.mjs +148 -0
  26. package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -0
  27. package/fesm2022/_widget-chunk.mjs +3 -2
  28. package/fesm2022/_widget-chunk.mjs.map +1 -1
  29. package/fesm2022/accordion.mjs +10 -5
  30. package/fesm2022/accordion.mjs.map +1 -1
  31. package/fesm2022/aria.mjs +1 -1
  32. package/fesm2022/aria.mjs.map +1 -1
  33. package/fesm2022/combobox.mjs +50 -13
  34. package/fesm2022/combobox.mjs.map +1 -1
  35. package/fesm2022/grid.mjs +3 -1
  36. package/fesm2022/grid.mjs.map +1 -1
  37. package/fesm2022/listbox.mjs +9 -7
  38. package/fesm2022/listbox.mjs.map +1 -1
  39. package/fesm2022/menu.mjs +9 -5
  40. package/fesm2022/menu.mjs.map +1 -1
  41. package/fesm2022/private.mjs +13 -1402
  42. package/fesm2022/private.mjs.map +1 -1
  43. package/fesm2022/tabs.mjs +14 -6
  44. package/fesm2022/tabs.mjs.map +1 -1
  45. package/fesm2022/toolbar.mjs +5 -1
  46. package/fesm2022/toolbar.mjs.map +1 -1
  47. package/fesm2022/tree.mjs +13 -5
  48. package/fesm2022/tree.mjs.map +1 -1
  49. package/package.json +2 -2
  50. package/types/_accordion-chunk.d.ts +100 -0
  51. package/types/_combobox-chunk.d.ts +187 -91
  52. package/types/_deferred-content-chunk.d.ts +42 -0
  53. package/types/_expansion-chunk.d.ts +40 -0
  54. package/types/_grid-chunk.d.ts +41 -41
  55. package/types/_keyboard-event-manager-chunk.d.ts +68 -0
  56. package/types/_list-chunk.d.ts +8 -9
  57. package/types/_list-navigation-chunk.d.ts +8 -101
  58. package/types/_listbox-chunk.d.ts +17 -16
  59. package/types/_menu-chunk.d.ts +267 -0
  60. package/types/_pointer-event-manager-chunk.d.ts +34 -0
  61. package/types/_tabs-chunk.d.ts +153 -0
  62. package/types/_toolbar-chunk.d.ts +124 -0
  63. package/types/_tree-chunk.d.ts +185 -0
  64. package/types/accordion.d.ts +13 -5
  65. package/types/aria.d.ts +1 -1
  66. package/types/combobox.d.ts +122 -6
  67. package/types/grid.d.ts +10 -0
  68. package/types/listbox.d.ts +17 -5
  69. package/types/menu.d.ts +23 -5
  70. package/types/private.d.ts +25 -885
  71. package/types/tabs.d.ts +24 -8
  72. package/types/toolbar.d.ts +12 -4
  73. package/types/tree.d.ts +16 -5
  74. package/fesm2022/_combobox-popup-chunk.mjs +0 -46
  75. package/fesm2022/_combobox-popup-chunk.mjs.map +0 -1
  76. package/types/_combobox-chunk.d2.ts +0 -193
@@ -0,0 +1,153 @@
1
+ import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
2
+ import { PointerEventManager } from './_pointer-event-manager-chunk.js';
3
+ import { ExpansionItem, ListExpansionInputs, ListExpansion } from './_expansion-chunk.js';
4
+ import { SignalLike, ListNavigationItem, WritableSignalLike, ListNavigationInputs, ListFocus, ListNavigation } from './_list-navigation-chunk.js';
5
+
6
+ /** Represents the required inputs for the label control. */
7
+ interface LabelControlInputs {
8
+ /** The default `aria-labelledby` ids. */
9
+ defaultLabelledBy: SignalLike<string[]>;
10
+ }
11
+ /** Represents the optional inputs for the label control. */
12
+ interface LabelControlOptionalInputs {
13
+ /** The `aria-label`. */
14
+ label?: SignalLike<string | undefined>;
15
+ /** The user-provided `aria-labelledby` ids. */
16
+ labelledBy?: SignalLike<string[]>;
17
+ }
18
+ /** Controls label and description of an element. */
19
+ declare class LabelControl {
20
+ readonly inputs: LabelControlInputs & LabelControlOptionalInputs;
21
+ /** The `aria-label`. */
22
+ readonly label: SignalLike<string | undefined>;
23
+ /** The `aria-labelledby` ids. */
24
+ readonly labelledBy: SignalLike<string[]>;
25
+ constructor(inputs: LabelControlInputs & LabelControlOptionalInputs);
26
+ }
27
+
28
+ /** The required inputs to tabs. */
29
+ interface TabInputs extends Omit<ListNavigationItem, 'index'>, Omit<ExpansionItem, 'expandable'> {
30
+ /** The parent tablist that controls the tab. */
31
+ tablist: SignalLike<TabListPattern>;
32
+ /** The remote tabpanel controlled by the tab. */
33
+ tabpanel: SignalLike<TabPanelPattern | undefined>;
34
+ /** The remote tabpanel unique identifier. */
35
+ value: SignalLike<string>;
36
+ }
37
+ /** A tab in a tablist. */
38
+ declare class TabPattern {
39
+ readonly inputs: TabInputs;
40
+ /** A global unique identifier for the tab. */
41
+ readonly id: SignalLike<string>;
42
+ /** The index of the tab. */
43
+ readonly index: SignalLike<number>;
44
+ /** The remote tabpanel unique identifier. */
45
+ readonly value: SignalLike<string>;
46
+ /** Whether the tab is disabled. */
47
+ readonly disabled: SignalLike<boolean>;
48
+ /** The html element that should receive focus. */
49
+ readonly element: SignalLike<HTMLElement>;
50
+ /** Whether this tab has expandable panel. */
51
+ readonly expandable: SignalLike<boolean>;
52
+ /** Whether the tab panel is expanded. */
53
+ readonly expanded: WritableSignalLike<boolean>;
54
+ /** Whether the tab is active. */
55
+ readonly active: SignalLike<boolean>;
56
+ /** Whether the tab is selected. */
57
+ readonly selected: SignalLike<boolean>;
58
+ /** The tab index of the tab. */
59
+ readonly tabIndex: SignalLike<0 | -1>;
60
+ /** The id of the tabpanel associated with the tab. */
61
+ readonly controls: SignalLike<string | undefined>;
62
+ constructor(inputs: TabInputs);
63
+ /** Opens the tab. */
64
+ open(): boolean;
65
+ }
66
+ /** The required inputs for the tabpanel. */
67
+ interface TabPanelInputs extends LabelControlOptionalInputs {
68
+ /** A global unique identifier for the tabpanel. */
69
+ id: SignalLike<string>;
70
+ /** The tab that controls this tabpanel. */
71
+ tab: SignalLike<TabPattern | undefined>;
72
+ /** A local unique identifier for the tabpanel. */
73
+ value: SignalLike<string>;
74
+ }
75
+ /** A tabpanel associated with a tab. */
76
+ declare class TabPanelPattern {
77
+ readonly inputs: TabPanelInputs;
78
+ /** A global unique identifier for the tabpanel. */
79
+ readonly id: SignalLike<string>;
80
+ /** A local unique identifier for the tabpanel. */
81
+ readonly value: SignalLike<string>;
82
+ /** Controls label for this tabpanel. */
83
+ readonly labelManager: LabelControl;
84
+ /** Whether the tabpanel is hidden. */
85
+ readonly hidden: SignalLike<boolean>;
86
+ /** The tab index of this tabpanel. */
87
+ readonly tabIndex: SignalLike<-1 | 0>;
88
+ /** The aria-labelledby value for this tabpanel. */
89
+ readonly labelledBy: SignalLike<string | undefined>;
90
+ constructor(inputs: TabPanelInputs);
91
+ }
92
+ /** The required inputs for the tablist. */
93
+ interface TabListInputs extends Omit<ListNavigationInputs<TabPattern>, 'multi'>, Omit<ListExpansionInputs, 'multiExpandable' | 'items'> {
94
+ /** The selection strategy used by the tablist. */
95
+ selectionMode: SignalLike<'follow' | 'explicit'>;
96
+ }
97
+ /** Controls the state of a tablist. */
98
+ declare class TabListPattern {
99
+ readonly inputs: TabListInputs;
100
+ /** The list focus behavior for the tablist. */
101
+ readonly focusBehavior: ListFocus<TabPattern>;
102
+ /** The list navigation behavior for the tablist. */
103
+ readonly navigationBehavior: ListNavigation<TabPattern>;
104
+ /** Controls expansion for the tablist. */
105
+ readonly expansionBehavior: ListExpansion;
106
+ /** The currently active tab. */
107
+ readonly activeTab: SignalLike<TabPattern | undefined>;
108
+ /** The currently selected tab. */
109
+ readonly selectedTab: WritableSignalLike<TabPattern | undefined>;
110
+ /** Whether the tablist is vertically or horizontally oriented. */
111
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
112
+ /** Whether the tablist is disabled. */
113
+ readonly disabled: SignalLike<boolean>;
114
+ /** The tab index of the tablist. */
115
+ readonly tabIndex: SignalLike<0 | -1>;
116
+ /** The id of the current active tab. */
117
+ readonly activeDescendant: SignalLike<string | undefined>;
118
+ /** Whether selection should follow focus. */
119
+ readonly followFocus: SignalLike<boolean>;
120
+ /** The key used to navigate to the previous tab in the tablist. */
121
+ readonly prevKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
122
+ /** The key used to navigate to the next item in the list. */
123
+ readonly nextKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
124
+ /** The keydown event manager for the tablist. */
125
+ readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
126
+ /** The pointerdown event manager for the tablist. */
127
+ readonly pointerdown: SignalLike<PointerEventManager<PointerEvent>>;
128
+ constructor(inputs: TabListInputs);
129
+ /**
130
+ * Sets the tablist to its default initial state.
131
+ *
132
+ * Sets the active index of the tablist to the first focusable selected
133
+ * tab if one exists. Otherwise, sets focus to the first focusable tab.
134
+ *
135
+ * This method should be called once the tablist and its tabs are properly initialized.
136
+ */
137
+ setDefaultState(): void;
138
+ /** Handles keydown events for the tablist. */
139
+ onKeydown(event: KeyboardEvent): void;
140
+ /** The pointerdown event manager for the tablist. */
141
+ onPointerdown(event: PointerEvent): void;
142
+ /** Opens the tab by given value. */
143
+ open(value: string): boolean;
144
+ /** Opens the given tab or the current active tab. */
145
+ open(tab?: TabPattern): boolean;
146
+ /** Executes a navigation operation and expand the active tab if needed. */
147
+ private _navigate;
148
+ /** Returns the tab item associated with the given pointer event. */
149
+ private _getItem;
150
+ }
151
+
152
+ export { TabListPattern, TabPanelPattern, TabPattern };
153
+ export type { TabInputs, TabListInputs, TabPanelInputs };
@@ -0,0 +1,124 @@
1
+ import { SignalLike } from './_list-navigation-chunk.js';
2
+ import { ListItem, ListInputs, List } from './_list-chunk.js';
3
+
4
+ /** Represents the required inputs for a toolbar widget group. */
5
+ interface ToolbarWidgetGroupInputs<T extends ListItem<V>, V> {
6
+ /** A reference to the parent toolbar. */
7
+ toolbar: SignalLike<ToolbarPattern<V> | undefined>;
8
+ /** Whether the widget group is disabled. */
9
+ disabled: SignalLike<boolean>;
10
+ /** The list of items within the widget group. */
11
+ items: SignalLike<T[]>;
12
+ /** Whether the group allows multiple widgets to be selected. */
13
+ multi: SignalLike<boolean>;
14
+ }
15
+ /** A group of widgets within a toolbar that provides nested navigation. */
16
+ declare class ToolbarWidgetGroupPattern<T extends ListItem<V>, V> {
17
+ readonly inputs: ToolbarWidgetGroupInputs<T, V>;
18
+ /** Whether the widget is disabled. */
19
+ readonly disabled: () => boolean;
20
+ /** A reference to the parent toolbar. */
21
+ readonly toolbar: () => ToolbarPattern<V> | undefined;
22
+ /** Whether the group allows multiple widgets to be selected. */
23
+ readonly multi: () => boolean;
24
+ readonly searchTerm: () => string;
25
+ readonly value: () => V;
26
+ readonly selectable: () => boolean;
27
+ readonly element: () => undefined;
28
+ constructor(inputs: ToolbarWidgetGroupInputs<T, V>);
29
+ }
30
+
31
+ /** Represents the required inputs for a toolbar widget in a toolbar. */
32
+ interface ToolbarWidgetInputs<V> extends Omit<ListItem<V>, 'searchTerm' | 'index' | 'selectable'> {
33
+ /** A reference to the parent toolbar. */
34
+ toolbar: SignalLike<ToolbarPattern<V>>;
35
+ /** A reference to the parent widget group. */
36
+ group: SignalLike<ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined>;
37
+ }
38
+ declare class ToolbarWidgetPattern<V> implements ListItem<V> {
39
+ readonly inputs: ToolbarWidgetInputs<V>;
40
+ /** A unique identifier for the widget. */
41
+ readonly id: () => string;
42
+ /** The html element that should receive focus. */
43
+ readonly element: () => HTMLElement | undefined;
44
+ /** Whether the widget is disabled. */
45
+ readonly disabled: () => boolean;
46
+ /** A reference to the parent toolbar. */
47
+ readonly group: () => ToolbarWidgetGroupPattern<ToolbarWidgetPattern<V>, V> | undefined;
48
+ /** A reference to the toolbar containing the widget. */
49
+ readonly toolbar: () => ToolbarPattern<V>;
50
+ /** The tabindex of the widget. */
51
+ readonly tabIndex: SignalLike<0 | -1>;
52
+ /** The text used by the typeahead search. */
53
+ readonly searchTerm: () => string;
54
+ /** The value associated with the widget. */
55
+ readonly value: () => V;
56
+ /** Whether the widget is selectable. */
57
+ readonly selectable: () => boolean;
58
+ /** The position of the widget within the toolbar. */
59
+ readonly index: SignalLike<number>;
60
+ /** Whether the widget is selected (only relevant in a selection group). */
61
+ readonly selected: SignalLike<boolean>;
62
+ /** Whether the widget is currently the active one (focused). */
63
+ readonly active: SignalLike<boolean>;
64
+ constructor(inputs: ToolbarWidgetInputs<V>);
65
+ }
66
+
67
+ /** Represents the required inputs for a toolbar. */
68
+ type ToolbarInputs<V> = Omit<ListInputs<ToolbarWidgetPattern<V>, V>, 'multi' | 'typeaheadDelay' | 'selectionMode' | 'focusMode'> & {
69
+ /** A function that returns the toolbar item associated with a given element. */
70
+ getItem: (e: Element) => ToolbarWidgetPattern<V> | undefined;
71
+ };
72
+ /** Controls the state of a toolbar. */
73
+ declare class ToolbarPattern<V> {
74
+ readonly inputs: ToolbarInputs<V>;
75
+ /** The list behavior for the toolbar. */
76
+ readonly listBehavior: List<ToolbarWidgetPattern<V>, V>;
77
+ /** Whether the tablist is vertically or horizontally oriented. */
78
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
79
+ /** Whether disabled items in the group should be focusable. */
80
+ readonly softDisabled: SignalLike<boolean>;
81
+ /** Whether the toolbar is disabled. */
82
+ readonly disabled: SignalLike<boolean>;
83
+ /** The tab index of the toolbar (if using activedescendant). */
84
+ readonly tabIndex: SignalLike<0 | -1>;
85
+ /** The id of the current active widget (if using activedescendant). */
86
+ readonly activeDescendant: SignalLike<string | undefined>;
87
+ /** The currently active item in the toolbar. */
88
+ readonly activeItem: () => ToolbarWidgetPattern<V> | undefined;
89
+ /** The key used to navigate to the previous widget. */
90
+ private readonly _prevKey;
91
+ /** The key used to navigate to the next widget. */
92
+ private readonly _nextKey;
93
+ /** The alternate key used to navigate to the previous widget. */
94
+ private readonly _altPrevKey;
95
+ /** The alternate key used to navigate to the next widget. */
96
+ private readonly _altNextKey;
97
+ /** The keydown event manager for the toolbar. */
98
+ private readonly _keydown;
99
+ /** Navigates to the next widget in a widget group. */
100
+ private _groupNext;
101
+ /** Navigates to the previous widget in a widget group. */
102
+ private _groupPrev;
103
+ /** Navigates to the widget targeted by a pointer event. */
104
+ private _goto;
105
+ select(): void;
106
+ constructor(inputs: ToolbarInputs<V>);
107
+ /** Handles keydown events for the toolbar. */
108
+ onKeydown(event: KeyboardEvent): void;
109
+ onPointerdown(event: PointerEvent): void;
110
+ /** Handles click events for the toolbar. */
111
+ onClick(event: MouseEvent): void;
112
+ /**
113
+ * Sets the toolbar to its default initial state.
114
+ *
115
+ * Sets the active index to the selected widget if one exists and is focusable.
116
+ * Otherwise, sets the active index to the first focusable widget.
117
+ */
118
+ setDefaultState(): void;
119
+ /** Validates the state of the toolbar and returns a list of accessibility violations. */
120
+ validate(): string[];
121
+ }
122
+
123
+ export { ToolbarPattern, ToolbarWidgetGroupPattern, ToolbarWidgetPattern };
124
+ export type { ToolbarInputs, ToolbarWidgetGroupInputs, ToolbarWidgetInputs };
@@ -0,0 +1,185 @@
1
+ import { SignalLike, WritableSignalLike } from './_list-navigation-chunk.js';
2
+ import { ListItem, ListInputs, List } from './_list-chunk.js';
3
+ import { ExpansionItem, ListExpansion } from './_expansion-chunk.js';
4
+ import { KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
5
+ import { PointerEventManager } from './_pointer-event-manager-chunk.js';
6
+
7
+ /** Represents the required inputs for a tree item. */
8
+ interface TreeItemInputs<V> extends Omit<ListItem<V>, 'index'>, Omit<ExpansionItem, 'expandable'> {
9
+ /** The parent item. */
10
+ parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;
11
+ /** Whether this item has children. Children can be lazily loaded. */
12
+ hasChildren: SignalLike<boolean>;
13
+ /** The children items. */
14
+ children: SignalLike<TreeItemPattern<V>[]>;
15
+ /** The tree pattern this item belongs to. */
16
+ tree: SignalLike<TreePattern<V>>;
17
+ }
18
+ /**
19
+ * Represents an item in a Tree.
20
+ */
21
+ declare class TreeItemPattern<V> implements ListItem<V>, ExpansionItem {
22
+ readonly inputs: TreeItemInputs<V>;
23
+ /** A unique identifier for this item. */
24
+ readonly id: SignalLike<string>;
25
+ /** The value of this item. */
26
+ readonly value: SignalLike<V>;
27
+ /** A reference to the item element. */
28
+ readonly element: SignalLike<HTMLElement>;
29
+ /** Whether the item is disabled. */
30
+ readonly disabled: SignalLike<boolean>;
31
+ /** The text used by the typeahead search. */
32
+ readonly searchTerm: SignalLike<string>;
33
+ /** The tree pattern this item belongs to. */
34
+ readonly tree: SignalLike<TreePattern<V>>;
35
+ /** The parent item. */
36
+ readonly parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;
37
+ /** The children items. */
38
+ readonly children: SignalLike<TreeItemPattern<V>[]>;
39
+ /** The position of this item among its siblings. */
40
+ readonly index: SignalLike<number>;
41
+ /** Controls expansion for child items. */
42
+ readonly expansionBehavior: ListExpansion;
43
+ /** Whether the item is expandable. It's expandable if children item exist. */
44
+ readonly expandable: SignalLike<boolean>;
45
+ /** Whether the item is selectable. */
46
+ readonly selectable: SignalLike<boolean>;
47
+ /** Whether the item is expanded. */
48
+ readonly expanded: WritableSignalLike<boolean>;
49
+ /** The level of the current item in a tree. */
50
+ readonly level: SignalLike<number>;
51
+ /** Whether this item is visible. */
52
+ readonly visible: SignalLike<boolean>;
53
+ /** The number of items under the same parent at the same level. */
54
+ readonly setsize: SignalLike<number>;
55
+ /** The position of this item among its siblings (1-based). */
56
+ readonly posinset: SignalLike<number>;
57
+ /** Whether the item is active. */
58
+ readonly active: SignalLike<boolean>;
59
+ /** The tab index of the item. */
60
+ readonly tabIndex: SignalLike<0 | -1>;
61
+ /** Whether the item is selected. */
62
+ readonly selected: SignalLike<boolean | undefined>;
63
+ /** The current type of this item. */
64
+ readonly current: SignalLike<string | undefined>;
65
+ constructor(inputs: TreeItemInputs<V>);
66
+ }
67
+ /** The selection operations that the tree can perform. */
68
+ interface SelectOptions {
69
+ toggle?: boolean;
70
+ selectOne?: boolean;
71
+ selectRange?: boolean;
72
+ anchor?: boolean;
73
+ }
74
+ /** Represents the required inputs for a tree. */
75
+ interface TreeInputs<V> extends Omit<ListInputs<TreeItemPattern<V>, V>, 'items'> {
76
+ /** A unique identifier for the tree. */
77
+ id: SignalLike<string>;
78
+ /** All items in the tree, in document order (DFS-like, a flattened list). */
79
+ allItems: SignalLike<TreeItemPattern<V>[]>;
80
+ /** Whether the tree is in navigation mode. */
81
+ nav: SignalLike<boolean>;
82
+ /** The aria-current type. */
83
+ currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;
84
+ }
85
+ /** Controls the state and interactions of a tree view. */
86
+ declare class TreePattern<V> implements TreeInputs<V> {
87
+ readonly inputs: TreeInputs<V>;
88
+ /** The list behavior for the tree. */
89
+ readonly listBehavior: List<TreeItemPattern<V>, V>;
90
+ /** Controls expansion for direct children of the tree root (top-level items). */
91
+ readonly expansionBehavior: ListExpansion;
92
+ /** The root level is 0. */
93
+ readonly level: () => number;
94
+ /** The root is always expanded. */
95
+ readonly expanded: () => boolean;
96
+ /** The root is always visible. */
97
+ readonly visible: () => boolean;
98
+ /** The tab index of the tree. */
99
+ readonly tabIndex: SignalLike<-1 | 0>;
100
+ /** The id of the current active item. */
101
+ readonly activeDescendant: SignalLike<string | undefined>;
102
+ /** The direct children of the root (top-level tree items). */
103
+ readonly children: SignalLike<TreeItemPattern<V>[]>;
104
+ /** All currently visible tree items. An item is visible if their parent is expanded. */
105
+ readonly visibleItems: SignalLike<TreeItemPattern<V>[]>;
106
+ /** Whether the tree selection follows focus. */
107
+ readonly followFocus: SignalLike<boolean>;
108
+ /** Whether the tree direction is RTL. */
109
+ readonly isRtl: SignalLike<boolean>;
110
+ /** The key for navigating to the previous item. */
111
+ readonly prevKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
112
+ /** The key for navigating to the next item. */
113
+ readonly nextKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
114
+ /** The key for collapsing an item or moving to its parent. */
115
+ readonly collapseKey: SignalLike<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
116
+ /** The key for expanding an item or moving to its first child. */
117
+ readonly expandKey: SignalLike<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
118
+ /** Represents the space key. Does nothing when the user is actively using typeahead. */
119
+ readonly dynamicSpaceKey: SignalLike<"" | " ">;
120
+ /** Regular expression to match characters for typeahead. */
121
+ readonly typeaheadRegexp: RegExp;
122
+ /** The keydown event manager for the tree. */
123
+ readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
124
+ /** The pointerdown event manager for the tree. */
125
+ pointerdown: SignalLike<PointerEventManager<PointerEvent>>;
126
+ /** A unique identifier for the tree. */
127
+ readonly id: SignalLike<string>;
128
+ /** The host native element. */
129
+ readonly element: SignalLike<HTMLElement>;
130
+ /** Whether the tree is in navigation mode. */
131
+ readonly nav: SignalLike<boolean>;
132
+ /** The aria-current type. */
133
+ readonly currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;
134
+ /** All items in the tree, in document order (DFS-like, a flattened list). */
135
+ readonly allItems: SignalLike<TreeItemPattern<V>[]>;
136
+ /** The focus strategy used by the tree. */
137
+ readonly focusMode: SignalLike<'roving' | 'activedescendant'>;
138
+ /** Whether the tree is disabled. */
139
+ readonly disabled: SignalLike<boolean>;
140
+ /** The currently active item in the tree. */
141
+ readonly activeItem: WritableSignalLike<TreeItemPattern<V> | undefined>;
142
+ /** Whether disabled items should be focusable. */
143
+ readonly softDisabled: SignalLike<boolean>;
144
+ /** Whether the focus should wrap when navigating past the first or last item. */
145
+ readonly wrap: SignalLike<boolean>;
146
+ /** The orientation of the tree. */
147
+ readonly orientation: SignalLike<'vertical' | 'horizontal'>;
148
+ /** The text direction of the tree. */
149
+ readonly textDirection: SignalLike<'ltr' | 'rtl'>;
150
+ /** Whether multiple items can be selected at the same time. */
151
+ readonly multi: SignalLike<boolean>;
152
+ /** The selection mode of the tree. */
153
+ readonly selectionMode: SignalLike<'follow' | 'explicit'>;
154
+ /** The delay in milliseconds to wait before clearing the typeahead buffer. */
155
+ readonly typeaheadDelay: SignalLike<number>;
156
+ /** The current selected items of the tree. */
157
+ readonly values: WritableSignalLike<V[]>;
158
+ constructor(inputs: TreeInputs<V>);
159
+ /**
160
+ * Sets the tree to it's default initial state.
161
+ *
162
+ * Sets the active index of the tree to the first focusable selected tree item if one exists.
163
+ * Otherwise, sets focus to the first focusable tree item.
164
+ */
165
+ setDefaultState(): void;
166
+ /** Handles keydown events on the tree. */
167
+ onKeydown(event: KeyboardEvent): void;
168
+ /** Handles pointerdown events on the tree. */
169
+ onPointerdown(event: PointerEvent): void;
170
+ /** Navigates to the given tree item in the tree. */
171
+ goto(e: PointerEvent, opts?: SelectOptions): void;
172
+ /** Toggles to expand or collapse a tree item. */
173
+ toggleExpansion(item?: TreeItemPattern<V>): void;
174
+ /** Expands a tree item. */
175
+ expand(opts?: SelectOptions): void;
176
+ /** Expands all sibling tree items including itself. */
177
+ expandSiblings(item?: TreeItemPattern<V>): void;
178
+ /** Collapses a tree item. */
179
+ collapse(opts?: SelectOptions): void;
180
+ /** Retrieves the TreeItemPattern associated with a DOM event, if any. */
181
+ protected _getItem(event: Event): TreeItemPattern<V> | undefined;
182
+ }
183
+
184
+ export { TreeItemPattern, TreePattern };
185
+ export type { TreeInputs, TreeItemInputs };
@@ -1,8 +1,12 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { WritableSignal } from '@angular/core';
3
- import * as i1 from '@angular/aria/private';
4
- import { AccordionTriggerPattern, AccordionPanelPattern, AccordionGroupPattern } from '@angular/aria/private';
3
+ import { AccordionTriggerPattern, AccordionPanelPattern, AccordionGroupPattern } from './_accordion-chunk.js';
4
+ import { DeferredContentAware, DeferredContent } from './_deferred-content-chunk.js';
5
5
  import * as _angular_cdk_bidi from '@angular/cdk/bidi';
6
+ import './_keyboard-event-manager-chunk.js';
7
+ import './_list-navigation-chunk.js';
8
+ import './_pointer-event-manager-chunk.js';
9
+ import './_expansion-chunk.js';
6
10
 
7
11
  /**
8
12
  * The content panel of an accordion item that is conditionally visible.
@@ -23,6 +27,7 @@ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
23
27
  * ```
24
28
  *
25
29
  * @developerPreview 21.0
30
+ * @see [Accordion](guide/aria/accordion)
26
31
  */
27
32
  declare class AccordionPanel {
28
33
  /** The DeferredContentAware host directive. */
@@ -45,7 +50,7 @@ declare class AccordionPanel {
45
50
  /** Toggles the expansion state of this item. */
46
51
  toggle(): void;
47
52
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionPanel, never>;
48
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
53
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
49
54
  }
50
55
 
51
56
  /**
@@ -82,6 +87,7 @@ declare class AccordionPanel {
82
87
  * ```
83
88
  *
84
89
  * @developerPreview 21.0
90
+ * @see [Accordion](guide/aria/accordion)
85
91
  */
86
92
  declare class AccordionGroup {
87
93
  /** A reference to the group element. */
@@ -136,6 +142,7 @@ declare class AccordionGroup {
136
142
  * ```
137
143
  *
138
144
  * @developerPreview 21.0
145
+ * @see [Accordion](guide/aria/accordion)
139
146
  */
140
147
  declare class AccordionTrigger {
141
148
  /** A reference to the trigger element. */
@@ -185,10 +192,11 @@ declare class AccordionTrigger {
185
192
  * ```
186
193
  *
187
194
  * @developerPreview 21.0
195
+ * @see [Accordion](guide/aria/accordion)
188
196
  */
189
197
  declare class AccordionContent {
190
198
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionContent, never>;
191
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionContent, "ng-template[ngAccordionContent]", never, {}, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
199
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionContent, "ng-template[ngAccordionContent]", never, {}, {}, never, never, true, [{ directive: typeof DeferredContent; inputs: {}; outputs: {}; }]>;
192
200
  }
193
201
 
194
- export { AccordionContent, AccordionGroup, AccordionPanel, AccordionTrigger };
202
+ export { AccordionContent, AccordionGroup, AccordionPanel, AccordionTrigger, DeferredContent as ɵɵDeferredContent };
package/types/aria.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Version } from '@angular/core';
2
2
 
3
- /** Current version of the CDK Experimental package. */
3
+ /** Current version of the Aria package. */
4
4
  declare const VERSION: Version;
5
5
 
6
6
  export { VERSION };