@material/mwc-base
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -17,42 +17,40 @@ /** | ||
*/ | ||
import { MDCFoundation } from '@material/base'; | ||
import { LitElement } from 'lit-element'; | ||
import { Constructor } from './utils.js'; | ||
export * from 'lit-element'; | ||
export { classMap } from 'lit-html/directives/class-map.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; | ||
} |
@@ -18,4 +18,2 @@ /** | ||
import { LitElement } from 'lit-element'; | ||
export * from 'lit-element'; | ||
export { classMap } from 'lit-html/directives/class-map.js'; | ||
export { observer } from './observer.js'; | ||
@@ -22,0 +20,0 @@ export { addHasRemoveClass } from './utils.js'; |
@@ -17,26 +17,27 @@ /** | ||
*/ | ||
import { BaseElement } from './base-element'; | ||
import {MDCRippleFoundation} from '@material/ripple/foundation.js'; | ||
import {BaseElement} from './base-element'; | ||
export * from './base-element'; | ||
export interface RippleSurface { | ||
activate(): void; | ||
deactivate(): void; | ||
export interface RippleSurface extends MDCRippleFoundation { | ||
activate(): void; | ||
deactivate(): void; | ||
} | ||
export interface HTMLElementWithRipple extends HTMLElement { | ||
ripple?: RippleSurface; | ||
ripple?: RippleSurface; | ||
} | ||
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?: RippleSurface; | ||
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?: RippleSurface; | ||
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.8.0", | ||
"version": "0.9.0", | ||
"description": "", | ||
@@ -14,10 +14,13 @@ "repository": { | ||
"@material/dom": "^3.1.0", | ||
"@material/ripple": "^3.0.0", | ||
"lit-element": "^2.2.1", | ||
"lit-html": "^1.0.0", | ||
"tslib": "^1.10.0" | ||
}, | ||
"devDependencies": { | ||
"@material/ripple": "^3.0.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "e47de0d9d6e556ce8c4b0b92f87be25a3e18da79" | ||
"gitHead": "d6db9ceafe4b21572f967ac4acae9189da8c9c4f" | ||
} |
@@ -22,5 +22,2 @@ /** | ||
import {Constructor} from './utils.js'; | ||
export * from 'lit-element'; | ||
export {classMap} from 'lit-html/directives/class-map.js'; | ||
export {observer} from './observer.js'; | ||
@@ -27,0 +24,0 @@ export {addHasRemoveClass} from './utils.js'; |
@@ -18,6 +18,9 @@ /** | ||
import {MDCRippleFoundation} from '@material/ripple/foundation.js'; | ||
import {BaseElement} from './base-element'; | ||
export * from './base-element'; | ||
export interface RippleSurface { | ||
export interface RippleSurface extends MDCRippleFoundation { | ||
activate(): void; | ||
@@ -24,0 +27,0 @@ deactivate(): void; |
@@ -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 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
42169
1
485
1
+ Added@material/ripple@^3.0.0
+ Added@material/animation@3.1.0(transitive)
+ Added@material/feature-targeting@3.1.0(transitive)
+ Added@material/ripple@3.2.0(transitive)
+ Added@material/theme@3.1.0(transitive)
- Removedlit-html@^1.0.0