Add types for @material group at tag v0.26.0 (#23179)

This commit is contained in:
Brent Douglas
2018-02-01 10:50:12 -08:00
committed by Sheetal Nandi
parent 1f0e148136
commit fc02b40ffc
143 changed files with 4901 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
/**
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface MDCLinearProgressAdapter {
addClass(className: string): void;
getPrimaryBar(): Element;
getBuffer(): Element;
hasClass(className: string): boolean;
removeClass(className: string): void;
setStyle(el: Element, styleProperty: string, value: number): void;
}
+28
View File
@@ -0,0 +1,28 @@
/**
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MDCStrings } from 'material__base';
export interface cssClasses extends MDCStrings {
CLOSED_CLASS: 'mdc-linear-progress--closed';
INDETERMINATE_CLASS: 'mdc-linear-progress--indeterminate';
REVERSED_CLASS: 'mdc-linear-progress--reversed';
}
export interface strings extends MDCStrings {
PRIMARY_BAR_SELECTOR: '.mdc-linear-progress__primary-bar';
BUFFER_SELECTOR: '.mdc-linear-progress__buffer';
}
+40
View File
@@ -0,0 +1,40 @@
/**
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MDCFoundation } from 'material__base';
import { transformStyleProperties } from 'material__animation';
import { MDCLinearProgressAdapter } from './adapter';
import { cssClasses, strings } from './constants';
export class MDCLinearProgressFoundation extends MDCFoundation<MDCLinearProgressAdapter> {
static readonly cssClasses: cssClasses;
static readonly strings: strings;
static readonly defaultAdapter: MDCLinearProgressAdapter;
setDeterminate(isDeterminate: boolean): void;
setProgress(value: number): void;
setBuffer(value: number): void;
setReverse(isReversed: boolean): void;
open(): void;
close(): void;
}
+45
View File
@@ -0,0 +1,45 @@
// Type definitions for Material Components Web 0.26
// Project: https://material.io/components/
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MDCComponent } from 'material__base';
import { MDCLinearProgressAdapter } from './adapter';
import { MDCLinearProgressFoundation } from './foundation';
export {MDCLinearProgressAdapter, MDCLinearProgressFoundation};
export class MDCLinearProgress extends MDCComponent<MDCLinearProgressAdapter, MDCLinearProgressFoundation> {
static attachTo(root: Element): MDCLinearProgress;
determinate: boolean;
progress: number;
buffer: number;
reverse: boolean;
open(): void;
close(): void;
getDefaultFoundation(): MDCLinearProgressFoundation;
}
@@ -0,0 +1,27 @@
{
"files": [
"constants.d.ts",
"adapter.d.ts",
"index.d.ts",
"foundation.d.ts"
],
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }