Remove material__textfield package (outdated) (#46881)

This commit is contained in:
Abhinay Omkar 2020-08-28 05:37:40 -04:00 committed by GitHub
parent 50cdf17fdf
commit e0730a56e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
177 changed files with 162 additions and 5937 deletions

View File

@ -2832,6 +2832,168 @@
"sourceRepoURL": "https://material.io/components",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/animation",
"typingsPackageName": "material__animation",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-animation",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/auto-init",
"typingsPackageName": "material__auto-init",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-auto-init",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/ripple",
"typingsPackageName": "material__ripple",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-ripple",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/checkbox",
"typingsPackageName": "material__checkbox",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-checkbox",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/chips",
"typingsPackageName": "material__chips",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-chips",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/dialog",
"typingsPackageName": "material__dialog",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-dialog",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/dom",
"typingsPackageName": "material__dom",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-dom",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/drawer",
"typingsPackageName": "material__drawer",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-drawer",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/floating-label",
"typingsPackageName": "material__floating-label",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-floating-label",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/form-field",
"typingsPackageName": "material__form-field",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-form-field",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/grid-list",
"typingsPackageName": "material__grid-list",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-grid-list",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/icon-button",
"typingsPackageName": "material__icon-toggle",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-icon-button",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/line-ripple",
"typingsPackageName": "material__line-ripple",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-line-ripple",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/linear-progress",
"typingsPackageName": "material__linear-progress",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-linear-progress",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/list",
"typingsPackageName": "material__list",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-list",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/menu",
"typingsPackageName": "material__menu",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-menu",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/notched-outline",
"typingsPackageName": "material__notched-outline",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-notched-outline",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/radio",
"typingsPackageName": "material__radio",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-radio",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/select",
"typingsPackageName": "material__select",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-select",
"asOfVersion": "1.0.0"
},
{
"libraryName": "material-components-web",
"typingsPackageName": "material__selection-control",
"sourceRepoURL": "https://github.com/material-components/material-components-web",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/slider",
"typingsPackageName": "material__slider",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-slider",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/snackbar",
"typingsPackageName": "material__snackbar",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-snackbar",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/tab",
"typingsPackageName": "material__tab",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-tab",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/tabs",
"typingsPackageName": "material__tabs",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-tabs",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/textfield",
"typingsPackageName": "material__textfield",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-textfield",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/toolbar",
"typingsPackageName": "material__toolbar",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-toolbar",
"asOfVersion": "1.0.0"
},
{
"libraryName": "@material/top-app-bar",
"typingsPackageName": "material__top-app-bar",
"sourceRepoURL": "https://github.com/material-components/material-components-web/tree/master/packages/mdc-top-app-bar",
"asOfVersion": "1.0.0"
},
{
"libraryName": "maxmind",
"typingsPackageName": "maxmind",

View File

@ -1,27 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* Copyright 2016 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 const transformStyleProperties: string[];
export function getCorrectEventName(windowObj: Window, eventType: string): string;
export function getCorrectPropertyName(windowObj: Window, eventType: string): string;

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1,6 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"npm-naming": false
}
}

View File

@ -1,39 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* Copyright 2016 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 type MDCLogger = (message?: any, ...optionalParams: any[]) => void;
export interface MDCAutoInit {
(root?: Document, warn?: MDCLogger): MDCAutoInit;
register(componentName: string, Ctor: (...args: any[]) => any, warn?: MDCLogger): void;
deregister(componentName: string): void;
deregisterAll(): void;
}
/**
* Auto-initializes all mdc components on a page.
*/
// tslint:disable-next-line:strict-export-declare-modifiers
declare const mdcAutoInit: MDCAutoInit;
// tslint:disable-next-line:strict-export-declare-modifiers
export default mdcAutoInit;

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,56 +0,0 @@
/**
* @license
* Copyright 2016 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 { MDCSelectionControlState } from 'material__selection-control';
/**
* Adapter for MDC Checkbox. Provides an interface for managing
* - classes
* - dom
* - event handlers
*
* Additionally, provides type information for the adapter to the Closure
* compiler.
*
* Implement this adapter for your framework of choice to delegate updates to
* the component in your framework of choice. See architecture documentation
* for more details.
* https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md
*/
export default interface MDCCheckboxAdapter {
addClass(className: string): void;
removeClass(className: string): void;
setNativeControlAttr(attr: string, value: string): void;
removeNativeControlAttr(attr: string): void;
registerAnimationEndHandler(handler: EventListener): void;
deregisterAnimationEndHandler(handler: EventListener): void;
registerChangeHandler(handler: EventListener): void;
deregisterChangeHandler(handler: EventListener): void;
getNativeControl(): MDCSelectionControlState;
forceLayout(): void;
isAttachedToDOM(): boolean;
}

View File

