primevue-mirror/components/lib/styleclass/StyleClass.d.ts

127 lines
3.6 KiB
TypeScript
Raw Normal View History

2023-03-02 11:26:12 +00:00
/**
*
* StyleClass manages css classes declaratively to during enter/leave animations or just to toggle classes on an element.
*
2023-03-03 14:17:03 +00:00
* [Live Demo](https://primevue.org/styleclass)
*
* @module styleclass
2023-03-02 11:26:12 +00:00
*/
import { DirectiveBinding, ObjectDirective } from 'vue';
2022-09-06 12:03:37 +00:00
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Defines options of StyleClass.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
export interface StyleClassOptions {
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Selector to define the target element. Available selectors are '@next', '@prev', '@parent' and '@grandparent'.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
selector?: '@next' | '@prev' | '@parent' | '@grandparent' | string | undefined;
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Style class to add when item begins to get displayed.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
enterClassName?: string | undefined;
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Style class to add during enter animation.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
enterActiveClassName?: string | undefined;
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Style class to add when item begins to get displayed.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
enterToClassName?: string | undefined;
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Style class to add when item begins to get hidden.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
leaveClassName?: string | undefined;
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Style class to add during leave animation.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
leaveActiveClassName?: string | undefined;
2023-06-22 13:55:50 +00:00
/**
2023-06-23 09:47:31 +00:00
* Style class to add when leave animation is completed.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 09:47:31 +00:00
leaveToClassName?: string | undefined;
/**
* Whether to trigger leave animation when outside of the element is clicked.
* @defaultValue false
*/
hideOnOutsideClick?: boolean | undefined;
/**
* Adds or removes a class when no enter-leave animation is required.
*/
toggleClass?: string | undefined;
/**
* Uses to pass attributes to DOM elements inside the component.
2023-06-23 14:51:42 +00:00
* @type {StyleClassDirectivePassThroughOptions}
2023-06-23 09:47:31 +00:00
*/
2023-06-23 14:51:42 +00:00
pt?: StyleClassDirectivePassThroughOptions;
2023-06-22 13:55:50 +00:00
}
/**
2023-06-23 09:47:31 +00:00
* Custom passthrough(pt) directive options.
2023-06-22 13:55:50 +00:00
*/
2023-06-23 14:51:42 +00:00
export interface StyleClassDirectivePassThroughOptions {
2023-06-22 13:55:50 +00:00
/**
* Uses to pass attributes to the life cycle hooks.
2023-06-23 14:51:42 +00:00
* @see {@link StyleClassDirectivePassThroughHooksOptions}
2023-06-22 13:55:50 +00:00
*/
2023-06-23 14:51:42 +00:00
hooks?: StyleClassDirectivePassThroughHooksOptions;
2023-06-22 13:55:50 +00:00
}
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Custom passthrough(pt) hooks options.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 14:51:42 +00:00
export interface StyleClassDirectivePassThroughHooksOptions {
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Called before bound element's attributes or event listeners are applied.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 09:47:31 +00:00
created?: DirectiveBinding;
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Called right before the element is inserted into the DOM.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 09:47:31 +00:00
beforeMount?: DirectiveBinding;
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Called when the bound element's parent component and all its children are mounted.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 09:47:31 +00:00
mounted?: DirectiveBinding;
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Called before the parent component is updated.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 09:47:31 +00:00
beforeUpdate?: DirectiveBinding;
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Called after the parent component and all of its children have updated all of its children have updated.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 09:47:31 +00:00
updated?: DirectiveBinding;
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Called before the parent component is unmounted.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 09:47:31 +00:00
beforeUnmount?: DirectiveBinding;
2023-03-02 11:26:12 +00:00
/**
2023-06-23 09:47:31 +00:00
* Called when the parent component is unmounted.
2023-03-02 11:26:12 +00:00
*/
2023-06-23 09:47:31 +00:00
unmounted?: DirectiveBinding;
2023-03-02 11:26:12 +00:00
}
/**
* Binding of StyleClass directive.
*/
export interface StyleClassDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
/**
* Value of the StyleClass.
*/
value?: StyleClassOptions | undefined;
}
/**
* **PrimeVue - StyleClass**
*
* _StyleClass manages css classes declaratively to during enter/leave animations or just to toggle classes on an element._
*
* [Live Demo](https://www.primevue.org/styleclass/)
* --- ---
2023-03-03 10:55:20 +00:00
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
2023-03-02 11:26:12 +00:00
*
*/
2022-09-06 12:03:37 +00:00
declare const StyleClass: ObjectDirective;
export default StyleClass;