|
1 | 1 | .writing-editor .tiptap .tableWrapper { |
2 | 2 | box-sizing: border-box; |
| 3 | + position: relative; |
3 | 4 | width: calc(100% - 1.5rem); |
4 | 5 | max-width: calc(100% - 1.5rem); |
5 | | - margin: 1.25rem 1.5rem 1.5rem 0; |
| 6 | + padding: 1.25rem 1.5rem 1.5rem 0; |
6 | 7 | overflow-x: auto; |
7 | 8 | overflow-y: visible; |
8 | 9 | } |
|
174 | 175 | background-color: transparent; |
175 | 176 | } |
176 | 177 |
|
177 | | -.writing-editor .tiptap[data-ws-column-menu-active="true"] table .selectedCell::after { |
| 178 | +.writing-editor .tiptap[data-ws-selection-overlay-active="true"] table .selectedCell { |
| 179 | + border-style: solid; |
| 180 | + border-color: oklch(var(--border)); |
| 181 | + background-color: transparent; |
| 182 | +} |
| 183 | + |
| 184 | +.writing-editor .tiptap[data-ws-column-menu-active="true"] table .selectedCell::after, |
| 185 | +.writing-editor .tiptap[data-ws-selection-overlay-active="true"] table .selectedCell::after { |
178 | 186 | background: transparent; |
179 | 187 | } |
180 | 188 |
|
181 | 189 | .ws-table-column-selection { |
182 | 190 | position: absolute; |
183 | 191 | pointer-events: none; |
| 192 | + z-index: 1; |
184 | 193 | } |
185 | 194 |
|
186 | 195 | .ws-table-column-selection-outline { |
| 196 | + position: relative; |
187 | 197 | width: 100%; |
188 | 198 | height: 100%; |
189 | 199 | border: 2px solid oklch(var(--primary)); |
| 200 | + border-radius: 0; |
190 | 201 | } |
191 | 202 |
|
192 | | -/* .ws-table-column-selection-outline--column { |
193 | | - border-radius: 0.45rem; |
194 | | -} */ |
| 203 | +.ws-table-column-selection--overlay .ws-table-column-selection-outline { |
| 204 | + border-color: oklch(var(--primary) / 0.72); |
| 205 | + border-radius: 0; |
| 206 | + background: oklch(var(--primary) / 0.12); |
| 207 | +} |
| 208 | + |
| 209 | +.ws-table-column-selection-outline--column { |
| 210 | + border-radius: 0; |
| 211 | +} |
195 | 212 |
|
196 | 213 | .ws-table-column-handle-anchor { |
197 | 214 | position: absolute; |
198 | | - z-index: 90; |
| 215 | + z-index: 2; |
| 216 | + transform: translate(-50%, -50%); |
| 217 | +} |
| 218 | + |
| 219 | +.ws-table-selection-handle-anchor { |
| 220 | + position: absolute; |
| 221 | + z-index: 2; |
199 | 222 | transform: translate(-50%, -50%); |
200 | 223 | } |
201 | 224 |
|
202 | 225 | .ws-table-column-bubble-layer { |
203 | 226 | position: relative; |
204 | | - z-index: 100; |
| 227 | + z-index: 3; |
205 | 228 | } |
206 | 229 |
|
207 | 230 | .ws-table-column-handle { |
|
257 | 280 | transform: scale(1); |
258 | 281 | } |
259 | 282 |
|
| 283 | +.ws-table-selection-handle { |
| 284 | + width: 6px; |
| 285 | + min-width: 6px; |
| 286 | + height: 18px; |
| 287 | + min-height: 18px; |
| 288 | + padding: 0; |
| 289 | + border: 2px solid oklch(var(--background)); |
| 290 | + border-radius: 9999px; |
| 291 | + background: oklch(var(--primary)); |
| 292 | + color: transparent; |
| 293 | + box-shadow: none; |
| 294 | + overflow: hidden; |
| 295 | + transition: |
| 296 | + width 0.16s ease, |
| 297 | + min-width 0.16s ease, |
| 298 | + height 0.16s ease, |
| 299 | + min-height 0.16s ease, |
| 300 | + border-radius 0.16s ease, |
| 301 | + background-color 0.16s ease, |
| 302 | + color 0.16s ease, |
| 303 | + transform 0.16s ease; |
| 304 | +} |
| 305 | + |
| 306 | +.ws-table-selection-handle:hover, |
| 307 | +.ws-table-selection-handle:focus-visible, |
| 308 | +.ws-table-selection-handle--active { |
| 309 | + width: 1.5rem; |
| 310 | + min-width: 1.5rem; |
| 311 | + height: 2.5rem; |
| 312 | + min-height: 2.5rem; |
| 313 | + border-radius: 0.4rem; |
| 314 | + border-color: oklch(var(--background)); |
| 315 | + background: oklch(var(--primary)); |
| 316 | + color: oklch(var(--primary-foreground)); |
| 317 | +} |
| 318 | + |
| 319 | +.ws-table-selection-handle-icon { |
| 320 | + width: 0.95rem; |
| 321 | + height: 0.95rem; |
| 322 | + opacity: 0; |
| 323 | + transform: scale(0.7); |
| 324 | + transition: opacity 0.16s ease, transform 0.16s ease; |
| 325 | +} |
| 326 | + |
| 327 | +.ws-table-selection-handle:hover .ws-table-selection-handle-icon, |
| 328 | +.ws-table-selection-handle:focus-visible .ws-table-selection-handle-icon, |
| 329 | +.ws-table-selection-handle--active .ws-table-selection-handle-icon { |
| 330 | + opacity: 1; |
| 331 | + transform: scale(1); |
| 332 | +} |
| 333 | + |
260 | 334 | .ws-table-column-menu { |
261 | 335 | position: relative; |
262 | | - z-index: 110; |
| 336 | + z-index: 4; |
263 | 337 | width: 16.5625rem; |
264 | 338 | min-width: 11.25rem; |
265 | 339 | max-width: calc(100vw - 24px); |
|
346 | 420 | text-align: center; |
347 | 421 | } |
348 | 422 |
|
349 | | -.ws-table-column-color-menu { |
350 | | - z-index: 120; |
| 423 | +.ws-table-selection-menu { |
| 424 | + position: relative; |
| 425 | + z-index: 4; |
| 426 | + width: 12.5rem; |
| 427 | + min-width: 12.5rem; |
| 428 | + max-width: calc(100vw - 24px); |
| 429 | + border-radius: 0.875rem; |
| 430 | + box-shadow: 0 24px 60px -30px oklch(0 0 0 / 0.36); |
| 431 | + overflow: hidden; |
| 432 | +} |
| 433 | + |
| 434 | +.ws-table-selection-menu-items { |
| 435 | + display: flex; |
| 436 | + flex-direction: column; |
| 437 | + gap: 1px; |
| 438 | + padding: 0.25rem; |
| 439 | +} |
| 440 | + |
| 441 | +.ws-table-color-menu { |
| 442 | + z-index: 5; |
351 | 443 | width: min(22rem, calc(100vw - 40px)); |
352 | | - border-radius: 1.25rem; |
353 | | - padding: 0.5rem; |
| 444 | + border-radius: 0.25rem; |
| 445 | + padding: 0.25rem; |
354 | 446 | box-shadow: 0 26px 64px -30px oklch(0 0 0 / 0.36); |
355 | 447 | } |
356 | 448 |
|
357 | | -.ws-table-column-color-scroll { |
| 449 | +.ws-table-color-scroll { |
358 | 450 | height: min(60vh, 32rem); |
359 | 451 | max-height: min(60vh, 32rem); |
360 | 452 | } |
361 | 453 |
|
362 | | -.ws-table-column-color-section { |
| 454 | +.ws-table-color-section { |
363 | 455 | display: flex; |
364 | 456 | flex-direction: column; |
365 | 457 | gap: 0.25rem; |
366 | 458 | padding: 0.25rem; |
367 | 459 | } |
368 | 460 |
|
369 | | -.ws-table-column-color-title { |
| 461 | +.ws-table-color-title { |
370 | 462 | padding: 0.35rem 0.45rem 0.55rem; |
371 | 463 | font-size: 1.2rem; |
372 | 464 | font-weight: 700; |
373 | 465 | color: oklch(var(--foreground)); |
374 | 466 | } |
375 | 467 |
|
376 | | -.ws-table-column-color-item { |
| 468 | +.ws-table-color-item { |
377 | 469 | display: inline-flex; |
378 | 470 | width: 100%; |
379 | 471 | align-items: center; |
|
387 | 479 | transition: background-color 0.16s ease, color 0.16s ease; |
388 | 480 | } |
389 | 481 |
|
390 | | -.ws-table-column-color-item:hover { |
| 482 | +.ws-table-color-item:hover { |
391 | 483 | background: oklch(var(--accent)); |
392 | 484 | } |
393 | 485 |
|
394 | | -.ws-table-column-color-swatch { |
| 486 | +.ws-table-color-swatch { |
395 | 487 | display: inline-flex; |
396 | 488 | width: 3.9rem; |
397 | 489 | height: 3.9rem; |
|
0 commit comments