Files
metabuilder/fakemui/styles/TreeView.module.scss
2025-12-30 20:04:52 +00:00

137 lines
2.5 KiB
SCSS

.treeView {
margin: 0;
padding: 0;
list-style: none;
}
.treeItem {
list-style: none;
}
.treeItemContent {
display: flex;
align-items: center;
padding: 8px 8px;
cursor: pointer;
border-radius: var(--radius-sm, 4px);
transition: background-color 0.15s ease;
user-select: none;
min-height: 40px;
&:hover:not(.disabled) {
background-color: var(--action-hover, rgba(0, 0, 0, 0.04));
}
&:focus {
outline: 2px solid var(--primary-main, #1976d2);
outline-offset: -2px;
}
&.selected {
background-color: var(--primary-selected, rgba(25, 118, 210, 0.12));
&:hover {
background-color: var(--primary-selected-hover, rgba(25, 118, 210, 0.2));
}
}
&.disabled {
opacity: 0.5;
cursor: not-allowed;
}
&.dense {
padding: 4px 8px;
min-height: 32px;
}
}
.treeItemIcon {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
margin-right: 4px;
flex-shrink: 0;
color: var(--text-secondary, rgba(0, 0, 0, 0.6));
cursor: pointer;
border-radius: 50%;
transition: background-color 0.15s ease;
&:hover {
background-color: var(--action-hover, rgba(0, 0, 0, 0.04));
}
svg {
transition: transform 0.2s ease;
}
}
.treeItemIconPlaceholder {
width: 24px;
height: 24px;
margin-right: 4px;
flex-shrink: 0;
}
.treeItemNodeIcon {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
margin-right: 8px;
flex-shrink: 0;
color: var(--text-secondary, rgba(0, 0, 0, 0.6));
}
.treeItemLabel {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.875rem;
line-height: 1.43;
color: var(--text-primary, rgba(0, 0, 0, 0.87));
}
.treeItemChildren {
margin: 0;
padding: 0;
list-style: none;
}
// Dark mode support
:global(.dark) {
.treeItemContent {
&:hover:not(.disabled) {
background-color: var(--action-hover-dark, rgba(255, 255, 255, 0.08));
}
&.selected {
background-color: var(--primary-selected-dark, rgba(144, 202, 249, 0.16));
&:hover {
background-color: var(--primary-selected-hover-dark, rgba(144, 202, 249, 0.24));
}
}
}
.treeItemIcon {
color: var(--text-secondary-dark, rgba(255, 255, 255, 0.7));
&:hover {
background-color: var(--action-hover-dark, rgba(255, 255, 255, 0.08));
}
}
.treeItemNodeIcon {
color: var(--text-secondary-dark, rgba(255, 255, 255, 0.7));
}
.treeItemLabel {
color: var(--text-primary-dark, #fff);
}
}