primevue-mirror/components/lib/tree/style/TreeStyle.js

45 lines
1.4 KiB
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const classes = {
root: ({ props }) => [
'p-tree p-component',
{
'p-tree-selectable': props.selectionMode != null,
'p-tree-loading': props.loading,
'p-tree-flex-scrollable': props.scrollHeight === 'flex'
}
],
loadingOverlay: 'p-tree-loading-overlay p-component-overlay',
loadingIcon: 'p-tree-loading-icon',
filterContainer: 'p-tree-filter-container',
input: 'p-tree-filter p-component',
searchIcon: 'p-tree-filter-icon',
wrapper: 'p-tree-wrapper',
container: 'p-tree-container',
node: ({ instance }) => ['p-treenode', { 'p-treenode-leaf': instance.leaf }],
content: ({ instance }) => [
'p-treenode-content',
instance.node.styleClass,
{
'p-treenode-selectable': instance.selectable,
'p-highlight': instance.checkboxMode && instance.$parentInstance.highlightOnSelect ? instance.checked : instance.selected
}
],
toggler: 'p-tree-toggler p-link',
togglerIcon: 'p-tree-toggler-icon',
nodeTogglerIcon: 'p-tree-node-toggler-icon',
2024-01-14 13:38:51 +00:00
nodeCheckbox: ({ instance }) => [
{
'p-indeterminate': instance.partialChecked
}
],
2023-11-17 17:06:08 +00:00
nodeIcon: 'p-treenode-icon',
label: 'p-treenode-label',
subgroup: 'p-treenode-children'
};
export default BaseStyle.extend({
name: 'tree',
classes
});