2023-10-24 13:44:43 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* AnimateOnScroll manages PrimeFlex CSS classes declaratively to during enter/leave animations on scroll or on page load.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://primevue.org/animateonscroll)
|
|
|
|
*
|
|
|
|
* @module animateonscroll
|
|
|
|
*/
|
|
|
|
import { DirectiveBinding, ObjectDirective } from 'vue';
|
|
|
|
import { DirectiveHooks } from '../basedirective/BaseDirective';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines options of AnimateOnScroll.
|
|
|
|
*/
|
|
|
|
export interface AnimateOnScrollOptions {
|
|
|
|
/**
|
2023-10-26 09:37:23 +00:00
|
|
|
* Style class to add when item goes into viewport, use white space as a delimeter to define multiple classes.
|
2023-10-24 13:44:43 +00:00
|
|
|
*/
|
|
|
|
enterClass?: string | undefined;
|
|
|
|
/**
|
2023-10-26 09:37:23 +00:00
|
|
|
* Style class to add when item leaves the viewport, use white space as a delimeter to define multiple classes.
|
2023-10-24 13:44:43 +00:00
|
|
|
*/
|
|
|
|
leaveClass?: string | undefined;
|
2023-10-26 00:54:11 +00:00
|
|
|
/**
|
|
|
|
* Specifies the `root` option of the IntersectionObserver API
|
|
|
|
*/
|
|
|
|
root?: Element | Document | null;
|
|
|
|
/**
|
|
|
|
* Specifies the `rootMargin` option of the IntersectionObserver API
|
|
|
|
*/
|
|
|
|
rootMargin?: string;
|
|
|
|
/**
|
|
|
|
* Specifies the `threshold` option of the IntersectionObserver API
|
|
|
|
*/
|
|
|
|
threshold?: ReadonlyArray<number>;
|
2023-10-24 13:44:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) directive options.
|
|
|
|
*/
|
|
|
|
export interface AnimateOnScrollDirectivePassThroughOptions {
|
|
|
|
/**
|
|
|
|
* Used to manage all lifecycle hooks
|
|
|
|
* @see {@link BaseDirective.DirectiveHooks}
|
|
|
|
*/
|
|
|
|
hooks?: DirectiveHooks;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines modifiers of AnimateOnScroll.
|
|
|
|
*/
|
|
|
|
export interface AnimateOnScrollDirectiveModifiers {
|
|
|
|
/**
|
2023-10-25 04:01:16 +00:00
|
|
|
* Whether the scroll event listener should be removed after initial run.
|
2023-10-24 13:44:43 +00:00
|
|
|
* @defaultValue true
|
|
|
|
*/
|
|
|
|
once?: boolean | undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Binding of AnimateOnScroll directive.
|
|
|
|
*/
|
|
|
|
export interface AnimateOnScrollDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
|
|
|
|
/**
|
|
|
|
* Value of the AnimateOnScroll.
|
|
|
|
*/
|
|
|
|
value?: AnimateOnScrollOptions | undefined;
|
|
|
|
/**
|
|
|
|
* Modifiers of the tooltip.
|
|
|
|
* @type {AnimateOnScrollDirectiveModifiers}
|
|
|
|
*/
|
|
|
|
modifiers?: AnimateOnScrollDirectiveModifiers | undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* **PrimeVue - AnimateOnScroll**
|
|
|
|
*
|
|
|
|
* _AnimateOnScroll manages PrimeFlex CSS classes declaratively to during enter/leave animations on scroll or on page load._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/animateonscroll/)
|
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
declare const AnimateOnScroll: ObjectDirective;
|
|
|
|
|
|
|
|
export default AnimateOnScroll;
|