fixes on material according to test results

This commit is contained in:
Arthur Groupp
2019-01-19 22:31:19 +02:00
parent a3dcbbc853
commit 90cb1caaf7
12 changed files with 18 additions and 63 deletions
-5
View File
@@ -1,7 +1,2 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function closest(element: Element, selector: string): Element;
export function matches(element: Element, selector: string): boolean;
-5
View File
@@ -1,8 +1,3 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @license
* Copyright 2018 Google Inc.
+8 -14
View File
@@ -1,8 +1,3 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
@@ -23,18 +18,17 @@ import { MDCStrings } from 'material__base';
export interface cssClasses extends MDCStrings {
ROOT: 'mdc-drawer';
DISMISSIBLE: 'mdc-drawer--dismissible',
MODAL: 'mdc-drawer--modal',
DISMISSIBLE: 'mdc-drawer--dismissible';
MODAL: 'mdc-drawer--modal';
OPEN: 'mdc-drawer--open';
ANIMATE: 'mdc-drawer--animate';
OPENING: 'mdc-drawer--opening',
CLOSING: 'mdc-drawer--closing',
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',
APP_CONTENT_SELECTOR: '.mdc-drawer-app-content';
SCRIM_SELECTOR: '.mdc-drawer-scrim';
CLOSE_EVENT: 'MDCDrawer:closed';
OPEN_EVENT: 'MDCDrawer:opened';
}
+1 -6
View File
@@ -1,8 +1,3 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @license
* Copyright 2018 Google Inc.
@@ -28,7 +23,7 @@
import { MDCDrawerAdapter } from '../adapter';
import MDCFoundation from 'material__base/foundation';
import {cssClasses, strings} from '../constants';
import { cssClasses, strings } from '../constants';
export class MDCDismissibleDrawerFoundation extends MDCFoundation<MDCDrawerAdapter> {
static readonly strings: strings;
+2 -3
View File
@@ -55,9 +55,9 @@ export interface Options {
clickOutsideDeactivates?: boolean;
}
type ActivateOptions = Pick<Options, "onActivate">;
export type ActivateOptions = Pick<Options, "onActivate">;
interface DeactivateOptions extends Pick<Options, "onDeactivate"> {
export interface DeactivateOptions extends Pick<Options, "onDeactivate"> {
returnFocus?: boolean;
}
@@ -79,4 +79,3 @@ export default function focusTrap(
element: HTMLElement | string,
userOptions?: Options
): FocusTrap;
+2 -4
View File
@@ -27,16 +27,14 @@ import { MDCDrawerAdapter } from './adapter';
import { MDCList, MDCListFoundation } from 'material__list/index';
import { strings } from './constants';
import * as util from './util';
import createFocusTrap from './focus-trap';
import { FocusTrap } from './focus-trap';
import createFocusTrap, { FocusTrap } from './focus-trap';
export class MDCDrawer extends MDCComponent<MDCDrawer, MDCDismissibleDrawerFoundation | MDCModalDrawerFoundation> {
constructor(...args: any);
constructor(...args: any[]);
static attachTo(root: Element): MDCDrawer;
/**
* Returns true if drawer is in the open position.
* @return {boolean}
*/
open: boolean;
-5
View File
@@ -1,8 +1,3 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @license
* Copyright 2018 Google Inc.
+1 -1
View File
@@ -16,4 +16,4 @@
import { FocusTrap } from './focus-trap';
export function createFocusTrapInstance(surfaceEl: Element, focusTrapFactory: Function): FocusTrap
export function createFocusTrapInstance(surfaceEl: Element, focusTrapFactory: () => FocusTrap): FocusTrap;
+1 -6
View File
@@ -1,8 +1,3 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export class MDCListAdapter {
getListItemCount(): number;
getFocusedElementIndex(): number;
@@ -30,7 +25,7 @@ export class MDCListAdapter {
/**
* Returns true if radio button is present at given list item index.
*/
hasRadioAtIndex(index: number): boolean
hasRadioAtIndex(index: number): boolean;
/**
* Returns true if checkbox is present at given list item index.
-5
View File
@@ -1,8 +1,3 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* @license
* Copyright 2018 Google Inc.
+1 -7
View File
@@ -1,13 +1,8 @@
// Type definitions for Material Components Web 0.43
// Project: https://material.io/components/
// Definitions by: Arthur Groupp <https://github.com/agroupp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import MDCFoundation from 'material__base/foundation';
import { MDCListAdapter } from './adapter';
import { strings, cssClasses, Index } from './constants';
declare const ELEMENTS_KEY_ALLOWED_IN: string[];
export const ELEMENTS_KEY_ALLOWED_IN: string[];
export class MDCListFoundation extends MDCFoundation<MDCListFoundation> {
static readonly strings: strings;
@@ -75,4 +70,3 @@ export class MDCListFoundation extends MDCFoundation<MDCListFoundation> {
focusLastElement(): number;
}
+2 -2
View File
@@ -22,7 +22,7 @@
*/
import MDCComponent from 'material__base/component';
import { MDCListFoundation } from './foundation'
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
@@ -33,7 +33,7 @@ export class MDCList {
destroy(): void;
initialSyncWithDOM():void;
initialSyncWithDOM(): void;
layout(): void;