@ -1,44 +0,0 @@
/**
* @license
* Copyright 2016 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, MDCNumbers } from 'material__base';
export interface cssClasses extends MDCStrings {
UPGRADED: 'mdc-checkbox--upgraded';
CHECKED: 'mdc-checkbox--checked';
INDETERMINATE: 'mdc-checkbox--indeterminate';
DISABLED: 'mdc-checkbox--disabled';
ANIM_UNCHECKED_CHECKED: 'mdc-checkbox--anim-unchecked-checked';
ANIM_UNCHECKED_INDETERMINATE: 'mdc-checkbox--anim-unchecked-indeterminate';
ANIM_CHECKED_UNCHECKED: 'mdc-checkbox--anim-checked-unchecked';
ANIM_CHECKED_INDETERMINATE: 'mdc-checkbox--anim-checked-indeterminate';
ANIM_INDETERMINATE_CHECKED: 'mdc-checkbox--anim-indeterminate-checked';
ANIM_INDETERMINATE_UNCHECKED: 'mdc-checkbox--anim-indeterminate-unchecked';
}
export interface strings extends MDCStrings {
NATIVE_CONTROL_SELECTOR: '.mdc-checkbox__native-control';
TRANSITION_STATE_INIT: 'init';
TRANSITION_STATE_CHECKED: 'checked';
TRANSITION_STATE_UNCHECKED: 'unchecked';
TRANSITION_STATE_INDETERMINATE: 'indeterminate';
ARIA_CHECKED_ATTR: 'aria-checked';
ARIA_CHECKED_INDETERMINATE_VALUE: 'mixed';
}
export interface numbers extends MDCNumbers {
ANIM_END_LATCH_MS: 250;
}

View File

@ -1,50 +0,0 @@
/**
* @license
* Copyright 2016 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/foundation';
import MDCCheckboxAdapter from './adapter';
import { cssClasses, strings, numbers } from './constants';
export default class MDCCheckboxFoundation extends MDCFoundation<MDCCheckboxAdapter> {
static readonly cssClasses: cssClasses;
static readonly strings: strings;
static readonly numbers: numbers;
static readonly defaultAdapter: MDCCheckboxAdapter;
isChecked(): boolean;
setChecked(checked: boolean): void;
isIndeterminate(): boolean;
setIndeterminate(indeterminate: boolean): void;
isDisabled(): boolean;
setDisabled(disabled: boolean): void;
getValue(): string;
setValue(value: string): void;
handleAnimationEnd(): void;
handleChange(): void;
}

View File

@ -1,44 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* Copyright 2016 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/component';
import MDCCheckboxAdapter from './adapter';
import { MDCSelectionControl } from 'material__selection-control';
import MDCCheckboxFoundation from './foundation';
import { MDCRipple } from 'material__ripple';
export { MDCCheckboxAdapter, MDCCheckboxFoundation };
export class MDCCheckbox extends MDCComponent<MDCCheckboxAdapter, MDCCheckboxFoundation> implements MDCSelectionControl {
static attachTo(root: Element): MDCCheckbox;
readonly ripple: MDCRipple;
checked: boolean;
indeterminate: boolean;
disabled: boolean;
value: string;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,50 +0,0 @@
/**
* @license
* 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.
*/
/**
* Adapter for MDC Chip Set.
*
* Defines the shape of the adapter expected by the foundation. Implement this
* adapter to integrate the Chip Set into your framework. See
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md
* for more information.
*
*/
import { MDCChip } from '../chip';
export default interface MDCChipSetAdapter {
/**
* Returns true if the root element contains the given class name.
*/
hasClass(className: string): boolean;
/**
* Registers an event handler on the root element for a given event.
*/
registerInteractionHandler(evtType: string, handler: EventListener): void;
/**
* Deregisters an event handler on the root element for a given event.
*/
deregisterInteractionHandler(evtType: string, handler: EventListener): void;
/**
* Appends and returns a new chip element with the given text, leading icon, and trailing icon.
*/
appendChip(text: string, leadingIcon?: Element | null, trailingIcon?: Element | null): Element;
/**
* Removes the chip object from the chip set.
*/
removeChip(chip: MDCChip): void;
}

View File

@ -1,26 +0,0 @@
/**
* @license
* Copyright 2016 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 strings extends MDCStrings {
CHIP_SELECTOR: '.mdc-chip';
}
export interface cssClasses extends MDCStrings {
CHOICE: 'mdc-chip-set--choice';
FILTER: 'mdc-chip-set--filter';
}

View File

@ -1,44 +0,0 @@
/**
* @license
* 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/foundation';
import MDCChipFoundation from './foundation';
import MDCChipSetAdapter from './adapter';
import { strings, cssClasses } from './constants';
export default class MDCChipSetFoundation extends MDCFoundation<MDCChipSetAdapter> {
static readonly strings: strings;
static readonly cssClasses: cssClasses;
static readonly defaultAdapter: MDCChipSetAdapter;
/**
* Returns a new chip element with the given text, leading icon, and trailing icon,
* added to the root chip set element.
*/
addChip(text: string, leadingIcon?: Element | null, trailingIcon?: Element | null): Element;
/**
* Selects the given chip. Deselects all other chips if the chip set is of the choice variant.
*/
select(chipFoundation: MDCChipFoundation): void;
/**
* Deselects the given chip.
*/
deselect(chipFoundation: MDCChipFoundation): void;
}

View File

@ -1,35 +0,0 @@
/**
* @license
* Copyright 2016 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/component';
import MDCChipSetFoundation from './foundation';
import MDCChipSetAdapter from './adapter';
import { MDCChip } from '../chip';
export { MDCChipSetFoundation, MDCChipSetAdapter };
export class MDCChipSet extends MDCComponent<MDCChipSetAdapter, MDCChipSetFoundation> {
static attachTo(root: any): MDCChipSet;
initialize(chipFactory?: (el: Element) => MDCChip): void;
initialSyncWithDOM(): void;
/**
* Creates a new chip in the chip set with the given text, leading icon, and trailing icon.
*/
addChip(text: string, leadingIcon?: Element | null, trailingIcon?: Element | null): void;
}

View File

@ -1,77 +0,0 @@
/**
* @license
* 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.
*/
/**
* Adapter for MDC Chip.
*
* Defines the shape of the adapter expected by the foundation. Implement this
* adapter to integrate the Chip into your framework. See
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md
* for more information.
*/
export default interface MDCChipAdapter {
addClass(className: string): void;
removeClass(className: string): void;
hasClass(className: string): boolean;
addClassToLeadingIcon(className: string): void;
removeClassFromLeadingIcon(className: string): void;
/**
* Returns true if target has className, false otherwise.
*/
eventTargetHasClass(target: EventTarget, className: string): boolean;
/**
* Registers an event listener on the root element for a given event.
*/
registerEventHandler(evtType: string, handler: EventListener): void;
/**
* Deregisters an event listener on the root element for a given event.
*/
deregisterEventHandler(evtType: string, handler: EventListener): void;
/**
* Registers an event listener on the trailing icon element for a given event.
*/
registerTrailingIconInteractionHandler(evtType: string, handler: EventListener): void;
/**
* Deregisters an event listener on the trailing icon element for a given event.
*/
deregisterTrailingIconInteractionHandler(evtType: string, handler: EventListener): void;
/**
* Emits a custom "MDCChip:interaction" event denoting the chip has been
* interacted with (typically on click or keydown).
*/
notifyInteraction(): void;
/**
* Emits a custom "MDCChip:trailingIconInteraction" event denoting the trailing icon has been
* interacted with (typically on click or keydown).
*/
notifyTrailingIconInteraction(): void;
/**
* Emits a custom event "MDCChip:removal" denoting the chip will be removed.
*/
notifyRemoval(): void;
/**
* Returns the computed property value of the given style property on the root element.
*/
getComputedStyleValue(propertyName: string): string;
/**
* Sets the property value of the given style property on the root element.
*/
setStyleProperty(propertyName: string, value: string): void;
}

View File

