2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
|
|
|
const classes = {
|
2024-03-18 10:02:20 +00:00
|
|
|
root: ({ props }) => [
|
2023-10-02 10:46:09 +00:00
|
|
|
'p-listbox p-component',
|
|
|
|
{
|
2024-03-22 08:57:54 +00:00
|
|
|
'p-listbox-striped': props.stripedRows,
|
2024-01-30 11:27:56 +00:00
|
|
|
'p-disabled': props.disabled,
|
|
|
|
'p-invalid': props.invalid
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
header: 'p-listbox-header',
|
|
|
|
filterContainer: 'p-listbox-filter-container',
|
2024-03-18 10:02:20 +00:00
|
|
|
filterInput: 'p-listbox-filter',
|
2023-10-02 10:46:09 +00:00
|
|
|
filterIcon: 'p-listbox-filter-icon',
|
|
|
|
wrapper: 'p-listbox-list-wrapper',
|
|
|
|
list: 'p-listbox-list',
|
|
|
|
itemGroup: 'p-listbox-item-group',
|
|
|
|
item: ({ instance, option, index, getItemOptions }) => [
|
|
|
|
'p-listbox-item',
|
|
|
|
{
|
|
|
|
'p-highlight': instance.isSelected(option),
|
|
|
|
'p-focus': instance.focusedOptionIndex === instance.getOptionIndex(index, getItemOptions),
|
|
|
|
'p-disabled': instance.isOptionDisabled(option)
|
|
|
|
}
|
|
|
|
],
|
|
|
|
emptyMessage: 'p-listbox-empty-message'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'listbox',
|
|
|
|
classes
|
|
|
|
});
|