Socket
Socket
Sign inDemoInstall

@material/mwc-base

Package Overview
Dependencies
Maintainers
17
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.9.1 to 0.10.0

72

base-element.d.ts

@@ -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,27 +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 RippleSurface extends MDCRippleFoundation {
activate(): void;
deactivate(): void;
}
export interface HTMLElementWithRipple extends HTMLElement {
ripple?: RippleSurface;
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?: 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?: 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.9.1",
"version": "0.10.0",
"description": "",

@@ -24,3 +24,3 @@ "repository": {

},
"gitHead": "2b2676d71b8d393aa61348cb8e3d9ed03dd8dc08"
"gitHead": "631e70e3a39330ccade8210d1a72edc0f22ddc0a"
}

@@ -24,9 +24,4 @@ /**

export interface RippleSurface extends MDCRippleFoundation {
activate(): void;
deactivate(): void;
}
export interface HTMLElementWithRipple extends HTMLElement {
ripple?: RippleSurface;
ripple?: MDCRippleFoundation;
}

@@ -49,3 +44,3 @@

*/
readonly ripple?: RippleSurface;
readonly ripple?: MDCRippleFoundation;

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

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

*/
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;
};

@@ -26,0 +25,0 @@ /**

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc