@angular/aria 0.0.1 → 21.0.0-next.9

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.
@@ -0,0 +1,92 @@
1
+ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
2
+ import * as _angular_core from '@angular/core';
3
+ import { WritableSignal } from '@angular/core';
4
+ import { AccordionTriggerPattern, AccordionPanelPattern, AccordionGroupPattern } from '@angular/aria/ui-patterns';
5
+ import * as i1 from '@angular/aria/deferred-content';
6
+
7
+ /**
8
+ * Represents the content panel of an accordion item. It is controlled by an
9
+ * associated `AccordionTrigger`.
10
+ */
11
+ declare class AccordionPanel {
12
+ /** The DeferredContentAware host directive. */
13
+ private readonly _deferredContentAware;
14
+ /** A global unique identifier for the panel. */
15
+ private readonly _id;
16
+ /** A local unique identifier for the panel, used to match with its trigger's value. */
17
+ value: _angular_core.InputSignal<string>;
18
+ /** The parent accordion trigger pattern that controls this panel. This is set by AccordionGroup. */
19
+ readonly accordionTrigger: WritableSignal<AccordionTriggerPattern | undefined>;
20
+ /** The UI pattern instance for this panel. */
21
+ readonly pattern: AccordionPanelPattern;
22
+ constructor();
23
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionPanel, never>;
24
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionPanel, "[ngAccordionPanel]", ["ngAccordionPanel"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
25
+ }
26
+ /**
27
+ * Represents the trigger button for an accordion item. It controls the expansion
28
+ * state of an associated `AccordionPanel`.
29
+ */
30
+ declare class AccordionTrigger {
31
+ /** A global unique identifier for the trigger. */
32
+ private readonly _id;
33
+ /** A reference to the trigger element. */
34
+ private readonly _elementRef;
35
+ /** The parent AccordionGroup. */
36
+ private readonly _accordionGroup;
37
+ /** A local unique identifier for the trigger, used to match with its panel's value. */
38
+ value: _angular_core.InputSignal<string>;
39
+ /** Whether the trigger is disabled. */
40
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
41
+ /**
42
+ * Whether this trigger is completely inaccessible.
43
+ *
44
+ * TODO(ok7sai): Consider move this to UI patterns.
45
+ */
46
+ readonly hardDisabled: _angular_core.Signal<boolean>;
47
+ /** The accordion panel pattern controlled by this trigger. This is set by AccordionGroup. */
48
+ readonly accordionPanel: WritableSignal<AccordionPanelPattern | undefined>;
49
+ /** The UI pattern instance for this trigger. */
50
+ readonly pattern: AccordionTriggerPattern;
51
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionTrigger, never>;
52
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionTrigger, "[ngAccordionTrigger]", ["ngAccordionTrigger"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
53
+ }
54
+ /**
55
+ * Container for a group of accordion items. It manages the overall state and
56
+ * interactions of the accordion, such as keyboard navigation and expansion mode.
57
+ */
58
+ declare class AccordionGroup {
59
+ /** A reference to the group element. */
60
+ private readonly _elementRef;
61
+ /** The AccordionTriggers nested inside this group. */
62
+ protected readonly _triggers: _angular_core.Signal<readonly AccordionTrigger[]>;
63
+ /** The AccordionPanels nested inside this group. */
64
+ protected readonly _panels: _angular_core.Signal<readonly AccordionPanel[]>;
65
+ /** The text direction (ltr or rtl). */
66
+ readonly textDirection: WritableSignal<_angular_cdk_bidi.Direction>;
67
+ /** Whether the entire accordion group is disabled. */
68
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
69
+ /** Whether multiple accordion items can be expanded simultaneously. */
70
+ multiExpandable: _angular_core.InputSignalWithTransform<boolean, unknown>;
71
+ /** The values of the current selected/expanded accordions. */
72
+ value: _angular_core.ModelSignal<string[]>;
73
+ /** Whether disabled items should be skipped during keyboard navigation. */
74
+ skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
75
+ /** Whether keyboard navigation should wrap around from the last item to the first, and vice-versa. */
76
+ wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
77
+ /** The UI pattern instance for this accordion group. */
78
+ readonly pattern: AccordionGroupPattern;
79
+ constructor();
80
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionGroup, never>;
81
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionGroup, "[ngAccordionGroup]", ["ngAccordionGroup"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "multiExpandable": { "alias": "multiExpandable"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_triggers", "_panels"], never, true, never>;
82
+ }
83
+ /**
84
+ * A structural directive that marks the `ng-template` to be used as the content
85
+ * for a `AccordionPanel`. This content can be lazily loaded.
86
+ */
87
+ declare class AccordionContent {
88
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionContent, never>;
89
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccordionContent, "ng-template[ngAccordionContent]", never, {}, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
90
+ }
91
+
92
+ export { AccordionContent, AccordionGroup, AccordionPanel, AccordionTrigger };
@@ -0,0 +1,6 @@
1
+ import { Version } from '@angular/core';
2
+
3
+ /** Current version of the CDK Experimental package. */
4
+ declare const VERSION: Version;
5
+
6
+ export { VERSION };
@@ -0,0 +1,51 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { WritableSignal } from '@angular/core';
3
+ import { ComboboxPattern, ComboboxListboxControls, ComboboxTreeControls } from '@angular/aria/ui-patterns';
4
+ import * as i1 from '@angular/aria/deferred-content';
5
+
6
+ declare class Combobox<V> {
7
+ /** The element that the combobox is attached to. */
8
+ private readonly _elementRef;
9
+ /** The DeferredContentAware host directive. */
10
+ private readonly _deferredContentAware;
11
+ /** The combobox popup. */
12
+ readonly popup: _angular_core.Signal<ComboboxPopup<V> | undefined>;
13
+ /** The filter mode for the combobox. */
14
+ filterMode: _angular_core.InputSignal<"manual" | "auto-select" | "highlight">;
15
+ /** Whether the combobox is focused. */
16
+ readonly isFocused: WritableSignal<boolean>;
17
+ /** The value of the first matching item in the popup. */
18
+ firstMatch: _angular_core.InputSignal<V | undefined>;
19
+ /** Whether the listbox has received focus yet. */
20
+ private _hasBeenFocused;
21
+ /** The combobox ui pattern. */
22
+ readonly pattern: ComboboxPattern<any, V>;
23
+ constructor();
24
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Combobox<any>, never>;
25
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Combobox<any>, "[ngCombobox]", ["ngCombobox"], { "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; "firstMatch": { "alias": "firstMatch"; "required": false; "isSignal": true; }; }, {}, ["popup"], never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
26
+ }
27
+ declare class ComboboxInput {
28
+ /** The element that the combobox is attached to. */
29
+ private readonly _elementRef;
30
+ /** The combobox that the input belongs to. */
31
+ readonly combobox: Combobox<any>;
32
+ /** The value of the input. */
33
+ value: _angular_core.ModelSignal<string>;
34
+ constructor();
35
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxInput, never>;
36
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxInput, "input[ngComboboxInput]", ["ngComboboxInput"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
37
+ }
38
+ declare class ComboboxPopupContainer {
39
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopupContainer, never>;
40
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopupContainer, "ng-template[ngComboboxPopupContainer]", ["ngComboboxPopupContainer"], {}, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
41
+ }
42
+ declare class ComboboxPopup<V> {
43
+ /** The combobox that the popup belongs to. */
44
+ readonly combobox: Combobox<V> | null;
45
+ /** The controls the popup exposes to the combobox. */
46
+ readonly controls: WritableSignal<ComboboxListboxControls<any, V> | ComboboxTreeControls<any, V> | undefined>;
47
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopup<any>, never>;
48
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopup<any>, "[ngComboboxPopup]", ["ngComboboxPopup"], {}, {}, never, never, true, never>;
49
+ }
50
+
51
+ export { Combobox, ComboboxInput, ComboboxPopup, ComboboxPopupContainer };
@@ -0,0 +1,38 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ /**
4
+ * A container directive controls the visibility of its content.
5
+ */
6
+ declare class DeferredContentAware {
7
+ readonly contentVisible: _angular_core.WritableSignal<boolean>;
8
+ readonly preserveContent: _angular_core.ModelSignal<boolean>;
9
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContentAware, never>;
10
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContentAware, never, never, { "preserveContent": { "alias": "preserveContent"; "required": false; "isSignal": true; }; }, { "preserveContent": "preserveContentChange"; }, never, never, true, never>;
11
+ }
12
+ /**
13
+ * DeferredContent loads/unloads the content based on the visibility.
14
+ * The visibilty signal is sent from a parent directive implements
15
+ * DeferredContentAware.
16
+ *
17
+ * Use this directive as a host directive. For example:
18
+ *
19
+ * ```ts
20
+ * @Directive({
21
+ * selector: 'ng-template[AccordionContent]',
22
+ * hostDirectives: [DeferredContent],
23
+ * })
24
+ * class AccordionContent {}
25
+ * ```
26
+ */
27
+ declare class DeferredContent {
28
+ private readonly _deferredContentAware;
29
+ private readonly _templateRef;
30
+ private readonly _viewContainerRef;
31
+ private _isRendered;
32
+ readonly deferredContentAware: _angular_core.WritableSignal<DeferredContentAware | null>;
33
+ constructor();
34
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContent, never>;
35
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContent, never, never, {}, {}, never, never, true, never>;
36
+ }
37
+
38
+ export { DeferredContent, DeferredContentAware };
@@ -0,0 +1,95 @@
1
+ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
2
+ import * as _angular_core from '@angular/core';
3
+ import { OptionPattern, ListboxPattern } from '@angular/aria/ui-patterns';
4
+ import { ComboboxPopup } from './combobox.js';
5
+ import '@angular/aria/deferred-content';
6
+
7
+ /**
8
+ * A listbox container.
9
+ *
10
+ * Listboxes are used to display a list of items for a user to select from. The Listbox is meant
11
+ * to be used in conjunction with Option as follows:
12
+ *
13
+ * ```html
14
+ * <ul ngListbox>
15
+ * <li [value]="1" ngOption>Item 1</li>
16
+ * <li [value]="2" ngOption>Item 2</li>
17
+ * <li [value]="3" ngOption>Item 3</li>
18
+ * </ul>
19
+ * ```
20
+ */
21
+ declare class Listbox<V> {
22
+ /** A unique identifier for the listbox. */
23
+ private readonly _generatedId;
24
+ /** A unique identifier for the listbox. */
25
+ protected id: _angular_core.Signal<string>;
26
+ /** A reference to the parent combobox popup, if one exists. */
27
+ private readonly _popup;
28
+ /** A reference to the listbox element. */
29
+ private readonly _elementRef;
30
+ /** The directionality (LTR / RTL) context for the application (or a subtree of it). */
31
+ private readonly _directionality;
32
+ /** The Options nested inside of the Listbox. */
33
+ private readonly _options;
34
+ /** A signal wrapper for directionality. */
35
+ protected textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
36
+ /** The Option UIPatterns of the child Options. */
37
+ protected items: _angular_core.Signal<OptionPattern<any>[]>;
38
+ /** Whether the list is vertically or horizontally oriented. */
39
+ orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
40
+ /** Whether multiple items in the list can be selected at once. */
41
+ multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
42
+ /** Whether focus should wrap when navigating. */
43
+ wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
44
+ /** Whether disabled items in the list should be skipped when navigating. */
45
+ skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
46
+ /** The focus strategy used by the list. */
47
+ focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
48
+ /** The selection strategy used by the list. */
49
+ selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
50
+ /** The amount of time before the typeahead search is reset. */
51
+ typeaheadDelay: _angular_core.InputSignal<number>;
52
+ /** Whether the listbox is disabled. */
53
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
54
+ /** Whether the listbox is readonly. */
55
+ readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
56
+ /** The values of the current selected items. */
57
+ value: _angular_core.ModelSignal<V[]>;
58
+ /** The Listbox UIPattern. */
59
+ pattern: ListboxPattern<V>;
60
+ /** Whether the listbox has received focus yet. */
61
+ private _hasFocused;
62
+ constructor();
63
+ onFocus(): void;
64
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Listbox<any>, never>;
65
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Listbox<any>, "[ngListbox]", ["ngListbox"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_options"], never, true, [{ directive: typeof ComboboxPopup; inputs: {}; outputs: {}; }]>;
66
+ }
67
+ /** A selectable option in a Listbox. */
68
+ declare class Option<V> {
69
+ /** A reference to the option element. */
70
+ private readonly _elementRef;
71
+ /** The parent Listbox. */
72
+ private readonly _listbox;
73
+ /** A unique identifier for the option. */
74
+ private readonly _generatedId;
75
+ /** A unique identifier for the option. */
76
+ protected id: _angular_core.Signal<string>;
77
+ /** The text used by the typeahead search. */
78
+ protected searchTerm: _angular_core.Signal<any>;
79
+ /** The parent Listbox UIPattern. */
80
+ protected listbox: _angular_core.Signal<ListboxPattern<any>>;
81
+ /** A reference to the option element to be focused on navigation. */
82
+ protected element: _angular_core.Signal<any>;
83
+ /** The value of the option. */
84
+ value: _angular_core.InputSignal<V>;
85
+ /** Whether an item is disabled. */
86
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
87
+ /** The text used by the typeahead search. */
88
+ label: _angular_core.InputSignal<string | undefined>;
89
+ /** The Option UIPattern. */
90
+ pattern: OptionPattern<V>;
91
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Option<any>, never>;
92
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Option<any>, "[ngOption]", ["ngOption"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
93
+ }
94
+
95
+ export { Listbox, Option };
@@ -0,0 +1,82 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { WritableSignal } from '@angular/core';
3
+ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
+ import { RadioButtonPattern, RadioGroupPattern } from '@angular/aria/ui-patterns';
5
+ import * as i1 from '@angular/aria/toolbar';
6
+
7
+ /**
8
+ * A radio button group container.
9
+ *
10
+ * Radio groups are used to group multiple radio buttons or radio group labels so they function as
11
+ * a single form control. The RadioGroup is meant to be used in conjunction with RadioButton
12
+ * as follows:
13
+ *
14
+ * ```html
15
+ * <div ngRadioGroup>
16
+ * <div ngRadioButton value="1">Option 1</div>
17
+ * <div ngRadioButton value="2">Option 2</div>
18
+ * <div ngRadioButton value="3">Option 3</div>
19
+ * </div>
20
+ * ```
21
+ */
22
+ declare class RadioGroup<V> {
23
+ /** A reference to the radio group element. */
24
+ private readonly _elementRef;
25
+ /** A reference to the ToolbarWidgetGroup, if the radio group is in a toolbar. */
26
+ private readonly _toolbarWidgetGroup;
27
+ /** Whether the radio group is inside of a Toolbar. */
28
+ private readonly _hasToolbar;
29
+ /** The RadioButtons nested inside of the RadioGroup. */
30
+ private readonly _radioButtons;
31
+ /** A signal wrapper for directionality. */
32
+ protected textDirection: WritableSignal<_angular_cdk_bidi.Direction>;
33
+ /** The RadioButton UIPatterns of the child RadioButtons. */
34
+ protected items: _angular_core.Signal<RadioButtonPattern<any>[]>;
35
+ /** Whether the radio group is vertically or horizontally oriented. */
36
+ readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
37
+ /** Whether disabled items in the group should be skipped when navigating. */
38
+ readonly skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
39
+ /** The focus strategy used by the radio group. */
40
+ readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
41
+ /** Whether the radio group is disabled. */
42
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
43
+ /** Whether the radio group is readonly. */
44
+ readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
45
+ /** The value of the currently selected radio button. */
46
+ readonly value: _angular_core.ModelSignal<V | null>;
47
+ /** The internal selection state for the radio group. */
48
+ private readonly _value;
49
+ /** The RadioGroup UIPattern. */
50
+ readonly pattern: RadioGroupPattern<V>;
51
+ /** Whether the radio group has received focus yet. */
52
+ private _hasFocused;
53
+ constructor();
54
+ onFocus(): void;
55
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RadioGroup<any>, never>;
56
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RadioGroup<any>, "[ngRadioGroup]", ["ngRadioGroup"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["_radioButtons"], never, true, [{ directive: typeof i1.ToolbarWidgetGroup; inputs: { "disabled": "disabled"; }; outputs: {}; }]>;
57
+ }
58
+ /** A selectable radio button in a RadioGroup. */
59
+ declare class RadioButton<V> {
60
+ /** A reference to the radio button element. */
61
+ private readonly _elementRef;
62
+ /** The parent RadioGroup. */
63
+ private readonly _radioGroup;
64
+ /** A unique identifier for the radio button. */
65
+ private readonly _generatedId;
66
+ /** A unique identifier for the radio button. */
67
+ readonly id: _angular_core.Signal<string>;
68
+ /** The value associated with the radio button. */
69
+ readonly value: _angular_core.InputSignal<V>;
70
+ /** The parent RadioGroup UIPattern. */
71
+ readonly group: _angular_core.Signal<RadioGroupPattern<any>>;
72
+ /** A reference to the radio button element to be focused on navigation. */
73
+ element: _angular_core.Signal<any>;
74
+ /** Whether the radio button is disabled. */
75
+ disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
76
+ /** The RadioButton UIPattern. */
77
+ pattern: RadioButtonPattern<V>;
78
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RadioButton<any>, never>;
79
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RadioButton<any>, "[ngRadioButton]", ["ngRadioButton"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
80
+ }
81
+
82
+ export { RadioButton, RadioGroup };
@@ -0,0 +1,156 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal, OnInit, OnDestroy } from '@angular/core';
3
+ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
+ import { TabPattern, TabPanelPattern, TabListPattern } from '@angular/aria/ui-patterns';
5
+ import * as i1 from '@angular/aria/deferred-content';
6
+
7
+ interface HasElement {
8
+ element: Signal<HTMLElement>;
9
+ }
10
+ /**
11
+ * A Tabs container.
12
+ *
13
+ * Represents a set of layered sections of content. The Tabs is a container meant to be used with
14
+ * TabList, Tab, and TabPanel as follows:
15
+ *
16
+ * ```html
17
+ * <div ngTabs>
18
+ * <ul ngTabList>
19
+ * <li ngTab value="tab1">Tab 1</li>
20
+ * <li ngTab value="tab2">Tab 2</li>
21
+ * <li ngTab value="tab3">Tab 3</li>
22
+ * </ul>
23
+ *
24
+ * <div ngTabPanel value="tab1">
25
+ * <ng-template ngTabContent>Tab content 1</ng-template>
26
+ * </div>
27
+ * <div ngTabPanel value="tab2">
28
+ * <ng-template ngTabContent>Tab content 2</ng-template>
29
+ * </div>
30
+ * <div ngTabPanel value="tab3">
31
+ * <ng-template ngTabContent>Tab content 3</ng-template>
32
+ * </div>
33
+ * ```
34
+ */
35
+ declare class Tabs {
36
+ /** The TabList nested inside of the container. */
37
+ private readonly _tablist;
38
+ /** The TabPanels nested inside of the container. */
39
+ private readonly _unorderedPanels;
40
+ /** The Tab UIPattern of the child Tabs. */
41
+ tabs: Signal<TabPattern[] | undefined>;
42
+ /** The TabPanel UIPattern of the child TabPanels. */
43
+ unorderedTabpanels: Signal<TabPanelPattern[]>;
44
+ register(child: TabList | TabPanel): void;
45
+ deregister(child: TabList | TabPanel): void;
46
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tabs, never>;
47
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tabs, "[ngTabs]", ["ngTabs"], {}, {}, never, never, true, never>;
48
+ }
49
+ /**
50
+ * A TabList container.
51
+ *
52
+ * Controls a list of Tab(s).
53
+ */
54
+ declare class TabList implements OnInit, OnDestroy {
55
+ /** A reference to the tab list element. */
56
+ private readonly _elementRef;
57
+ /** The parent Tabs. */
58
+ private readonly _tabs;
59
+ /** The Tabs nested inside of the TabList. */
60
+ private readonly _unorderedTabs;
61
+ /** The internal tab selection state. */
62
+ private readonly _selection;
63
+ /** Text direction. */
64
+ readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
65
+ /** The Tab UIPatterns of the child Tabs. */
66
+ readonly tabs: Signal<TabPattern[]>;
67
+ /** Whether the tablist is vertically or horizontally oriented. */
68
+ readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
69
+ /** Whether focus should wrap when navigating. */
70
+ readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
71
+ /** Whether disabled items in the list should be skipped when navigating. */
72
+ readonly skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
73
+ /** The focus strategy used by the tablist. */
74
+ readonly focusMode: _angular_core.InputSignal<"roving" | "activedescendant">;
75
+ /** The selection strategy used by the tablist. */
76
+ readonly selectionMode: _angular_core.InputSignal<"follow" | "explicit">;
77
+ /** Whether the tablist is disabled. */
78
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
79
+ /** The current selected tab. */
80
+ readonly selectedTab: _angular_core.ModelSignal<string | undefined>;
81
+ /** The TabList UIPattern. */
82
+ readonly pattern: TabListPattern;
83
+ /** Whether the tree has received focus yet. */
84
+ private _hasFocused;
85
+ constructor();
86
+ onFocus(): void;
87
+ ngOnInit(): void;
88
+ ngOnDestroy(): void;
89
+ register(child: Tab): void;
90
+ deregister(child: Tab): void;
91
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabList, never>;
92
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabList, "[ngTabList]", ["ngTabList"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectedTab": { "alias": "selectedTab"; "required": false; "isSignal": true; }; }, { "selectedTab": "selectedTabChange"; }, never, never, true, never>;
93
+ }
94
+ /** A selectable tab in a TabList. */
95
+ declare class Tab implements HasElement, OnInit, OnDestroy {
96
+ /** A reference to the tab element. */
97
+ private readonly _elementRef;
98
+ /** The parent Tabs. */
99
+ private readonly _tabs;
100
+ /** The parent TabList. */
101
+ private readonly _tabList;
102
+ /** A global unique identifier for the tab. */
103
+ private readonly _id;
104
+ /** The host native element. */
105
+ readonly element: Signal<any>;
106
+ /** The parent TabList UIPattern. */
107
+ readonly tablist: Signal<TabListPattern>;
108
+ /** The TabPanel UIPattern associated with the tab */
109
+ readonly tabpanel: Signal<TabPanelPattern | undefined>;
110
+ /** Whether a tab is disabled. */
111
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
112
+ /** A local unique identifier for the tab. */
113
+ readonly value: _angular_core.InputSignal<string>;
114
+ /** The Tab UIPattern. */
115
+ readonly pattern: TabPattern;
116
+ ngOnInit(): void;
117
+ ngOnDestroy(): void;
118
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Tab, never>;
119
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Tab, "[ngTab]", ["ngTab"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
120
+ }
121
+ /**
122
+ * A TabPanel container for the resources of layered content associated with a tab.
123
+ *
124
+ * If a tabpanel is hidden due to its corresponding tab is not activated, the `inert` attribute
125
+ * will be applied to the tabpanel element to remove it from the accessibility tree and stop
126
+ * all the keyboard and pointer interactions. Note that this does not visually hide the tabpenl
127
+ * and a proper styling is required.
128
+ */
129
+ declare class TabPanel implements OnInit, OnDestroy {
130
+ /** The DeferredContentAware host directive. */
131
+ private readonly _deferredContentAware;
132
+ /** The parent Tabs. */
133
+ private readonly _Tabs;
134
+ /** A global unique identifier for the tab. */
135
+ private readonly _id;
136
+ /** The Tab UIPattern associated with the tabpanel */
137
+ readonly tab: Signal<TabPattern | undefined>;
138
+ /** A local unique identifier for the tabpanel. */
139
+ readonly value: _angular_core.InputSignal<string>;
140
+ /** The TabPanel UIPattern. */
141
+ readonly pattern: TabPanelPattern;
142
+ constructor();
143
+ ngOnInit(): void;
144
+ ngOnDestroy(): void;
145
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabPanel, never>;
146
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabPanel, "[ngTabPanel]", ["ngTabPanel"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
147
+ }
148
+ /**
149
+ * A TabContent container for the lazy-loaded content.
150
+ */
151
+ declare class TabContent {
152
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabContent, never>;
153
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabContent, "ng-template[ngTabContent]", ["ngTabContent"], {}, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
154
+ }
155
+
156
+ export { Tab, TabContent, TabList, TabPanel, Tabs };
@@ -0,0 +1,113 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal, OnInit, OnDestroy } from '@angular/core';
3
+ import * as _angular_cdk_bidi from '@angular/cdk/bidi';
4
+ import { ToolbarWidgetPattern, ToolbarWidgetGroupPattern, ToolbarPattern, ToolbarWidgetGroupControls } from '@angular/aria/ui-patterns';
5
+
6
+ /**
7
+ * A toolbar widget container.
8
+ *
9
+ * Widgets such as radio groups or buttons are nested within a toolbar to allow for a single
10
+ * place of reference for focus and navigation. The Toolbar is meant to be used in conjunction
11
+ * with ToolbarWidget and RadioGroup as follows:
12
+ *
13
+ * ```html
14
+ * <div ngToolbar>
15
+ * <button ngToolbarWidget>Button</button>
16
+ * <div ngRadioGroup>
17
+ * <label ngRadioButton value="1">Option 1</label>
18
+ * <label ngRadioButton value="2">Option 2</label>
19
+ * <label ngRadioButton value="3">Option 3</label>
20
+ * </div>
21
+ * </div>
22
+ * ```
23
+ */
24
+ declare class Toolbar<V> {
25
+ /** A reference to the toolbar element. */
26
+ private readonly _elementRef;
27
+ /** The TabList nested inside of the container. */
28
+ private readonly _widgets;
29
+ /** A signal wrapper for directionality. */
30
+ readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
31
+ /** Sorted UIPatterns of the child widgets */
32
+ readonly items: Signal<(ToolbarWidgetPattern<V> | ToolbarWidgetGroupPattern<V>)[]>;
33
+ /** Whether the toolbar is vertically or horizontally oriented. */
34
+ readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
35
+ /** Whether disabled items in the group should be skipped when navigating. */
36
+ readonly skipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
37
+ /** Whether the toolbar is disabled. */
38
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
39
+ /** Whether focus should wrap when navigating. */
40
+ readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
41
+ /** The toolbar UIPattern. */
42
+ readonly pattern: ToolbarPattern<V>;
43
+ /** Whether the toolbar has received focus yet. */
44
+ private _hasFocused;
45
+ constructor();
46
+ onFocus(): void;
47
+ register(widget: ToolbarWidget<V> | ToolbarWidgetGroup<V>): void;
48
+ unregister(widget: ToolbarWidget<V> | ToolbarWidgetGroup<V>): void;
49
+ /** Finds the toolbar item associated with a given element. */
50
+ private _getItem;
51
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Toolbar<any>, never>;
52
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Toolbar<any>, "[ngToolbar]", ["ngToolbar"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "skipDisabled": { "alias": "skipDisabled"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
53
+ }
54
+ /**
55
+ * A widget within a toolbar.
56
+ *
57
+ * A widget is anything that is within a toolbar. It should be applied to any native HTML element
58
+ * that has the purpose of acting as a widget navigatable within a toolbar.
59
+ */
60
+ declare class ToolbarWidget<V> implements OnInit, OnDestroy {
61
+ /** A reference to the widget element. */
62
+ private readonly _elementRef;
63
+ /** The parent Toolbar. */
64
+ private readonly _toolbar;
65
+ /** A unique identifier for the widget. */
66
+ private readonly _generatedId;
67
+ /** A unique identifier for the widget. */
68
+ readonly id: Signal<string>;
69
+ /** The parent Toolbar UIPattern. */
70
+ readonly toolbar: Signal<ToolbarPattern<any>>;
71
+ /** A reference to the widget element to be focused on navigation. */
72
+ readonly element: Signal<any>;
73
+ /** Whether the widget is disabled. */
74
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
75
+ /** Whether the widget is 'hard' disabled, which is different from `aria-disabled`. A hard disabled widget cannot receive focus. */
76
+ readonly hardDisabled: Signal<boolean>;
77
+ /** The ToolbarWidget UIPattern. */
78
+ readonly pattern: ToolbarWidgetPattern<V>;
79
+ ngOnInit(): void;
80
+ ngOnDestroy(): void;
81
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarWidget<any>, never>;
82
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidget<any>, "[ngToolbarWidget]", ["ngToolbarWidget"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
83
+ }
84
+ /**
85
+ * A directive that groups toolbar widgets, used for more complex widgets like radio groups that
86
+ * have their own internal navigation.
87
+ */
88
+ declare class ToolbarWidgetGroup<V> implements OnInit, OnDestroy {
89
+ /** A reference to the widget element. */
90
+ private readonly _elementRef;
91
+ /** The parent Toolbar. */
92
+ private readonly _toolbar;
93
+ /** A unique identifier for the widget. */
94
+ private readonly _generatedId;
95
+ /** A unique identifier for the widget. */
96
+ readonly id: Signal<string>;
97
+ /** The parent Toolbar UIPattern. */
98
+ readonly toolbar: Signal<ToolbarPattern<any> | undefined>;
99
+ /** A reference to the widget element to be focused on navigation. */
100
+ readonly element: Signal<any>;
101
+ /** Whether the widget group is disabled. */
102
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
103
+ /** The controls that can be performed on the widget group. */
104
+ readonly controls: _angular_core.WritableSignal<ToolbarWidgetGroupControls | undefined>;
105
+ /** The ToolbarWidgetGroup UIPattern. */
106
+ readonly pattern: ToolbarWidgetGroupPattern<V>;
107
+ ngOnInit(): void;
108
+ ngOnDestroy(): void;
109
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarWidgetGroup<any>, never>;
110
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ToolbarWidgetGroup<any>, never, never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
111
+ }
112
+
113
+ export { Toolbar, ToolbarWidget, ToolbarWidgetGroup };