@skygraph/styles 0.0.0-placeholder.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +92 -6
  3. package/components/autocomplete.css +33 -0
  4. package/components/avatar.css +37 -0
  5. package/components/badge.css +102 -0
  6. package/components/breadcrumb.css +29 -0
  7. package/components/button.css +181 -0
  8. package/components/calendar.css +408 -0
  9. package/components/carousel.css +102 -0
  10. package/components/cascader.css +354 -0
  11. package/components/charts.css +408 -0
  12. package/components/checkbox.css +29 -0
  13. package/components/collapse.css +166 -0
  14. package/components/colorpicker.css +252 -0
  15. package/components/context-menu.css +95 -0
  16. package/components/dashboard.css +299 -0
  17. package/components/datagrid.css +86 -0
  18. package/components/datepicker.css +601 -0
  19. package/components/descriptions.css +82 -0
  20. package/components/diagram.css +422 -0
  21. package/components/drawer.css +103 -0
  22. package/components/dropdown.css +93 -0
  23. package/components/empty.css +25 -0
  24. package/components/event-timeline.css +100 -0
  25. package/components/field.css +35 -0
  26. package/components/form.css +115 -0
  27. package/components/gantt.css +161 -0
  28. package/components/inline-edit.css +113 -0
  29. package/components/input-group.css +79 -0
  30. package/components/input-number.css +76 -0
  31. package/components/input-password.css +104 -0
  32. package/components/input.css +110 -0
  33. package/components/list.css +357 -0
  34. package/components/mentions.css +54 -0
  35. package/components/menu.css +309 -0
  36. package/components/modal.css +77 -0
  37. package/components/notification.css +128 -0
  38. package/components/pagination.css +162 -0
  39. package/components/pin-input.css +71 -0
  40. package/components/popconfirm.css +95 -0
  41. package/components/progress.css +116 -0
  42. package/components/radio.css +38 -0
  43. package/components/rate.css +34 -0
  44. package/components/resource-calendar.css +219 -0
  45. package/components/result.css +45 -0
  46. package/components/schema-form-editor.css +425 -0
  47. package/components/search-input.css +112 -0
  48. package/components/segmented.css +76 -0
  49. package/components/select.css +172 -0
  50. package/components/skeleton.css +68 -0
  51. package/components/slider.css +51 -0
  52. package/components/spin.css +86 -0
  53. package/components/steps.css +185 -0
  54. package/components/switch.css +69 -0
  55. package/components/table.css +984 -0
  56. package/components/tabs.css +117 -0
  57. package/components/tag-input.css +94 -0
  58. package/components/tag.css +61 -0
  59. package/components/textarea.css +22 -0
  60. package/components/timeline.css +169 -0
  61. package/components/timepicker.css +213 -0
  62. package/components/tooltip.css +91 -0
  63. package/components/transfer.css +140 -0
  64. package/components/tree.css +574 -0
  65. package/components/treeselect.css +219 -0
  66. package/components/upload.css +124 -0
  67. package/index.css +69 -3
  68. package/index.d.ts +9 -0
  69. package/package.json +102 -18
  70. package/print.css +88 -0
  71. package/reset.css +17 -0
  72. package/themes/dark.css +17 -0
  73. package/themes/default.css +14 -0
  74. package/tokens.css +312 -0
  75. package/transitions.css +158 -0
