|
1 | 1 | /* Relation Select AddOn Styles */ |
2 | 2 |
|
| 3 | +/* SVG Icons */ |
| 4 | +.relation-select-icon { |
| 5 | + display: inline-block; |
| 6 | + vertical-align: middle; |
| 7 | + fill: currentColor; |
| 8 | +} |
| 9 | + |
3 | 10 | .relation-select-widget { |
4 | 11 | display: flex; |
5 | 12 | gap: 20px; |
|
42 | 49 | margin-bottom: 5px; |
43 | 50 | border-radius: 3px; |
44 | 51 | background: var(--rex-panel-bg, #fff); |
45 | | - transition: background-color 0.2s; |
| 52 | + transition: background-color 0.2s, border-color 0.2s; |
46 | 53 | } |
47 | 54 |
|
48 | 55 | .relation-select-list li:hover { |
49 | 56 | background-color: var(--rex-hover-bg, #f8f9fa); |
50 | 57 | } |
51 | 58 |
|
| 59 | +/* Available items are clickable */ |
| 60 | +.relation-select-item-available { |
| 61 | + cursor: pointer; |
| 62 | +} |
| 63 | + |
| 64 | +.relation-select-item-available:hover { |
| 65 | + border-color: var(--rex-link-color, #007bff); |
| 66 | +} |
| 67 | + |
| 68 | +.relation-select-item-available .title { |
| 69 | + cursor: pointer; |
| 70 | +} |
| 71 | + |
52 | 72 | .relation-select-list li:last-child { |
53 | 73 | margin-bottom: 0; |
54 | 74 | } |
|
64 | 84 | cursor: move; |
65 | 85 | color: var(--rex-text-muted, #6c757d); |
66 | 86 | margin-right: 5px; |
| 87 | + flex-shrink: 0; |
67 | 88 | } |
68 | 89 |
|
69 | 90 | .relation-select-list .handle:hover { |
|
73 | 94 | .relation-select-list .btn-link { |
74 | 95 | padding: 2px 8px; |
75 | 96 | color: var(--rex-link-color, #007bff); |
| 97 | + flex-shrink: 0; |
76 | 98 | } |
77 | 99 |
|
78 | 100 | .relation-select-list .btn-link:hover { |
79 | 101 | color: var(--rex-link-hover-color, #0056b3); |
80 | 102 | } |
81 | 103 |
|
82 | | -.relation-select-list .add-item i { |
| 104 | +.relation-select-list .add-item .relation-select-icon { |
83 | 105 | color: var(--rex-success-color, #28a745); |
84 | 106 | } |
85 | 107 |
|
86 | | -.relation-select-list .remove-item i { |
| 108 | +.relation-select-list .remove-item .relation-select-icon { |
87 | 109 | color: var(--rex-danger-color, #dc3545); |
88 | 110 | } |
89 | 111 |
|
|
113 | 135 |
|
114 | 136 | .relation-select-open-modal { |
115 | 137 | margin-top: 5px; |
| 138 | + position: relative; |
| 139 | +} |
| 140 | + |
| 141 | +.relation-select-badge { |
| 142 | + display: inline-block; |
| 143 | + min-width: 20px; |
| 144 | + padding: 3px 7px; |
| 145 | + font-size: 11px; |
| 146 | + font-weight: 600; |
| 147 | + line-height: 1; |
| 148 | + color: var(--rex-text-muted, #999); |
| 149 | + background-color: var(--rex-border-light, #e9ecef); |
| 150 | + border-radius: 10px; |
| 151 | + margin-left: 8px; |
| 152 | + transition: all 0.2s ease; |
| 153 | +} |
| 154 | + |
| 155 | +.relation-select-badge.has-items { |
| 156 | + color: #fff; |
| 157 | + background-color: var(--rex-link-color, #007bff); |
| 158 | + transform: scale(1.1); |
116 | 159 | } |
117 | 160 |
|
118 | 161 | .relation-select-modal { |
@@ -303,6 +346,43 @@ body.rex-theme-dark .relation-select-list li:focus-within { |
303 | 346 | outline-color: #409be4; |
304 | 347 | } |
305 | 348 |
|
| 349 | +body.rex-theme-dark .relation-select-modal-dialog { |
| 350 | + background: #202b35; |
| 351 | + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); |
| 352 | +} |
| 353 | + |
| 354 | +body.rex-theme-dark .relation-select-modal-header, |
| 355 | +body.rex-theme-dark .relation-select-modal-footer { |
| 356 | + border-color: #26323f; |
| 357 | +} |
| 358 | + |
| 359 | +body.rex-theme-dark .relation-select-modal-title { |
| 360 | + color: rgba(255, 255, 255, 0.75); |
| 361 | +} |
| 362 | + |
| 363 | +body.rex-theme-dark .relation-select-modal-close { |
| 364 | + color: rgba(255, 255, 255, 0.45); |
| 365 | +} |
| 366 | + |
| 367 | +body.rex-theme-dark .relation-select-modal-close:hover { |
| 368 | + background-color: #26323f; |
| 369 | + color: rgba(255, 255, 255, 0.75); |
| 370 | +} |
| 371 | + |
| 372 | +body.rex-theme-dark .relation-select-modal-overlay { |
| 373 | + background: rgba(0, 0, 0, 0.7); |
| 374 | +} |
| 375 | + |
| 376 | +body.rex-theme-dark .relation-select-badge { |
| 377 | + color: rgba(255, 255, 255, 0.45); |
| 378 | + background-color: #26323f; |
| 379 | +} |
| 380 | + |
| 381 | +body.rex-theme-dark .relation-select-badge.has-items { |
| 382 | + color: #fff; |
| 383 | + background-color: #409be4; |
| 384 | +} |
| 385 | + |
306 | 386 | /* Apply dark theme based on system preference (auto mode) */ |
307 | 387 | @media (prefers-color-scheme: dark) { |
308 | 388 | body:not(.rex-theme-light) .relation-select-available, |
@@ -359,6 +439,43 @@ body.rex-theme-dark .relation-select-list li:focus-within { |
359 | 439 | body:not(.rex-theme-light) .relation-select-list li:focus-within { |
360 | 440 | outline-color: #409be4; |
361 | 441 | } |
| 442 | + |
| 443 | + body:not(.rex-theme-light) .relation-select-modal-dialog { |
| 444 | + background: #202b35; |
| 445 | + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); |
| 446 | + } |
| 447 | + |
| 448 | + body:not(.rex-theme-light) .relation-select-modal-header, |
| 449 | + body:not(.rex-theme-light) .relation-select-modal-footer { |
| 450 | + border-color: #26323f; |
| 451 | + } |
| 452 | + |
| 453 | + body:not(.rex-theme-light) .relation-select-modal-title { |
| 454 | + color: rgba(255, 255, 255, 0.75); |
| 455 | + } |
| 456 | + |
| 457 | + body:not(.rex-theme-light) .relation-select-modal-close { |
| 458 | + color: rgba(255, 255, 255, 0.45); |
| 459 | + } |
| 460 | + |
| 461 | + body:not(.rex-theme-light) .relation-select-modal-close:hover { |
| 462 | + background-color: #26323f; |
| 463 | + color: rgba(255, 255, 255, 0.75); |
| 464 | + } |
| 465 | + |
| 466 | + body:not(.rex-theme-light) .relation-select-modal-overlay { |
| 467 | + background: rgba(0, 0, 0, 0.7); |
| 468 | + } |
| 469 | + |
| 470 | + body:not(.rex-theme-light) .relation-select-badge { |
| 471 | + color: rgba(255, 255, 255, 0.45); |
| 472 | + background-color: #26323f; |
| 473 | + } |
| 474 | + |
| 475 | + body:not(.rex-theme-light) .relation-select-badge.has-items { |
| 476 | + color: #fff; |
| 477 | + background-color: #409be4; |
| 478 | + } |
362 | 479 | } |
363 | 480 |
|
364 | 481 |
|
|
0 commit comments