2024-02-19 22:53:42 +00:00
|
|
|
export default {
|
2024-03-12 08:19:23 +00:00
|
|
|
css: ({ dt }) => `
|
2024-02-19 22:53:42 +00:00
|
|
|
.p-tree {
|
2024-03-13 11:13:29 +00:00
|
|
|
background: ${dt('tree.background')};
|
|
|
|
color: ${dt('tree.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-19 22:53:42 +00:00
|
|
|
border: 0 none;
|
|
|
|
padding: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-container {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style-type: none;
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode {
|
|
|
|
padding: 0 0;
|
|
|
|
outline: 0 none;
|
|
|
|
margin: 2px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-container > .p-treenode:first-child {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-container > .p-treenode:last-child {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content {
|
2024-03-12 08:19:23 +00:00
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-19 22:53:42 +00:00
|
|
|
padding: 0.25rem 0.5rem;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
outline-color: transparent;
|
2024-03-13 11:13:29 +00:00
|
|
|
color: ${dt('tree.node.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode:focus-visible > .p-treenode-content {
|
2024-03-12 08:19:23 +00:00
|
|
|
outline: 1px solid ${dt('focus.ring.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
outline-offset: -2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content.p-highlight {
|
2024-03-13 11:13:29 +00:00
|
|
|
background: ${dt('highlight.background')};
|
|
|
|
color: ${dt('highlight.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-toggler {
|
|
|
|
cursor: pointer;
|
|
|
|
user-select: none;
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
flex-shrink: 0;
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
width: 1.75rem;
|
|
|
|
height: 1.75rem;
|
2024-03-13 11:13:29 +00:00
|
|
|
color: ${dt('tree.toggle.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
border: 0 none;
|
|
|
|
background: transparent;
|
|
|
|
border-radius: 50%;
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
2024-02-19 22:53:42 +00:00
|
|
|
outline-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-toggler:enabled:hover {
|
2024-03-13 11:13:29 +00:00
|
|
|
background: ${dt('tree.toggle.hover.background')};
|
|
|
|
color: ${dt('tree.toggle.hover.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content.p-highlight .p-tree-toggler,
|
|
|
|
.p-treenode-content.p-highlight .p-treenode-icon {
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content.p-highlight .p-tree-toggler:hover {
|
2024-03-13 11:13:29 +00:00
|
|
|
background: ${dt('tree.toggle.highlight.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content.p-treenode-selectable:not(.p-highlight):hover {
|
2024-03-13 11:13:29 +00:00
|
|
|
background: ${dt('tree.node.hover.background')};
|
|
|
|
color: ${dt('tree.node.hover.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content.p-treenode-selectable:not(.p-highlight):hover .p-tree-toggler {
|
2024-03-13 11:13:29 +00:00
|
|
|
color: ${dt('tree.toggle.hover.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content.p-treenode-selectable:not(.p-highlight):hover .p-treenode-icon {
|
2024-03-13 11:13:29 +00:00
|
|
|
color: ${dt('tree.icon.hover.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-children {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style-type: none;
|
|
|
|
padding: 0 0 0 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-wrapper {
|
|
|
|
overflow: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-selectable {
|
|
|
|
cursor: pointer;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-leaf > .p-treenode-content .p-tree-toggler {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-icon {
|
|
|
|
margin-right: 0.5rem;
|
2024-03-13 11:13:29 +00:00
|
|
|
color: ${dt('tree.icon.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: color ${dt('transition.duration')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content .p-checkbox {
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-treenode-content .p-checkbox.p-indeterminate .p-checkbox-icon {
|
2024-03-13 11:13:29 +00:00
|
|
|
color: ${dt('tree.indeterminate.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-filter {
|
|
|
|
width: 100%;
|
|
|
|
padding-right: 1.75rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-filter-container {
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-filter-icon {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
margin-top: -0.5rem;
|
|
|
|
right: 0.75rem;
|
|
|
|
color: #94a3b8;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-loading {
|
|
|
|
position: relative;
|
|
|
|
min-height: 4rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-loading-icon {
|
|
|
|
font-size: 2rem;
|
|
|
|
width: 2rem;
|
|
|
|
height: 2rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-loading-overlay {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-flex-scrollable {
|
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
|
|
|
height: 100%;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-tree-flex-scrollable .p-tree-wrapper {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
`
|
|
|
|
};
|