mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
fixes in material__drawer according to test results
This commit is contained in:
Vendored
+2
-12
@@ -2,7 +2,7 @@
|
||||
// Project: https://material.io/components/
|
||||
// Definitions by: Arthur Groupp <https://github.com/agroupp>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -39,30 +39,22 @@
|
||||
*
|
||||
* @record
|
||||
*/
|
||||
declare class MDCDrawerAdapter {
|
||||
export class MDCDrawerAdapter {
|
||||
/**
|
||||
* Adds a class to the root Element.
|
||||
* @param {string} className
|
||||
*/
|
||||
addClass(className: string): void;
|
||||
|
||||
/**
|
||||
* Removes a class from the root Element.
|
||||
* @param {string} className
|
||||
*/
|
||||
removeClass(className: string): void;
|
||||
|
||||
/**
|
||||
* Returns true if the root Element contains the given class.
|
||||
* @param {string} className
|
||||
* @return {boolean}
|
||||
*/
|
||||
hasClass(className: string): boolean;
|
||||
|
||||
/**
|
||||
* @param {!Element} element target element to verify class name
|
||||
* @param {string} className class name
|
||||
*/
|
||||
elementHasClass(element: Element, className: string): void;
|
||||
|
||||
/**
|
||||
@@ -101,5 +93,3 @@ declare class MDCDrawerAdapter {
|
||||
*/
|
||||
releaseFocus(): void;
|
||||
}
|
||||
|
||||
export { MDCDrawerAdapter };
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Project: https://material.io/components/
|
||||
// Definitions by: Arthur Groupp <https://github.com/agroupp>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
/**
|
||||
* Copyright 2016 Google Inc. All Rights Reserved.
|
||||
|
||||
+2
-16
@@ -2,7 +2,7 @@
|
||||
// Project: https://material.io/components/
|
||||
// Definitions by: Arthur Groupp <https://github.com/agroupp>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -31,16 +31,9 @@ import { MDCDrawerAdapter } from '../adapter';
|
||||
import MDCFoundation from 'material__base/foundation';
|
||||
import {cssClasses, strings} from '../constants';
|
||||
|
||||
/**
|
||||
* @extends {MDCFoundation<!MDCDrawerAdapter>}
|
||||
*/
|
||||
declare class MDCDismissibleDrawerFoundation extends MDCFoundation<MDCDrawerAdapter> {
|
||||
/** @return enum {string} */
|
||||
export class MDCDismissibleDrawerFoundation extends MDCFoundation<MDCDrawerAdapter> {
|
||||
static readonly strings: strings;
|
||||
|
||||
/** @return enum {string} */
|
||||
static readonly cssClasses: cssClasses;
|
||||
|
||||
static readonly defaultAdapter: MDCDrawerAdapter;
|
||||
|
||||
constructor(adapter: MDCDrawerAdapter);
|
||||
@@ -59,33 +52,26 @@ declare class MDCDismissibleDrawerFoundation extends MDCFoundation<MDCDrawerAdap
|
||||
|
||||
/**
|
||||
* Returns true if drawer is in open state.
|
||||
* @return {boolean}
|
||||
*/
|
||||
isOpen(): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if drawer is animating open.
|
||||
* @return {boolean}
|
||||
*/
|
||||
isOpening(): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if drawer is animating closed.
|
||||
* @return {boolean}
|
||||
*/
|
||||
isClosing(): boolean;
|
||||
|
||||
/**
|
||||
* Keydown handler to close drawer when key is escape.
|
||||
* @param evt
|
||||
*/
|
||||
handleKeydown(evt: KeyboardEvent): void;
|
||||
|
||||
/**
|
||||
* Handles a transition end event on the root element.
|
||||
* @param {!Event} evt
|
||||
*/
|
||||
handleTransitionEnd(evt: Event): void;
|
||||
}
|
||||
|
||||
export { MDCDismissibleDrawerFoundation };
|
||||
|
||||
Vendored
+3
-3
@@ -2,7 +2,7 @@
|
||||
// Project: https://material.io/components/
|
||||
// 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
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
/**
|
||||
* Copyright 2016 Google Inc. All Rights Reserved.
|
||||
@@ -30,7 +30,7 @@ import * as util from './util';
|
||||
import createFocusTrap from './focus-trap';
|
||||
import { FocusTrap } from './focus-trap';
|
||||
|
||||
declare class MDCDrawer extends MDCComponent<MDCDrawer, MDCDismissibleDrawerFoundation | MDCModalDrawerFoundation> {
|
||||
export class MDCDrawer extends MDCComponent<MDCDrawer, MDCDismissibleDrawerFoundation | MDCModalDrawerFoundation> {
|
||||
constructor(...args: any);
|
||||
static attachTo(root: Element): MDCDrawer;
|
||||
|
||||
@@ -49,4 +49,4 @@ declare class MDCDrawer extends MDCComponent<MDCDrawer, MDCDismissibleDrawerFoun
|
||||
getDefaultFoundation(): MDCDismissibleDrawerFoundation | MDCModalDrawerFoundation;
|
||||
}
|
||||
|
||||
export {MDCDrawer, MDCDismissibleDrawerFoundation, MDCModalDrawerFoundation, util};
|
||||
export { MDCDismissibleDrawerFoundation, MDCModalDrawerFoundation, util };
|
||||
|
||||
+2
-9
@@ -2,7 +2,7 @@
|
||||
// Project: https://material.io/components/
|
||||
// Definitions by: Arthur Groupp <https://github.com/agroupp>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 3.1
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -30,19 +30,14 @@
|
||||
import { MDCDrawerAdapter } from '../adapter';
|
||||
import { MDCDismissibleDrawerFoundation } from '../dismissible/foundation';
|
||||
|
||||
/**
|
||||
* @extends {MDCDismissibleDrawerFoundation}
|
||||
*/
|
||||
declare class MDCModalDrawerFoundation extends MDCDismissibleDrawerFoundation {
|
||||
export class MDCModalDrawerFoundation extends MDCDismissibleDrawerFoundation {
|
||||
/**
|
||||
* Called when drawer finishes open animation.
|
||||
* @override
|
||||
*/
|
||||
opened(): void;
|
||||
|
||||
/**
|
||||
* Called when drawer finishes close animation.
|
||||
* @override
|
||||
*/
|
||||
closed(): void;
|
||||
|
||||
@@ -51,5 +46,3 @@ declare class MDCModalDrawerFoundation extends MDCDismissibleDrawerFoundation {
|
||||
*/
|
||||
handleScrimClick(): void;
|
||||
}
|
||||
|
||||
export { MDCModalDrawerFoundation };
|
||||
|
||||
Reference in New Issue
Block a user