@datametria/vue-components
Version:
DATAMETRIA Vue.js 3 Component Library with Multi-Brand Theming - 51 components + 10 composables with theming support, WCAG 2.2 AA, dark mode, responsive system
50 lines (49 loc) • 1.34 kB
TypeScript
interface RippleOptions {
color?: string;
duration?: number;
disabled?: boolean;
}
interface RippleEffect {
x: number;
y: number;
size: number;
id: string;
}
/**
* Composable para efeito ripple em elementos clicáveis
* Implementa Material Design ripple effect com acessibilidade
*/
export declare function useRipple(options?: RippleOptions): {
rippleRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
ripples: import('vue').Ref<{
x: number;
y: number;
size: number;
id: string;
}[], RippleEffect[] | {
x: number;
y: number;
size: number;
id: string;
}[]>;
applyRipple: (element: HTMLElement) => (() => void) | undefined;
removeRipple: (id: string) => void;
clearRipples: () => void;
getRippleStyle: (ripple: RippleEffect) => {
position: "absolute";
left: string;
top: string;
width: string;
height: string;
borderRadius: string;
backgroundColor: string;
transform: string;
animation: string;
pointerEvents: "none";
zIndex: number;
};
createRipple: (event: MouseEvent | TouchEvent) => void;
addRippleEffect: () => (() => void) | undefined;
removeRippleEffect: () => void;
};
export {};