2022-09-12 07:13:52 +00:00
|
|
|
const SplitterProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'layout',
|
|
|
|
type: 'string',
|
|
|
|
default: 'horizontal',
|
2022-09-12 07:13:52 +00:00
|
|
|
description: 'Orientation of the panels, valid values are "horizontal" and "vertical".'
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'gutterSize',
|
|
|
|
type: 'number',
|
|
|
|
default: '4',
|
|
|
|
description: 'Size of the divider in pixels.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'stateKey',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Storage identifier of a stateful Splitter.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'stateStorage',
|
|
|
|
type: 'string',
|
|
|
|
default: 'storage',
|
2022-09-12 07:13:52 +00:00
|
|
|
description: 'Defines where a stateful splitter keeps its state, valid values are "session" for sessionStorage and "local" for localStorage.'
|
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'step',
|
|
|
|
type: 'number',
|
|
|
|
default: '5',
|
|
|
|
description: 'Step factor to increment/decrement the size of the panels while pressing the arrow keys.'
|
2023-03-27 07:13:31 +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 SplitterEvents = [
|
|
|
|
{
|
2024-10-14 13:50:17 +00:00
|
|
|
name: 'resizeend',
|
2022-09-14 14:26:41 +00:00
|
|
|
description: 'Callback to invoke when resize ends.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event.originalEvent',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event.sizes',
|
|
|
|
type: 'array',
|
|
|
|
description: 'Sizes of the panels as an array'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
splitter: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Splitter',
|
|
|
|
description: 'Splitter is utilized to separate and resize panels',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: SplitterProps,
|
|
|
|
events: SplitterEvents
|
|
|
|
}
|
|
|
|
};
|