2023-03-02 11:05:45 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Badge directive is a small status indicator for another element.
|
|
|
|
*
|
2023-03-03 14:17:03 +00:00
|
|
|
* [Live Demo](https://primevue.org/badge)
|
2023-03-02 14:25:05 +00:00
|
|
|
*
|
|
|
|
* @module badgedirective
|
2023-03-02 11:05:45 +00:00
|
|
|
*/
|
|
|
|
import { DirectiveBinding, ObjectDirective } from 'vue';
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-06-23 09:47:31 +00:00
|
|
|
/**
|
|
|
|
* Defines options of Badge.
|
|
|
|
*/
|
|
|
|
export interface BadgeOptions {
|
|
|
|
/**
|
|
|
|
* Uses to pass attributes to DOM elements inside the component.
|
|
|
|
* @type {BadgePassThroughOptions}
|
|
|
|
*/
|
|
|
|
pt?: BadgePassThroughOptions;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link BadgeOptions.pt}
|
|
|
|
*/
|
|
|
|
export interface BadgePassThroughOptions {
|
|
|
|
/**
|
|
|
|
* Uses to pass attributes to the root's DOM element.
|
|
|
|
* @see {@link BadgePassThroughDirectiveOptions}
|
|
|
|
*/
|
|
|
|
root?: BadgePassThroughDirectiveOptions;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) directive options.
|
|
|
|
*/
|
|
|
|
export interface BadgePassThroughDirectiveOptions {
|
|
|
|
/**
|
|
|
|
* Uses to pass attributes to the life cycle hooks.
|
|
|
|
* @see {@link BadgePassThroughHooksOptions}
|
|
|
|
*/
|
|
|
|
hooks?: BadgePassThroughHooksOptions;
|
|
|
|
/**
|
|
|
|
* Uses to pass attributes to the styles.
|
|
|
|
* @see {@link BadgePassThroughCSSOptions}
|
|
|
|
*/
|
|
|
|
css?: BadgePassThroughCSSOptions;
|
|
|
|
}
|
|
|
|
|
2023-06-22 13:50:40 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) hooks options.
|
|
|
|
*/
|
|
|
|
export interface BadgePassThroughHooksOptions {
|
|
|
|
/**
|
|
|
|
* Called before bound element's attributes or event listeners are applied.
|
|
|
|
*/
|
|
|
|
created?: DirectiveBinding;
|
|
|
|
/**
|
|
|
|
* Called right before the element is inserted into the DOM.
|
|
|
|
*/
|
|
|
|
beforeMount?: DirectiveBinding;
|
|
|
|
/**
|
|
|
|
* Called when the bound element's parent component and all its children are mounted.
|
|
|
|
*/
|
|
|
|
mounted?: DirectiveBinding;
|
|
|
|
/**
|
|
|
|
* Called before the parent component is updated.
|
|
|
|
*/
|
|
|
|
beforeUpdate?: DirectiveBinding;
|
|
|
|
/**
|
|
|
|
* Called after the parent component and all of its children have updated all of its children have updated.
|
|
|
|
*/
|
|
|
|
updated?: DirectiveBinding;
|
|
|
|
/**
|
|
|
|
* Called before the parent component is unmounted.
|
|
|
|
*/
|
|
|
|
beforeUnmount?: DirectiveBinding;
|
|
|
|
/**
|
|
|
|
* Called when the parent component is unmounted.
|
|
|
|
*/
|
|
|
|
unmounted?: DirectiveBinding;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) css options.
|
|
|
|
*/
|
|
|
|
export interface BadgePassThroughCSSOptions {
|
|
|
|
/**
|
|
|
|
* Style class of the element.
|
|
|
|
*/
|
|
|
|
class?: any;
|
|
|
|
/**
|
|
|
|
* Inline style of the element.
|
|
|
|
*/
|
|
|
|
style?: any;
|
|
|
|
}
|
|
|
|
|
2023-03-02 11:05:45 +00:00
|
|
|
/**
|
|
|
|
* Defines modifiers of Badge directive.
|
|
|
|
*/
|
2023-03-02 14:25:05 +00:00
|
|
|
export interface BadgeDirectiveModifiers {
|
2023-03-02 11:05:45 +00:00
|
|
|
/**
|
2023-03-02 18:53:47 +00:00
|
|
|
* Info severity for Badge directive.
|
|
|
|
* @defaultValue true
|
2023-03-02 11:05:45 +00:00
|
|
|
*/
|
2023-03-02 18:53:47 +00:00
|
|
|
info?: boolean | undefined;
|
2023-03-02 11:05:45 +00:00
|
|
|
/**
|
2023-03-02 18:53:47 +00:00
|
|
|
* Success severity for Badge directive.
|
|
|
|
* @defaultValue false
|
2023-03-02 11:05:45 +00:00
|
|
|
*/
|
2023-03-02 18:53:47 +00:00
|
|
|
success?: boolean | undefined;
|
2023-03-02 11:05:45 +00:00
|
|
|
/**
|
|
|
|
* Warning severity for Badge directive.
|
2023-03-02 18:53:47 +00:00
|
|
|
* @defaultValue false
|
2023-03-02 11:05:45 +00:00
|
|
|
*/
|
2023-03-02 18:53:47 +00:00
|
|
|
warning?: boolean | undefined;
|
2023-03-02 11:05:45 +00:00
|
|
|
/**
|
|
|
|
* Danger severity for Badge directive.
|
2023-03-02 18:53:47 +00:00
|
|
|
* @defaultValue false
|
2023-03-02 11:05:45 +00:00
|
|
|
*/
|
2023-03-02 18:53:47 +00:00
|
|
|
danger?: boolean | undefined;
|
2023-03-02 14:25:05 +00:00
|
|
|
}
|
2023-03-02 11:05:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Binding of Badge directive.
|
|
|
|
*/
|
|
|
|
export interface BadgeDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
|
|
|
|
/**
|
|
|
|
* Value of the Badge.
|
|
|
|
*/
|
2023-06-22 13:50:40 +00:00
|
|
|
value?: string | BadgeOptions | undefined;
|
2023-03-02 11:05:45 +00:00
|
|
|
/**
|
|
|
|
* Modifiers of the Badge.
|
|
|
|
* @type {BadgeDirectiveModifiers}
|
|
|
|
*/
|
|
|
|
modifiers?: BadgeDirectiveModifiers | undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* **PrimeVue - Badge**
|
|
|
|
*
|
|
|
|
* _Badge directive provides advisory information for a component._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/badge/)
|
|
|
|
* --- ---
|
2023-03-03 10:55:20 +00:00
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
2023-03-02 11:05:45 +00:00
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
declare const BadgeDirective: ObjectDirective;
|
|
|
|
|
|
|
|
export default BadgeDirective;
|