primevue-mirror/components/lib/treeselect/style/TreeSelectStyle.js

47 lines
1.5 KiB
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const inlineStyles = {
root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined })
};
const classes = {
root: ({ instance, props }) => [
'p-treeselect p-component p-inputwrapper',
{
'p-treeselect-chip': props.display === 'chip',
'p-disabled': props.disabled,
'p-invalid': props.invalid,
'p-focus': instance.focused,
2024-02-02 13:26:27 +00:00
'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled',
'p-inputwrapper-filled': !instance.emptyValue,
'p-inputwrapper-focus': instance.focused || instance.overlayVisible
}
],
labelContainer: 'p-treeselect-label-container',
label: ({ instance, props }) => [
'p-treeselect-label',
{
'p-placeholder': instance.label === props.placeholder,
'p-treeselect-label-empty': !props.placeholder && instance.emptyValue
}
],
token: 'p-treeselect-token',
tokenLabel: 'p-treeselect-token-label',
trigger: 'p-treeselect-trigger',
triggerIcon: 'p-treeselect-trigger-icon',
2024-03-22 08:58:03 +00:00
panel: ({ instance }) => [
'p-treeselect-panel p-component',
{
'p-ripple-disabled': instance.$primevue.config.ripple === false
}
],
wrapper: 'p-treeselect-items-wrapper',
emptyMessage: 'p-treeselect-empty-message'
};
export default BaseStyle.extend({
name: 'treeselect',
classes,
inlineStyles
});