UNPKG

@sandlada/mdc

Version:

@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.

62 lines 1.76 kB
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 * @link * https://github.com/material-components/material-web/blob/main/ripple/internal/ripple.ts * * [Modified by Kai-Orion & Sandlada] */ import { ReactiveElement } from 'lit'; export interface IRipple extends ReactiveElement { hovered: boolean; focused: boolean; pressed: boolean; disabled: boolean; disableHoverStateLayer: boolean; disableFocusStateLayer: boolean; disablePressStateLayer: boolean; hoverStateLayerElement: HTMLElement; focusStateLayerElement: HTMLElement; pressStateLayerElement: HTMLElement; } /** * Used to manage the `hovered`, `focused` and `pressed` states of ripple components. */ export declare class RippleAction { private readonly host; private state; private startEvent; private checkBoundsAfterContextMenu; private initialSize; private rippleScale; private rippleSize; private growAnimation; constructor(host: IRipple); onControlChange(prev: HTMLElement | null, next: HTMLElement | null): void; /** * Event handles */ private handlePointerenter; private handlePointerleave; private handlePointerup; private handlePointerdown; private handlePointercancel; private handleClick; private handleContextmenu; private handleFocus; private handleBlur; /** * Animations about */ private startPressAnimation; private getTranslationCoordinates; private getNormalizedPointerEventCoords; private endPressAnimation; private determineRippleSize; private inBounds; private isTouch; private shouldReactToEvent; private handleEvent; } //# sourceMappingURL=ripple-action.d.ts.map