@ -1,38 +0,0 @@
/**
* @license
* Copyright 2016 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 strings extends MDCStrings {
ENTRY_ANIMATION_NAME: 'mdc-chip-entry';
INTERACTION_EVENT: 'MDCChip:interaction';
TRAILING_ICON_INTERACTION_EVENT: 'MDCChip:trailingIconInteraction';
REMOVAL_EVENT: 'MDCChip:removal';
CHECKMARK_SELECTOR: '.mdc-chip__checkmark';
LEADING_ICON_SELECTOR: '.mdc-chip__icon--leading';
TRAILING_ICON_SELECTOR: '.mdc-chip__icon--trailing';
}
export interface cssClasses extends MDCStrings {
CHECKMARK: 'mdc-chip__checkmark';
CHIP: 'mdc-chip';
CHIP_EXIT: 'mdc-chip--exit';
HIDDEN_LEADING_ICON: 'mdc-chip__icon--leading-hidden';
LEADING_ICON: 'mdc-chip__icon--leading';
TRAILING_ICON: 'mdc-chip__icon--trailing';
SELECTED: 'mdc-chip--selected';
TEXT: 'mdc-chip__text';
}

View File

@ -1,32 +0,0 @@
/**
* @license
* Copyright 2016 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/foundation';
import MDCChipAdapter from './adapter';
import { cssClasses, strings } from './constants';
export default class MDCChipFoundation extends MDCFoundation<MDCChipAdapter> {
static readonly strings: strings;
static readonly cssClasses: cssClasses;
static readonly defaultAdapter: MDCChipAdapter;
isSelected(): boolean;
setSelected(selected: boolean): void;
}

View File

@ -1,39 +0,0 @@
/**
* @license
* Copyright 2016 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/component';
import MDCChipFoundation from './foundation';
import MDCChipAdapter from './adapter';
import { MDCRipple } from 'material__ripple';
export { MDCChipFoundation, MDCChipAdapter };
export class MDCChip extends MDCComponent<MDCChipAdapter, MDCChipFoundation> {
static attachTo(root: Element): MDCChip;
/**
* Returns true if the chip is selected.
*/
isSelected(): boolean;
/**
* Destroys the chip and removes the root element from the DOM.
*/
remove(): void;
readonly foundation: MDCChipFoundation;
readonly ripple: MDCRipple;
}

View File

@ -1,24 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// 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 { MDCChipFoundation, MDCChip, MDCChipAdapter } from './chip';
import { MDCChipSetFoundation, MDCChipSet, MDCChipSetAdapter } from './chip-set';
export { MDCChipFoundation, MDCChip, MDCChipAdapter, MDCChipSetFoundation, MDCChipSet, MDCChipSetAdapter };

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,53 +0,0 @@
/**
* 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 default interface MDCDialogAdapter {
addClass(className: string): void;
removeClass(className: string): void;
addBodyClass(className: string): void;
removeBodyClass(className: string): void;
eventTargetHasClass(target: EventTarget, className: string): boolean;
registerInteractionHandler(evt: string, handler: EventListener): void;
deregisterInteractionHandler(evt: string, handler: EventListener): void;
registerSurfaceInteractionHandler(evt: string, handler: EventListener): void;
deregisterSurfaceInteractionHandler(evt: string, handler: EventListener): void;
registerDocumentKeydownHandler(handler: EventListener): void;
deregisterDocumentKeydownHandler(handler: EventListener): void;
registerTransitionEndHandler(handler: EventListener): void;
deregisterTransitionEndHandler(handler: EventListener): void;
notifyAccept(): void;
notifyCancel(): void;
trapFocusOnSurface(): void;
untrapFocusOnSurface(): void;
isDialog(el: Element): boolean;
}

View File

@ -1,35 +0,0 @@
/**
* Copyright 2016 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 {
ROOT: 'mdc-dialog';
OPEN: 'mdc-dialog--open';
ANIMATING: 'mdc-dialog--animating';
BACKDROP: 'mdc-dialog__backdrop';
SCROLL_LOCK: 'mdc-dialog-scroll-lock';
ACCEPT_BTN: 'mdc-dialog__footer__button--accept';
CANCEL_BTN: 'mdc-dialog__footer__button--cancel';
}
export interface strings extends MDCStrings {
OPEN_DIALOG_SELECTOR: '.mdc-dialog--open';
DIALOG_SURFACE_SELECTOR: '.mdc-dialog__surface';
ACCEPT_SELECTOR: '.mdc-dialog__footer__button--accept';
ACCEPT_EVENT: 'MDCDialog:accept';
CANCEL_EVENT: 'MDCDialog:cancel';
}

View File

@ -1,37 +0,0 @@
/**
* 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 { cssClasses, strings } from './constants';
import MDCDialogAdapter from './adapter';
export default class MDCDialogFoundation extends MDCFoundation<MDCDialogAdapter> {
static readonly cssClasses: cssClasses;
static readonly strings: strings;
static readonly defaultAdapter: MDCDialogAdapter;
open(): void;
close(): void;
isOpen(): boolean;
accept(shouldNotify: boolean): void;
cancel(shouldNotify: boolean): void;
}

View File

@ -1,37 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// 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 MDCDialogFoundation from './foundation';
import MDCDialogAdapter from './adapter';
import * as util from './util';
export { MDCDialogAdapter, MDCDialogFoundation, util };
export class MDCDialog extends MDCComponent<MDCDialogAdapter, MDCDialogFoundation> {
static attachTo(root: Element): MDCDialog;
readonly open: boolean;
show(): void;
close(): void;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,19 +0,0 @@
/**
* Copyright 2016 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 type MDCFocusTrapFactory = (a: Element, b: {initialFocus: Element, clickOutsideDeactivates: boolean}) => any;
export function createFocusTrapInstance(surfaceEl: Element, acceptButtonEl: Element, focusTrapFactory?: MDCFocusTrapFactory): any;

View File

@ -1,32 +0,0 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import * as ponyfill from './ponyfill';
export { ponyfill };

View File

@ -1,2 +0,0 @@
export function closest(element: Element, selector: string): Element;
export function matches(element: Element, selector: string): boolean;

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1,6 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"npm-naming": false
}
}

View File

@ -1,89 +0,0 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/* eslint no-unused-vars: [2, {"args": "none"}] */
/**
* Adapter for MDC Drawer
*
* Defines the shape of the adapter expected by the foundation. Implement this
* adapter to integrate the Drawer into your framework. See
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md
* for more information.
*
* @record
*/
export class MDCDrawerAdapter {
/**
* Adds a class to the root Element.
*/
addClass(className: string): void;
/**
* Removes a class from the root Element.
*/
removeClass(className: string): void;
/**
* Returns true if the root Element contains the given class.
*/
hasClass(className: string): boolean;
elementHasClass(element: Element, className: string): void;
/**
* Saves the focus of currently active element.
*/
saveFocus(): void;
/**
* Restores focus to element previously saved with 'saveFocus'.
*/
restoreFocus(): void;
/**
* Focuses the active / selected navigation item.
*/
focusActiveNavigationItem(): void;
/**
* Emits a custom event "MDCDrawer:closed" denoting the drawer has closed.
*/
notifyClose(): void;
/**
* Emits a custom event "MDCDrawer:opened" denoting the drawer has opened.
*/
notifyOpen(): void;
/**
* Traps focus on root element and focuses the active navigation element.
*/
trapFocus(): void;
/**
* Releases focus trap from root element which was set by `trapFocus`
* and restores focus to where it was prior to calling `trapFocus`.
*/
releaseFocus(): void;
}

View File

