@vaadin/component-base 23.0.0-alpha1 → 23.0.0-alpha2
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/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +2 -2
- package/src/active-mixin.js +4 -4
- package/src/async.js +3 -3
- package/src/debounce.js +10 -4
- package/src/dir-helper.js +2 -1
- package/src/dir-mixin.js +6 -6
- package/src/element-mixin.js +1 -1
- package/src/focus-trap-controller.d.ts +39 -0
- package/src/focus-trap-controller.js +139 -0
- package/src/focus-utils.d.ts +45 -0
- package/src/focus-utils.js +228 -0
- package/src/gestures.d.ts +76 -0
- package/src/gestures.js +932 -0
- package/src/iron-list-core.js +13 -11
- package/src/slot-controller.d.ts +51 -0
- package/src/slot-controller.js +122 -0
- package/src/slot-mixin.js +10 -2
- package/src/virtualizer-iron-list-adapter.js +4 -5
- package/src/virtualizer.js +6 -6
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
5
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
6
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7
|
+
Code distributed by Google as part of the polymer project is also
|
|
8
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export { deepTargetFind };
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Finds the element rendered on the screen at the provided coordinates.
|
|
15
|
+
*
|
|
16
|
+
* Similar to `document.elementFromPoint`, but pierces through
|
|
17
|
+
* shadow roots.
|
|
18
|
+
*
|
|
19
|
+
* @returns Returns the deepest shadowRoot inclusive element
|
|
20
|
+
* found at the screen position given.
|
|
21
|
+
*/
|
|
22
|
+
declare function deepTargetFind(x: number, y: number): Element | null;
|
|
23
|
+
|
|
24
|
+
export { addListener };
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Adds an event listener to a node for the given gesture type.
|
|
28
|
+
*
|
|
29
|
+
* @returns Returns true if a gesture event listener was added.
|
|
30
|
+
*/
|
|
31
|
+
declare function addListener(node: EventTarget, evType: string, handler: (p0: Event) => void): boolean;
|
|
32
|
+
|
|
33
|
+
export { removeListener };
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Removes an event listener from a node for the given gesture type.
|
|
37
|
+
*
|
|
38
|
+
* @returns Returns true if a gesture event listener was removed.
|
|
39
|
+
*/
|
|
40
|
+
declare function removeListener(node: EventTarget, evType: string, handler: (p0: Event) => void): boolean;
|
|
41
|
+
|
|
42
|
+
export { register };
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Registers a new gesture event recognizer for adding new custom
|
|
46
|
+
* gesture event types.
|
|
47
|
+
*/
|
|
48
|
+
declare function register(recog: GestureRecognizer): void;
|
|
49
|
+
|
|
50
|
+
export { setTouchAction };
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Sets scrolling direction on node.
|
|
54
|
+
*
|
|
55
|
+
* This value is checked on first move, thus it should be called prior to
|
|
56
|
+
* adding event listeners.
|
|
57
|
+
*/
|
|
58
|
+
declare function setTouchAction(node: EventTarget, value: string): void;
|
|
59
|
+
|
|
60
|
+
export { prevent };
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Prevents the dispatch and default action of the given event name.
|
|
64
|
+
*/
|
|
65
|
+
declare function prevent(evName: string): void;
|
|
66
|
+
|
|
67
|
+
export interface GestureRecognizer {
|
|
68
|
+
reset: () => void;
|
|
69
|
+
mousedown?: (e: MouseEvent) => void;
|
|
70
|
+
mousemove?: (e: MouseEvent) => void;
|
|
71
|
+
mouseup?: (e: MouseEvent) => void;
|
|
72
|
+
touchstart?: (e: TouchEvent) => void;
|
|
73
|
+
touchmove?: (e: TouchEvent) => void;
|
|
74
|
+
touchend?: (e: TouchEvent) => void;
|
|
75
|
+
click?: (e: MouseEvent) => void;
|
|
76
|
+
}
|