@angular/aria 22.0.0-next.7 → 22.0.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_accordion-chunk.mjs +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs +1 -1
- package/fesm2022/{_signal-like-chunk.mjs → _collection-chunk.mjs} +51 -2
- package/fesm2022/_collection-chunk.mjs.map +1 -0
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_list-chunk.mjs +4 -1
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs +1 -1
- package/fesm2022/_menu-chunk.mjs +1 -1
- package/fesm2022/{_combobox-listbox-chunk.mjs → _option-chunk.mjs} +3 -50
- package/fesm2022/_option-chunk.mjs.map +1 -0
- package/fesm2022/_tabs-chunk.mjs +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +1 -1
- package/fesm2022/_transforms-chunk.mjs +8 -0
- package/fesm2022/_transforms-chunk.mjs.map +1 -0
- package/fesm2022/{_combobox-tree-chunk.mjs → _tree-chunk.mjs} +3 -48
- package/fesm2022/_tree-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +36 -15
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +28 -55
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox-testing.mjs +79 -0
- package/fesm2022/combobox-testing.mjs.map +1 -0
- package/fesm2022/combobox.mjs +273 -307
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid-testing.mjs +8 -0
- package/fesm2022/grid-testing.mjs.map +1 -1
- package/fesm2022/grid.mjs +68 -87
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs +4 -0
- package/fesm2022/listbox-testing.mjs.map +1 -1
- package/fesm2022/listbox.mjs +184 -205
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +11 -0
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +42 -66
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +19 -13
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +78 -84
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +5 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +21 -31
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +12 -0
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +118 -146
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +6 -6
- package/types/_accordion-chunk.d.ts +2 -2
- package/types/_collection-chunk.d.ts +42 -0
- package/types/_expansion-chunk.d.ts +1 -1
- package/types/_grid-chunk.d.ts +9 -3
- package/types/_keyboard-event-manager-chunk.d.ts +1 -1
- package/types/_list-chunk.d.ts +1 -1
- package/types/_list-navigation-chunk.d.ts +1 -1
- package/types/_listbox-chunk.d.ts +1 -1
- package/types/_menu-chunk.d.ts +1 -1
- package/types/_tabs-chunk.d.ts +1 -1
- package/types/_toolbar-chunk.d.ts +1 -1
- package/types/_tree-chunk.d.ts +1 -1
- package/types/accordion.d.ts +7 -13
- package/types/combobox-testing.d.ts +63 -0
- package/types/combobox.d.ts +96 -193
- package/types/grid-testing.d.ts +4 -0
- package/types/grid.d.ts +101 -97
- package/types/listbox-testing.d.ts +25 -0
- package/types/listbox.d.ts +55 -60
- package/types/menu-testing.d.ts +6 -0
- package/types/menu.d.ts +17 -13
- package/types/private.d.ts +24 -138
- package/types/tabs.d.ts +69 -72
- package/types/toolbar-testing.d.ts +4 -0
- package/types/toolbar.d.ts +5 -6
- package/types/tree-testing.d.ts +8 -0
- package/types/tree.d.ts +7 -14
- package/fesm2022/_combobox-chunk.mjs +0 -478
- package/fesm2022/_combobox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-listbox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-tree-chunk.mjs.map +0 -1
- package/fesm2022/_element-chunk.mjs +0 -6
- package/fesm2022/_element-chunk.mjs.map +0 -1
- package/fesm2022/_signal-like-chunk.mjs.map +0 -1
- package/fesm2022/simple-combobox.mjs +0 -443
- package/fesm2022/simple-combobox.mjs.map +0 -1
- package/types/_combobox-chunk.d.ts +0 -224
- package/types/_element-chunk.d.ts +0 -10
- package/types/_signal-like-chunk.d.ts +0 -14
- package/types/simple-combobox.d.ts +0 -124
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simple-combobox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/simple-combobox/simple-combobox.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/simple-combobox/simple-combobox-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/simple-combobox/simple-combobox-popup.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/simple-combobox/simple-combobox-widget.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnInit,\n signal,\n Renderer2,\n} from '@angular/core';\nimport {DeferredContentAware, SimpleComboboxPattern} from '@angular/aria/private';\nimport type {ComboboxPopup} from './simple-combobox-popup';\n\n/**\n * The container element that wraps a combobox input and popup, and orchestrates its behavior.\n *\n * The `ngCombobox` directive is the main entry point for creating a combobox and customizing its\n * behavior. It coordinates the interactions between the input and the popup.\n *\n * ```html\n * <div ngCombobox [(expanded)]=\"expanded\">\n * <input ngComboboxInput />\n *\n * <ng-template ngComboboxPopup>\n * <div ngComboboxWidget>\n * <!-- ... options ... -->\n * </div>\n * </ng-template>\n * </div>\n * ```\n */\n@Directive({\n selector: '[ngCombobox]',\n exportAs: 'ngCombobox',\n host: {\n 'role': 'combobox',\n '[attr.aria-autocomplete]': '_pattern.autocomplete()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-expanded]': '_pattern.isExpanded()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '[attr.aria-controls]': '_pattern.popupId()',\n '[attr.aria-haspopup]': '_pattern.popupType()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(focusin)': '_pattern.onFocusin()',\n '(focusout)': '_pattern.onFocusout($event)',\n '(click)': '_pattern.onClick($event)',\n '(input)': '_pattern.onInput($event)',\n },\n})\nexport class Combobox extends DeferredContentAware implements OnInit {\n private readonly _renderer = inject(Renderer2);\n\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** A reference to the input element. */\n readonly element = this._elementRef.nativeElement;\n\n /** The popup associated with the combobox. */\n readonly _popup = signal<ComboboxPopup | undefined>(undefined);\n\n /** Whether the combobox is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the combobox should always remain expanded. */\n readonly alwaysExpanded = input(false, {transform: booleanAttribute});\n\n /** Whether the combobox is expanded. */\n readonly expanded = model<boolean>(false);\n\n /** The value of the combobox input. */\n readonly value = model<string>('');\n\n /** An inline suggestion to be displayed in the input. */\n readonly inlineSuggestion = input<string | undefined>(undefined);\n\n /** The combobox ui pattern. */\n readonly _pattern = new SimpleComboboxPattern({\n ...this,\n element: () => this.element,\n expandable: () => true,\n popup: computed(() => this._popup()?._pattern),\n });\n\n constructor() {\n super();\n\n afterRenderEffect(() => this._pattern.keyboardEventRelayEffect());\n afterRenderEffect(() => this._pattern.closePopupOnBlurEffect());\n afterRenderEffect(() => {\n this.contentVisible.set(this._pattern.isExpanded());\n });\n\n if (this._pattern.isEditable()) {\n afterRenderEffect(() => {\n this._renderer.setProperty(this.element, 'value', this.value());\n });\n afterRenderEffect(() => {\n this._pattern.highlightEffect();\n });\n }\n }\n\n ngOnInit() {\n if (this.alwaysExpanded()) {\n this.expanded.set(true);\n }\n }\n\n /** Registers a popup with the combobox. */\n _registerPopup(popup: ComboboxPopup) {\n this._popup.set(popup);\n }\n\n /** Unregisters the popup from the combobox. */\n _unregisterPopup() {\n this._popup.set(undefined);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {ComboboxPopup} from './simple-combobox-popup';\n\n/** Token used to expose the combobox popup. */\nexport const SIMPLE_COMBOBOX_POPUP = new InjectionToken<ComboboxPopup>('SIMPLE_COMBOBOX_POPUP');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed, Directive, inject, input, OnDestroy, OnInit, signal} from '@angular/core';\nimport {DeferredContent, SimpleComboboxPopupPattern} from '@angular/aria/private';\nimport type {Combobox} from './simple-combobox';\nimport type {ComboboxWidget} from './simple-combobox-widget';\nimport {SIMPLE_COMBOBOX_POPUP} from './simple-combobox-tokens';\n\n/**\n * A structural directive that marks the `ng-template` to be used as the popup\n * for a combobox. This content is conditionally rendered.\n *\n * The content of the popup can be any element with the `ngComboboxWidget` directive.\n *\n * ```html\n * <ng-template ngComboboxPopup>\n * <div ngComboboxWidget>\n * <!-- ... options ... -->\n * </div>\n * </ng-template>\n * ```\n */\n@Directive({\n selector: 'ng-template[ngComboboxPopup]',\n exportAs: 'ngComboboxPopup',\n hostDirectives: [DeferredContent],\n providers: [{provide: SIMPLE_COMBOBOX_POPUP, useExisting: ComboboxPopup}],\n})\nexport class ComboboxPopup implements OnInit, OnDestroy {\n private readonly _deferredContent = inject(DeferredContent);\n\n /** The combobox that the popup belongs to. */\n readonly combobox = input.required<Combobox>();\n\n /** The widget contained within the popup. */\n readonly _widget = signal<ComboboxWidget | undefined>(undefined);\n\n /** The element that serves as the control target for the popup. */\n readonly controlTarget = computed(() => this._widget()?.element);\n\n /** The ID of the popup. */\n readonly popupId = computed(() => this._widget()?.popupId());\n\n /** The ID of the active descendant in the popup. */\n readonly activeDescendant = computed(() => this._widget()?.activeDescendant());\n\n /** The type of the popup (e.g., listbox, tree, grid, dialog). */\n readonly popupType = input<'listbox' | 'tree' | 'grid' | 'dialog'>('listbox');\n\n /** The popup pattern. */\n readonly _pattern = new SimpleComboboxPopupPattern({\n ...this,\n });\n\n ngOnInit() {\n this.combobox()._registerPopup(this);\n this._deferredContent.deferredContentAware.set(this.combobox());\n }\n\n ngOnDestroy() {\n this.combobox()._unregisterPopup();\n }\n\n /** Registers a widget with the popup. */\n _registerWidget(widget: ComboboxWidget) {\n this._widget.set(widget);\n }\n\n /** Unregisters the widget from the popup. */\n _unregisterWidget() {\n this._widget.set(undefined);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive, ElementRef, inject, input, OnDestroy, OnInit, signal} from '@angular/core';\nimport {SIMPLE_COMBOBOX_POPUP} from './simple-combobox-tokens';\n\n/**\n * Identifies an element as a widget within a combobox popup.\n *\n * This directive should be applied to the element that contains the options or content\n * of the popup. It handles the communication of ID and active descendant information\n * to the combobox.\n */\n@Directive({\n selector: '[ngComboboxWidget]',\n exportAs: 'ngComboboxWidget',\n host: {\n '(focusin)': 'onFocusin()',\n '(focusout)': 'onFocusout($event)',\n },\n})\nexport class ComboboxWidget implements OnInit, OnDestroy {\n /** The element that the popup widget is attached to. */\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _popup = inject(SIMPLE_COMBOBOX_POPUP);\n\n /** A reference to the popup widget element. */\n readonly element = this._elementRef.nativeElement;\n\n /** The ID of the popup widget. */\n readonly popupId = signal<string | undefined>(undefined);\n\n /** The ID of the active descendant in the widget. */\n readonly activeDescendant = input<string | undefined>(undefined);\n\n private _observer: MutationObserver | undefined;\n\n constructor() {\n const el = this.element;\n this._observer = new MutationObserver(mutations => {\n for (const mutation of mutations) {\n if (mutation.attributeName === 'id') {\n this.popupId.set(el.id);\n }\n }\n });\n\n this._observer.observe(el, {\n attributes: true,\n attributeFilter: ['id'],\n });\n }\n\n ngOnInit() {\n this.popupId.set(this.element.id);\n this._popup._registerWidget(this);\n }\n\n ngOnDestroy(): void {\n this._observer?.disconnect();\n this._popup._unregisterWidget();\n }\n\n /** Handles focus in events for the widget. */\n onFocusin() {\n this._popup._pattern.onFocusin();\n }\n\n /** Handles focus out events for the widget. */\n onFocusout(event: FocusEvent) {\n this._popup._pattern.onFocusout(event);\n }\n}\n"],"names":["Combobox","DeferredContentAware","_renderer","inject","Renderer2","_elementRef","ElementRef","element","nativeElement","_popup","signal","undefined","disabled","input","transform","booleanAttribute","alwaysExpanded","expanded","model","value","inlineSuggestion","_pattern","SimpleComboboxPattern","expandable","popup","computed","constructor","afterRenderEffect","keyboardEventRelayEffect","closePopupOnBlurEffect","contentVisible","set","isExpanded","isEditable","setProperty","highlightEffect","ngOnInit","_registerPopup","_unregisterPopup","deps","target","i0","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","outputs","host","attributes","listeners","properties","exportAs","usesInheritance","ngImport","decorators","args","SIMPLE_COMBOBOX_POPUP","InjectionToken","ComboboxPopup","_deferredContent","DeferredContent","combobox","required","_widget","controlTarget","popupId","activeDescendant","popupType","SimpleComboboxPopupPattern","deferredContentAware","ngOnDestroy","_registerWidget","widget","_unregisterWidget","providers","provide","useExisting","hostDirectives","directive","i1","ComboboxWidget","_observer","el","MutationObserver","mutations","mutation","attributeName","id","observe","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AAAC,IAAAA,QAAA,EAAA,oBAAA;AAAAC,IAAAA,MAAA,EAAA;AAAA0B,MAAAA,gBAAA,EAAA;AAAAzB,QAAAA,iBAAA,EAAA,kBAAA;AAAAC,QAAAA,UAAA,EAAA,kBAAA;AAAAC,QAAAA,QAAA,EAAA,IAAA;AAAAC,QAAAA,UAAA,EAAA,KAAA;AAAAC,QAAAA,iBAAA,EAAA;AAAA;KAAA;AAAAE,IAAAA,IAAA,EAAA;AAAAE,MAAAA,SAAA,EAAA;AAAA,QAAA,SAAA,EAAA,aAAA;AAAA,QAAA,UAAA,EAAA;AAAA;KAAA;IAAAE,QAAA,EAAA,CAAA,kBAAA,CAAA;AAAAE,IAAAA,QAAA,EAAAlB;AAAA,GAAA,CAAA;;;;;;QAAd6C,cAAc;AAAA1B,EAAAA,UAAA,EAAA,CAAA;UAR1BjB,SAAS;AAACkB,IAAAA,IAAA,EAAA,CAAA;AACThB,MAAAA,QAAQ,EAAE,oBAAoB;AAC9BY,MAAAA,QAAQ,EAAE,kBAAkB;AAC5BJ,MAAAA,IAAI,EAAE;AACJ,QAAA,WAAW,EAAE,aAAa;AAC1B,QAAA,YAAY,EAAE;AACf;KACF;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import { EventManager, EventHandlerOptions, ModifierInputs, EventHandler, KeyboardEventManager } from './_keyboard-event-manager-chunk.js';
|
|
2
|
-
import { SignalLike, WritableSignalLike } from './_signal-like-chunk.js';
|
|
3
|
-
import { ListItem } from './_list-chunk.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The different mouse buttons that may appear on a pointer event.
|
|
7
|
-
*/
|
|
8
|
-
declare enum MouseButton {
|
|
9
|
-
Main = 0,
|
|
10
|
-
Auxiliary = 1,
|
|
11
|
-
Secondary = 2
|
|
12
|
-
}
|
|
13
|
-
/** An event manager that is specialized for handling pointer events. */
|
|
14
|
-
declare class PointerEventManager<T extends PointerEvent> extends EventManager<T> {
|
|
15
|
-
readonly options: EventHandlerOptions;
|
|
16
|
-
/**
|
|
17
|
-
* Configures this event manager to handle events with a specific modifer and mouse button
|
|
18
|
-
* combination.
|
|
19
|
-
*/
|
|
20
|
-
on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;
|
|
21
|
-
/**
|
|
22
|
-
* Configures this event manager to handle events with a specific mouse button and no modifiers.
|
|
23
|
-
*/
|
|
24
|
-
on(modifiers: ModifierInputs, handler: EventHandler<T>): this;
|
|
25
|
-
/**
|
|
26
|
-
* Configures this event manager to handle events with the main mouse button and no modifiers.
|
|
27
|
-
*
|
|
28
|
-
* @param handler The handler function
|
|
29
|
-
* @param options Options for whether to stop propagation or prevent default.
|
|
30
|
-
*/
|
|
31
|
-
on(handler: EventHandler<T>): this;
|
|
32
|
-
private _normalizeInputs;
|
|
33
|
-
_isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs): boolean;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** Represents the required inputs for a combobox. */
|
|
37
|
-
interface ComboboxInputs<T extends ListItem<V>, V> {
|
|
38
|
-
/** The controls for the popup associated with the combobox. */
|
|
39
|
-
popupControls: SignalLike<ComboboxListboxControls<T, V> | ComboboxTreeControls<T, V> | ComboboxDialogPattern | undefined>;
|
|
40
|
-
/** The HTML input element that serves as the combobox input. */
|
|
41
|
-
inputEl: SignalLike<HTMLInputElement | undefined>;
|
|
42
|
-
/** The HTML element that serves as the combobox container. */
|
|
43
|
-
containerEl: SignalLike<HTMLElement | undefined>;
|
|
44
|
-
/** The filtering mode for the combobox. */
|
|
45
|
-
filterMode: SignalLike<'manual' | 'auto-select' | 'highlight'>;
|
|
46
|
-
/** The current value of the combobox. */
|
|
47
|
-
inputValue?: WritableSignalLike<string>;
|
|
48
|
-
/** The value of the first matching item in the popup. */
|
|
49
|
-
firstMatch: SignalLike<V | undefined>;
|
|
50
|
-
/** Whether the combobox is disabled. */
|
|
51
|
-
disabled: SignalLike<boolean>;
|
|
52
|
-
/** Whether the combobox is read-only. */
|
|
53
|
-
readonly: SignalLike<boolean>;
|
|
54
|
-
/** Whether the combobox is in a right-to-left context. */
|
|
55
|
-
textDirection: SignalLike<'rtl' | 'ltr'>;
|
|
56
|
-
/** Whether the combobox is always expanded. */
|
|
57
|
-
alwaysExpanded: SignalLike<boolean>;
|
|
58
|
-
}
|
|
59
|
-
/** An interface that allows combobox popups to expose the necessary controls for the combobox. */
|
|
60
|
-
interface ComboboxListboxControls<T extends ListItem<V>, V> {
|
|
61
|
-
/** A unique identifier for the popup. */
|
|
62
|
-
readonly id: () => string;
|
|
63
|
-
/** The ARIA role for the popup. */
|
|
64
|
-
role: SignalLike<'listbox' | 'tree' | 'grid'>;
|
|
65
|
-
/** Whether multiple items in the popup can be selected at once. */
|
|
66
|
-
multi: SignalLike<boolean>;
|
|
67
|
-
/** The ID of the active item in the popup. */
|
|
68
|
-
activeId: SignalLike<string | undefined>;
|
|
69
|
-
/** The list of items in the popup. */
|
|
70
|
-
items: SignalLike<T[]>;
|
|
71
|
-
/** Navigates to the given item in the popup. */
|
|
72
|
-
focus: (item: T, opts?: {
|
|
73
|
-
focusElement?: boolean;
|
|
74
|
-
}) => void;
|
|
75
|
-
/** Navigates to the next item in the popup. */
|
|
76
|
-
next: () => void;
|
|
77
|
-
/** Navigates to the previous item in the popup. */
|
|
78
|
-
prev: () => void;
|
|
79
|
-
/** Navigates to the first item in the popup. */
|
|
80
|
-
first: () => void;
|
|
81
|
-
/** Navigates to the last item in the popup. */
|
|
82
|
-
last: () => void;
|
|
83
|
-
/** Selects the current item in the popup. */
|
|
84
|
-
select: (item?: T) => void;
|
|
85
|
-
/** Toggles the selection state of the given item in the popup. */
|
|
86
|
-
toggle: (item?: T) => void;
|
|
87
|
-
/** Clears the selection state of the popup. */
|
|
88
|
-
clearSelection: () => void;
|
|
89
|
-
/** Removes focus from any item in the popup. */
|
|
90
|
-
unfocus: () => void;
|
|
91
|
-
/** Returns the item corresponding to the given event. */
|
|
92
|
-
getItem: (e: PointerEvent) => T | undefined;
|
|
93
|
-
/** Returns the currently active (focused) item in the popup. */
|
|
94
|
-
getActiveItem: () => T | undefined;
|
|
95
|
-
/** Returns the currently selected items in the popup. */
|
|
96
|
-
getSelectedItems: () => T[];
|
|
97
|
-
/** Sets the value of the combobox based on the selected item. */
|
|
98
|
-
setValue: (value: V | undefined) => void;
|
|
99
|
-
}
|
|
100
|
-
interface ComboboxTreeControls<T extends ListItem<V>, V> extends ComboboxListboxControls<T, V> {
|
|
101
|
-
/** Whether the currently active item in the popup is collapsible. */
|
|
102
|
-
isItemCollapsible: () => boolean;
|
|
103
|
-
/** Expands the currently active item in the popup. */
|
|
104
|
-
expandItem: () => void;
|
|
105
|
-
/** Collapses the currently active item in the popup. */
|
|
106
|
-
collapseItem: () => void;
|
|
107
|
-
/** Checks if the currently active item in the popup is expandable. */
|
|
108
|
-
isItemExpandable: (item?: T) => boolean;
|
|
109
|
-
/** Expands all nodes in the tree. */
|
|
110
|
-
expandAll: () => void;
|
|
111
|
-
/** Collapses all nodes in the tree. */
|
|
112
|
-
collapseAll: () => void;
|
|
113
|
-
/** Toggles the expansion state of the currently active item in the popup. */
|
|
114
|
-
toggleExpansion: (item?: T) => void;
|
|
115
|
-
/** Whether the current active item is selectable. */
|
|
116
|
-
isItemSelectable: (item?: T) => boolean;
|
|
117
|
-
}
|
|
118
|
-
/** Controls the state of a combobox. */
|
|
119
|
-
declare class ComboboxPattern<T extends ListItem<V>, V> {
|
|
120
|
-
readonly inputs: ComboboxInputs<T, V>;
|
|
121
|
-
/** Whether the combobox is expanded. */
|
|
122
|
-
readonly expanded: WritableSignalLike<boolean>;
|
|
123
|
-
/** Whether the combobox is disabled. */
|
|
124
|
-
readonly disabled: () => boolean;
|
|
125
|
-
/** The ID of the active item in the combobox. */
|
|
126
|
-
readonly activeDescendant: SignalLike<string | null>;
|
|
127
|
-
/** The currently highlighted item in the combobox. */
|
|
128
|
-
readonly highlightedItem: WritableSignalLike<T | undefined>;
|
|
129
|
-
/** Whether the most recent input event was a deletion. */
|
|
130
|
-
private _isDeleting;
|
|
131
|
-
/** Whether the combobox is focused. */
|
|
132
|
-
readonly isFocused: WritableSignalLike<boolean>;
|
|
133
|
-
/** Whether the combobox has ever been focused. */
|
|
134
|
-
readonly hasBeenInteracted: WritableSignalLike<boolean>;
|
|
135
|
-
/** The key used to navigate to the previous item in the list. */
|
|
136
|
-
readonly expandKey: SignalLike<"ArrowLeft" | "ArrowRight">;
|
|
137
|
-
/** The key used to navigate to the next item in the list. */
|
|
138
|
-
readonly collapseKey: SignalLike<"ArrowLeft" | "ArrowRight">;
|
|
139
|
-
/** The ID of the popup associated with the combobox. */
|
|
140
|
-
readonly popupId: SignalLike<string | null>;
|
|
141
|
-
/** The autocomplete behavior of the combobox. */
|
|
142
|
-
readonly autocomplete: SignalLike<"both" | "list">;
|
|
143
|
-
/** The ARIA role of the popup associated with the combobox. */
|
|
144
|
-
readonly hasPopup: SignalLike<"listbox" | "tree" | "grid" | "dialog" | null>;
|
|
145
|
-
/** Whether the combobox is read-only. */
|
|
146
|
-
readonly readonly: SignalLike<true | null>;
|
|
147
|
-
/** Returns the listbox controls for the combobox. */
|
|
148
|
-
readonly listControls: () => ComboboxListboxControls<T, V> | null | undefined;
|
|
149
|
-
/** Returns the tree controls for the combobox. */
|
|
150
|
-
readonly treeControls: () => ComboboxTreeControls<T, V> | null;
|
|
151
|
-
/** The keydown event manager for the combobox. */
|
|
152
|
-
readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
|
|
153
|
-
/** The click event manager for the combobox. */
|
|
154
|
-
readonly click: SignalLike<PointerEventManager<PointerEvent>>;
|
|
155
|
-
constructor(inputs: ComboboxInputs<T, V>);
|
|
156
|
-
/** Handles keydown events for the combobox. */
|
|
157
|
-
onKeydown(event: KeyboardEvent): void;
|
|
158
|
-
/** Handles click events for the combobox. */
|
|
159
|
-
onClick(event: MouseEvent): void;
|
|
160
|
-
/** Handles input events for the combobox. */
|
|
161
|
-
onInput(event: Event): void;
|
|
162
|
-
/** Handles focus in events for the combobox. */
|
|
163
|
-
onFocusIn(): void;
|
|
164
|
-
/** Handles focus out events for the combobox. */
|
|
165
|
-
onFocusOut(event: FocusEvent): void;
|
|
166
|
-
/** The first matching item in the combobox. */
|
|
167
|
-
readonly firstMatch: SignalLike<T | undefined>;
|
|
168
|
-
/** Handles filtering logic for the combobox. */
|
|
169
|
-
onFilter(): void;
|
|
170
|
-
/** Highlights the currently selected item in the combobox. */
|
|
171
|
-
highlight(): void;
|
|
172
|
-
/** Closes the combobox. */
|
|
173
|
-
close(opts?: {
|
|
174
|
-
reset: boolean;
|
|
175
|
-
}): void;
|
|
176
|
-
/** Opens the combobox. */
|
|
177
|
-
open(nav?: {
|
|
178
|
-
first?: boolean;
|
|
179
|
-
last?: boolean;
|
|
180
|
-
selected?: boolean;
|
|
181
|
-
}): void;
|
|
182
|
-
/** Navigates to the next focusable item in the combobox popup. */
|
|
183
|
-
next(): void;
|
|
184
|
-
/** Navigates to the previous focusable item in the combobox popup. */
|
|
185
|
-
prev(): void;
|
|
186
|
-
/** Navigates to the first focusable item in the combobox popup. */
|
|
187
|
-
first(): void;
|
|
188
|
-
/** Navigates to the last focusable item in the combobox popup. */
|
|
189
|
-
last(): void;
|
|
190
|
-
/** Collapses the currently focused item in the combobox. */
|
|
191
|
-
collapseItem(): void;
|
|
192
|
-
/** Expands the currently focused item in the combobox. */
|
|
193
|
-
expandItem(): void;
|
|
194
|
-
/** Selects an item in the combobox popup. */
|
|
195
|
-
select(opts?: {
|
|
196
|
-
item?: T;
|
|
197
|
-
commit?: boolean;
|
|
198
|
-
close?: boolean;
|
|
199
|
-
}): void;
|
|
200
|
-
/** Updates the value of the input based on the currently selected item. */
|
|
201
|
-
commit(): void;
|
|
202
|
-
/** Navigates and handles additional actions based on filter mode. */
|
|
203
|
-
private _navigate;
|
|
204
|
-
}
|
|
205
|
-
declare class ComboboxDialogPattern {
|
|
206
|
-
readonly inputs: {
|
|
207
|
-
combobox: ComboboxPattern<any, any>;
|
|
208
|
-
element: SignalLike<HTMLDialogElement>;
|
|
209
|
-
id: SignalLike<string>;
|
|
210
|
-
};
|
|
211
|
-
readonly id: () => string;
|
|
212
|
-
readonly role: () => "dialog";
|
|
213
|
-
readonly keydown: SignalLike<KeyboardEventManager<KeyboardEvent>>;
|
|
214
|
-
constructor(inputs: {
|
|
215
|
-
combobox: ComboboxPattern<any, any>;
|
|
216
|
-
element: SignalLike<HTMLDialogElement>;
|
|
217
|
-
id: SignalLike<string>;
|
|
218
|
-
});
|
|
219
|
-
onKeydown(event: KeyboardEvent): void;
|
|
220
|
-
onClick(event: MouseEvent): void;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export { ComboboxDialogPattern, ComboboxPattern };
|
|
224
|
-
export type { ComboboxInputs, ComboboxListboxControls, ComboboxTreeControls };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type SignalLike<T> = () => T;
|
|
2
|
-
interface WritableSignalLike<T> extends SignalLike<T> {
|
|
3
|
-
set(value: T): void;
|
|
4
|
-
update(updateFn: (value: T) => T): void;
|
|
5
|
-
asReadonly(): SignalLike<T>;
|
|
6
|
-
}
|
|
7
|
-
/** Converts a getter setter style signal to a WritableSignalLike. */
|
|
8
|
-
declare function convertGetterSetterToWritableSignalLike<T>(getter: () => T, setter: (v: T) => void): WritableSignalLike<T>;
|
|
9
|
-
declare function computed<T>(computation: () => T): SignalLike<T>;
|
|
10
|
-
declare function signal<T>(initialValue: T): WritableSignalLike<T>;
|
|
11
|
-
declare function linkedSignal<T>(sourceFn: () => T): WritableSignalLike<T>;
|
|
12
|
-
|
|
13
|
-
export { computed, convertGetterSetterToWritableSignalLike, linkedSignal, signal };
|
|
14
|
-
export type { SignalLike, WritableSignalLike };
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/aria/private';
|
|
4
|
-
import { SimpleComboboxPopupPattern, DeferredContentAware, SimpleComboboxPattern } from '@angular/aria/private';
|
|
5
|
-
export { DeferredContent as ɵɵDeferredContent, DeferredContentAware as ɵɵDeferredContentAware } from './_deferred-content-chunk.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Identifies an element as a widget within a combobox popup.
|
|
9
|
-
*
|
|
10
|
-
* This directive should be applied to the element that contains the options or content
|
|
11
|
-
* of the popup. It handles the communication of ID and active descendant information
|
|
12
|
-
* to the combobox.
|
|
13
|
-
*/
|
|
14
|
-
declare class ComboboxWidget implements OnInit, OnDestroy {
|
|
15
|
-
/** The element that the popup widget is attached to. */
|
|
16
|
-
private readonly _elementRef;
|
|
17
|
-
private readonly _popup;
|
|
18
|
-
/** A reference to the popup widget element. */
|
|
19
|
-
readonly element: HTMLElement;
|
|
20
|
-
/** The ID of the popup widget. */
|
|
21
|
-
readonly popupId: _angular_core.WritableSignal<string | undefined>;
|
|
22
|
-
/** The ID of the active descendant in the widget. */
|
|
23
|
-
readonly activeDescendant: _angular_core.InputSignal<string | undefined>;
|
|
24
|
-
private _observer;
|
|
25
|
-
constructor();
|
|
26
|
-
ngOnInit(): void;
|
|
27
|
-
ngOnDestroy(): void;
|
|
28
|
-
/** Handles focus in events for the widget. */
|
|
29
|
-
onFocusin(): void;
|
|
30
|
-
/** Handles focus out events for the widget. */
|
|
31
|
-
onFocusout(event: FocusEvent): void;
|
|
32
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxWidget, never>;
|
|
33
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxWidget, "[ngComboboxWidget]", ["ngComboboxWidget"], { "activeDescendant": { "alias": "activeDescendant"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* A structural directive that marks the `ng-template` to be used as the popup
|
|
38
|
-
* for a combobox. This content is conditionally rendered.
|
|
39
|
-
*
|
|
40
|
-
* The content of the popup can be any element with the `ngComboboxWidget` directive.
|
|
41
|
-
*
|
|
42
|
-
* ```html
|
|
43
|
-
* <ng-template ngComboboxPopup>
|
|
44
|
-
* <div ngComboboxWidget>
|
|
45
|
-
* <!-- ... options ... -->
|
|
46
|
-
* </div>
|
|
47
|
-
* </ng-template>
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
declare class ComboboxPopup implements OnInit, OnDestroy {
|
|
51
|
-
private readonly _deferredContent;
|
|
52
|
-
/** The combobox that the popup belongs to. */
|
|
53
|
-
readonly combobox: _angular_core.InputSignal<Combobox>;
|
|
54
|
-
/** The widget contained within the popup. */
|
|
55
|
-
readonly _widget: _angular_core.WritableSignal<ComboboxWidget | undefined>;
|
|
56
|
-
/** The element that serves as the control target for the popup. */
|
|
57
|
-
readonly controlTarget: _angular_core.Signal<HTMLElement | undefined>;
|
|
58
|
-
/** The ID of the popup. */
|
|
59
|
-
readonly popupId: _angular_core.Signal<string | undefined>;
|
|
60
|
-
/** The ID of the active descendant in the popup. */
|
|
61
|
-
readonly activeDescendant: _angular_core.Signal<string | undefined>;
|
|
62
|
-
/** The type of the popup (e.g., listbox, tree, grid, dialog). */
|
|
63
|
-
readonly popupType: _angular_core.InputSignal<"listbox" | "tree" | "grid" | "dialog">;
|
|
64
|
-
/** The popup pattern. */
|
|
65
|
-
readonly _pattern: SimpleComboboxPopupPattern;
|
|
66
|
-
ngOnInit(): void;
|
|
67
|
-
ngOnDestroy(): void;
|
|
68
|
-
/** Registers a widget with the popup. */
|
|
69
|
-
_registerWidget(widget: ComboboxWidget): void;
|
|
70
|
-
/** Unregisters the widget from the popup. */
|
|
71
|
-
_unregisterWidget(): void;
|
|
72
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxPopup, never>;
|
|
73
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComboboxPopup, "ng-template[ngComboboxPopup]", ["ngComboboxPopup"], { "combobox": { "alias": "combobox"; "required": true; "isSignal": true; }; "popupType": { "alias": "popupType"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.DeferredContent; inputs: {}; outputs: {}; }]>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* The container element that wraps a combobox input and popup, and orchestrates its behavior.
|
|
78
|
-
*
|
|
79
|
-
* The `ngCombobox` directive is the main entry point for creating a combobox and customizing its
|
|
80
|
-
* behavior. It coordinates the interactions between the input and the popup.
|
|
81
|
-
*
|
|
82
|
-
* ```html
|
|
83
|
-
* <div ngCombobox [(expanded)]="expanded">
|
|
84
|
-
* <input ngComboboxInput />
|
|
85
|
-
*
|
|
86
|
-
* <ng-template ngComboboxPopup>
|
|
87
|
-
* <div ngComboboxWidget>
|
|
88
|
-
* <!-- ... options ... -->
|
|
89
|
-
* </div>
|
|
90
|
-
* </ng-template>
|
|
91
|
-
* </div>
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
declare class Combobox extends DeferredContentAware implements OnInit {
|
|
95
|
-
private readonly _renderer;
|
|
96
|
-
/** The element that the combobox is attached to. */
|
|
97
|
-
private readonly _elementRef;
|
|
98
|
-
/** A reference to the input element. */
|
|
99
|
-
readonly element: HTMLElement;
|
|
100
|
-
/** The popup associated with the combobox. */
|
|
101
|
-
readonly _popup: _angular_core.WritableSignal<ComboboxPopup | undefined>;
|
|
102
|
-
/** Whether the combobox is disabled. */
|
|
103
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
104
|
-
/** Whether the combobox should always remain expanded. */
|
|
105
|
-
readonly alwaysExpanded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
106
|
-
/** Whether the combobox is expanded. */
|
|
107
|
-
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
108
|
-
/** The value of the combobox input. */
|
|
109
|
-
readonly value: _angular_core.ModelSignal<string>;
|
|
110
|
-
/** An inline suggestion to be displayed in the input. */
|
|
111
|
-
readonly inlineSuggestion: _angular_core.InputSignal<string | undefined>;
|
|
112
|
-
/** The combobox ui pattern. */
|
|
113
|
-
readonly _pattern: SimpleComboboxPattern;
|
|
114
|
-
constructor();
|
|
115
|
-
ngOnInit(): void;
|
|
116
|
-
/** Registers a popup with the combobox. */
|
|
117
|
-
_registerPopup(popup: ComboboxPopup): void;
|
|
118
|
-
/** Unregisters the popup from the combobox. */
|
|
119
|
-
_unregisterPopup(): void;
|
|
120
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Combobox, never>;
|
|
121
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Combobox, "[ngCombobox]", ["ngCombobox"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "alwaysExpanded": { "alias": "alwaysExpanded"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "inlineSuggestion": { "alias": "inlineSuggestion"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; "value": "valueChange"; }, never, never, true, never>;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export { Combobox, ComboboxPopup, ComboboxWidget };
|