@material/mwc-base
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -17,40 +17,40 @@ /** | ||
*/ | ||
import { MDCFoundation } from '@material/base'; | ||
import { LitElement } from 'lit-element'; | ||
import { Constructor } from './utils.js'; | ||
export { observer } from './observer.js'; | ||
export { addHasRemoveClass } from './utils.js'; | ||
import {MDCFoundation} from '@material/base'; | ||
import {LitElement} from 'lit-element'; | ||
import {Constructor} from './utils.js'; | ||
export {observer} from './observer.js'; | ||
export {addHasRemoveClass} from './utils.js'; | ||
export * from '@material/base/types.js'; | ||
export declare abstract class BaseElement extends LitElement { | ||
/** | ||
* Root element for MDC Foundation usage. | ||
* | ||
* Define in your component with the `@query` decorator | ||
*/ | ||
protected abstract mdcRoot: HTMLElement; | ||
/** | ||
* Return the foundation class for this component | ||
*/ | ||
protected abstract readonly mdcFoundationClass: Constructor<MDCFoundation>; | ||
/** | ||
* An instance of the MDC Foundation class to attach to the root element | ||
*/ | ||
protected abstract mdcFoundation: MDCFoundation; | ||
/** | ||
* Create the adapter for the `mdcFoundation`. | ||
* | ||
* Override and return an object with the Adapter's functions implemented: | ||
* | ||
* { | ||
* addClass: () => {}, | ||
* removeClass: () => {}, | ||
* ... | ||
* } | ||
*/ | ||
protected abstract createAdapter(): {}; | ||
/** | ||
* Create and attach the MDC Foundation to the instance | ||
*/ | ||
protected createFoundation(): void; | ||
protected firstUpdated(): void; | ||
/** | ||
* Root element for MDC Foundation usage. | ||
* | ||
* Define in your component with the `@query` decorator | ||
*/ | ||
protected abstract mdcRoot: HTMLElement; | ||
/** | ||
* Return the foundation class for this component | ||
*/ | ||
protected abstract readonly mdcFoundationClass: Constructor<MDCFoundation>; | ||
/** | ||
* An instance of the MDC Foundation class to attach to the root element | ||
*/ | ||
protected abstract mdcFoundation: MDCFoundation; | ||
/** | ||
* Create the adapter for the `mdcFoundation`. | ||
* | ||
* Override and return an object with the Adapter's functions implemented: | ||
* | ||
* { | ||
* addClass: () => {}, | ||
* removeClass: () => {}, | ||
* ... | ||
* } | ||
*/ | ||
protected abstract createAdapter(): {}; | ||
/** | ||
* Create and attach the MDC Foundation to the instance | ||
*/ | ||
protected createFoundation(): void; | ||
protected firstUpdated(): void; | ||
} |
@@ -17,23 +17,23 @@ /** | ||
*/ | ||
import { MDCRippleFoundation } from '@material/ripple/foundation.js'; | ||
import { BaseElement } from './base-element'; | ||
import {MDCRippleFoundation} from '@material/ripple/foundation.js'; | ||
import {BaseElement} from './base-element'; | ||
export * from './base-element'; | ||
export interface HTMLElementWithRipple extends HTMLElement { | ||
ripple?: MDCRippleFoundation; | ||
ripple?: MDCRippleFoundation; | ||
} | ||
export declare abstract class FormElement extends BaseElement { | ||
/** | ||
* Form-capable element in the component ShadowRoot. | ||
* | ||
* Define in your component with the `@query` decorator | ||
*/ | ||
protected abstract formElement: HTMLElement; | ||
protected createRenderRoot(): ShadowRoot; | ||
/** | ||
* Implement ripple getter for Ripple integration with mwc-formfield | ||
*/ | ||
readonly ripple?: MDCRippleFoundation; | ||
click(): void; | ||
setAriaLabel(label: string): void; | ||
protected firstUpdated(): void; | ||
/** | ||
* Form-capable element in the component ShadowRoot. | ||
* | ||
* Define in your component with the `@query` decorator | ||
*/ | ||
protected abstract formElement: HTMLElement; | ||
protected createRenderRoot(): ShadowRoot; | ||
/** | ||
* Implement ripple getter for Ripple integration with mwc-formfield | ||
*/ | ||
readonly ripple?: MDCRippleFoundation; | ||
click(): void; | ||
setAriaLabel(label: string): void; | ||
protected firstUpdated(): void; | ||
} |
export interface Observer { | ||
(value: any, old: any): void; | ||
(value: any, old: any): void; | ||
} | ||
export declare const observer: (observer: Observer) => (proto: any, propName: string | number | symbol) => void; | ||
export declare const observer: (observer: Observer) => | ||
(proto: any, propName: string|number|symbol) => void; |
{ | ||
"name": "@material/mwc-base", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "", | ||
@@ -12,5 +12,5 @@ "repository": { | ||
"dependencies": { | ||
"@material/base": "=4.0.0-canary.e851d4f40.0", | ||
"@material/dom": "=4.0.0-canary.e851d4f40.0", | ||
"@material/ripple": "=4.0.0-canary.e851d4f40.0", | ||
"@material/base": "=5.0.0-canary.5729943ba.0", | ||
"@material/dom": "=5.0.0-canary.5729943ba.0", | ||
"@material/ripple": "=5.0.0-canary.5729943ba.0", | ||
"lit-element": "^2.2.1", | ||
@@ -25,3 +25,3 @@ "tslib": "^1.10.0" | ||
}, | ||
"gitHead": "631e70e3a39330ccade8210d1a72edc0f22ddc0a" | ||
"gitHead": "147d9789d99bf7a5ed28f6b066b8db58f5b9ab0a" | ||
} |
@@ -17,8 +17,9 @@ /** | ||
*/ | ||
export declare function findAssignedElement(slot: HTMLSlotElement, selector: string): HTMLElement | null; | ||
export declare function findAssignedElement( | ||
slot: HTMLSlotElement, selector: string): HTMLElement|null; | ||
export declare type Constructor<T> = new (...args: any[]) => T; | ||
export declare function addHasRemoveClass(element: HTMLElement): { | ||
addClass: (className: string) => void; | ||
removeClass: (className: string) => void; | ||
hasClass: (className: string) => boolean; | ||
addClass: (className: string) => void; | ||
removeClass: (className: string) => void; | ||
hasClass: (className: string) => boolean; | ||
}; | ||
@@ -25,0 +26,0 @@ /** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
477
41941
1