@ -1,34 +0,0 @@
/**
* Copyright 2016 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 {
ROOT: 'mdc-drawer';
DISMISSIBLE: 'mdc-drawer--dismissible';
MODAL: 'mdc-drawer--modal';
OPEN: 'mdc-drawer--open';
ANIMATE: 'mdc-drawer--animate';
OPENING: 'mdc-drawer--opening';
CLOSING: 'mdc-drawer--closing';
}
export interface strings extends MDCStrings {
APP_CONTENT_SELECTOR: '.mdc-drawer-app-content';
SCRIM_SELECTOR: '.mdc-drawer-scrim';
CLOSE_EVENT: 'MDCDrawer:closed';
OPEN_EVENT: 'MDCDrawer:opened';
}

View File

@ -1,71 +0,0 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import { MDCDrawerAdapter } from '../adapter';
import MDCFoundation from 'material__base/foundation';
import { cssClasses, strings } from '../constants';
export class MDCDismissibleDrawerFoundation extends MDCFoundation<MDCDrawerAdapter> {
static readonly strings: strings;
static readonly cssClasses: cssClasses;
static readonly defaultAdapter: MDCDrawerAdapter;
constructor(adapter: MDCDrawerAdapter);
destroy(): void;
/**
* Function to open the drawer.
*/
open(): void;
/**
* Function to close the drawer.
*/
close(): void;
/**
* Returns true if drawer is in open state.
*/
isOpen(): boolean;
/**
* Returns true if drawer is animating open.
*/
isOpening(): boolean;
/**
* Returns true if drawer is animating closed.
*/
isClosing(): boolean;
/**
* Keydown handler to close drawer when key is escape.
*/
handleKeydown(evt: KeyboardEvent): void;
/**
* Handles a transition end event on the root element.
*/
handleTransitionEnd(evt: Event): void;
}

View File

@ -1,81 +0,0 @@
/**
* A DOM node, a selector string (which will be passed to
* `document.querySelector()` to find the DOM node), or a function that
* returns a DOM node.
*/
export type FocusTarget = HTMLElement | string | { (): HTMLElement };
export interface Options {
/**
* A function that will be called when the focus trap activates.
*/
onActivate?: () => void;
/**
* A function that will be called when the focus trap deactivates.
*/
onDeactivate?: () => void;
/**
* By default, when a focus trap is activated the first element in the
* focus trap's tab order will receive focus. With this option you can
* specify a different element to receive that initial focus.
*/
initialFocus?: FocusTarget;
/**
* By default, an error will be thrown if the focus trap contains no
* elements in its tab order. With this option you can specify a
* fallback element to programmatically receive focus if no other
* tabbable elements are found. For example, you may want a popover's
* `<div>` to receive focus if the popover's content includes no
* tabbable elements. *Make sure the fallback element has a negative
* `tabindex` so it can be programmatically focused.*
*/
fallbackFocus?: FocusTarget;
/**
* Default: `true`. If `false`, when the trap is deactivated,
* focus will *not* return to the element that had focus before activation.
*/
returnFocusOnDeactivate?: boolean;
/**
* Default: `true`. If `false`, the `Escape` key will not trigger
* deactivation of the focus trap. This can be useful if you want
* to force the user to make a decision instead of allowing an easy
* way out.
*/
escapeDeactivates?: boolean;
/**
* Default: `false`. If `true`, a click outside the focus trap will
* deactivate the focus trap and allow the click event to do its thing.
*/
clickOutsideDeactivates?: boolean;
}
export type ActivateOptions = Pick<Options, "onActivate">;
export interface DeactivateOptions extends Pick<Options, "onDeactivate"> {
returnFocus?: boolean;
}
export interface FocusTrap {
activate(activateOptions?: ActivateOptions): void;
deactivate(deactivateOptions?: DeactivateOptions): void;
pause(): void;
unpause(): void;
}
/**
* Returns a new focus trap on `element`.
*
* @param element
* The element to be the focus trap, or a selector that will be used to
* find the element.
*/
export default function focusTrap(
element: HTMLElement | string,
userOptions?: Options
): FocusTrap;

View File

@ -1,50 +0,0 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>, Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* Copyright 2016 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/component';
import { MDCDismissibleDrawerFoundation } from './dismissible/foundation';
import { MDCModalDrawerFoundation } from './modal/foundation';
import { MDCDrawerAdapter } from './adapter';
import { MDCList, MDCListFoundation } from 'material__list/index';
import { strings } from './constants';
import * as util from './util';
import createFocusTrap, { FocusTrap } from './focus-trap';
export class MDCDrawer extends MDCComponent<MDCDrawer, MDCDismissibleDrawerFoundation | MDCModalDrawerFoundation> {
constructor(...args: any[]);
static attachTo(root: Element): MDCDrawer;
/**
* Returns true if drawer is in the open position.
*/
open: boolean;
initialize(focusTrapFactory: FocusTrap, listFactory: MDCList): void;
initialSyncWithDOM(): void;
destroy(): void;
getDefaultFoundation(): MDCDismissibleDrawerFoundation | MDCModalDrawerFoundation;
}
export { MDCDismissibleDrawerFoundation, MDCModalDrawerFoundation, util };

View File

@ -1,42 +0,0 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import { MDCDrawerAdapter } from '../adapter';
import { MDCDismissibleDrawerFoundation } from '../dismissible/foundation';
export class MDCModalDrawerFoundation extends MDCDismissibleDrawerFoundation {
/**
* Called when drawer finishes open animation.
*/
opened(): void;
/**
* Called when drawer finishes close animation.
*/
closed(): void;
/**
* Handles click event on scrim.
*/
handleScrimClick(): void;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1,6 +0,0 @@
{
"extends": "dtslint/dt.json",
"rules": {
"npm-naming": [true,{"mode":"code","errors":[["NeedsExportEquals",false]]}]
}
}

View File

@ -1,19 +0,0 @@
/**
* Copyright 2016 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 { FocusTrap } from './focus-trap';
export function createFocusTrapInstance(surfaceEl: Element, focusTrapFactory: () => FocusTrap): FocusTrap;

View File

@ -1,51 +0,0 @@
/**
* @license
* 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.
*/
/**
* Adapter for MDC Floating Label.
*
* Defines the shape of the adapter expected by the foundation. Implement this
* adapter to integrate the floating label into your framework. See
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md
* for more information.
*/
export default interface MDCFloatingLabelAdapter {
/**
* Adds a class to the label element.
*/
addClass(className: string): void;
/**
* Removes a class from the label element.
*/
removeClass(className: string): void;
/**
* Returns the width of the label element.
*/
getWidth(): number;
/**
* Registers an event listener on the root element for a given event.
*/
registerInteractionHandler(evtType: string, handler: EventListener): void;
/**
* Deregisters an event listener on the root element for a given event.
*/
deregisterInteractionHandler(evtType: string, handler: EventListener): void;
}

View File

@ -1,23 +0,0 @@
/**
* @license
* Copyright 2016 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 {
LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above';
LABEL_SHAKE: 'mdc-floating-label--shake';
}

View File

@ -1,40 +0,0 @@
/**
* @license
* Copyright 2016 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/foundation';
import MDCFloatingLabelAdapter from './adapter';
import { cssClasses } from './constants';
export default class MDCFloatingLabelFoundation extends MDCFoundation<MDCFloatingLabelAdapter> {
static readonly cssClasses: cssClasses;
static readonly defaultAdapter: MDCFloatingLabelAdapter;
/**
* Returns the width of the label element.
*/
getWidth(): number;
/**
* Styles the label to produce the label shake for errors.
*/
shake(shouldShake: boolean): void;
/**
* Styles the label to float or dock.
*/
float(shouldFloat: boolean): void;
}

