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

137 lines
3.4 KiB
JavaScript
Raw Normal View History

const ChipsProps = [
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'array',
default: 'null',
description: 'Value of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'max',
type: 'number',
default: 'null',
description: 'Maximum number of entries allowed.'
},
{
2022-09-14 14:26:41 +00:00
name: 'separator',
type: 'string',
default: 'null',
description: 'Separator char to add an item when pressed in addition to the enter key. Currently only possible value is ","'
},
{
2022-09-14 14:26:41 +00:00
name: 'addOnBlur',
type: 'boolean',
default: 'false',
description: 'Whether to add an item when the input loses focus.'
},
{
2022-09-14 14:26:41 +00:00
name: 'allowDuplicate',
type: 'boolean',
default: 'false',
description: 'Whether to allow duplicate values or not.'
},
{
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.'
},
{
2022-09-14 14:26:41 +00:00
name: 'placeholder',
type: 'string',
default: 'null',
description: 'Placeholder text for the input.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputId',
type: 'string',
default: 'null',
description: 'Identifier of the focus input to match a label defined for the chips.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputClass',
type: 'string | object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Style class of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputStyle',
type: 'object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Inline style of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputProps',
type: 'object',
default: 'null',
description: 'Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.'
2023-05-05 09:36:30 +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.'
}
];
const ChipsEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'add',
description: 'Callback to invoke when a chip is added.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'originalEvent',
type: 'object',
description: 'Browser event'
},
{
2022-09-14 14:26:41 +00:00
name: 'value',
type: 'array',
description: 'Added item value'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'remove',
description: 'Callback to invoke when a chip is removed.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'originalEvent',
type: 'object',
description: 'Browser event'
},
{
2022-09-14 14:26:41 +00:00
name: 'value',
type: 'array',
description: 'Removed item value'
}
]
}
];
const ChipsSlots = [
{
2022-09-14 14:26:41 +00:00
name: 'chips',
description: 'Custom content for the chips'
},
{
name: 'removetokenicon',
description: 'Custom remove token icon template.'
}
];
module.exports = {
chips: {
2022-09-14 14:26:41 +00:00
name: 'chips',
description: 'Chips is used to enter multiple values on an input field.',
props: ChipsProps,
events: ChipsEvents,
slots: ChipsSlots
}
};