2022-09-12 07:13:52 +00:00
|
|
|
const FieldsetProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'legend',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Header text of the fieldset.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'toggleable',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'null',
|
|
|
|
description: 'When specified, content can toggled by clicking the legend.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'collapsed',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'true',
|
|
|
|
description: 'Defines the default visibility state of the content.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'toggleButtonProps',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
2023-03-06 08:29:54 +00:00
|
|
|
description: 'Uses to pass the custom value to read for the AnchorHTMLAttributes inside the component.'
|
2023-03-24 15:07:46 +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
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const FieldsetEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'toggle',
|
|
|
|
description: 'Callback to invoke when a tab gets expanded or collapsed.',
|
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.value',
|
|
|
|
type: 'boolean',
|
|
|
|
description: 'collapsed state as a boolean'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const FieldsetSlots = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'legend',
|
2023-03-24 15:07:46 +00:00
|
|
|
description: 'Custom legend template.'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'togglericon',
|
|
|
|
description: 'Custom toggler icon template.'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
fieldset: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Fieldset',
|
|
|
|
description: 'Fieldset is a grouping component with the optional content toggle feature.',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: FieldsetProps,
|
|
|
|
events: FieldsetEvents,
|
|
|
|
slots: FieldsetSlots
|
|
|
|
}
|
|
|
|
};
|