View File

@ -1,48 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* Copyright 2016 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/component';
import MDCFloatingLabelFoundation from './foundation';
import MDCFloatingLabelAdapter from './adapter';
export { MDCFloatingLabelFoundation, MDCFloatingLabelAdapter };
export class MDCFloatingLabel extends MDCComponent<MDCFloatingLabelAdapter, MDCFloatingLabelFoundation> {
static attachTo(root: Element): MDCFloatingLabel;
/**
* Styles the label to produce the label shake for errors.
* @param shouldShake styles the label to shake by adding shake class
* if true, otherwise will stop shaking by removing shake class.
*/
shake(shouldShake: boolean): void;
/**
* Styles label to float/dock.
* @param shouldFloat styles the label to float by adding float class
* if true, otherwise docks the label by removing the float class.
*/
float(shouldFloat: boolean): void;
getWidth(): number;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,39 +0,0 @@
/**
* @license
* Copyright 2016 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.
*/
/**
* Adapter for MDC Form Field. Provides an interface for managing
* - event handlers
* - ripple activation
*
* Additionally, provides type information for the adapter to the Closure
* compiler.
*
* Implement this adapter for your framework of choice to delegate updates to
* the component in your framework of choice. See architecture documentation
* for more details.
* https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md
*/
export default interface MDCFormFieldAdapter {
registerInteractionHandler(type: string, handler: EventListener): void;
deregisterInteractionHandler(type: string, handler: EventListener): void;
activateInputRipple(): void;
deactivateInputRipple(): void;
}

View File

@ -1,26 +0,0 @@
/**
* @license
* 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 {
ROOT: 'mdc-form-field';
}
export interface strings extends MDCStrings {
LABEL_SELECTOR: '.mdc-form-field > label';
}

View File

@ -1,28 +0,0 @@
/**
* @license
* 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/foundation';
import MDCFormFieldAdapter from './adapter';
import { cssClasses, strings } from './constants';
export default class MDCFormFieldFoundation extends MDCFoundation<MDCFormFieldAdapter> {
static readonly cssClasses: cssClasses;
static readonly strings: strings;
static readonly defaultAdapter: MDCFormFieldAdapter;
}

View File

@ -1,35 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* 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/component';
import MDCFormFieldFoundation from './foundation';
import MDCFormFieldAdapter from './adapter';
import { MDCSelectionControl } from 'material__selection-control';
export { MDCFormFieldAdapter, MDCFormFieldFoundation };
export class MDCFormField extends MDCComponent<MDCFormFieldAdapter, MDCFormFieldFoundation> {
static attachTo(root: Element): MDCFormField;
input: MDCSelectionControl;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,29 +0,0 @@
/**
* Copyright 2016 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 default interface MDCGridListAdapter {
getOffsetWidth(): number;
getNumberOfTiles(): number;
getOffsetWidthForTileAtIndex(index: number): number;
setStyleForTilesElement(property: string, value: string): void;
registerResizeHandler(handler: EventListener): void;
deregisterResizeHandler(handler: EventListener): void;
}

View File

@ -1,22 +0,0 @@
/**
* Copyright 2016 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 strings extends MDCStrings {
TILES_SELECTOR: '.mdc-grid-list__tiles';
TILE_SELECTOR: '.mdc-grid-tile';
}

View File

@ -1,27 +0,0 @@
/**
* Copyright 2016 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 { strings } from './constants';
import MDCGridListAdapter from './adapter';
export default class MDCGridListFoundation extends MDCFoundation<MDCGridListAdapter> {
static readonly strings: strings;
static readonly defaultAdapter: MDCGridListAdapter;
alignCenter(): void;
}

View File

@ -1,31 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* Copyright 2016 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 MDCGridListAdapter from './adapter';
import MDCGridListFoundation from './foundation';
export { MDCGridListAdapter, MDCGridListFoundation };
export class MDCGridList extends MDCComponent<MDCGridListAdapter, MDCGridListFoundation> {
static attachTo(root: Element): MDCGridList;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,60 +0,0 @@
/**
* @license
* 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.
*/
/**
* Adapter for MDC Icon Toggle. Provides an interface for managing
* - classes
* - dom
* - inner text
* - event handlers
* - event dispatch
*
* Additionally, provides type information for the adapter to the Closure
* compiler.
*
* Implement this adapter for your framework of choice to delegate updates to
* the component in your framework of choice. See architecture documentation
* for more details.
* https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md
*/
export default interface MDCIconToggleAdapter {
addClass(className: string): void;
removeClass(className: string): void;
registerInteractionHandler(type: string, handler: EventListener): void;
deregisterInteractionHandler(type: string, handler: EventListener): void;
setText(text: string): void;
getTabIndex(): number;
setTabIndex(tabIndex: number): void;
getAttr(name: string): string;
setAttr(name: string, value: string): void;
rmAttr(name: string): void;
notifyChange(evtData: IconToggleEvent): void;
}
export interface IconToggleEvent {
isOn: boolean;
}

View File

@ -1,32 +0,0 @@
/**
* @license
* Copyright 2016 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 {
ROOT: 'mdc-icon-toggle';
DISABLED: 'mdc-icon-toggle--disabled';
}
export interface strings extends MDCStrings {
DATA_TOGGLE_ON: 'data-toggle-on';
DATA_TOGGLE_OFF: 'data-toggle-off';
ARIA_PRESSED: 'aria-pressed';
ARIA_DISABLED: 'aria-disabled';
ARIA_LABEL: 'aria-label';
CHANGE_EVENT: 'MDCIconToggle:change';
}

View File

@ -1,40 +0,0 @@
/**
* @license
* Copyright 2016 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/foundation';
import MDCIconToggleAdapter from './adapter';
import { cssClasses, strings } from './constants';
export default class MDCIconToggleFoundation extends MDCFoundation<MDCIconToggleAdapter> {
static readonly cssClasses: cssClasses;
static readonly strings: strings;
static readonly defaultAdapter: MDCIconToggleAdapter;
refreshToggleData(): void;
isOn(): boolean;
toggle(isOn?: boolean): void;
isDisabled(): boolean;
setDisabled(isDisabled: boolean): void;
isKeyboardActivated(): boolean;
}

View File

@ -1,43 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* Copyright 2016 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/component';
import MDCIconToggleFoundation from './foundation';
import MDCIconToggleAdapter from './adapter';
import { MDCRipple } from 'material__ripple';
export { MDCIconToggleAdapter, MDCIconToggleFoundation };
export class MDCIconToggle extends MDCComponent<MDCIconToggleAdapter, MDCIconToggleFoundation> {
static attachTo(root: Element): MDCIconToggle;
initialSyncWithDOM(): void;
readonly ripple: MDCRipple;
on: boolean;
disabled: boolean;
refreshToggleData(): void;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,53 +0,0 @@
/**
* @license
* Copyright 2018 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.
*/
/**
* Adapter for MDC TextField Line Ripple.
*
* Defines the shape of the adapter expected by the foundation. Implement this
* adapter to integrate the line ripple into your framework. See
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md
* for more information.
*/
export default interface MDCLineRippleAdapter {
/**
* Adds a class to the line ripple element.
*/
addClass(className: string): void;
/**
* Removes a class from the line ripple element.
*/
removeClass(className: string): void;
hasClass(className: string): boolean;
/**
* Sets the style property with propertyName to value on the root element.
*/
setStyle(propertyName: string, value: string): void;
/**
* Registers an event listener on the line ripple element for a given event.
*/
registerEventHandler(evtType: string, handler: EventListener): void;
/**
* Deregisters an event listener on the line ripple element for a given event.
*/
deregisterEventHandler(evtType: string, handler: EventListener): void;
}

View File

@ -1,23 +0,0 @@
/**
* @license
* Copyright 2018 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 {
LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active';
LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating';
}

View File

@ -1,45 +0,0 @@
/**
* @license
* Copyright 2018 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/foundation';
import { cssClasses } from './constants';
import MDCLineRippleAdapter from './adapter';
export default class MDCLineRippleFoundation extends MDCFoundation<MDCLineRippleAdapter> {
static readonly cssClasses: cssClasses;
static readonly defaultAdapter: MDCLineRippleAdapter;
/**
* Activates the line ripple
*/
activate(): void;
/**
* Sets the center of the ripple animation to the given X coordinate.
*/
setRippleCenter(xCoordinate: number): void;
/**
* Deactivates the line ripple
*/
deactivate(): void;
/**
* Handles a transition end event
*/
handleTransitionEnd(evt: Event): void;
}

