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

41 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'
}
],
2024-04-25 22:47:09 +00:00
loadingOverlay: 'p-tree-mask p-component-overlay',
loadingIcon: 'p-tree-loading-icon',
filterContainer: 'p-tree-filter-container',
2024-04-25 22:47:09 +00:00
input: 'p-tree-filter-input',
searchIcon: 'p-tree-filter-icon',
2024-04-25 22:47:09 +00:00
wrapper: 'p-tree-root',
container: 'p-tree-root-children',
node: ({ instance }) => ['p-tree-node', { 'p-tree-node-leaf': instance.leaf }],
content: ({ instance }) => [
2024-04-25 22:47:09 +00:00
'p-tree-node-content',
instance.node.styleClass,
{
2024-04-25 22:47:09 +00:00
'p-tree-node-selectable': instance.selectable,
'p-tree-node-selected': instance.checkboxMode && instance.$parentInstance.highlightOnSelect ? instance.checked : instance.selected
}
],
2024-04-29 08:26:15 +00:00
toggler: 'p-tree-node-toggle-button',
2024-04-26 09:48:40 +00:00
togglerIcon: 'p-tree-node-toggle-icon',
2024-04-25 22:47:09 +00:00
nodeTogglerIcon: 'p-tree-node-toggler-icon', //todo: discuss
nodeCheckbox: 'p-tree-node-checkbox',
nodeIcon: 'p-tree-node-icon',
label: 'p-tree-node-label',
subgroup: 'p-tree-node-children'
};
export default BaseStyle.extend({
name: 'tree',
classes
});