@@ -0,0 +1,984 @@
1
+ .sg-table-wrapper {
2
+ --sg-table-row-height: auto;
3
+ --sg-table-row-bg: transparent;
4
+ --sg-table-row-hover-bg: var(--sg-color-bg-hover);
5
+ --sg-table-header-bg: var(--sg-color-bg-secondary);
6
+ --sg-table-border-color: var(--sg-color-border);
7
+ --sg-table-border-color-secondary: var(--sg-color-border-secondary);
8
+ --sg-table-cell-padding: var(--sg-padding-sm) var(--sg-padding-md);
9
+ /* Opaque fallback used by fixed (sticky) cells so scrolling columns
10
+ don't bleed through. Override per instance for non-default backgrounds. */
11
+ --sg-table-cell-solid-bg: var(--sg-color-bg);
12
+ width: 100%;
13
+ /* Allow shrinking below intrinsic min-content inside flex/grid parents
14
+ * so the inner scroll container can actually overflow (or the table can
15
+ * flex under its natural column widths). */
16
+ min-width: 0;
17
+ font-size: var(--sg-font-size);
18
+ color: var(--sg-color-text);
19
+ }
20
+
21
+ /* Toolbar */
22
+ .sg-table-toolbar {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: var(--sg-padding-sm);
26
+ margin-bottom: var(--sg-margin-sm);
27
+ flex-wrap: wrap;
28
+ }
29
+
30
+ .sg-table-toolbar-right {
31
+ display: flex;
32
+ gap: 8px;
33
+ margin-left: auto;
34
+ align-items: center;
35
+ flex-wrap: wrap;
36
+ }
37
+
38
+ .sg-table-toolbar-btn {
39
+ display: inline-flex;
40
+ align-items: center;
41
+ gap: 4px;
42
+ padding: 4px 12px;
43
+ font-size: var(--sg-font-size-sm);
44
+ color: var(--sg-color-text-secondary);
45
+ background: var(--sg-color-bg);
46
+ border: 1px solid var(--sg-color-border);
47
+ border-radius: var(--sg-border-radius-sm);
48
+ cursor: pointer;
49
+ white-space: nowrap;
50
+ transition: all var(--sg-transition-duration);
51
+ }
52
+
53
+ .sg-table-toolbar-btn:hover {
54
+ color: var(--sg-color-primary);
55
+ border-color: var(--sg-color-primary);
56
+ }
57
+
58
+ .sg-table-toolbar-group {
59
+ display: flex;
60
+ gap: 4px;
61
+ }
62
+
63
+ /* Scroll container.
64
+ * `overflow-x` is set inline by `Table.tsx` only when the author passes
65
+ * `scroll.x` — otherwise the table flexes to fit its container and no
66
+ * scrollbar is needed. `min-width: 0` unblocks horizontal shrinking in
67
+ * nested flex/grid contexts. */
68
+ .sg-table-scroll {
69
+ width: 100%;
70
+ min-width: 0;
71
+ position: relative;
72
+ }
73
+
74
+ /* Grid base.
75
+ * The grid carries a solid base background so body cells (transparent by
76
+ * default) and fixed-sticky cells draw over the same colour. Without this,
77
+ * fixed columns look like "floating white rectangles" when the table sits
78
+ * on a coloured surface (e.g. a DemoBox with a tinted fill).
79
+ */
80
+ .sg-table-grid {
81
+ display: grid;
82
+ /* Fluid mode: stretch to fill the scroll container. Overridden below
83
+ * when the author opts into horizontal scroll via `scroll.x`. */
84
+ min-width: 100%;
85
+ background: var(--sg-table-cell-solid-bg);
86
+ }
87
+
88
+ /* Horizontal-scroll mode: the grid keeps its declared `scroll.x` width
89
+ * (set inline as `min-width`) and does NOT stretch to fill the scroll
90
+ * container. This lets fixed columns sit flush against the right edge
91
+ * of the actual content instead of floating in empty space. */
92
+ .sg-table-scroll-x .sg-table-grid,
93
+ .sg-table-scroll-x .sg-table-pinned-top,
94
+ .sg-table-scroll-x .sg-table-pinned-bottom {
95
+ min-width: 0;
96
+ width: max-content;
97
+ }
98
+
99
+ /* ---- Header ---- */
100
+ .sg-table-th {
101
+ position: relative;
102
+ padding: var(--sg-table-cell-padding);
103
+ font-weight: 600;
104
+ color: var(--sg-color-text);
105
+ background: var(--sg-table-header-bg);
106
+ border-bottom: 1px solid var(--sg-table-border-color);
107
+ user-select: none;
108
+ display: flex;
109
+ align-items: center;
110
+ gap: var(--sg-padding-xs);
111
+ white-space: nowrap;
112
+ }
113
+
114
+ .sg-table-th-content {
115
+ flex: 1;
116
+ min-width: 0;
117
+ display: flex;
118
+ align-items: center;
119
+ gap: var(--sg-padding-xs);
120
+ }
121
+
122
+ .sg-table-th-sortable {
123
+ cursor: pointer;
124
+ }
125
+
126
+ .sg-table-th-sortable:hover {
127
+ background: var(--sg-color-bg-hover);
128
+ }
129
+
130
+ /* Sort arrows */
131
+ .sg-table-sort-arrows {
132
+ display: inline-flex;
133
+ flex-direction: column;
134
+ line-height: 1;
135
+ gap: 0;
136
+ margin-left: 2px;
137
+ flex-shrink: 0;
138
+ }
139
+
140
+ .sg-table-sort-asc,
141
+ .sg-table-sort-desc {
142
+ font-size: 8px;
143
+ line-height: 8px;
144
+ color: var(--sg-color-text-quaternary, var(--sg-color-text-tertiary));
145
+ transition: color var(--sg-transition-duration);
146
+ }
147
+
148
+ .sg-table-sort-current {
149
+ color: var(--sg-color-primary);
150
+ }
151
+
152
+ .sg-table-th-sortable:hover .sg-table-sort-asc,
153
+ .sg-table-th-sortable:hover .sg-table-sort-desc {
154
+ color: var(--sg-color-text-tertiary);
155
+ }
156
+
157
+ .sg-table-th-sortable:hover .sg-table-sort-current {
158
+ color: var(--sg-color-primary);
159
+ }
160
+
161
+ .sg-table-sort-index {
162
+ font-size: 9px;
163
+ color: var(--sg-color-primary);
164
+ font-weight: 700;
165
+ margin-left: 1px;
166
+ }
167
+
168
+ /* Drag over */
169
+ .sg-table-th-drag-over {
170
+ background: var(--sg-color-primary-bg);
171
+ box-shadow: inset 2px 0 0 var(--sg-color-primary);
172
+ }
173
+
174
+ /* Fixed cell — legacy selector kept for non-td/th elements (group headers etc).
175
+ Opaque body/header overrides live at the end of the file where they can
176
+ win the cascade against .sg-table-td / .sg-table-th. */
177
+ .sg-table-cell-fixed {
178
+ background: var(--sg-table-cell-solid-bg);
179
+ }
180
+
181
+ /* Sticky header */
182
+ .sg-table-sticky .sg-table-th {
183
+ position: sticky;
184
+ top: 0;
185
+ z-index: var(--sg-z-sticky);
186
+ }
187
+
188
+ .sg-table-sticky .sg-table-cell-fixed.sg-table-th {
189
+ z-index: var(--sg-z-sticky-fixed);
190
+ }
191
+
192
+ /* ---- Body cells ---- */
193
+ .sg-table-td {
194
+ padding: var(--sg-table-cell-padding);
195
+ min-height: var(--sg-table-row-height);
196
+ background: var(--sg-table-row-bg);
197
+ border-bottom: 1px solid var(--sg-table-border-color-secondary);
198
+ display: flex;
199
+ align-items: center;
200
+ min-width: 0;
201
+ transition: background var(--sg-transition-duration);
202
+ }
203
+
204
+ .sg-table-hoverable .sg-table-row:hover .sg-table-td {
205
+ background: var(--sg-table-row-hover-bg);
206
+ }
207
+
208
+ .sg-table-row-selected .sg-table-td {
209
+ background: var(--sg-color-primary-bg);
210
+ }
211
+
212
+ .sg-table-row-selected:hover .sg-table-td {
213
+ background: var(--sg-color-primary-bg);
214
+ }
215
+
216
+ .sg-table-row-clickable .sg-table-td {
217
+ cursor: pointer;
218
+ }
219
+
220
+ /* Fixed-cell hover/selected overrides live in the dedicated block at the end
221
+ of the file so they can beat `.sg-table-td { background }`. */
222
+
223
+ /* Cell content wrapper */
224
+ .sg-table-cell-content {
225
+ flex: 1;
226
+ min-width: 0;
227
+ overflow: hidden;
228
+ }
229
+
230
+ /* ---- Selection / Expand cells ---- */
231
+ .sg-table-cell-selection,
232
+ .sg-table-cell-expand {
233
+ justify-content: center;
234
+ flex-shrink: 0;
235
+ }
236
+
237
+ /* ---- Row number ---- */
238
+ .sg-table-cell-row-number {
239
+ justify-content: center;
240
+ color: var(--sg-color-text-tertiary);
241
+ font-size: var(--sg-font-size-sm);
242
+ font-variant-numeric: tabular-nums;
243
+ }
244
+
245
+ /* ---- Expand button ---- */
246
+ .sg-table-expand-btn {
247
+ border: none;
248
+ background: none;
249
+ cursor: pointer;
250
+ font-size: 16px;
251
+ color: var(--sg-color-text-secondary);
252
+ padding: 0;
253
+ width: 20px;
254
+ height: 20px;
255
+ display: flex;
256
+ align-items: center;
257
+ justify-content: center;
258
+ transition: transform var(--sg-transition-duration) var(--sg-transition-timing);
259
+ transform: rotate(0deg);
260
+ }
261
+
262
+ .sg-table-expand-open {
263
+ transform: rotate(90deg);
264
+ }
265
+
266
+ .sg-table-expand-btn:hover {
267
+ color: var(--sg-color-primary);
268
+ }
269
+
270
+ /* ---- Expanded row ---- */
271
+ .sg-table-expanded-row {
272
+ padding: var(--sg-padding-md) var(--sg-padding-lg);
273
+ background: var(--sg-color-bg-secondary);
274
+ border-bottom: 1px solid var(--sg-color-border-secondary);
275
+ }
276
+
277
+ /* ---- Empty ---- */
278
+ .sg-table-empty {
279
+ padding: var(--sg-padding-xl);
280
+ text-align: center;
281
+ color: var(--sg-color-text-tertiary);
282
+ }
283
+
284
+ /* ---- Editable ---- */
285
+ .sg-table-td-editable {
286
+ cursor: text;
287
+ }
288
+
289
+ .sg-table-edit-input {
290
+ width: 100%;
291
+ border: 1px solid var(--sg-color-primary);
292
+ border-radius: var(--sg-border-radius-sm);
293
+ padding: 2px var(--sg-padding-xs);
294
+ font-size: inherit;
295
+ font-family: inherit;
296
+ color: var(--sg-color-text);
297
+ background: var(--sg-color-bg);
298
+ outline: none;
299
+ box-shadow: 0 0 0 2px var(--sg-color-primary-bg);
300
+ }
301
+
302
+ /* ---- Resize handle ---- */
303
+ .sg-table-resize-handle {
304
+ position: absolute;
305
+ top: 0;
306
+ right: 0;
307
+ bottom: 0;
308
+ width: 4px;
309
+ cursor: col-resize;
310
+ z-index: var(--sg-z-base);
311
+ transition: background var(--sg-transition-duration);
312
+ }
313
+
314
+ .sg-table-resize-handle:hover,
315
+ .sg-table-resize-handle:active {
316
+ background: var(--sg-color-primary);
317
+ }
318
+
319
+ /* ---- Filter ---- */
320
+ .sg-table-filter-trigger {
321
+ display: inline-flex;
322
+ align-items: center;
323
+ justify-content: center;
324
+ cursor: pointer;
325
+ font-size: var(--sg-font-size-sm);
326
+ color: var(--sg-color-text-tertiary);
327
+ padding: 2px 4px;
328
+ border-radius: var(--sg-border-radius-sm);
329
+ transition:
330
+ color var(--sg-transition-duration),
331
+ background-color var(--sg-transition-duration);
332
+ flex-shrink: 0;
333
+ line-height: 1;
334
+ }
335
+
336
+ .sg-table-filter-trigger > svg {
337
+ display: block;
338
+ }
339
+
340
+ .sg-table-filter-trigger:hover {
341
+ color: var(--sg-color-primary);
342
+ background: var(--sg-color-bg-hover);
343
+ }
344
+
345
+ .sg-table-filter-active {
346
+ color: var(--sg-color-primary);
347
+ }
348
+
349
+ .sg-table-filter-portal > .sg-table-filter-dropdown {
350
+ position: static;
351
+ }
352
+
353
+ .sg-table-filter-dropdown {
354
+ position: absolute;
355
+ top: 100%;
356
+ left: 0;
357
+ z-index: var(--sg-z-dropdown);
358
+ min-width: 140px;
359
+ background: var(--sg-color-bg-elevated);
360
+ border-radius: var(--sg-border-radius-lg);
361
+ box-shadow: var(--sg-shadow-lg);
362
+ border: 1px solid var(--sg-color-border-secondary);
363
+ padding: var(--sg-padding-sm);
364
+ animation: sg-table-filter-in var(--sg-transition-duration) var(--sg-transition-timing);
365
+ }
366
+
367
+ @keyframes sg-table-filter-in {
368
+ from {
369
+ opacity: 0;
370
+ transform: scaleY(0.8);
371
+ }
372
+ to {
373
+ opacity: 1;
374
+ transform: scaleY(1);
375
+ }
376
+ }
377
+
378
+ .sg-table-filter-list {
379
+ display: flex;
380
+ flex-direction: column;
381
+ gap: var(--sg-padding-xs);
382
+ max-height: 200px;
383
+ overflow-y: auto;
384
+ margin-bottom: var(--sg-padding-sm);
385
+ }
386
+
387
+ .sg-table-filter-item {
388
+ display: flex;
389
+ align-items: center;
390
+ gap: var(--sg-padding-xs);
391
+ font-size: var(--sg-font-size-sm);
392
+ font-weight: 400;
393
+ cursor: pointer;
394
+ padding: 2px 0;
395
+ }
396
+
397
+ .sg-table-filter-actions {
398
+ display: flex;
399
+ justify-content: space-between;
400
+ gap: var(--sg-padding-xs);
401
+ border-top: 1px solid var(--sg-color-border-secondary);
402
+ padding-top: var(--sg-padding-sm);
403
+ }
404
+
405
+ .sg-table-filter-search {
406
+ margin-bottom: var(--sg-padding-sm);
407
+ }
408
+
409
+ .sg-table-filter-search-mode {
410
+ display: flex;
411
+ flex-direction: column;
412
+ gap: var(--sg-padding-sm);
413
+ min-width: 180px;
414
+ }
415
+
416
+ .sg-table-filter-item input[type='radio'] {
417
+ accent-color: var(--sg-color-primary);
418
+ margin: 0;
419
+ }
420
+
421
+ .sg-table-filter-empty {
422
+ padding: var(--sg-padding-sm);
423
+ text-align: center;
424
+ color: var(--sg-color-text-tertiary);
425
+ font-size: var(--sg-font-size-sm);
426
+ }
427
+
428
+ /* ---- Filter (advanced mode) ---- */
429
+ .sg-table-filter-advanced-mode {
430
+ min-width: 200px;
431
+ display: flex;
432
+ flex-direction: column;
433
+ gap: var(--sg-padding-sm);
434
+ }
435
+
436
+ .sg-table-filter-advanced-row {
437
+ display: flex;
438
+ width: 100%;
439
+ }
440
+
441
+ .sg-table-filter-advanced-row > * {
442
+ flex: 1 1 auto;
443
+ min-width: 0;
444
+ }
445
+
446
+ /* Базовый вид нативного <select> внутри любого filter-dropdown
447
+ (advanced-режим + пользовательские filterDropdown). :where() даёт нулевую
448
+ specificity, поэтому кастомный класс/inline-style легко перебивает. */
449
+ :where(.sg-table-filter-dropdown select) {
450
+ width: 100%;
451
+ height: 28px;
452
+ padding: 0 28px 0 var(--sg-padding-sm);
453
+ font-family: inherit;
454
+ font-size: var(--sg-font-size-sm);
455
+ color: var(--sg-color-text);
456
+ background-color: var(--sg-color-bg);
457
+ border: 1px solid var(--sg-color-border);
458
+ border-radius: var(--sg-border-radius-sm);
459
+ cursor: pointer;
460
+ appearance: none;
461
+ -webkit-appearance: none;
462
+ -moz-appearance: none;
463
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
464
+ background-repeat: no-repeat;
465
+ background-position: right 8px center;
466
+ background-size: 10px 10px;
467
+ transition:
468
+ border-color var(--sg-transition-duration),
469
+ box-shadow var(--sg-transition-duration);
470
+ }
471
+
472
+ :where(.sg-table-filter-dropdown select):hover {
473
+ border-color: var(--sg-color-primary);
474
+ }
475
+
476
+ :where(.sg-table-filter-dropdown select):focus,
477
+ :where(.sg-table-filter-dropdown select):focus-visible {
478
+ outline: none;
479
+ border-color: var(--sg-color-primary);
480
+ box-shadow: 0 0 0 2px var(--sg-color-primary-bg, rgba(24, 144, 255, 0.15));
481
+ }
482
+
483
+ /* ---- Summary ---- */
484
+ .sg-table-summary-cell {
485
+ font-weight: 600;
486
+ background: var(--sg-color-bg-secondary);
487
+ border-top: 2px solid var(--sg-color-border);
488
+ }
489
+
490
+ /* ---- Pagination ---- */
491
+ .sg-table-pagination {
492
+ display: flex;
493
+ align-items: center;
494
+ justify-content: space-between;
495
+ padding: var(--sg-padding-md) 0;
496
+ }
497
+
498
+ .sg-table-pagination-total {
499
+ font-size: var(--sg-font-size-sm);
500
+ color: var(--sg-color-text-secondary);
501
+ }
502
+
503
+ .sg-table-pagination-controls {
504
+ display: inline-flex;
505
+ align-items: center;
506
+ gap: var(--sg-padding-xs);
507
+ }
508
+
509
+ .sg-table-pagination-page {
510
+ font-size: var(--sg-font-size-sm);
511
+ color: var(--sg-color-text-secondary);
512
+ font-variant-numeric: tabular-nums;
513
+ min-width: 56px;
514
+ text-align: center;
515
+ }
516
+
517
+ .sg-table-pagination-prev,
518
+ .sg-table-pagination-next {
519
+ padding: 2px 10px;
520
+ font-size: 14px;
521
+ line-height: 1;
522
+ }
523
+
524
+ .sg-table-pagination-prev:disabled,
525
+ .sg-table-pagination-next:disabled {
526
+ opacity: 0.4;
527
+ cursor: not-allowed;
528
+ }
529
+
530
+ /* ---- Sizes ---- */
531
+ .sg-table-small .sg-table-th,
532
+ .sg-table-small .sg-table-td {
533
+ padding: var(--sg-padding-xs) var(--sg-padding-sm);
534
+ font-size: var(--sg-font-size-sm);
535
+ }
536
+
537
+ .sg-table-large .sg-table-th,
538
+ .sg-table-large .sg-table-td {
539
+ padding: var(--sg-padding-md) var(--sg-padding-lg);
540
+ }
541
+
542
+ /* ---- Bordered ---- */
543
+ .sg-table-bordered .sg-table-th,
544
+ .sg-table-bordered .sg-table-td {
545
+ border-right: 1px solid var(--sg-color-border-secondary);
546
+ }
547
+
548
+ .sg-table-bordered .sg-table-th:last-child,
549
+ .sg-table-bordered .sg-table-td:last-child {
550
+ border-right: none;
551
+ }
552
+
553
+ .sg-table-bordered .sg-table-grid {
554
+ border: 1px solid var(--sg-color-border);
555
+ border-radius: var(--sg-border-radius);
556
+ overflow: hidden;
557
+ }
558
+
559
+ /* ---- Loading ---- */
560
+ .sg-table-loading {
561
+ position: relative;
562
+ }
563
+
564
+ .sg-table-loading .sg-table-scroll {
565
+ opacity: 0.4;
566
+ pointer-events: none;
567
+ transition: opacity var(--sg-transition-duration);
568
+ }
569
+
570
+ .sg-table-loading-mask {
571
+ position: absolute;
572
+ inset: 0;
573
+ display: flex;
574
+ align-items: center;
575
+ justify-content: center;
576
+ z-index: var(--sg-z-loading);
577
+ pointer-events: none;
578
+ }
579
+
580
+ /* ---- Column group header ---- */
581
+ .sg-table-th-group {
582
+ justify-content: center;
583
+ text-align: center;
584
+ border-bottom: 1px solid var(--sg-color-border);
585
+ }
586
+
587
+ /* ---- Tree indent ---- */
588
+ .sg-table-td .sg-table-expand-btn {
589
+ flex-shrink: 0;
590
+ }
591
+
592
+ /* ---- Scroll Y ---- */
593
+ .sg-table-scroll {
594
+ position: relative;
595
+ }
596
+
597
+ /* ---- Virtualization, fixed-height mode ----
598
+ *
599
+ * When the engine has been told `rowHeight: <number>` (no measurement
600
+ * estimate), it computes scroll math assuming each row is exactly that
601
+ * tall. Natural cell height (padding + line-height + border) usually
602
+ * differs by 1–4px per row, which makes the effective DOM `scrollHeight`
603
+ * drift away from the engine's `totalHeight` as the visible window
604
+ * changes — that drift is what shows up as the scrollbar thumb lagging
605
+ * behind the cursor while the user drags it. Locking visible row cells to
606
+ * the configured `rowHeight` removes the mismatch entirely. */
607
+ .sg-table-grid-virtual-fixed .sg-table-row[data-sg-virtual-row-index] > .sg-table-td {
608
+ height: var(--sg-virtual-row-height);
609
+ min-height: 0;
610
+ overflow: hidden;
611
+ }
612
+
613
+ /* ---- Span cells ---- */
614
+ .sg-table-td[style*='grid-row'] {
615
+ align-items: flex-start;
616
+ padding-top: var(--sg-padding-sm);
617
+ }
618
+
619
+ .sg-table-td[style*='grid-column'] {
620
+ border-right: none;
621
+ }
622
+
623
+ /* ---- Zebra striping ---- */
624
+ .sg-table-row-striped .sg-table-td {
625
+ background: color-mix(in srgb, var(--sg-color-text) 2%, transparent);
626
+ }
627
+
628
+ .sg-table-hoverable .sg-table-row-striped:hover .sg-table-td {
629
+ background: var(--sg-color-bg-hover);
630
+ }
631
+
632
+ /* ---- Row warning (custom rowClassName example) ---- */
633
+ .sg-table-row-warning .sg-table-td {
634
+ background: color-mix(in srgb, var(--sg-color-warning) 8%, transparent);
635
+ }
636
+
637
+ /* ---- Row drag over ---- */
638
+ .sg-table-row-drag-over .sg-table-td {
639
+ box-shadow: inset 0 -2px 0 var(--sg-color-primary);
640
+ }
641
+
642
+ /* ---- Drag handle ---- */
643
+ .sg-table-cell-drag-handle {
644
+ color: var(--sg-color-text-tertiary);
645
+ font-size: 16px;
646
+ }
647
+
648
+ .sg-table-cell-drag-handle:hover {
649
+ color: var(--sg-color-text-secondary);
650
+ }
651
+
652
+ /* ---- Selection bar ---- */
653
+ .sg-table-selection-bar {
654
+ display: flex;
655
+ align-items: center;
656
+ gap: var(--sg-padding-sm);
657
+ padding: var(--sg-padding-sm) var(--sg-padding-md);
658
+ background: var(--sg-color-primary-bg);
659
+ border-radius: var(--sg-border-radius-sm);
660
+ margin-bottom: var(--sg-margin-sm);
661
+ font-size: var(--sg-font-size-sm);
662
+ }
663
+
664
+ .sg-table-selection-count {
665
+ font-weight: 600;
666
+ color: var(--sg-color-primary);
667
+ }
668
+
669
+ .sg-table-selection-action {
670
+ padding: 2px 8px;
671
+ font-size: var(--sg-font-size-sm);
672
+ background: none;
673
+ border: 1px solid var(--sg-color-border);
674
+ border-radius: var(--sg-border-radius-sm);
675
+ cursor: pointer;
676
+ color: var(--sg-color-text);
677
+ transition: all var(--sg-transition-duration);
678
+ }
679
+
680
+ .sg-table-selection-action:hover {
681
+ border-color: var(--sg-color-primary);
682
+ color: var(--sg-color-primary);
683
+ }
684
+
685
+ .sg-table-selection-action-danger {
686
+ color: var(--sg-color-error);
687
+ border-color: var(--sg-color-error);
688
+ }
689
+
690
+ .sg-table-selection-clear {
691
+ margin-left: auto;
692
+ background: none;
693
+ border: none;
694
+ cursor: pointer;
695
+ color: var(--sg-color-text-tertiary);
696
+ font-size: 16px;
697
+ padding: 0 4px;
698
+ }
699
+
700
+ .sg-table-selection-clear:hover {
701
+ color: var(--sg-color-text);
702
+ }
703
+
704
+ /* ---- Fullscreen ---- */
705
+ .sg-table-fullscreen {
706
+ position: fixed;
707
+ inset: 0;
708
+ z-index: 1100;
709
+ background: var(--sg-color-bg);
710
+ padding: var(--sg-padding-lg);
711
+ overflow: auto;
712
+ }
713
+
714
+ /* ---- Column visibility dropdown ---- */
715
+ .sg-table-col-visibility-dropdown {
716
+ position: absolute;
717
+ top: 100%;
718
+ right: 0;
719
+ z-index: 1040;
720
+ background: var(--sg-color-bg-elevated, var(--sg-color-bg-container));
721
+ border: 1px solid var(--sg-color-border);
722
+ border-radius: var(--sg-border-radius);
723
+ box-shadow: var(--sg-shadow-lg, 0 6px 16px rgba(0, 0, 0, 0.08));
724
+ padding: 8px 0;
725
+ min-width: 160px;
726
+ max-height: 300px;
727
+ overflow-y: auto;
728
+ }
729
+
730
+ .sg-table-col-visibility-item {
731
+ display: flex;
732
+ align-items: center;
733
+ gap: 8px;
734
+ padding: 4px 12px;
735
+ cursor: pointer;
736
+ font-size: var(--sg-font-size-sm);
737
+ transition: background var(--sg-transition-duration);
738
+ }
739
+
740
+ .sg-table-col-visibility-item:hover {
741
+ background: var(--sg-color-bg-hover);
742
+ }
743
+
744
+ /* ---- Density dropdown ---- */
745
+ .sg-table-density-dropdown {
746
+ position: absolute;
747
+ top: 100%;
748
+ right: 0;
749
+ z-index: 1040;
750
+ background: var(--sg-color-bg-elevated, var(--sg-color-bg-container));
751
+ border: 1px solid var(--sg-color-border);
752
+ border-radius: var(--sg-border-radius);
753
+ box-shadow: var(--sg-shadow-lg, 0 6px 16px rgba(0, 0, 0, 0.08));
754
+ padding: 4px 0;
755
+ min-width: 120px;
756
+ }
757
+
758
+ .sg-table-density-option {
759
+ display: block;
760
+ width: 100%;
761
+ padding: 6px 12px;
762
+ font-size: var(--sg-font-size-sm);
763
+ text-align: left;
764
+ background: none;
765
+ border: none;
766
+ cursor: pointer;
767
+ color: var(--sg-color-text);
768
+ transition: background var(--sg-transition-duration);
769
+ }
770
+
771
+ .sg-table-density-option:hover {
772
+ background: var(--sg-color-bg-hover);
773
+ }
774
+
775
+ .sg-table-density-active {
776
+ color: var(--sg-color-primary);
777
+ font-weight: 600;
778
+ }
779
+
780
+ /* ---- Group rows ---- */
781
+ .sg-table-group-cell {
782
+ display: flex;
783
+ align-items: center;
784
+ gap: var(--sg-padding-sm);
785
+ padding: var(--sg-padding-sm) var(--sg-padding-md);
786
+ background: var(--sg-color-bg-secondary);
787
+ border-bottom: 1px solid var(--sg-color-border);
788
+ cursor: pointer;
789
+ font-weight: 500;
790
+ transition: background var(--sg-transition-duration);
791
+ }
792
+
793
+ .sg-table-group-cell:hover {
794
+ background: var(--sg-color-bg-hover);
795
+ }
796
+
797
+ .sg-table-group-title {
798
+ flex-shrink: 0;
799
+ }
800
+
801
+ .sg-table-group-count {
802
+ color: var(--sg-color-text-tertiary);
803
+ font-size: var(--sg-font-size-sm);
804
+ }
805
+
806
+ .sg-table-group-aggregates {
807
+ display: flex;
808
+ gap: var(--sg-padding-md);
809
+ margin-left: auto;
810
+ font-size: var(--sg-font-size-sm);
811
+ color: var(--sg-color-text-secondary);
812
+ }
813
+
814
+ .sg-table-group-agg-item {
815
+ white-space: nowrap;
816
+ }
817
+
818
+ /* ---- Aggregation footer ---- */
819
+ .sg-table-footer-cell {
820
+ font-weight: 600;
821
+ background: var(--sg-color-bg-secondary);
822
+ border-top: 2px solid var(--sg-color-border);
823
+ }
824
+
825
+ .sg-table-aggregate-value {
826
+ display: inline-flex;
827
+ gap: 4px;
828
+ align-items: baseline;
829
+ }
830
+
831
+ .sg-table-aggregate-label {
832
+ font-size: var(--sg-font-size-sm);
833
+ color: var(--sg-color-text-tertiary);
834
+ font-weight: 400;
835
+ text-transform: uppercase;
836
+ letter-spacing: 0.5px;
837
+ }
838
+
839
+ /* ---- Keyboard navigation focus ---- */
840
+ .sg-table-cell-focused {
841
+ outline: 2px solid var(--sg-color-primary);
842
+ outline-offset: -2px;
843
+ z-index: 1;
844
+ }
845
+
846
+ /* ---- Cell copy ---- */
847
+ .sg-table-cell-copyable {
848
+ position: relative;
849
+ }
850
+
851
+ .sg-table-copy-btn {
852
+ opacity: 0;
853
+ position: absolute;
854
+ top: 50%;
855
+ right: 4px;
856
+ transform: translateY(-50%);
857
+ border: none;
858
+ background: var(--sg-color-bg-elevated, var(--sg-color-bg-container));
859
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
860
+ border-radius: var(--sg-border-radius-sm);
861
+ cursor: pointer;
862
+ font-size: 12px;
863
+ width: 22px;
864
+ height: 22px;
865
+ display: flex;
866
+ align-items: center;
867
+ justify-content: center;
868
+ color: var(--sg-color-text-secondary);
869
+ transition:
870
+ opacity var(--sg-transition-duration),
871
+ color var(--sg-transition-duration);
872
+ }
873
+
874
+ .sg-table-cell-copyable:hover .sg-table-copy-btn {
875
+ opacity: 1;
876
+ }
877
+
878
+ .sg-table-copy-btn:hover {
879
+ color: var(--sg-color-primary);
880
+ }
881
+
882
+ .sg-table-cell-copied .sg-table-copy-btn {
883
+ opacity: 1;
884
+ color: var(--sg-color-success);
885
+ }
886
+
887
+ /* ---- Column header tooltip ---- */
888
+ .sg-table-th-tooltip {
889
+ font-size: 12px;
890
+ color: var(--sg-color-text-tertiary);
891
+ cursor: help;
892
+ flex-shrink: 0;
893
+ margin-left: 2px;
894
+ }
895
+
896
+ .sg-table-th-tooltip:hover {
897
+ color: var(--sg-color-primary);
898
+ }
899
+
900
+ /* ---- Pinned rows ---- */
901
+ .sg-table-pinned-top,
902
+ .sg-table-pinned-bottom {
903
+ display: grid;
904
+ }
905
+
906
+ .sg-table-pinned-top {
907
+ border-bottom: 2px solid var(--sg-color-primary);
908
+ }
909
+
910
+ .sg-table-pinned-bottom {
911
+ border-top: 2px solid var(--sg-color-primary);
912
+ }
913
+
914
+ .sg-table-row-pinned .sg-table-td {
915
+ background: color-mix(in srgb, var(--sg-color-primary) 4%, var(--sg-color-bg-container));
916
+ }
917
+
918
+ /* ---- Fixed cells: opaque backgrounds ------------------------------------
919
+ *
920
+ * Fixed (sticky) columns need a solid background, otherwise content from
921
+ * the scrolling columns bleeds through them. These rules are placed last
922
+ * so their specificity (0,2,0) beats the plain `.sg-table-td` /
923
+ * `.sg-table-th` rules (0,1,0) that reset background for stripes / theme.
924
+ *
925
+ * Order: default → hover → selected → striped (least → most specific).
926
+ * Each variant keeps the fixed column visually in sync with the rest of
927
+ * the row, so the "floating" effect disappears entirely.
928
+ */
929
+ .sg-table-td.sg-table-cell-fixed {
930
+ background: var(--sg-table-cell-solid-bg);
931
+ }
932
+
933
+ .sg-table-th.sg-table-cell-fixed {
934
+ background: var(--sg-table-header-bg);
935
+ }
936
+
937
+ .sg-table-hoverable .sg-table-row:hover .sg-table-td.sg-table-cell-fixed {
938
+ background: var(--sg-table-row-hover-bg);
939
+ }
940
+
941
+ .sg-table-row-selected .sg-table-td.sg-table-cell-fixed,
942
+ .sg-table-row-selected:hover .sg-table-td.sg-table-cell-fixed {
943
+ background: var(--sg-color-primary-bg);
944
+ }
945
+
946
+ .sg-table-row-striped .sg-table-td.sg-table-cell-fixed {
947
+ background: color-mix(in srgb, var(--sg-color-text) 2%, var(--sg-table-cell-solid-bg));
948
+ }
949
+
950
+ .sg-table-hoverable .sg-table-row-striped:hover .sg-table-td.sg-table-cell-fixed {
951
+ background: var(--sg-table-row-hover-bg);
952
+ }
953
+
954
+ /* Subtle shadow on the inner edge so the fixed column visually detaches
955
+ from the scrolling body. Keeps the table readable when columns collide. */
956
+ .sg-table-td.sg-table-cell-fixed-left,
957
+ .sg-table-th.sg-table-cell-fixed-left {
958
+ box-shadow: 2px 0 4px -2px color-mix(in srgb, black 12%, transparent);
959
+ }
960
+
961
+ .sg-table-td.sg-table-cell-fixed-right,
962
+ .sg-table-th.sg-table-cell-fixed-right {
963
+ box-shadow: -2px 0 4px -2px color-mix(in srgb, black 12%, transparent);
964
+ }
965
+
966
+ /* ---- Print ---- */
967
+ @media print {
968
+ .sg-table-toolbar,
969
+ .sg-table-pagination,
970
+ .sg-table-selection-bar {
971
+ display: none !important;
972
+ }
973
+ .sg-table-wrapper {
974
+ overflow: visible !important;
975
+ }
976
+ .sg-table-scroll {
977
+ overflow: visible !important;
978
+ max-height: none !important;
979
+ }
980
+ .sg-table-fullscreen {
981
+ position: static !important;
982
+ padding: 0 !important;
983
+ }
984
+ }