2022-09-12 07:13:52 +00:00
|
|
|
const ChipProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'label',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Defines the text to display.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'icon',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Defines the icon to display.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'image',
|
|
|
|
type: 'string',
|
|
|
|
default: 'null',
|
|
|
|
description: 'Defines the image to display.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'removable',
|
|
|
|
type: 'boolean',
|
|
|
|
default: 'false',
|
|
|
|
description: 'Whether to display a remove icon.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'removeIconClass',
|
|
|
|
type: 'string',
|
|
|
|
default: 'pi pi-times-circle',
|
|
|
|
description: 'Icon of the remove element.'
|
2023-04-21 13:24:22 +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 ChipEvents = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'remove',
|
|
|
|
description: 'Callback to invoke when a chip is removed.',
|
2022-09-12 07:13:52 +00:00
|
|
|
arguments: [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'event',
|
|
|
|
type: 'object',
|
|
|
|
description: 'Browser event'
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-04-10 19:42:57 +00:00
|
|
|
const ChipSlots = [
|
2023-04-18 13:42:36 +00:00
|
|
|
{
|
|
|
|
name: 'icon',
|
|
|
|
description: 'Custom icon template of chip component.'
|
|
|
|
},
|
2023-04-10 19:42:57 +00:00
|
|
|
{
|
|
|
|
name: 'removeicon',
|
|
|
|
description: 'Custom remove icon template of chip component.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2022-09-12 07:13:52 +00:00
|
|
|
module.exports = {
|
|
|
|
chip: {
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'Chip',
|
|
|
|
description: 'Chip represents entities using icons, labels and images',
|
2022-09-12 07:13:52 +00:00
|
|
|
props: ChipProps,
|
2023-04-10 19:42:57 +00:00
|
|
|
events: ChipEvents,
|
|
|
|
slots: ChipSlots
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
};
|