File size: 3,197 Bytes
b0c3c39 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
.mindMapItem {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 22px;
margin: 10px 0;
border-radius: 14px;
cursor: pointer;
background: #fff;
border: 1.5px solid #e0e0e0;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
position: relative;
transition: box-shadow 0.2s, background 0.2s, transform 0.15s;
}
.mindMapItem:hover {
background: #f5faff;
box-shadow: 0 4px 16px rgba(0,123,255,0.08);
transform: translateY(-2px) scale(1.01);
}
.mindMapItem.active {
background: #eaf4ff;
border-left: 4px solid #007bff;
box-shadow: 0 6px 24px rgba(0,123,255,0.10);
}
.mindMapInfo {
display: flex;
flex-direction: column;
gap: 2px;
flex: 1;
min-width: 0;
}
.mindMapName {
font-weight: 700;
color: #1a2947;
font-size: 1.08rem;
letter-spacing: 0.01em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.mindMapDate {
font-size: 0.9rem;
color: #7a8ca3;
font-weight: 400;
}
.menuContainer {
position: relative;
margin-left: 12px;
}
.menuButton {
background: none;
border: none;
padding: 6px;
cursor: pointer;
color: #7a8ca3;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.18s, color 0.18s, box-shadow 0.18s;
box-shadow: none;
}
.menuButton:focus {
outline: 2px solid #007bff;
outline-offset: 2px;
}
.menuButton:hover {
background: #eaf4ff;
color: #007bff;
box-shadow: 0 2px 8px rgba(0,123,255,0.08);
}
.menu {
position: absolute;
right: 0;
top: 110%;
margin-top: 6px;
background: #fff;
border-radius: 10px;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 1.5px 4px rgba(0,0,0,0.08);
min-width: 180px;
z-index: 2000;
animation: menuFadeIn 0.18s cubic-bezier(0.4,0,0.2,1);
transition: box-shadow 0.2s, transform 0.2s;
will-change: transform, box-shadow;
}
.menuItem {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 18px;
width: 100%;
border: none;
background: none;
color: #1a2947;
cursor: pointer;
font-size: 1rem;
border-radius: 6px;
transition: background 0.18s, color 0.18s;
}
.menuItem:focus, .menuItem:hover {
background: #eaf4ff;
color: #007bff;
outline: none;
}
.menuItem.delete {
color: #dc3545;
}
.menuItem.delete:hover {
background: #fff0f3;
color: #dc3545;
}
.renameForm {
width: 100%;
}
.renameInput {
width: 100%;
padding: 10px 14px;
border: 1.5px solid #007bff;
border-radius: 6px;
font-size: 1rem;
color: #1a2947;
background: white;
transition: box-shadow 0.18s, border 0.18s;
}
.renameInput:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.18);
border-color: #0056b3;
}
@keyframes menuFadeIn {
from { opacity: 0; transform: translateY(-8px) scale(0.98);}
to { opacity: 1; transform: translateY(0) scale(1);}
}
/*
For accessibility, add in your React code:
- role="menu" to .menu
- role="menuitem" to .menuItem
- Keyboard navigation (arrow keys, esc to close) in JS/TS
- Focus trap when menu is open
*/ |