primevue-mirror/api-generator/components/selectbutton.js

145 lines
3.8 KiB
JavaScript
Raw Permalink Normal View History

const SelectButtonProps = [
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'any',
default: 'null',
description: 'Value of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'options',
type: 'array',
default: 'null',
description: 'An array of selectitems to display as the available options.'
},
{
2022-09-14 14:26:41 +00:00
name: 'optionLabel',
type: 'string',
default: 'null',
description: 'Property name or getter function to use as the label of an option.'
},
{
2022-09-14 14:26:41 +00:00
name: 'optionValue',
type: 'string',
default: 'null',
description: 'Property name or getter function to use as the value of an option, defaults to the option itself when not defined.'
},
{
2022-09-14 14:26:41 +00:00
name: 'optionDisabled',
type: 'boolean',
default: 'null',
description: 'Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.'
},
{
2022-09-14 14:26:41 +00:00
name: 'multiple',
type: 'boolean',
default: 'false',
description: 'When specified, allows selecting multiple values.'
},
{
2022-09-14 14:26:41 +00:00
name: 'disabled',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the element should be disabled.'
},
2024-01-31 08:01:02 +00:00
{
name: 'invalid',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the component should have invalid state style.'
},
{
2022-09-14 14:26:41 +00:00
name: 'dataKey',
type: 'string',
default: 'null',
description: 'A property to uniquely identify an option.'
},
{
2022-09-14 14:26:41 +00:00
name: 'unselectable',
type: 'boolean',
default: 'false',
description: 'Whether selection can not be cleared.'
},
{
name: 'allowEmpty',
type: 'boolean',
default: 'true',
2022-09-14 14:26:41 +00:00
description: 'Whether selection can be cleared.'
},
{
2022-09-14 14:26:41 +00:00
name: 'aria-labelledby',
type: 'string',
default: 'null',
description: 'Identifier of the underlying element.'
2023-05-08 12:18:27 +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.'
}
];
const SelectButtonEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'change',
description: 'Callback to invoke on value change.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event.originalEvent',
type: 'object',
description: 'Browser event'
},
{
2022-09-14 14:26:41 +00:00
name: 'event.value',
type: 'any',
description: 'Single value or an array of values that are selected.'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'focus',
description: 'Callback to invoke on focus.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'blur',
description: 'Callback to invoke on blur.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
}
];
const SelectButtonSlots = [
{
2022-09-14 14:26:41 +00:00
name: 'option',
description: "Custom content for the item's option"
}
];
module.exports = {
selectbutton: {
2022-09-14 14:26:41 +00:00
name: 'SelectButton',
description: 'SelectButton is a form component to choose a value from a list of options using button elements.',
props: SelectButtonProps,
events: SelectButtonEvents,
slots: SelectButtonSlots
}
};