@vue-dnd-kit/components
Version:
Components for Vue DnD Kit
110 lines (92 loc) • 2.08 kB
CSS
/* Tree Component Styles */
.tree-container {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
color: #374151;
line-height: 1.5;
height: 100%;
min-height: 20px;
transition: all 0.2s ease;
border: 1px solid transparent;
border-radius: 8px;
}
.tree-container-overed {
background-color: rgba(59, 130, 246, 0.05);
border: 1px solid rgba(59, 130, 246, 0.2);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.tree-item {
position: relative;
margin: 2px 0;
transition: all 0.2s ease;
}
.tree-item:hover {
background-color: #f3f4f6;
border-radius: 6px;
}
.tree-item-content {
display: flex;
align-items: center;
padding: 8px 12px;
border-radius: 6px;
transition: all 0.2s ease;
position: relative;
}
.tree-item-content:hover {
background-color: #e5e7eb;
transform: translateX(2px);
}
.tree-children {
margin-left: 24px;
position: relative;
transition: all 0.2s ease;
border: 1px solid transparent;
border-radius: 6px;
}
.tree-children-empty {
padding: 4px 0;
min-height: 12px;
}
.tree-children-overed {
background-color: rgba(59, 130, 246, 0.05);
border: 1px solid rgba(59, 130, 246, 0.2);
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
.tree-item-text {
flex: 1;
font-size: 14px;
font-weight: 500;
}
.tree-item-content:hover .tree-item-text {
color: #111827;
}
/* Drag overlay styles */
.tree-item.dragging {
opacity: 0.5;
transform: rotate(5deg);
}
.tree-item.drag-over {
background-color: #dbeafe;
border-radius: 6px;
}
/* Animation for expanding/collapsing */
.tree-children-enter-active,
.tree-children-leave-active {
transition: all 0.3s ease;
}
.tree-children-enter-from,
.tree-children-leave-to {
opacity: 0;
transform: translateY(-10px);
}
/* Responsive design */
@media (max-width: 768px) {
.tree-children {
margin-left: 16px;
}
.tree-item-content {
padding: 6px 8px;
}
.tree-item-text {
font-size: 13px;
}
}