|
1 | | -/* src/components/MissionControl/MissionBar/MissionManager.css */ |
2 | | - |
3 | 1 | @import "../../../../configs/CSSConfigs/animations.css"; |
4 | 2 |
|
5 | 3 | /* timing vars & defaults */ |
|
12 | 10 |
|
13 | 11 | /* new var, if you want to reference in CSS */ |
14 | 12 | --delete-slide-duration: 0.3s; |
| 13 | + /* fallback values; will be overridden by inline styles */ |
| 14 | + --desktop-count: 0; |
| 15 | + --thumb-width: 0px; |
15 | 16 | } |
16 | 17 |
|
17 | 18 | /* ---------- Keyframes ---------- */ |
|
33 | 34 | to { transform: translate(0, 0); opacity: 1; } |
34 | 35 | } |
35 | 36 | @keyframes slideFromRight { |
36 | | - from { transform: translateX(100vw); opacity: 0; } |
37 | | - to { transform: translateX(0); opacity: 1; } |
| 37 | + from { |
| 38 | + transform: translateX( |
| 39 | + calc( |
| 40 | + -68px |
| 41 | + + (55vw - ((var(--thumb-width) * var(--desktop-count)) + (30px * var(--desktop-count))) / 2) |
| 42 | + ) |
| 43 | + ); |
| 44 | + opacity: 1; |
| 45 | + } |
| 46 | + to { transform: translateX(0); opacity: 1; } |
| 47 | +} |
| 48 | +/* new: fade then slide in */ |
| 49 | +@keyframes slideFadeFromRight { |
| 50 | + 0% { |
| 51 | + transform: translateX( |
| 52 | + calc( |
| 53 | + -68px |
| 54 | + + (55vw - ((var(--thumb-width) * var(--desktop-count)) + (30px * var(--desktop-count))) / 2) |
| 55 | + ) |
| 56 | + ); |
| 57 | + opacity: 0; |
| 58 | + } |
| 59 | + 10% { opacity: 1; } |
| 60 | + 100% { transform: translateX(0); opacity: 1; } |
38 | 61 | } |
39 | 62 |
|
40 | 63 | @keyframes slideWrapperUp { |
|
80 | 103 | display: flex; |
81 | 104 | justify-content: center; |
82 | 105 | align-items: center; |
| 106 | + z-index: 190; |
83 | 107 | gap: 43px; |
84 | 108 | transition: |
85 | 109 | gap var(--names-slide-duration) var(--easing-flattened), |
|
126 | 150 | cursor: pointer; |
127 | 151 | opacity: 1; /* now always visible */ |
128 | 152 | z-index: 191; |
| 153 | + /* ensure the circle can expand beyond the button bounds */ |
| 154 | + overflow: visible; |
| 155 | + transition: opacity 0.2s; |
| 156 | +} |
| 157 | + |
| 158 | +/* disabled state for the + button */ |
| 159 | +.mc-bar-new.disabled { |
| 160 | + cursor: default; |
| 161 | + opacity: 0.5; |
| 162 | + pointer-events: none; |
129 | 163 | } |
130 | 164 |
|
131 | 165 | /* Animate the “+” up when the bar expands */ |
|
137 | 171 | opacity: 1; |
138 | 172 | } |
139 | 173 |
|
| 174 | +/* ---------- Grow circle behind “+” on hover (synced) ---------- */ |
| 175 | +.mc-bar-new::before { |
| 176 | + content: ''; |
| 177 | + position: absolute; |
| 178 | + left: 12px; |
| 179 | + top: 27px; |
| 180 | + width: 31px; |
| 181 | + height: 31px; |
| 182 | + border-radius: 50%; |
| 183 | + background: rgba(255, 255, 255, 0.7); |
| 184 | + backdrop-filter: blur(10px); |
| 185 | + transform: translate(-50%, -50%) scale(0); |
| 186 | + /* synced to bar-slide-duration and easing */ |
| 187 | + transition: transform var(--bar-slide-duration) var(--easing-flattened); |
| 188 | + z-index: -1; |
| 189 | + pointer-events: none; |
| 190 | +} |
| 191 | +.mc-bar-new:hover::before { |
| 192 | + transform: translate(-50%, -50%) scale(1); |
| 193 | +} |
| 194 | + |
140 | 195 | /* ---------- Exit overlay ---------- */ |
141 | 196 | .mc-exit-overlay { |
142 | 197 | position: absolute; |
|
157 | 212 | transform var(--desktop-slide-duration) var(--easing-flattened), |
158 | 213 | opacity var(--desktop-slide-duration) var(--easing-flattened); |
159 | 214 | } |
160 | | - |
161 | 215 | .mission-control-container.overview-open .desktops-wrapper { |
162 | | - /* still ignore pointer-events here */ |
163 | 216 | pointer-events: none; |
164 | | - |
165 | 217 | position: absolute; |
166 | 218 | top: 30px; left: 0; right: 0; |
167 | 219 | display: flex; |
|
175 | 227 | opacity: 0; |
176 | 228 | transition: none; |
177 | 229 | } |
178 | | - |
179 | 230 | .mission-control-container.overview-open.bar-expanded .desktops-wrapper { |
180 | 231 | pointer-events: none; |
181 | 232 | transform: translateY(5px); |
|
184 | 235 | transform var(--bar-slide-duration) var(--easing-flattened), |
185 | 236 | opacity var(--bar-slide-duration) var(--easing-flattened); |
186 | 237 | } |
187 | | - |
188 | 238 | .mission-control-container.overview-open.bar-expanded .desktops-wrapper.closing { |
189 | 239 | animation: slideWrapperUp var(--bar-slide-duration) var(--easing-flattened) forwards; |
190 | 240 | } |
|
200 | 250 | position: relative; |
201 | 251 | margin-left: 0; |
202 | 252 | } |
203 | | - |
204 | 253 | .mission-control-container.overview-open .desktop-panel { |
205 | 254 | overflow: hidden; |
206 | 255 | background: transparent; |
|
209 | 258 | transform: translate(var(--tx), var(--ty)); |
210 | 259 | opacity: 0; |
211 | 260 | } |
212 | | - |
213 | 261 | .mission-control-container.overview-open.bar-expanded .desktop-panel { |
214 | 262 | animation: |
215 | 263 | var(--panel-animation, var(--desktop-panel-animation)) |
|
255 | 303 | .delete-icon:hover { |
256 | 304 | background: rgba(255,255,255,1); |
257 | 305 | } |
| 306 | + |
| 307 | +/* ---------- Desktop Preview Panel (synced & fading) ---------- */ |
| 308 | +.preview-panel { |
| 309 | + position: absolute; |
| 310 | + top: 30px; /* align with desktops-wrapper */ |
| 311 | + right: calc(0% - var(--thumb-width)); |
| 312 | + width: var(--thumb-width); |
| 313 | + height: var(--thumb-height, 90px); |
| 314 | + pointer-events: none; |
| 315 | + z-index: 189; |
| 316 | + background: rgba(255, 255, 255, 0); |
| 317 | + border-radius: 2px; |
| 318 | + |
| 319 | + /* ensure it's hidden by default */ |
| 320 | + opacity: 0; |
| 321 | + |
| 322 | + /* slide-right still 0.3s, but fade only 0.2s */ |
| 323 | + transition: |
| 324 | + right var(--bar-slide-duration) var(--easing-flattened), |
| 325 | + opacity 0.2s ease-in-out; |
| 326 | +} |
| 327 | +.preview-panel.visible { |
| 328 | + right: calc(55px - var(--thumb-width)); |
| 329 | + opacity: 1; |
| 330 | +} |
0 commit comments