View File

@ -1,47 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* Copyright 2018 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/component';
import MDCLineRippleFoundation from './foundation';
import MDCLineRippleAdapter from './adapter';
export { MDCLineRippleFoundation, MDCLineRippleAdapter };
export class MDCLineRipple extends MDCComponent<MDCLineRippleAdapter, MDCLineRippleFoundation> {
static attachTo(root: Element): MDCLineRipple;
/**
* Activates the line ripple
*/
activate(): void;
/**
* Deactivates the line ripple
*/
deactivate(): void;
/**
* Sets the transform origin given a user's click location. The `rippleCenter` is the
* x-coordinate of the middle of the ripple.
*/
setRippleCenter(xCoordinate: number): void;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,29 +0,0 @@
/**
* 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 default 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;
}

View File

@ -1,28 +0,0 @@
/**
* 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';
}

View File

@ -1,39 +0,0 @@
/**
* 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/foundation';
import MDCLinearProgressAdapter from './adapter';
import { cssClasses, strings } from './constants';
export default 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;
}

View File

@ -1,43 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// 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;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,49 +0,0 @@
export class MDCListAdapter {
getListItemCount(): number;
getFocusedElementIndex(): number;
setAttributeForElementIndex(index: number, attribute: string, value: string): void;
removeAttributeForElementIndex(index: number, attribute: string): void;
addClassForElementIndex(index: number, className: string): void;
removeClassForElementIndex(index: number, className: string): void;
/**
* Focuses list item at the index specified.
*/
focusItemAtIndex(index: number): void;
/**
* Sets the tabindex to the value specified for all button/a element children of
* the list item at the index specified.
*/
setTabIndexForListItemChildren(listItemIndex: number, tabIndexValue: number): void;
/**
* If the given element has an href, follows the link.
*/
followHref(ele: HTMLAnchorElement): void;
/**
* Returns true if radio button is present at given list item index.
*/
hasRadioAtIndex(index: number): boolean;
/**
* Returns true if checkbox is present at given list item index.
*/
hasCheckboxAtIndex(index: number): boolean;
/**
* Returns true if checkbox inside a list item is checked.
*/
isCheckboxCheckedAtIndex(index: number): boolean;
/**
* Sets the checked status of checkbox or radio at given list item index.
*/
setCheckedCheckboxOrRadioAtIndex(index: number, isChecked: boolean): void;
/**
* Returns true when the current focused element is inside list root.
*/
isFocusInsideList(): boolean;
}

View File

