UNPKG

10.5 kBTypeScriptView Raw
1// Generated by dts-bundle v0.7.3
2// Dependencies for this module:
3// ../../@material/base/types
4// ../../@material/base/component
5// ../../@material/base/foundation
6
7declare module '@material/line-ripple' {
8 /**
9 * @license
10 * Copyright 2019 Google Inc.
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a copy
13 * of this software and associated documentation files (the "Software"), to deal
14 * in the Software without restriction, including without limitation the rights
15 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 * copies of the Software, and to permit persons to whom the Software is
17 * furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included in
20 * all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 * THE SOFTWARE.
29 */
30 export * from '@material/line-ripple/adapter';
31 export * from '@material/line-ripple/component';
32 export * from '@material/line-ripple/constants';
33 export * from '@material/line-ripple/foundation';
34}
35
36declare module '@material/line-ripple/adapter' {
37 /**
38 * @license
39 * Copyright 2018 Google Inc.
40 *
41 * Permission is hereby granted, free of charge, to any person obtaining a copy
42 * of this software and associated documentation files (the "Software"), to deal
43 * in the Software without restriction, including without limitation the rights
44 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
45 * copies of the Software, and to permit persons to whom the Software is
46 * furnished to do so, subject to the following conditions:
47 *
48 * The above copyright notice and this permission notice shall be included in
49 * all copies or substantial portions of the Software.
50 *
51 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
54 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
56 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
57 * THE SOFTWARE.
58 */
59 import { EventType, SpecificEventListener } from '@material/base/types';
60 /**
61 * Defines the shape of the adapter expected by the foundation.
62 * Implement this adapter for your framework of choice to delegate updates to
63 * the component in your framework of choice. See architecture documentation
64 * for more details.
65 * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md
66 */
67 export interface MDCLineRippleAdapter {
68 /**
69 * Adds a class to the line ripple element.
70 */
71 addClass(className: string): void;
72 /**
73 * Removes a class from the line ripple element.
74 */
75 removeClass(className: string): void;
76 hasClass(className: string): boolean;
77 /**
78 * Sets the style property with propertyName to value on the root element.
79 */
80 setStyle(propertyName: string, value: string): void;
81 /**
82 * Registers an event listener on the line ripple element for a given event.
83 */
84 registerEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
85 /**
86 * Deregisters an event listener on the line ripple element for a given event.
87 */
88 deregisterEventHandler<K extends EventType>(evtType: K, handler: SpecificEventListener<K>): void;
89 }
90}
91
92declare module '@material/line-ripple/component' {
93 /**
94 * @license
95 * Copyright 2018 Google Inc.
96 *
97 * Permission is hereby granted, free of charge, to any person obtaining a copy
98 * of this software and associated documentation files (the "Software"), to deal
99 * in the Software without restriction, including without limitation the rights
100 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
101 * copies of the Software, and to permit persons to whom the Software is
102 * furnished to do so, subject to the following conditions:
103 *
104 * The above copyright notice and this permission notice shall be included in
105 * all copies or substantial portions of the Software.
106 *
107 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
108 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
109 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
110 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
111 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
112 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
113 * THE SOFTWARE.
114 */
115 import { MDCComponent } from '@material/base/component';
116 import { MDCLineRippleFoundation } from '@material/line-ripple/foundation';
117 export type MDCLineRippleFactory = (el: Element, foundation?: MDCLineRippleFoundation) => MDCLineRipple;
118 export class MDCLineRipple extends MDCComponent<MDCLineRippleFoundation> {
119 static attachTo(root: Element): MDCLineRipple;
120 /**
121 * Activates the line ripple
122 */
123 activate(): void;
124 /**
125 * Deactivates the line ripple
126 */
127 deactivate(): void;
128 /**
129 * Sets the transform origin given a user's click location.
130 * The `rippleCenter` is the x-coordinate of the middle of the ripple.
131 */
132 setRippleCenter(xCoordinate: number): void;
133 getDefaultFoundation(): MDCLineRippleFoundation;
134 }
135}
136
137declare module '@material/line-ripple/constants' {
138 /**
139 * @license
140 * Copyright 2018 Google Inc.
141 *
142 * Permission is hereby granted, free of charge, to any person obtaining a copy
143 * of this software and associated documentation files (the "Software"), to deal
144 * in the Software without restriction, including without limitation the rights
145 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
146 * copies of the Software, and to permit persons to whom the Software is
147 * furnished to do so, subject to the following conditions:
148 *
149 * The above copyright notice and this permission notice shall be included in
150 * all copies or substantial portions of the Software.
151 *
152 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
153 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
154 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
155 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
156 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
157 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
158 * THE SOFTWARE.
159 */
160 const cssClasses: {
161 LINE_RIPPLE_ACTIVE: string;
162 LINE_RIPPLE_DEACTIVATING: string;
163 };
164 export { cssClasses };
165}
166
167declare module '@material/line-ripple/foundation' {
168 /**
169 * @license
170 * Copyright 2018 Google Inc.
171 *
172 * Permission is hereby granted, free of charge, to any person obtaining a copy
173 * of this software and associated documentation files (the "Software"), to deal
174 * in the Software without restriction, including without limitation the rights
175 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
176 * copies of the Software, and to permit persons to whom the Software is
177 * furnished to do so, subject to the following conditions:
178 *
179 * The above copyright notice and this permission notice shall be included in
180 * all copies or substantial portions of the Software.
181 *
182 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
183 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
185 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
186 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
187 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
188 * THE SOFTWARE.
189 */
190 import { MDCFoundation } from '@material/base/foundation';
191 import { MDCLineRippleAdapter } from '@material/line-ripple/adapter';
192 export class MDCLineRippleFoundation extends MDCFoundation<MDCLineRippleAdapter> {
193 static get cssClasses(): {
194 LINE_RIPPLE_ACTIVE: string;
195 LINE_RIPPLE_DEACTIVATING: string;
196 };
197 /**
198 * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.
199 */
200 static get defaultAdapter(): MDCLineRippleAdapter;
201 constructor(adapter?: Partial<MDCLineRippleAdapter>);
202 init(): void;
203 destroy(): void;
204 activate(): void;
205 setRippleCenter(xCoordinate: number): void;
206 deactivate(): void;
207 handleTransitionEnd(evt: TransitionEvent): void;
208 }
209 export default MDCLineRippleFoundation;
210}
211