2023-03-01 12:59:47 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* InlineMessage component is useful in cases where a single message needs to be displayed related to an element such as forms. It has one property, severity of the message.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/inlinemessage/)
|
|
|
|
*
|
|
|
|
* @module inlinemessage
|
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
import { VNode } from 'vue';
|
2023-07-06 11:17:08 +00:00
|
|
|
import { ComponentHooks } from '../basecomponent';
|
2023-09-05 08:50:46 +00:00
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2024-04-02 08:24:31 +00:00
|
|
|
import { ClassComponent, DesignToken, GlobalComponentConstructor, HintedString, PassThrough } from '../ts-helpers';
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-07-11 22:42:43 +00:00
|
|
|
export declare type InlineMessagePassThroughOptionType = InlineMessagePassThroughAttributes | ((options: InlineMessagePassThroughMethodOptions) => InlineMessagePassThroughAttributes | string) | string | null | undefined;
|
2023-04-28 11:55:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface InlineMessagePassThroughMethodOptions {
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
2023-07-06 12:01:33 +00:00
|
|
|
instance: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
2023-04-28 11:55:27 +00:00
|
|
|
props: InlineMessageProps;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines current inline state.
|
|
|
|
*/
|
2023-04-28 11:55:27 +00:00
|
|
|
state: InlineMessageState;
|
2023-12-10 21:41:17 +00:00
|
|
|
/**
|
|
|
|
* Defines valid attributes.
|
|
|
|
*/
|
|
|
|
attrs: any;
|
2023-12-05 11:06:32 +00:00
|
|
|
/**
|
|
|
|
* Defines parent options.
|
|
|
|
*/
|
|
|
|
parent: any;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Defines passthrough(pt) options in global config.
|
|
|
|
*/
|
|
|
|
global: object | undefined;
|
2023-04-28 11:55:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link InlineMessageProps.pt}
|
|
|
|
*/
|
|
|
|
export interface InlineMessagePassThroughOptions {
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the root's DOM element.
|
2023-04-28 11:55:27 +00:00
|
|
|
*/
|
|
|
|
root?: InlineMessagePassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the icon's DOM element.
|
2023-04-28 11:55:27 +00:00
|
|
|
*/
|
|
|
|
icon?: InlineMessagePassThroughOptionType;
|
|
|
|
/**
|
2024-05-15 09:24:26 +00:00
|
|
|
* Used to pass attributes to the text's DOM element.
|
2023-04-28 11:55:27 +00:00
|
|
|
*/
|
|
|
|
text?: InlineMessagePassThroughOptionType;
|
2023-07-06 11:09:01 +00:00
|
|
|
/**
|
2023-11-07 06:16:39 +00:00
|
|
|
* Used to manage all lifecycle hooks.
|
2023-07-06 11:09:01 +00:00
|
|
|
* @see {@link BaseComponent.ComponentHooks}
|
|
|
|
*/
|
|
|
|
hooks?: ComponentHooks;
|
2023-04-28 11:55:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
|
|
|
export interface InlineMessagePassThroughAttributes {
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current inline state in InlineMessage component.
|
|
|
|
*/
|
|
|
|
export interface InlineMessageState {
|
|
|
|
/**
|
|
|
|
* Current visible state as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
visible: boolean;
|
|
|
|
}
|
|
|
|
|
2023-03-01 12:59:47 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in InlineMessage component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface InlineMessageProps {
|
|
|
|
/**
|
|
|
|
* Severity level of the message.
|
2023-03-08 10:51:52 +00:00
|
|
|
* @defaultValue info
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2024-02-23 08:38:50 +00:00
|
|
|
severity?: HintedString<'success' | 'info' | 'warn' | 'error' | 'secondary' | 'contrast'> | undefined;
|
2023-04-07 18:49:14 +00:00
|
|
|
/**
|
|
|
|
* Display a custom icon for the message.
|
2023-04-18 10:51:10 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'icon' slot.
|
2023-04-07 18:49:14 +00:00
|
|
|
*/
|
|
|
|
icon?: string | undefined;
|
2024-04-02 08:24:31 +00:00
|
|
|
/**
|
|
|
|
* It generates scoped CSS variables using design tokens for the component.
|
|
|
|
*/
|
|
|
|
dt?: DesignToken<any>;
|
2023-04-28 13:40:36 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
2023-04-28 13:40:36 +00:00
|
|
|
* @type {InlineMessagePassThroughOptions}
|
|
|
|
*/
|
2023-09-05 11:28:04 +00:00
|
|
|
pt?: PassThrough<InlineMessagePassThroughOptions>;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Used to configure passthrough(pt) options of the component.
|
|
|
|
* @type {PassThroughOptions}
|
|
|
|
*/
|
|
|
|
ptOptions?: PassThroughOptions;
|
2023-05-25 14:15:19 +00:00
|
|
|
/**
|
|
|
|
* When enabled, it removes component related styles in the core.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
unstyled?: boolean;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
2023-03-01 12:59:47 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in InlineMessage slots.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface InlineMessageSlots {
|
|
|
|
/**
|
|
|
|
* Default custom slot.
|
|
|
|
*/
|
2023-03-01 12:59:47 +00:00
|
|
|
default(): VNode[];
|
2023-04-07 18:49:14 +00:00
|
|
|
/**
|
|
|
|
* Custom message icon template.
|
|
|
|
*/
|
2023-04-18 09:31:46 +00:00
|
|
|
icon(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 12:59:47 +00:00
|
|
|
export interface InlineMessageEmits {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 12:59:47 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - InlineMessage**
|
|
|
|
*
|
|
|
|
* _InlineMessage component is useful in cases where a single message needs to be displayed related to an element such as forms. It has one property, severity of the message._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/inlinemessage/)
|
|
|
|
* --- ---
|
2023-03-03 10:55:20 +00:00
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
2023-03-01 12:59:47 +00:00
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
declare class InlineMessage extends ClassComponent<InlineMessageProps, InlineMessageSlots, InlineMessageEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
InlineMessage: GlobalComponentConstructor<InlineMessage>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default InlineMessage;
|