This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathpaper-ripple.d.ts
171 lines (154 loc) · 4.72 KB
/
paper-ripple.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* paper-ripple.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.d.ts" />
/**
* Material design: [Surface reaction](https://www.google.com/design/spec/animation/responsive-interaction.html#responsive-interaction-surface-reaction)
*
* `paper-ripple` provides a visual effect that other paper elements can
* use to simulate a rippling effect emanating from the point of contact. The
* effect can be visualized as a concentric circle with motion.
*
* Example:
*
* <div style="position:relative">
* <paper-ripple></paper-ripple>
* </div>
*
* Note, it's important that the parent container of the ripple be relative position, otherwise
* the ripple will emanate outside of the desired container.
*
* `paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple
* effect when touches on it. You can also defeat the default behavior and
* manually route the down and up actions to the ripple element. Note that it is
* important if you call `downAction()` you will have to make sure to call
* `upAction()` so that `paper-ripple` would end the animation loop.
*
* Example:
*
* <paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
* ...
* downAction: function(e) {
* this.$.ripple.downAction(e.detail);
* },
* upAction: function(e) {
* this.$.ripple.upAction();
* }
*
* Styling ripple effect:
*
* Use CSS color property to style the ripple:
*
* paper-ripple {
* color: #4285f4;
* }
*
* Note that CSS color property is inherited so it is not required to set it on
* the `paper-ripple` element directly.
*
* By default, the ripple is centered on the point of contact. Apply the `recenters`
* attribute to have the ripple grow toward the center of its container.
*
* <paper-ripple recenters></paper-ripple>
*
* You can also center the ripple inside its container from the start.
*
* <paper-ripple center></paper-ripple>
*
* Apply `circle` class to make the rippling effect within a circle.
*
* <paper-ripple class="circle"></paper-ripple>
*/
interface PaperRippleElement extends Polymer.Element, Polymer.IronA11yKeysBehavior {
keyBindings: object;
/**
* The initial opacity set on the wave.
*/
initialOpacity: number|null|undefined;
/**
* How fast (opacity per second) the wave fades out.
*/
opacityDecayVelocity: number|null|undefined;
/**
* If true, ripples will exhibit a gravitational pull towards
* the center of their container as they fade away.
*/
recenters: boolean|null|undefined;
/**
* If true, ripples will center inside its container
*/
center: boolean|null|undefined;
/**
* A list of the visual ripples.
*/
ripples: any[]|null|undefined;
/**
* True when there are visible ripples animating within the
* element.
*/
readonly animating: boolean|null|undefined;
/**
* If true, the ripple will remain in the "down" state until `holdDown`
* is set to false again.
*/
holdDown: boolean|null|undefined;
/**
* If true, the ripple will not generate a ripple effect
* via pointer interaction.
* Calling ripple's imperative api like `simulatedRipple` will
* still generate the ripple effect.
*/
noink: boolean|null|undefined;
_animating: boolean|null|undefined;
_boundAnimate: Function|null|undefined;
readonly target: any;
readonly shouldKeepAnimating: any;
attached(): void;
detached(): void;
simulatedRipple(): void;
/**
* Provokes a ripple down effect via a UI event,
* respecting the `noink` property.
*/
uiDownAction(event?: Event|null): void;
/**
* Provokes a ripple down effect via a UI event,
* *not* respecting the `noink` property.
*/
downAction(event?: Event|null): void;
/**
* Provokes a ripple up effect via a UI event,
* respecting the `noink` property.
*/
uiUpAction(event?: Event|null): void;
/**
* Provokes a ripple up effect via a UI event,
* *not* respecting the `noink` property.
*/
upAction(event?: Event|null): void;
onAnimationComplete(): void;
addRipple(): any;
removeRipple(ripple: any): void;
/**
* This conflicts with Element#antimate().
* https://developer.mozilla.org/en-US/docs/Web/API/Element/animate
*/
animate(): void;
_onEnterKeydown(): void;
_onSpaceKeydown(): void;
_onSpaceKeyup(): void;
/**
* effect.
*/
_holdDownChanged(newVal: any, oldVal: any): void;
}
interface HTMLElementTagNameMap {
"paper-ripple": PaperRippleElement;
}