2022-09-12 07:13:52 +00:00
|
|
|
const SplitButtonProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'label',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Text of the button.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'icon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Name of the icon.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'model',
|
|
|
|
type: 'object',
|
|
|
|
default: 'null',
|
|
|
|
description: 'MenuModel instance to define the overlay items.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'autoZIndex',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'true',
|
|
|
|
description: 'Whether to automatically manage layering.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'baseZIndex',
|
|
|
|
type: 'number',
|
|
|
|
default: '0',
|
|
|
|
description: 'Base zIndex value to use in layering.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'appendTo',
|
|
|
|
type: 'string',
|
|
|
|
default: 'body',
|
|
|
|
description: 'A valid query selector or an HTMLElement to specify where the overlay gets attached.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
2023-01-02 08:40:36 +00:00
|
|
|
{
|
|
|
|
name: 'disabled',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When present, it specifies that the element should be disabled.'
|
|
|
|
},
|
2022-09-12 07:13:52 +00:00
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'class',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Style class of the component.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'style',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Inline of the component.'
|
2023-01-02 08:40:36 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'menuButtonIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Name of the menu button icon.'
|
2023-03-03 12:41:32 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'severity',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Defines the style of the button, valid values are "secondary", "success", "info", "warning", "help", "danger".'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'raised',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a shadow to indicate elevation.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'rounded',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a circular border radius to the button.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'text',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a textual class to the button without a background initially.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'outlined',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a border class without a background initially.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'size',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Defines the size of the button, valid values are "small" and "large".'
|
2023-03-06 08:16:57 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'plain',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Add a plain textual class to the button without a background initially.'
|
2023-04-24 14:10:17 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'pt',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Uses to pass attributes to DOM elements inside the component.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const SplitButtonEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'click',
|
|
|
|
description: 'Callback to invoke when main button is clicked.',
|
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
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-04-10 11:57:23 +00:00
|
|
|
const SplitButtonSlots = [
|
2023-04-18 13:42:36 +00:00
|
|
|
{
|
|
|
|
name: 'icon',
|
|
|
|
description: 'Custom icon template.'
|
|
|
|
},
|
2023-04-10 11:57:23 +00:00
|
|
|
{
|
|
|
|
name: 'menubuttonicon',
|
|
|
|
description: 'Custom menu button icon template.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2022-09-12 07:13:52 +00:00
|
|
|
module.exports = {
|
|
|
|
splitbutton: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'SplitButton',
|
|
|
|
description: 'SplitButton groups a set of commands in an overlay with a default command.',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: SplitButtonProps,
|
2023-04-10 11:57:23 +00:00
|
|
|
events: SplitButtonEvents,
|
|
|
|
slots: SplitButtonSlots
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
};
|