@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
50 lines • 1.5 kB
TypeScript
/**
* @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 type { IRipple } from './ripple.interface';
/**
* 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
*/
handlePointerenter(event: PointerEvent): void;
handlePointerleave(event: PointerEvent): void;
handlePointerup(event: PointerEvent): void;
handlePointerdown(event: PointerEvent): Promise<void>;
handlePointercancel(event: PointerEvent): void;
handleClick(): void;
handleContextmenu(): void;
handleFocus(): void;
handleBlur(): void;
/**
* 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