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.8.0 to 0.9.0

74

base-element.d.ts

@@ -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

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