UNPKG

2.91 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright 2017 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 { MDCProgressIndicatorFoundation } from '@material/progress-indicator/foundation';
25import { MDCLinearProgressAdapter } from './adapter';
26export declare class MDCLinearProgressFoundation extends MDCFoundation<MDCLinearProgressAdapter> implements MDCProgressIndicatorFoundation {
27 static get cssClasses(): {
28 CLOSED_CLASS: string;
29 CLOSED_ANIMATION_OFF_CLASS: string;
30 INDETERMINATE_CLASS: string;
31 REVERSED_CLASS: string;
32 ANIMATION_READY_CLASS: string;
33 };
34 static get strings(): {
35 ARIA_HIDDEN: string;
36 ARIA_VALUEMAX: string;
37 ARIA_VALUEMIN: string;
38 ARIA_VALUENOW: string;
39 BUFFER_BAR_SELECTOR: string;
40 FLEX_BASIS: string;
41 PRIMARY_BAR_SELECTOR: string;
42 };
43 static get defaultAdapter(): MDCLinearProgressAdapter;
44 private determinate;
45 private progress;
46 private buffer;
47 private observer;
48 constructor(adapter?: Partial<MDCLinearProgressAdapter>);
49 init(): void;
50 setDeterminate(isDeterminate: boolean): void;
51 isDeterminate(): boolean;
52 setProgress(value: number): void;
53 getProgress(): number;
54 setBuffer(value: number): void;
55 getBuffer(): number;
56 open(): void;
57 close(): void;
58 isClosed(): boolean;
59 /**
60 * Handles the transitionend event emitted after `close()` is called and the
61 * opacity fades out. This is so that animations are removed only after the
62 * progress indicator is completely hidden.
63 */
64 handleTransitionEnd(): void;
65 destroy(): void;
66 restartAnimation(): void;
67 private setPrimaryBarProgress;
68 private setBufferBarProgress;
69 private calculateAndSetDimensions;
70}
71export default MDCLinearProgressFoundation;