@ -1,49 +0,0 @@
/**
* @license
* Copyright 2018 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import { MDCStrings } from 'material__base';
export interface cssClasses extends MDCStrings {
ROOT: 'mdc-list';
LIST_ITEM_CLASS: 'mdc-list-item';
LIST_ITEM_SELECTED_CLASS: 'mdc-list-item--selected';
LIST_ITEM_ACTIVATED_CLASS: 'mdc-list-item--activated';
}
export interface strings extends MDCStrings {
ARIA_ORIENTATION: 'aria-orientation';
ARIA_ORIENTATION_HORIZONTAL: 'horizontal';
ARIA_SELECTED: 'aria-selected';
ARIA_CHECKED: 'aria-checked';
ARIA_CHECKED_RADIO_SELECTOR: '[role="radio"][aria-checked="true"]';
ARIA_ROLE_CHECKBOX_SELECTOR: '[role="checkbox"]';
ARIA_CHECKED_CHECKBOX_SELECTOR: '[role="checkbox"][aria-checked="true"]';
RADIO_SELECTOR: 'input[type="radio"]:not(:disabled)';
CHECKBOX_SELECTOR: 'input[type="checkbox"]:not(:disabled)';
CHECKBOX_RADIO_SELECTOR: 'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)';
CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: '.mdc-list-item button:not(:disabled), .mdc-list-item a';
FOCUSABLE_CHILD_ELEMENTS: '.mdc-list-item button:not(:disabled), .mdc-list-item a, .mdc-list-item input[type="radio"]:not(:disabled), .mdc-list-item input[type="checkbox"]:not(:disabled)';
ENABLED_ITEMS_SELECTOR: '.mdc-list-item:not(.mdc-list-item--disabled)';
}
export type Index = number | number[];

View File

@ -1,72 +0,0 @@
import MDCFoundation from 'material__base/foundation';
import { MDCListAdapter } from './adapter';
import { strings, cssClasses, Index } from './constants';
export const ELEMENTS_KEY_ALLOWED_IN: string[];
export class MDCListFoundation extends MDCFoundation<MDCListFoundation> {
static readonly strings: strings;
static readonly cssClasses: cssClasses;
static readonly defaultAdapter: MDCListAdapter;
constructor(adapter: MDCListAdapter);
layout(): void;
/**
* Sets the private wrapFocus_ variable.
*/
setWrapFocus(value: boolean): void;
/**
* Sets the isVertical_ private variable.
*/
setVerticalOrientation(value: boolean): void;
/**
* Sets the isSingleSelectionList_ private variable.
*/
setSingleSelection(value: boolean): void;
/**
* Sets the useActivatedClass_ private variable.
*/
setUseActivatedClass(useActivated: boolean): void;
getSelectedIndex(): Index;
setSelectedIndex(index: Index): void;
/**
* Focus in handler for the list items.
*/
handleFocusIn(evt: Event, listItemIndex: number): void;
/**
* Focus out handler for the list items.
*/
handleFocusOut(evt: Event, listItemIndex: number): void;
/**
* Key handler for the list.
*/
handleKeydown(evt: Event, isRootListItem: boolean, listItemIndex: number): void;
/**
* Click handler for the list.
*/
handleClick(index: number, toggleCheckbox: boolean): void;
/**
* Focuses the next element on the list.
*/
focusNextElement(index: number): number;
/**
* Focuses the previous element on the list.
*/
focusPrevElement(index: number): number;
focusFirstElement(): number;
focusLastElement(): number;
}

View File

@ -1,54 +0,0 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* Copyright 2016 Google Inc.
*
* 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/component';
import { MDCListFoundation } from './foundation';
import { MDCListAdapter } from './adapter';
import { matches } from 'material__dom/ponyfill';
import { cssClasses, strings, Index } from './constants'; // eslint-disable-line no-unused-vars
export class MDCList {
constructor(...args: any[]);
static attachTo(root: Element): MDCList;
destroy(): void;
initialSyncWithDOM(): void;
layout(): void;
/**
* Initialize selectedIndex value based on pre-selected checkbox list items, single selection or radio.
*/
initializeListType(): void;
vertical: boolean;
readonly listElements: Element[];
wrapFocus: boolean;
singleSelection: boolean;
selectedIndex: Index;
getDefaultFoundation(): MDCListFoundation;
}
export { MDCListFoundation };

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1 +0,0 @@
util.d.ts

View File

@ -1,102 +0,0 @@
/**
* @license
* Copyright 2016 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.
*/
/**
* Adapter for MDC Menu. Provides an interface for managing
* - classes
* - dom
* - focus
* - position
* - dimensions
* - event handlers
*
* Additionally, provides type information for the adapter to the Closure
* compiler.
*
* Implement this adapter for your framework of choice to delegate updates to
* the component in your framework of choice. See architecture documentation
* for more details.
* https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md
*/
export default interface MDCMenuAdapter {
addClass(className: string): void;
removeClass(className: string): void;
hasClass(className: string): boolean;
hasNecessaryDom(): boolean;
getAttributeForEventTarget(target: EventTarget, attributeName: string): string;
getInnerDimensions(): { width: number; height: number; };
hasAnchor(): boolean;
getAnchorDimensions(): { width: number; height: number; top: number; right: number; bottom: number; left: number; };
getWindowDimensions(): { width: number; height: number; };
getNumberOfItems(): number;
registerInteractionHandler(type: string, handler: EventListener): void;
deregisterInteractionHandler(type: string, handler: EventListener): void;
registerBodyClickHandler(handler: EventListener): void;
deregisterBodyClickHandler(handler: EventListener): void;
getIndexForEventTarget(target: EventTarget): number;
notifySelected(evtData: { index: number; }): void;
notifyCancel(): void;
saveFocus(): void;
restoreFocus(): void;
isFocused(): boolean;
focus(): void;
getFocusedItemIndex(): number;
focusItemAtIndex(index: number): void;
isRtl(): boolean;
setTransformOrigin(origin: string): void;
setPosition(position: {
top: (string|undefined),
right: (string|undefined),
bottom: (string|undefined),
left: (string|undefined)
}): void;
setMaxHeight(height: number): void;
setAttrForOptionAtIndex(index: number, attr: string, value: string): void;
rmAttrForOptionAtIndex(index: number, attr: string): void;
addClassForOptionAtIndex(index: number, className: string): void;
rmClassForOptionAtIndex(index: number, className: string): void;
}

View File

@ -1,77 +0,0 @@
/**
* @license
* Copyright 2016 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, MDCNumbers } from 'material__base';
export interface cssClasses extends MDCStrings {
ROOT: 'mdc-menu';
OPEN: 'mdc-menu--open';
ANIMATING_OPEN: 'mdc-menu--animating-open';
ANIMATING_CLOSED: 'mdc-menu--animating-closed';
SELECTED_LIST_ITEM: 'mdc-list-item--selected';
}
export interface strings extends MDCStrings {
ITEMS_SELECTOR: '.mdc-menu__items';
SELECTED_EVENT: 'MDCMenu:selected';
CANCEL_EVENT: 'MDCMenu:cancel';
ARIA_DISABLED_ATTR: 'aria-disabled';
}
export interface numbers extends MDCNumbers {
// Amount of time to wait before triggering a selected event on the menu. Note that this time
// will most likely be bumped up once interactive lists are supported to allow for the ripple to
// animate before closing the menu
SELECTED_TRIGGER_DELAY: 50;
// Total duration of menu open animation.
TRANSITION_OPEN_DURATION: 120;
// Total duration of menu close animation.
TRANSITION_CLOSE_DURATION: 75;
// Margin left to the edge of the viewport when menu is at maximum possible height.
MARGIN_TO_EDGE: 32;
// Ratio of anchor width to menu width for switching from corner positioning to center positioning.
ANCHOR_TO_MENU_WIDTH_RATIO: 0.67;
// Ratio of vertical offset to menu height for switching from corner to mid-way origin positioning.
OFFSET_TO_MENU_HEIGHT_RATIO: 0.1;
}
/**
* Enum for bits in the {@see Corner) bitmap.
*/
export interface CornerBit extends MDCNumbers {
BOTTOM: 1;
CENTER: 2;
RIGHT: 4;
FLIP_RTL: 8;
}
/**
* Enum for representing an element corner for positioning the menu.
*
* The START constants map to LEFT if element directionality is left
* to right and RIGHT if the directionality is right to left.
* Likewise END maps to RIGHT or LEFT depending on the directionality.
*/
export interface Corner extends MDCNumbers {
TOP_LEFT: 0;
TOP_RIGHT: 4;
BOTTOM_LEFT: 1;
BOTTOM_RIGHT: 5;
TOP_START: 8;
TOP_END: 12;
BOTTOM_START: 9;
BOTTOM_END: 13;
}

