UNPKG

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