UNPKG

3.06 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2016 Google Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 * THE SOFTWARE.
22 */
23import { MDCFoundation } from '@material/base/foundation';
24import { MDCCheckboxAdapter } from './adapter';
25export declare class MDCCheckboxFoundation extends MDCFoundation<MDCCheckboxAdapter> {
26 static get cssClasses(): {
27 ANIM_CHECKED_INDETERMINATE: string;
28 ANIM_CHECKED_UNCHECKED: string;
29 ANIM_INDETERMINATE_CHECKED: string;
30 ANIM_INDETERMINATE_UNCHECKED: string;
31 ANIM_UNCHECKED_CHECKED: string;
32 ANIM_UNCHECKED_INDETERMINATE: string;
33 BACKGROUND: string;
34 CHECKED: string;
35 CHECKMARK: string;
36 CHECKMARK_PATH: string;
37 DISABLED: string;
38 INDETERMINATE: string;
39 MIXEDMARK: string;
40 NATIVE_CONTROL: string;
41 ROOT: string;
42 SELECTED: string;
43 UPGRADED: string;
44 };
45 static get strings(): {
46 ARIA_CHECKED_ATTR: string;
47 ARIA_CHECKED_INDETERMINATE_VALUE: string;
48 DATA_INDETERMINATE_ATTR: string;
49 NATIVE_CONTROL_SELECTOR: string;
50 TRANSITION_STATE_CHECKED: string;
51 TRANSITION_STATE_INDETERMINATE: string;
52 TRANSITION_STATE_INIT: string;
53 TRANSITION_STATE_UNCHECKED: string;
54 };
55 static get numbers(): {
56 ANIM_END_LATCH_MS: number;
57 };
58 static get defaultAdapter(): MDCCheckboxAdapter;
59 private currentCheckState;
60 private currentAnimationClass;
61 private animEndLatchTimer;
62 private enableAnimationEndHandler;
63 constructor(adapter?: Partial<MDCCheckboxAdapter>);
64 init(): void;
65 destroy(): void;
66 setDisabled(disabled: boolean): void;
67 /**
68 * Handles the animationend event for the checkbox
69 */
70 handleAnimationEnd(): void;
71 /**
72 * Handles the change event for the checkbox
73 */
74 handleChange(): void;
75 private transitionCheckState;
76 private determineCheckState;
77 private getTransitionAnimationClass;
78 private updateAriaChecked;
79}
80export default MDCCheckboxFoundation;