2022-09-12 07:13:52 +00:00
|
|
|
const TabViewProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'activeIndex',
|
|
|
|
type: 'number',
|
|
|
|
default: '0',
|
|
|
|
description: 'Index of the active tab.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'lazy',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When enabled, hidden tabs are not rendered at all. Defaults to false that hides tabs with css.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'scrollable',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When enabled displays buttons at each side of the tab headers to scroll the tab list.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'tabindex',
|
|
|
|
type: 'number',
|
|
|
|
default: '0',
|
|
|
|
description: 'Index of the element in tabbing order.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'selectOnFocus',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'When enabled, the focused tab is activated.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2024-05-27 08:48:42 +00:00
|
|
|
name: 'prevButtonProps',
|
2022-09-14 14:26:41 +00:00
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
2023-08-01 14:01:12 +00:00
|
|
|
description: 'Used to pass all properties of the HTMLButtonElement to the previous button.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'nextButtonProps',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
2023-08-01 14:01:12 +00:00
|
|
|
description: 'Used to pass all properties of the HTMLButtonElement to the next button.'
|
2023-03-24 06:46:57 +00:00
|
|
|
},
|
2023-04-11 07:32:40 +00:00
|
|
|
{
|
|
|
|
name: 'prevIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Prev icon of the scrollable tabview.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'nextIcon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Next icon of the scrollable tabview.'
|
|
|
|
},
|
2023-03-24 06:46:57 +00:00
|
|
|
{
|
|
|
|
name: 'pt',
|
|
|
|
type: 'any',
|
|
|
|
default: 'null',
|
2023-08-01 14:01:12 +00:00
|
|
|
description: 'Used 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
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const TabViewEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'tab-change',
|
|
|
|
description: 'Callback to invoke when an active tab is changed.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'originalEvent',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Original event'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'index',
|
|
|
|
type: 'number',
|
|
|
|
description: 'Index of the selected tab'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'tab-click',
|
|
|
|
description: 'Callback to invoke when an active tab is clicked.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'originalEvent',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Original event'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'index',
|
|
|
|
type: 'number',
|
|
|
|
description: 'Index of the clicked tab'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-03-24 06:46:57 +00:00
|
|
|
const TabViewSlots = [
|
|
|
|
{
|
|
|
|
name: 'default',
|
|
|
|
description: 'Default slot to detect TabPanel components.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'previcon',
|
|
|
|
description: 'Previous button icon template for the scrollable component.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'nexticon',
|
|
|
|
description: 'Next button icon template for the scrollable component.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2022-09-12 07:13:52 +00:00
|
|
|
module.exports = {
|
|
|
|
tabview: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'TabView',
|
|
|
|
description: 'TabView is a container component to group content with tabs.',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: TabViewProps,
|
2023-03-24 06:46:57 +00:00
|
|
|
event: TabViewEvents,
|
|
|
|
slots: TabViewSlots
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
};
|