View File

@ -1,68 +0,0 @@
/**
* @license
* Copyright 2016 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/foundation';
import { cssClasses, strings, numbers, CornerBit, Corner } from './constants';
import MDCMenuAdapter from './adapter';
export interface AnchorMargin {
top: number;
right: number;
bottom: number;
left: number;
}
export default class MDCMenuFoundation extends MDCFoundation<MDCMenuFoundation> {
static readonly cssClasses: cssClasses;
static readonly strings: strings;
static readonly numbers: numbers;
static readonly Corner: Corner;
static readonly defaultAdapter: MDCMenuAdapter;
/**
* @param corner Default anchor corner alignment of top-left menu corner.
*/
setAnchorCorner(corner: number): void;
/**
* @param margin 4-plet of margins from anchor.
*/
setAnchorMargin(margin: AnchorMargin): void;
setRememberSelection(rememberSelection: boolean): void;
setQuickOpen(quickOpen: boolean): void;
open({focusIndex}?: {
focusIndex?: null;
}): void;
close(evt?: Event): void;
isOpen(): boolean;
getSelectedIndex(): number;
/**
* @param index Index of the item to set as selected.
*/
setSelectedIndex(index: number): void;
}

View File

@ -1,63 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* Copyright 2016 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/component';
import MDCMenuFoundation, { AnchorMargin } from './foundation';
import MDCMenuAdapter from './adapter';
import { Corner, CornerBit } from './constants';
export { MDCMenuFoundation, MDCMenuAdapter, AnchorMargin, Corner, CornerBit };
export class MDCMenu extends MDCComponent<MDCMenuAdapter, MDCMenuFoundation> {
static attachTo(root: Element): MDCMenu;
open: boolean;
show(options?: { focusIndex?: number | null; }): void;
hide(): void;
/**
* @param corner Default anchor corner alignment of top-left menu corner.
*/
setAnchorCorner(corner: number): void;
setAnchorMargin(margin: AnchorMargin): void;
/**
* Return the items within the menu. Note that this only contains the set of elements within
* the items container that are proper list items, and not supplemental / presentational DOM
* elements.
*/
readonly items: Element[];
/**
* Return the item within the menu that is selected.
*/
getOptionByIndex(index: number): Element | null;
selectedItemIndex: number;
rememberSelection: boolean;
quickOpen: boolean;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,37 +0,0 @@
/**
* Copyright 2016 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.
*/
/**
* Returns the name of the correct transform property to use on the current browser.
*/
export function getTransformPropertyName(globalObj: Window, forceRefresh?: boolean): string|undefined;
/**
* Clamps a value between the minimum and the maximum, returning the clamped value.
*/
export function clamp(value: number, min?: number, max?: number): number;
/**
* Returns the easing value to apply at time t, for a given cubic bezier curve.
* Control points P0 and P3 are assumed to be (0,0) and (1,1), respectively.
* Parameters are as follows:
* - time: The current time in the animation, scaled between 0 and 1.
* - x1: The x value of control point P1.
* - y1: The y value of control point P1.
* - x2: The x value of control point P2.
* - y2: The y value of control point P2.
*/
export function bezierProgress(time: number, x1: number, y1: number, x2: number, y2: number): number;

View File

@ -1,57 +0,0 @@
/**
* @license
* 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.
*/
/**
* Adapter for MDC Notched Outline.
*
* Defines the shape of the adapter expected by the foundation. Implement this
* adapter to integrate the Notched Outline into your framework. See
* https://github.com/material-components/material-components-web/blob/master/docs/authoring-components.md
* for more information.
*/
export default interface MDCNotchedOutlineAdapter {
/**
* Returns the width of the root element.
*/
getWidth(): number;
/**
* Returns the height of the root element.
*/
getHeight(): number;
/**
* Adds a class to the root element.
*/
addClass(className: string): void;
/**
* Removes a class from the root element.
*/
removeClass(className: string): void;
/**
* Sets the "d" attribute of the outline element's SVG path.
*/
setOutlinePathAttr(value: string): void;
/**
* Returns the idle outline element's computed style value of the given css property `propertyName`.
* We achieve this via `getComputedStyle(...).getPropertyValue(propertyName)`.
*/
getIdleOutlineStyleValue(propertyName: string): string;
}

View File

@ -1,27 +0,0 @@
/**
* @license
* Copyright 2018 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 strings extends MDCStrings {
PATH_SELECTOR: '.mdc-notched-outline__path';
IDLE_OUTLINE_SELECTOR: '.mdc-notched-outline__idle';
}
export interface cssClasses extends MDCStrings {
OUTLINE_NOTCHED: 'mdc-notched-outline--notched';
}

View File

@ -1,38 +0,0 @@
/**
* @license
* 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/foundation';
import { cssClasses, strings } from './constants';
import MDCNotchedOutlineAdapter from './adapter';
export default class MDCNotchedOutlineFoundation extends MDCFoundation<MDCNotchedOutlineAdapter> {
static readonly strings: strings;
static readonly cssClasses: cssClasses;
static readonly defaultAdapter: MDCNotchedOutlineAdapter;
/**
* Adds the outline notched selector and updates the notch width
* calculated based off of notchWidth and isRtl.
*/
notch(notchWidth: number, isRtl?: boolean): void;
/**
* Removes notched outline selector to close the notch in the outline.
*/
closeNotch(): void;
}

View File

@ -1,41 +0,0 @@
// Type definitions for Material Components Web 0.35
// Project: https://material.io/components/, https://github.com/material-components/material-components-web
// Definitions by: Brent Douglas <https://github.com/BrentDouglas>, Collin Kostichuk <https://github.com/ckosti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
/**
* @license
* 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/component';
import MDCNotchedOutlineFoundation from './foundation';
import MDCNotchedOutlineAdapter from './adapter';
export { MDCNotchedOutlineFoundation, MDCNotchedOutlineAdapter };
export class MDCNotchedOutline extends MDCComponent<MDCNotchedOutlineAdapter, MDCNotchedOutlineFoundation> {
static attachTo(root: Element): MDCNotchedOutline;
/**
* Updates outline selectors and SVG path to open notch.
*/
notch(notchWidth: number, isRtl?: boolean): void;
/**
* Updates the outline selectors to close notch and return it to idle state.
*/
closeNotch(): void;
}

View File

@ -1,24 +0,0 @@
{
"files": [
"index.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
}
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

Some files were not shown because too many files have changed in this diff Show More