@angular/aria 22.0.0-next.5 → 22.0.0-next.7
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/_combobox-chunk.mjs +51 -2
- package/fesm2022/_combobox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-listbox-chunk.mjs +3 -0
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -1
- package/fesm2022/_combobox-tree-chunk.mjs.map +1 -1
- package/fesm2022/_deferred-content-chunk.mjs +16 -14
- package/fesm2022/_deferred-content-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs +3 -1
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
- package/fesm2022/_signal-like-chunk.mjs +0 -1
- package/fesm2022/_signal-like-chunk.mjs.map +1 -1
- package/fesm2022/_tabs-chunk.mjs +22 -47
- package/fesm2022/_tabs-chunk.mjs.map +1 -1
- package/fesm2022/_widget-chunk.mjs +55 -13
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +16 -14
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +59 -34
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid-testing.mjs +72 -0
- package/fesm2022/grid-testing.mjs.map +1 -0
- package/fesm2022/grid.mjs +83 -37
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +58 -31
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +41 -35
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +156 -5
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/simple-combobox.mjs +443 -0
- package/fesm2022/simple-combobox.mjs.map +1 -0
- package/fesm2022/tabs.mjs +243 -218
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +11 -11
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +65 -33
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +10 -2
- package/types/_combobox-chunk.d.ts +32 -2
- package/types/_grid-chunk.d.ts +16 -8
- package/types/_tabs-chunk.d.ts +7 -42
- package/types/combobox.d.ts +4 -3
- package/types/grid-testing.d.ts +79 -0
- package/types/grid.d.ts +14 -6
- package/types/listbox.d.ts +8 -6
- package/types/menu.d.ts +7 -4
- package/types/private.d.ts +106 -10
- package/types/simple-combobox.d.ts +124 -0
- package/types/tabs.d.ts +79 -74
- package/types/tree.d.ts +5 -2
- package/fesm2022/_pointer-event-manager-chunk.mjs +0 -54
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +0 -1
- package/resources/code-examples.db +0 -0
- package/types/_pointer-event-manager-chunk.d.ts +0 -34
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { EventManager, Modifier, hasModifiers } from './_signal-like-chunk.mjs';
|
|
2
|
-
|
|
3
|
-
var MouseButton;
|
|
4
|
-
(function (MouseButton) {
|
|
5
|
-
MouseButton[MouseButton["Main"] = 0] = "Main";
|
|
6
|
-
MouseButton[MouseButton["Auxiliary"] = 1] = "Auxiliary";
|
|
7
|
-
MouseButton[MouseButton["Secondary"] = 2] = "Secondary";
|
|
8
|
-
})(MouseButton || (MouseButton = {}));
|
|
9
|
-
class PointerEventManager extends EventManager {
|
|
10
|
-
options = {
|
|
11
|
-
preventDefault: false,
|
|
12
|
-
stopPropagation: false
|
|
13
|
-
};
|
|
14
|
-
on(...args) {
|
|
15
|
-
const {
|
|
16
|
-
button,
|
|
17
|
-
handler,
|
|
18
|
-
modifiers
|
|
19
|
-
} = this._normalizeInputs(...args);
|
|
20
|
-
this.configs.push({
|
|
21
|
-
handler,
|
|
22
|
-
matcher: event => this._isMatch(event, button, modifiers),
|
|
23
|
-
...this.options
|
|
24
|
-
});
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
_normalizeInputs(...args) {
|
|
28
|
-
if (args.length === 3) {
|
|
29
|
-
return {
|
|
30
|
-
button: args[0],
|
|
31
|
-
modifiers: args[1],
|
|
32
|
-
handler: args[2]
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
if (args.length === 2) {
|
|
36
|
-
return {
|
|
37
|
-
button: MouseButton.Main,
|
|
38
|
-
modifiers: args[0],
|
|
39
|
-
handler: args[1]
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
button: MouseButton.Main,
|
|
44
|
-
modifiers: Modifier.None,
|
|
45
|
-
handler: args[0]
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
_isMatch(event, button, modifiers) {
|
|
49
|
-
return button === (event.button ?? 0) && hasModifiers(event, modifiers);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { PointerEventManager };
|
|
54
|
-
//# sourceMappingURL=_pointer-event-manager-chunk.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_pointer-event-manager-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/pointer-event-manager.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 EventHandler,\n EventHandlerOptions,\n EventManager,\n hasModifiers,\n ModifierInputs,\n Modifier,\n} from './event-manager';\n\n/**\n * The different mouse buttons that may appear on a pointer event.\n */\nexport enum MouseButton {\n Main = 0,\n Auxiliary = 1,\n Secondary = 2,\n}\n\n/** An event manager that is specialized for handling pointer events. */\nexport class PointerEventManager<T extends PointerEvent> extends EventManager<T> {\n readonly options: EventHandlerOptions = {\n preventDefault: false,\n stopPropagation: false,\n };\n\n /**\n * Configures this event manager to handle events with a specific modifer and mouse button\n * combination.\n */\n on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;\n\n /**\n * Configures this event manager to handle events with a specific mouse button and no modifiers.\n */\n on(modifiers: ModifierInputs, handler: EventHandler<T>): this;\n\n /**\n * Configures this event manager to handle events with the main mouse button and no modifiers.\n *\n * @param handler The handler function\n * @param options Options for whether to stop propagation or prevent default.\n */\n on(handler: EventHandler<T>): this;\n\n on(...args: any[]) {\n const {button, handler, modifiers} = this._normalizeInputs(...args);\n\n this.configs.push({\n handler,\n matcher: event => this._isMatch(event, button, modifiers),\n ...this.options,\n });\n return this;\n }\n\n private _normalizeInputs(...args: any[]) {\n if (args.length === 3) {\n return {\n button: args[0] as MouseButton,\n modifiers: args[1] as ModifierInputs,\n handler: args[2] as EventHandler<T>,\n };\n }\n\n if (args.length === 2) {\n return {\n button: MouseButton.Main,\n modifiers: args[0] as ModifierInputs,\n handler: args[1] as EventHandler<T>,\n };\n }\n\n return {\n button: MouseButton.Main,\n modifiers: Modifier.None,\n handler: args[0] as EventHandler<T>,\n };\n }\n\n _isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs) {\n return button === (event.button ?? 0) && hasModifiers(event, modifiers);\n }\n}\n"],"names":["MouseButton","PointerEventManager","EventManager","options","preventDefault","stopPropagation","on","args","button","handler","modifiers","_normalizeInputs","configs","push","matcher","event","_isMatch","length","Main","Modifier","None","hasModifiers"],"mappings":";;AAoBA,IAAYA,WAIX;AAJD,CAAA,UAAYA,WAAW,EAAA;EACrBA,WAAA,CAAAA,WAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;EACRA,WAAA,CAAAA,WAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa;EACbA,WAAA,CAAAA,WAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa;AACf,CAAC,EAJWA,WAAW,KAAXA,WAAW,GAAA,EAAA,CAAA,CAAA;AAOjB,MAAOC,mBAA4C,SAAQC,YAAe,CAAA;AACrEC,EAAAA,OAAO,G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AC,CAAC,IAAIa,YAAY,CAACN,KAAK,EAAEL,SAAS,CAAC;AACzE,EAAA;AACD;;;;"}
|
|
Binary file
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { EventManager, EventHandlerOptions, ModifierInputs, EventHandler } from './_keyboard-event-manager-chunk.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The different mouse buttons that may appear on a pointer event.
|
|
5
|
-
*/
|
|
6
|
-
declare enum MouseButton {
|
|
7
|
-
Main = 0,
|
|
8
|
-
Auxiliary = 1,
|
|
9
|
-
Secondary = 2
|
|
10
|
-
}
|
|
11
|
-
/** An event manager that is specialized for handling pointer events. */
|
|
12
|
-
declare class PointerEventManager<T extends PointerEvent> extends EventManager<T> {
|
|
13
|
-
readonly options: EventHandlerOptions;
|
|
14
|
-
/**
|
|
15
|
-
* Configures this event manager to handle events with a specific modifer and mouse button
|
|
16
|
-
* combination.
|
|
17
|
-
*/
|
|
18
|
-
on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;
|
|
19
|
-
/**
|
|
20
|
-
* Configures this event manager to handle events with a specific mouse button and no modifiers.
|
|
21
|
-
*/
|
|
22
|
-
on(modifiers: ModifierInputs, handler: EventHandler<T>): this;
|
|
23
|
-
/**
|
|
24
|
-
* Configures this event manager to handle events with the main mouse button and no modifiers.
|
|
25
|
-
*
|
|
26
|
-
* @param handler The handler function
|
|
27
|
-
* @param options Options for whether to stop propagation or prevent default.
|
|
28
|
-
*/
|
|
29
|
-
on(handler: EventHandler<T>): this;
|
|
30
|
-
private _normalizeInputs;
|
|
31
|
-
_isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs): boolean;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { PointerEventManager };
|