2022-09-12 07:13:52 +00:00
|
|
|
const MessageProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'severity',
|
|
|
|
type: 'string',
|
|
|
|
default: 'info',
|
2022-09-12 07:13:52 +00:00
|
|
|
description: 'Severity level of the message. Valid severities are "success", "info", "warn" and "error".'
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'closable',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'true',
|
|
|
|
description: 'Whether the message can be closed manually using the close icon.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'sticky',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'null',
|
|
|
|
description: 'When enabled, message is not removed automatically.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'life',
|
|
|
|
type: 'number',
|
|
|
|
default: '300',
|
|
|
|
description: 'Delay in milliseconds to close the message automatically.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'icon',
|
|
|
|
type: 'string',
|
2023-04-07 18:49:14 +00:00
|
|
|
default: 'undefined',
|
2022-09-14 14:26:41 +00:00
|
|
|
description: 'Display a custom icon for the message.'
|
2023-04-07 20:07:42 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'closeIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'undefined',
|
|
|
|
description: 'Display a custom close icon for the message.'
|
2023-04-28 11:56:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'pt',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Uses to pass attributes to DOM elements inside the component.'
|
2023-07-06 13:20:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'unstyled',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When enabled, it removes component related styles in the core.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-04-07 14:15:21 +00:00
|
|
|
const MessageSlots = [
|
|
|
|
{
|
|
|
|
name: 'messageicon',
|
|
|
|
description: 'Custom message icon template.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'closeicon',
|
|
|
|
description: 'Custom close icon template.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2022-09-12 07:13:52 +00:00
|
|
|
const MessageEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'close',
|
|
|
|
description: 'Callback to invoke when a message is closed.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
message: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Message',
|
|
|
|
description: 'Messages is used to display inline messages with various severities.',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: MessageProps,
|
2023-04-07 14:15:21 +00:00
|
|
|
slots: MessageSlots,
|
2022-09-12 07:13:52 +00:00
|
|
|
events: MessageEvents
|
|
|
|
}
|
|
|
|
};
|