UNPKG

11.1 kBTypeScriptView Raw
1// Generated by dts-bundle v0.7.3
2// Dependencies for this module:
3// ../../@material/base/component
4// ../../@material/ripple/component
5// ../../@material/base/foundation
6
7declare module '@material/icon-button' {
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/icon-button/adapter';
31 export * from '@material/icon-button/component';
32 export * from '@material/icon-button/constants';
33 export * from '@material/icon-button/foundation';
34 export * from '@material/icon-button/types';
35}
36
37declare module '@material/icon-button/adapter' {
38 /**
39 * @license
40 * Copyright 2018 Google Inc.
41 *
42 * Permission is hereby granted, free of charge, to any person obtaining a copy
43 * of this software and associated documentation files (the "Software"), to deal
44 * in the Software without restriction, including without limitation the rights
45 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
46 * copies of the Software, and to permit persons to whom the Software is
47 * furnished to do so, subject to the following conditions:
48 *
49 * The above copyright notice and this permission notice shall be included in
50 * all copies or substantial portions of the Software.
51 *
52 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
53 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
54 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
55 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
56 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
57 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
58 * THE SOFTWARE.
59 */
60 import { MDCIconButtonToggleEventDetail } from '@material/icon-button/types';
61 /**
62 * Defines the shape of the adapter expected by the foundation.
63 * Implement this adapter for your framework of choice to delegate updates to
64 * the component in your framework of choice. See architecture documentation
65 * for more details.
66 * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md
67 */
68 export interface MDCIconButtonToggleAdapter {
69 addClass(className: string): void;
70 removeClass(className: string): void;
71 hasClass(className: string): boolean;
72 /** Returns the given attribute value on the root element. */
73 getAttr(attrName: string): string | null;
74 setAttr(attrName: string, attrValue: string): void;
75 notifyChange(evtData: MDCIconButtonToggleEventDetail): void;
76 }
77}
78
79declare module '@material/icon-button/component' {
80 /**
81 * @license
82 * Copyright 2018 Google Inc.
83 *
84 * Permission is hereby granted, free of charge, to any person obtaining a copy
85 * of this software and associated documentation files (the "Software"), to deal
86 * in the Software without restriction, including without limitation the rights
87 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
88 * copies of the Software, and to permit persons to whom the Software is
89 * furnished to do so, subject to the following conditions:
90 *
91 * The above copyright notice and this permission notice shall be included in
92 * all copies or substantial portions of the Software.
93 *
94 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
95 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
96 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
97 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
98 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
99 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
100 * THE SOFTWARE.
101 */
102 import { MDCComponent } from '@material/base/component';
103 import { MDCRipple } from '@material/ripple/component';
104 import { MDCIconButtonToggleFoundation } from '@material/icon-button/foundation';
105 export class MDCIconButtonToggle extends MDCComponent<MDCIconButtonToggleFoundation> {
106 static attachTo(root: HTMLElement): MDCIconButtonToggle;
107 initialSyncWithDOM(): void;
108 destroy(): void;
109 getDefaultFoundation(): MDCIconButtonToggleFoundation;
110 get ripple(): MDCRipple;
111 get on(): boolean;
112 set on(isOn: boolean);
113 }
114}
115
116declare module '@material/icon-button/constants' {
117 /**
118 * @license
119 * Copyright 2018 Google Inc.
120 *
121 * Permission is hereby granted, free of charge, to any person obtaining a copy
122 * of this software and associated documentation files (the "Software"), to deal
123 * in the Software without restriction, including without limitation the rights
124 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
125 * copies of the Software, and to permit persons to whom the Software is
126 * furnished to do so, subject to the following conditions:
127 *
128 * The above copyright notice and this permission notice shall be included in
129 * all copies or substantial portions of the Software.
130 *
131 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
132 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
133 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
134 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
135 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
136 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
137 * THE SOFTWARE.
138 */
139 export const cssClasses: {
140 ICON_BUTTON_ON: string;
141 ROOT: string;
142 };
143 export const strings: {
144 ARIA_LABEL: string;
145 ARIA_PRESSED: string;
146 DATA_ARIA_LABEL_OFF: string;
147 DATA_ARIA_LABEL_ON: string;
148 CHANGE_EVENT: string;
149 };
150}
151
152declare module '@material/icon-button/foundation' {
153 /**
154 * @license
155 * Copyright 2018 Google Inc.
156 *
157 * Permission is hereby granted, free of charge, to any person obtaining a copy
158 * of this software and associated documentation files (the "Software"), to deal
159 * in the Software without restriction, including without limitation the rights
160 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
161 * copies of the Software, and to permit persons to whom the Software is
162 * furnished to do so, subject to the following conditions:
163 *
164 * The above copyright notice and this permission notice shall be included in
165 * all copies or substantial portions of the Software.
166 *
167 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
168 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
169 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
170 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
171 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
172 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
173 * THE SOFTWARE.
174 */
175 import { MDCFoundation } from '@material/base/foundation';
176 import { MDCIconButtonToggleAdapter } from '@material/icon-button/adapter';
177 export class MDCIconButtonToggleFoundation extends MDCFoundation<MDCIconButtonToggleAdapter> {
178 static get cssClasses(): {
179 ICON_BUTTON_ON: string;
180 ROOT: string;
181 };
182 static get strings(): {
183 ARIA_LABEL: string;
184 ARIA_PRESSED: string;
185 DATA_ARIA_LABEL_OFF: string;
186 DATA_ARIA_LABEL_ON: string;
187 CHANGE_EVENT: string;
188 };
189 static get defaultAdapter(): MDCIconButtonToggleAdapter;
190 constructor(adapter?: Partial<MDCIconButtonToggleAdapter>);
191 init(): void;
192 handleClick(): void;
193 isOn(): boolean;
194 toggle(isOn?: boolean): void;
195 }
196 export default MDCIconButtonToggleFoundation;
197}
198
199declare module '@material/icon-button/types' {
200 /**
201 * @license
202 * Copyright 2019 Google Inc.
203 *
204 * Permission is hereby granted, free of charge, to any person obtaining a copy
205 * of this software and associated documentation files (the "Software"), to deal
206 * in the Software without restriction, including without limitation the rights
207 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
208 * copies of the Software, and to permit persons to whom the Software is
209 * furnished to do so, subject to the following conditions:
210 *
211 * The above copyright notice and this permission notice shall be included in
212 * all copies or substantial portions of the Software.
213 *
214 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
215 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
216 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
217 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
218 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
219 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
220 * THE SOFTWARE.
221 */
222 export interface MDCIconButtonToggleEventDetail {
223 isOn: boolean;
224 }
225}
226