Socket
Socket
Sign inDemoInstall

@material/mwc-base

Package Overview
Dependencies
Maintainers
19
Versions
721
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/mwc-base - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0-canary.24f5fa6e.0

6

base-element.d.ts

@@ -20,5 +20,5 @@ /**

import { Constructor } from './utils.js';
export { CustomEventListener, EventType, SpecificEventListener } from '@material/base/types.js';
export { observer } from './observer.js';
export { addHasRemoveClass } from './utils.js';
export * from '@material/base/types.js';
export declare abstract class BaseElement extends LitElement {

@@ -34,7 +34,7 @@ /**

*/
protected abstract readonly mdcFoundationClass: Constructor<MDCFoundation>;
protected abstract readonly mdcFoundationClass?: Constructor<MDCFoundation>;
/**
* An instance of the MDC Foundation class to attach to the root element
*/
protected abstract mdcFoundation: MDCFoundation;
protected abstract mdcFoundation?: MDCFoundation;
/**

@@ -41,0 +41,0 @@ * Create the adapter for the `mdcFoundation`.

@@ -28,4 +28,6 @@ /**

}
this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());
this.mdcFoundation.init();
if (this.mdcFoundationClass) {
this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());
this.mdcFoundation.init();
}
}

@@ -32,0 +34,0 @@ firstUpdated() {

@@ -17,8 +17,13 @@ /**

*/
import { MDCRippleFoundation } from '@material/ripple/foundation.js';
import { BaseElement } from './base-element';
export * from './base-element';
import { addHasRemoveClass, BaseElement, CustomEventListener, EventType, observer, SpecificEventListener } from './base-element';
export { addHasRemoveClass, BaseElement, CustomEventListener, EventType, observer, SpecificEventListener };
export interface HTMLElementWithRipple extends HTMLElement {
ripple?: MDCRippleFoundation;
ripple?: RippleInterface;
}
export interface RippleInterface {
activate: (e?: Event) => void;
deactivate: () => void;
handleFocus: () => void;
handleBlur: () => void;
}
export declare abstract class FormElement extends BaseElement {

@@ -35,3 +40,3 @@ /**

*/
readonly ripple?: MDCRippleFoundation;
readonly ripple?: RippleInterface | Promise<RippleInterface | null>;
click(): void;

@@ -38,0 +43,0 @@ setAriaLabel(label: string): void;

@@ -17,4 +17,4 @@ /**

*/
import { BaseElement } from './base-element';
export * from './base-element';
import { addHasRemoveClass, BaseElement, observer } from './base-element';
export { addHasRemoveClass, BaseElement, observer };
export class FormElement extends BaseElement {

@@ -21,0 +21,0 @@ createRenderRoot() {

{
"name": "@material/mwc-base",
"version": "0.13.0",
"version": "0.14.0-canary.24f5fa6e.0",
"description": "",

@@ -12,5 +12,5 @@ "repository": {

"dependencies": {
"@material/base": "=5.0.0-canary.a1a0deb3e.0",
"@material/dom": "=5.0.0-canary.a1a0deb3e.0",
"@material/ripple": "=5.0.0-canary.a1a0deb3e.0",
"@material/base": "=6.0.0-canary.69edc6e28.0",
"@material/dom": "=6.0.0-canary.69edc6e28.0",
"@material/ripple": "=6.0.0-canary.69edc6e28.0",
"lit-element": "^2.2.1",

@@ -25,3 +25,3 @@ "tslib": "^1.10.0"

},
"gitHead": "054d0d234704a274e8aaf7d8a8a0399f525914eb"
"gitHead": "e884595521a6f82f63b8dec96fc4450410e37a09"
}

@@ -22,5 +22,6 @@ /**

import {Constructor} from './utils.js';
export {CustomEventListener, EventType, SpecificEventListener} from '@material/base/types.js';
export {observer} from './observer.js';
export {addHasRemoveClass} from './utils.js';
export * from '@material/base/types.js';

@@ -38,3 +39,3 @@ export abstract class BaseElement extends LitElement {

*/
protected abstract readonly mdcFoundationClass: Constructor<MDCFoundation>;
protected abstract readonly mdcFoundationClass?: Constructor<MDCFoundation>;

@@ -44,3 +45,3 @@ /**

*/
protected abstract mdcFoundation: MDCFoundation;
protected abstract mdcFoundation?: MDCFoundation;

@@ -67,4 +68,6 @@ /**

}
this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());
this.mdcFoundation.init();
if (this.mdcFoundationClass) {
this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());
this.mdcFoundation.init();
}
}

@@ -71,0 +74,0 @@

@@ -18,12 +18,24 @@ /**

import {MDCRippleFoundation} from '@material/ripple/foundation.js';
import {addHasRemoveClass, BaseElement, CustomEventListener, EventType, observer, SpecificEventListener} from './base-element';
import {BaseElement} from './base-element';
export {
addHasRemoveClass,
BaseElement,
CustomEventListener,
EventType,
observer,
SpecificEventListener
};
export * from './base-element';
export interface HTMLElementWithRipple extends HTMLElement {
ripple?: MDCRippleFoundation;
ripple?: RippleInterface;
}
export interface RippleInterface {
activate: (e?: Event) => void;
deactivate: () => void;
handleFocus: () => void;
handleBlur: () => void;
}
export abstract class FormElement extends BaseElement {

@@ -44,3 +56,3 @@ /**

*/
readonly ripple?: MDCRippleFoundation;
readonly ripple?: RippleInterface|Promise<RippleInterface|null>;

@@ -47,0 +59,0 @@ click() {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc