@svgrid/grid 1.0.0 → 1.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 (144) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +137 -39
  3. package/dist/GridFooter.svelte +164 -0
  4. package/dist/GridFooter.svelte.d.ts +29 -0
  5. package/dist/GridMenus.svelte +570 -0
  6. package/dist/GridMenus.svelte.d.ts +31 -0
  7. package/dist/SvGrid.controller.svelte.d.ts +429 -0
  8. package/dist/SvGrid.controller.svelte.js +1732 -0
  9. package/dist/SvGrid.css +1709 -0
  10. package/dist/SvGrid.helpers.d.ts +35 -0
  11. package/dist/SvGrid.helpers.js +160 -0
  12. package/dist/SvGrid.svelte +344 -7043
  13. package/dist/SvGrid.svelte.d.ts +4 -357
  14. package/dist/SvGrid.types.d.ts +436 -0
  15. package/dist/SvGrid.types.js +1 -0
  16. package/dist/SvGridChart.svelte +1060 -23
  17. package/dist/SvGridChart.svelte.d.ts +17 -0
  18. package/dist/build-api.d.ts +5 -0
  19. package/dist/build-api.js +527 -0
  20. package/dist/cell-render.d.ts +15 -0
  21. package/dist/cell-render.js +246 -0
  22. package/dist/cell-values.d.ts +28 -0
  23. package/dist/cell-values.js +89 -0
  24. package/dist/chart.d.ts +370 -3
  25. package/dist/chart.js +1135 -42
  26. package/dist/clipboard.d.ts +15 -0
  27. package/dist/clipboard.js +356 -0
  28. package/dist/columns.d.ts +30 -0
  29. package/dist/columns.js +277 -0
  30. package/dist/core.d.ts +1 -1
  31. package/dist/css.d.ts +3 -0
  32. package/dist/editing.d.ts +24 -0
  33. package/dist/editing.js +343 -0
  34. package/dist/editors/cell-editors.d.ts +1 -1
  35. package/dist/facet-buckets.d.ts +13 -0
  36. package/dist/facet-buckets.js +54 -0
  37. package/dist/features.d.ts +5 -0
  38. package/dist/features.js +30 -0
  39. package/dist/filter-operators.d.ts +16 -0
  40. package/dist/filter-operators.js +69 -0
  41. package/dist/hyperformula-adapter.d.ts +82 -0
  42. package/dist/hyperformula-adapter.js +73 -0
  43. package/dist/index.d.ts +5 -2
  44. package/dist/index.js +5 -2
  45. package/dist/keyboard-handlers.d.ts +7 -0
  46. package/dist/keyboard-handlers.js +197 -0
  47. package/dist/menus.d.ts +40 -0
  48. package/dist/menus.js +389 -0
  49. package/dist/named-views.d.ts +27 -0
  50. package/dist/named-views.js +39 -0
  51. package/dist/row-resize.d.ts +43 -0
  52. package/dist/row-resize.js +158 -0
  53. package/dist/scroll-sync.d.ts +9 -0
  54. package/dist/scroll-sync.js +86 -0
  55. package/dist/selection.d.ts +26 -0
  56. package/dist/selection.js +387 -0
  57. package/dist/spreadsheet.d.ts +80 -0
  58. package/dist/spreadsheet.js +194 -0
  59. package/dist/summaries.d.ts +12 -0
  60. package/dist/summaries.js +65 -0
  61. package/dist/sv-grid-scrollbar.js +7 -1
  62. package/dist/svgrid-wrapper.types.d.ts +12 -1
  63. package/dist/svgrid.comments-autocomplete.test.d.ts +1 -0
  64. package/dist/svgrid.comments-autocomplete.test.js +96 -0
  65. package/dist/svgrid.context-menu.test.d.ts +1 -0
  66. package/dist/svgrid.context-menu.test.js +102 -0
  67. package/dist/svgrid.new-features.wrapper.test.js +30 -4
  68. package/dist/svgrid.wrapper.test.js +27 -1
  69. package/dist/virtualization/column-virtualizer.d.ts +2 -0
  70. package/dist/virtualization/scroll-scaling.d.ts +28 -0
  71. package/dist/virtualization/scroll-scaling.js +64 -0
  72. package/dist/virtualization/scroll-scaling.test.d.ts +1 -0
  73. package/dist/virtualization/scroll-scaling.test.js +86 -0
  74. package/dist/virtualization/svelte-virtualizer.svelte.d.ts +2 -0
  75. package/dist/virtualization/svelte-virtualizer.svelte.js +2 -0
  76. package/dist/virtualization/virtualizer.d.ts +7 -0
  77. package/dist/virtualization/virtualizer.js +30 -0
  78. package/package.json +1 -1
  79. package/src/GridFooter.svelte +164 -0
  80. package/src/GridMenus.svelte +570 -0
  81. package/src/SvGrid.controller.svelte.ts +2195 -0
  82. package/src/SvGrid.css +1747 -0
  83. package/src/SvGrid.helpers.test.ts +415 -0
  84. package/src/SvGrid.helpers.ts +185 -0
  85. package/src/SvGrid.svelte +348 -7043
  86. package/src/SvGrid.types.ts +456 -0
  87. package/src/SvGridChart.svelte +1060 -23
  88. package/src/build-api.coverage.test.ts +532 -0
  89. package/src/build-api.ts +663 -0
  90. package/src/cell-render.test.ts +451 -0
  91. package/src/cell-render.ts +426 -0
  92. package/src/cell-values.ts +114 -0
  93. package/src/chart-export.test.ts +370 -0
  94. package/src/chart.coverage.test.ts +814 -0
  95. package/src/chart.ts +1352 -47
  96. package/src/clipboard.test.ts +731 -0
  97. package/src/clipboard.ts +524 -0
  98. package/src/collaboration.coverage.test.ts +220 -0
  99. package/src/columns.test.ts +702 -0
  100. package/src/columns.ts +419 -0
  101. package/src/core.ts +8 -0
  102. package/src/css.d.ts +3 -0
  103. package/src/editing.test.ts +837 -0
  104. package/src/editing.ts +513 -0
  105. package/src/editors/cell-editors.coverage.test.ts +156 -0
  106. package/src/editors/cell-editors.ts +1 -0
  107. package/src/facet-buckets.test.ts +353 -0
  108. package/src/facet-buckets.ts +67 -0
  109. package/src/features.ts +128 -0
  110. package/src/filter-operators.test.ts +174 -0
  111. package/src/filter-operators.ts +87 -0
  112. package/src/hyperformula-adapter.test.ts +256 -0
  113. package/src/hyperformula-adapter.ts +124 -0
  114. package/src/index.ts +37 -0
  115. package/src/keyboard-handlers.coverage.test.ts +560 -0
  116. package/src/keyboard-handlers.ts +353 -0
  117. package/src/keyboard.ts +97 -97
  118. package/src/menus.test.ts +620 -0
  119. package/src/menus.ts +554 -0
  120. package/src/named-views.coverage.test.ts +210 -0
  121. package/src/named-views.ts +48 -0
  122. package/src/row-resize.test.ts +369 -0
  123. package/src/row-resize.ts +171 -0
  124. package/src/scroll-sync.test.ts +330 -0
  125. package/src/scroll-sync.ts +216 -0
  126. package/src/selection.test.ts +722 -0
  127. package/src/selection.ts +545 -0
  128. package/src/server-data-source.coverage.test.ts +180 -0
  129. package/src/spreadsheet.test.ts +445 -0
  130. package/src/spreadsheet.ts +246 -0
  131. package/src/summaries.ts +204 -0
  132. package/src/sv-grid-scrollbar.ts +21 -2
  133. package/src/svgrid-wrapper.types.ts +12 -1
  134. package/src/svgrid.behavior.test.ts +22 -0
  135. package/src/svgrid.comments-autocomplete.test.ts +112 -0
  136. package/src/svgrid.context-menu.test.ts +126 -0
  137. package/src/svgrid.interaction.test.ts +30 -0
  138. package/src/svgrid.new-features.wrapper.test.ts +65 -4
  139. package/src/svgrid.wrapper.test.ts +27 -1
  140. package/src/test-setup.ts +9 -6
  141. package/src/virtualization/scroll-scaling.test.ts +148 -0
  142. package/src/virtualization/scroll-scaling.ts +121 -0
  143. package/src/virtualization/svelte-virtualizer.svelte.ts +2 -0
  144. package/src/virtualization/virtualizer.ts +26 -0
@@ -0,0 +1,1709 @@
1
+ /*
2
+ * SvGrid component styles. Extracted from SvGrid.svelte's <style> block so the
3
+ * component file stays focused on logic + markup. These are plain (global) CSS
4
+ * rules - every selector is a unique .sv-grid-* class that maps to a real class
5
+ * on the grid's elements, so behaviour is identical to the former scoped block.
6
+ * Imported for its side effect by SvGrid.svelte; the WC build inlines it and
7
+ * app bundlers include it via the import.
8
+ */
9
+ /* Root wrapper: holds the shell + pager + any overlays (find, tooltips
10
+ * pinned to the root). Position-relative so absolutely-positioned
11
+ * overlays (the find-in-grid toolbar) anchor to the grid, not the
12
+ * viewport. */
13
+ .sv-grid-root {
14
+ position: relative;
15
+ }
16
+ .sv-grid-sr-only {
17
+ position: absolute;
18
+ width: 1px;
19
+ height: 1px;
20
+ overflow: hidden;
21
+ clip: rect(0 0 0 0);
22
+ white-space: nowrap;
23
+ }
24
+ .sv-grid-loading-overlay {
25
+ position: absolute;
26
+ inset: 0;
27
+ z-index: 18;
28
+ pointer-events: auto;
29
+ background: color-mix(in srgb, var(--sg-bg, #fff) 35%, transparent);
30
+ }
31
+ /* Indeterminate top progress bar - the "something is happening" signal
32
+ that keeps the current rows visible underneath (no flash). */
33
+ .sv-grid-loading-bar {
34
+ position: absolute;
35
+ top: 0;
36
+ left: 0;
37
+ right: 0;
38
+ height: 3px;
39
+ overflow: hidden;
40
+ background: color-mix(in srgb, var(--sg-accent, #2563eb) 18%, transparent);
41
+ }
42
+ .sv-grid-loading-bar::before {
43
+ content: '';
44
+ position: absolute;
45
+ inset: 0;
46
+ width: 40%;
47
+ background: var(--sg-accent, #2563eb);
48
+ animation: sv-grid-loading-slide 1.1s ease-in-out infinite;
49
+ }
50
+ @keyframes sv-grid-loading-slide {
51
+ 0% { transform: translateX(-100%); }
52
+ 100% { transform: translateX(350%); }
53
+ }
54
+ /* First-load skeleton: shimmer placeholder rows under the header. */
55
+ .sv-grid-skeleton {
56
+ position: absolute;
57
+ top: var(--sg-thead-h, 40px);
58
+ left: 0;
59
+ right: 0;
60
+ padding: 0;
61
+ overflow: hidden;
62
+ }
63
+ .sv-grid-skeleton-row {
64
+ display: flex;
65
+ height: var(--sg-pinned-row-h, 36px);
66
+ align-items: center;
67
+ border-bottom: 1px solid var(--sg-border, #e2e8f0);
68
+ }
69
+ .sv-grid-skeleton-cell {
70
+ flex-shrink: 0;
71
+ padding: 0 12px;
72
+ box-sizing: border-box;
73
+ }
74
+ .sv-grid-skeleton-bar {
75
+ display: block;
76
+ height: 10px;
77
+ width: 70%;
78
+ border-radius: 4px;
79
+ background: linear-gradient(
80
+ 90deg,
81
+ color-mix(in srgb, var(--sg-muted, #94a3b8) 18%, transparent) 25%,
82
+ color-mix(in srgb, var(--sg-muted, #94a3b8) 32%, transparent) 50%,
83
+ color-mix(in srgb, var(--sg-muted, #94a3b8) 18%, transparent) 75%
84
+ );
85
+ background-size: 200% 100%;
86
+ animation: sv-grid-shimmer 1.3s linear infinite;
87
+ }
88
+ @keyframes sv-grid-shimmer {
89
+ 0% { background-position: 200% 0; }
90
+ 100% { background-position: -200% 0; }
91
+ }
92
+
93
+ .sv-grid-tool-panel-toggle {
94
+ position: absolute;
95
+ top: 6px;
96
+ right: 6px;
97
+ z-index: 21;
98
+ display: inline-flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ width: 30px;
102
+ height: 30px;
103
+ border: 1px solid var(--sg-border, #e2e8f0);
104
+ border-radius: var(--sg-radius, 6px);
105
+ background: var(--sg-bg, #fff);
106
+ color: var(--sg-muted, #64748b);
107
+ cursor: pointer;
108
+ }
109
+ .sv-grid-tool-panel-toggle:hover,
110
+ .sv-grid-tool-panel-toggle.is-open {
111
+ color: var(--sg-accent, #2563eb);
112
+ border-color: var(--sg-accent, #2563eb);
113
+ }
114
+ .sv-grid-tool-panel {
115
+ position: absolute;
116
+ top: 0;
117
+ right: 0;
118
+ bottom: 0;
119
+ z-index: 20;
120
+ width: 250px;
121
+ display: flex;
122
+ flex-direction: column;
123
+ background: var(--sg-bg, #fff);
124
+ border-left: 1px solid var(--sg-border, #e2e8f0);
125
+ box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
126
+ }
127
+ .sv-grid-tool-panel-head {
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: space-between;
131
+ padding: 8px 12px;
132
+ font-size: 12px;
133
+ font-weight: 700;
134
+ text-transform: uppercase;
135
+ letter-spacing: 0.05em;
136
+ color: var(--sg-muted, #64748b);
137
+ border-bottom: 1px solid var(--sg-border, #e2e8f0);
138
+ }
139
+ .sv-grid-tool-panel-close {
140
+ border: 0;
141
+ background: transparent;
142
+ color: var(--sg-muted, #64748b);
143
+ font-size: 14px;
144
+ cursor: pointer;
145
+ }
146
+ .sv-grid-tool-panel-list {
147
+ list-style: none;
148
+ margin: 0;
149
+ padding: 6px;
150
+ overflow-y: auto;
151
+ flex: 1;
152
+ }
153
+ .sv-grid-tool-panel-item {
154
+ display: flex;
155
+ align-items: center;
156
+ justify-content: space-between;
157
+ gap: 6px;
158
+ padding: 3px 6px;
159
+ border-radius: 5px;
160
+ }
161
+ .sv-grid-tool-panel-item:hover {
162
+ background: var(--sg-row-hover-bg, rgba(148, 163, 184, 0.1));
163
+ }
164
+ .sv-grid-tool-panel-vis {
165
+ display: flex;
166
+ align-items: center;
167
+ gap: 8px;
168
+ flex: 1;
169
+ min-width: 0;
170
+ font-size: 13px;
171
+ color: var(--sg-fg, #0f172a);
172
+ cursor: pointer;
173
+ }
174
+ .sv-grid-tool-panel-vis input {
175
+ accent-color: var(--sg-accent, #2563eb);
176
+ }
177
+ .sv-grid-tool-panel-name {
178
+ overflow: hidden;
179
+ text-overflow: ellipsis;
180
+ white-space: nowrap;
181
+ }
182
+ .sv-grid-tool-panel-actions {
183
+ display: inline-flex;
184
+ gap: 2px;
185
+ flex-shrink: 0;
186
+ }
187
+ .sv-grid-tool-panel-btn {
188
+ width: 22px;
189
+ height: 22px;
190
+ border: 0;
191
+ border-radius: 4px;
192
+ background: transparent;
193
+ color: var(--sg-muted, #64748b);
194
+ font-size: 13px;
195
+ cursor: pointer;
196
+ }
197
+ .sv-grid-tool-panel-btn:hover:not(:disabled) {
198
+ background: var(--sg-row-hover-bg, rgba(148, 163, 184, 0.18));
199
+ color: var(--sg-fg, #0f172a);
200
+ }
201
+ .sv-grid-tool-panel-btn.is-active {
202
+ color: var(--sg-accent, #2563eb);
203
+ }
204
+ .sv-grid-tool-panel-btn:disabled {
205
+ opacity: 0.35;
206
+ cursor: default;
207
+ }
208
+ /* Root wrapper fill mode: only takes effect when consumer passes
209
+ * containerHeight='100%'. The shell becomes a flex item that expands
210
+ * while the pager keeps its natural height. */
211
+ .sv-grid-root-fill {
212
+ display: flex;
213
+ flex-direction: column;
214
+ height: 100%;
215
+ min-height: 0;
216
+ }
217
+ .sv-grid-root-fill > .sv-grid-shell {
218
+ flex: 1 1 0;
219
+ min-height: 0;
220
+ height: auto !important;
221
+ }
222
+
223
+ .sv-grid-shell {
224
+ position: relative;
225
+ border-bottom: 1px solid var(--sg-border, #cbd5e1);
226
+ }
227
+
228
+ .sv-grid-table {
229
+ table-layout: fixed;
230
+ border-collapse: separate;
231
+ border-spacing: 0;
232
+ }
233
+
234
+ .sv-grid-table:focus {
235
+ outline: none;
236
+ }
237
+
238
+ .sv-grid-column,
239
+ .sv-grid-cell {
240
+ box-sizing: border-box;
241
+ overflow: hidden;
242
+ text-overflow: ellipsis;
243
+ white-space: nowrap;
244
+ background: var(--sg-bg, #fff);
245
+ color: var(--sg-fg, #0f172a);
246
+ user-select: none;
247
+ }
248
+ /* Only the active cell + the cell hosting the fill handle become a
249
+ positioning context (so the absolutely-positioned handle anchors
250
+ to the cell box). Adding `position: relative` to EVERY cell paints
251
+ each one as its own layout box and noticeably slows vertical
252
+ scroll on dense grids - keep it scoped. Sticky / pinned cells are
253
+ already positioning contexts via `position: sticky`. */
254
+ .sv-grid-cell-active,
255
+ .sv-grid-cell-has-fill-handle {
256
+ position: relative;
257
+ }
258
+ /* The cell that owns the fill handle gets overflow: visible so the
259
+ handle isn't clipped - chip cells in particular pack pills right up
260
+ to the cell edges, and with overflow: hidden the handle's hover
261
+ scale-up + the handle itself could be partially eaten by them. */
262
+ .sv-grid-cell-has-fill-handle {
263
+ overflow: visible;
264
+ }
265
+
266
+ /* Full-width expandable detail row (props.isDetailRow / renderDetailRow).
267
+ Overrides the normal single-line cell clamps so the panel spans every
268
+ column and grows to its natural height. Pair with virtualization={false}
269
+ so the variable height isn't fought by the fixed-row-height virtualizer.
270
+ These rules sit AFTER `.sv-grid-cell` so they win at equal specificity. */
271
+ .sv-grid-detail-row {
272
+ height: auto !important;
273
+ }
274
+ .sv-grid-detail-cell {
275
+ overflow: visible;
276
+ text-overflow: clip;
277
+ white-space: normal;
278
+ height: auto;
279
+ padding: 0;
280
+ background: var(--sg-bg, #fff);
281
+ user-select: text;
282
+ }
283
+
284
+ /* Pinned columns read as "frozen" via three layered cues:
285
+ 1. A distinct tint (slightly stronger than the header) so the
286
+ pinned strip is visible even before you scroll.
287
+ 2. A solid 1px divider on the inside edge (toward the scrollable
288
+ middle) and a soft drop shadow extending into the scroll area.
289
+ 3. A thin accent stripe on the outermost edge that turns on when
290
+ the grid scrolls past the pin - a familiar Excel-style cue.
291
+ The shadow direction flips based on which side is pinned so it
292
+ always points toward the scrollable middle. */
293
+ .sv-grid-cell[data-pinned="left"],
294
+ .sv-grid-column[data-pinned="left"] {
295
+ background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
296
+ box-shadow:
297
+ inset -1px 0 0 var(--sg-pinned-divider, var(--sg-border, #cbd5e1)),
298
+ 8px 0 12px -6px rgba(15, 23, 42, 0.22);
299
+ }
300
+ .sv-grid-cell[data-pinned="right"],
301
+ .sv-grid-column[data-pinned="right"] {
302
+ background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
303
+ box-shadow:
304
+ inset 1px 0 0 var(--sg-pinned-divider, var(--sg-border, #cbd5e1)),
305
+ -8px 0 12px -6px rgba(15, 23, 42, 0.22);
306
+ }
307
+ /* Header row pinned cells get a slightly darker variant + bolder font
308
+ so the frozen header itself reads as part of the grid chrome. */
309
+ .sv-grid-head .sv-grid-column[data-pinned="left"],
310
+ .sv-grid-head .sv-grid-column[data-pinned="right"] {
311
+ background: var(--sg-pinned-header-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 60%, var(--sg-accent, #2563eb) 14%));
312
+ font-weight: 600;
313
+ }
314
+ /* Zebra rows: keep the pinned tint visible (don't let the row-alt
315
+ background bleed through) by re-painting the pinned cells. */
316
+ .sv-grid-row-alt > .sv-grid-cell[data-pinned] {
317
+ background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
318
+ }
319
+ /* When the row is selected, keep the pinned tint but layer the
320
+ selection color over it so the row still reads as selected. */
321
+ .sv-grid-row-selected > .sv-grid-cell[data-pinned] {
322
+ background:
323
+ linear-gradient(
324
+ color-mix(in srgb, var(--sg-selection-bg, #dbeafe) 65%, transparent),
325
+ color-mix(in srgb, var(--sg-selection-bg, #dbeafe) 65%, transparent)
326
+ ),
327
+ var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
328
+ }
329
+ /* Hovered row keeps the pinned tint distinguishable from the hover. */
330
+ .sv-grid-row:hover > .sv-grid-cell[data-pinned] {
331
+ background:
332
+ linear-gradient(
333
+ color-mix(in srgb, var(--sg-row-hover-bg, #eef2ff) 55%, transparent),
334
+ color-mix(in srgb, var(--sg-row-hover-bg, #eef2ff) 55%, transparent)
335
+ ),
336
+ var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
337
+ }
338
+
339
+ .sv-grid-column {
340
+ position: relative;
341
+ }
342
+
343
+ /* Column alignment via data-align attribute (see getColumnAlign helper).
344
+ * For body cells text-align is enough; for headers the label lives inside
345
+ * a flex container so we adjust justify-content on the sort button.
346
+ * Padding is biased to the aligned side: left-aligned text gets a 7px
347
+ * left gap; right-aligned numbers/dates get a 7px right gap. */
348
+ .sv-grid-cell[data-align="left"],
349
+ .sv-grid-column[data-align="left"] {
350
+ padding-left: var(--sg-cell-px, 7px);
351
+ }
352
+ .sv-grid-cell[data-align="right"] {
353
+ text-align: right;
354
+ padding-right: var(--sg-cell-px, 7px);
355
+ }
356
+ .sv-grid-cell[data-align="center"] {
357
+ text-align: center;
358
+ }
359
+ .sv-grid-column[data-align="right"] {
360
+ padding-right: var(--sg-cell-px, 7px);
361
+ }
362
+ .sv-grid-column[data-align="right"] .sv-grid-header-sort {
363
+ justify-content: flex-end;
364
+ }
365
+ .sv-grid-column[data-align="center"] .sv-grid-header-sort {
366
+ justify-content: center;
367
+ }
368
+
369
+ .sv-grid-resize-handle {
370
+ position: absolute;
371
+ top: 0;
372
+ right: 0;
373
+ width: 5px;
374
+ height: 100%;
375
+ cursor: col-resize;
376
+ user-select: none;
377
+ z-index: 2;
378
+ transition: background-color 100ms ease;
379
+ }
380
+
381
+ .sv-grid-resize-handle:hover,
382
+ .sv-grid-resize-handle.is-resizing {
383
+ background: rgba(11, 99, 243, 0.3);
384
+ }
385
+
386
+ /* Row resize handle (counterpart of the column resize handle). Lives
387
+ at the bottom of the row-header gutter cell; the consumer opts in
388
+ by attaching the `rowResize` action and setting
389
+ `cellClass: 'sv-row-gutter'` on the row-header column. */
390
+ .sv-grid-row-resize-handle {
391
+ /* Geometry + interactivity are also set inline by the rowResize
392
+ action so the strip works even if this stylesheet hasn't been
393
+ parsed yet. This rule only owns the hover/active tint. */
394
+ transition: background-color 100ms ease;
395
+ }
396
+ .sv-grid-row-resize-handle:hover,
397
+ .sv-grid-row-resize-handle.is-resizing {
398
+ background: rgba(11, 99, 243, 0.3);
399
+ }
400
+
401
+ .sv-grid-head {
402
+ position: sticky;
403
+ top: 0;
404
+ /* Above pinned body cells (z-index 30 via cellPinStyle). Without
405
+ this, when a row scrolls partially behind the sticky header,
406
+ its pinned cells (left + right) paint OVER the header while the
407
+ middle non-pinned cells are correctly hidden behind it, leaving
408
+ "floating" symbol / pnl cells at the top of the viewport. */
409
+ z-index: 35;
410
+ background: var(--sg-header-bg, #f5f7fb);
411
+ }
412
+
413
+ /* Header drag-to-reorder. The `draggable` attribute is only set
414
+ * when `enableColumnReorder` is true, so the cursor and drop
415
+ * indicators only show in that mode. */
416
+ .sv-grid-column[draggable="true"] { cursor: grab; }
417
+ .sv-grid-column[draggable="true"]:active { cursor: grabbing; }
418
+ .sv-grid-column.is-dragging { opacity: 0.55; }
419
+ .sv-grid-column.is-drag-target-before,
420
+ .sv-grid-column.is-drag-target-after {
421
+ position: relative;
422
+ }
423
+ .sv-grid-column.is-drag-target-before::before,
424
+ .sv-grid-column.is-drag-target-after::after {
425
+ content: "";
426
+ position: absolute; top: 4px; bottom: 4px; width: 3px;
427
+ background: linear-gradient(180deg, #6366f1, #8b5cf6);
428
+ border-radius: 2px;
429
+ box-shadow: 0 0 6px #6366f1;
430
+ pointer-events: none;
431
+ z-index: 7;
432
+ animation: sg-drop-pulse 700ms ease-in-out infinite alternate;
433
+ }
434
+ .sv-grid-column.is-drag-target-before::before { left: -2px; }
435
+ .sv-grid-column.is-drag-target-after::after { right: -2px; }
436
+ @keyframes sg-drop-pulse { from { opacity: 0.55; } to { opacity: 1; } }
437
+
438
+ /* Pinned rows (top / bottom). Each cell sticks individually so the
439
+ * row tracks scroll on every browser. Top rows stick below the sticky
440
+ * thead via --sg-thead-h; bottom rows stick to the bottom of the
441
+ * scroll container. Tinted background distinguishes them from
442
+ * regular rows. */
443
+ .sv-grid-pinned-row td {
444
+ position: sticky;
445
+ z-index: 4;
446
+ background: var(--sg-pinned-bg, color-mix(in oklab, #6366f1 4%, #ffffff));
447
+ border-bottom: 1px solid var(--sg-pinned-border, color-mix(in oklab, #6366f1 24%, transparent));
448
+ font-weight: 600;
449
+ }
450
+ .sv-grid-pinned-row-top td { top: var(--sg-thead-h, 36px); }
451
+ .sv-grid-pinned-row-bottom td { bottom: 0; border-top: 1px solid var(--sg-pinned-border, color-mix(in oklab, #6366f1 24%, transparent)); }
452
+ /* Stack multiple pinned-top rows: row 1 stops at thead, row 2 stops
453
+ * at thead + 36px, etc. The component itself sets --sg-pinned-top-h
454
+ * to the current pinned-top stack height via $effect. */
455
+ .sv-grid-pinned-row-top[data-pinned-index="1"] td { top: calc(var(--sg-thead-h, 36px) + var(--sg-pinned-row-h, 32px)); }
456
+ .sv-grid-pinned-row-top[data-pinned-index="2"] td { top: calc(var(--sg-thead-h, 36px) + var(--sg-pinned-row-h, 32px) * 2); }
457
+ .sv-grid-pinned-row-top[data-pinned-index="3"] td { top: calc(var(--sg-thead-h, 36px) + var(--sg-pinned-row-h, 32px) * 3); }
458
+ .sv-grid-pinned-row-bottom[data-pinned-index="1"] td { bottom: var(--sg-pinned-row-h, 32px); }
459
+ .sv-grid-pinned-row-bottom[data-pinned-index="2"] td { bottom: calc(var(--sg-pinned-row-h, 32px) * 2); }
460
+ .sv-grid-pinned-row-bottom[data-pinned-index="3"] td { bottom: calc(var(--sg-pinned-row-h, 32px) * 3); }
461
+ /* Sticky-left columns keep their left position; just override their
462
+ * z so they sit above non-pinned pinned-row cells. */
463
+ .sv-grid-pinned-row td[data-pinned] { z-index: 5; }
464
+
465
+ /* Group header rows for multi-level (pivot-style) headers. Sits above
466
+ * the standard leaf header row when the column tree has nesting. */
467
+ .sv-grid-group-header-row {
468
+ background: var(--sg-header-bg, #eef2f8);
469
+ }
470
+ .sv-grid-group-header-cell {
471
+ box-sizing: border-box;
472
+ border-bottom: 1px solid var(--sg-border, #d8dee9);
473
+ border-right: 1px solid var(--sg-border, #e2e8f0);
474
+ text-align: center;
475
+ padding: 4px 8px;
476
+ font-weight: 700;
477
+ font-size: 11.5px;
478
+ color: var(--sg-header-fg, #475569);
479
+ text-transform: uppercase;
480
+ letter-spacing: 0.04em;
481
+ }
482
+ .sv-grid-group-header-placeholder {
483
+ background: transparent;
484
+ border-right-color: transparent;
485
+ }
486
+ .sv-grid-group-header-label {
487
+ display: inline-block;
488
+ max-width: 100%;
489
+ overflow: hidden;
490
+ text-overflow: ellipsis;
491
+ white-space: nowrap;
492
+ }
493
+
494
+ .sv-grid-foot {
495
+ position: sticky;
496
+ bottom: 0;
497
+ z-index: 6;
498
+ background: var(--sg-header-bg, #f5f7fb);
499
+ }
500
+
501
+ .sv-grid-container {
502
+ scrollbar-width: auto;
503
+ -ms-overflow-style: auto;
504
+ /* Trap wheel scroll inside the grid. Without this, hitting the top
505
+ * or bottom edge of the grid lets the wheel event chain to the
506
+ * outer page (or any scrollable ancestor), so what feels like one
507
+ * wheel notch keeps scrolling something else - the "starts and
508
+ * doesn't stop" symptom. `contain` cancels the chained scroll
509
+ * but still bounces normally inside the grid. */
510
+ overscroll-behavior: contain;
511
+ /* Disable scroll anchoring. The virtualizer changes the top-spacer
512
+ * height every time the visible row window slides - modern browsers
513
+ * (default `overflow-anchor: auto`) react by quietly adjusting
514
+ * `scrollTop` to keep the visible content stable. That adjustment
515
+ * fires another `scroll` event, which fires `onBodyScroll`, which
516
+ * re-runs the virtualizer, which shifts the spacer again, which
517
+ * adjusts `scrollTop` again - a self-sustaining loop that
518
+ * presents as "the grid keeps scrolling after the wheel stops."
519
+ * Turning anchoring off lets the virtualizer own the scroll
520
+ * position outright. */
521
+ overflow-anchor: none;
522
+ /* Tell the browser that the sticky thead occupies the top
523
+ `--sg-thead-h` pixels of the scroll container. `scrollIntoView`
524
+ and friends use this to avoid scrolling a row underneath the
525
+ sticky header - critical for Excel-style keyboard nav. */
526
+ scroll-padding-top: var(--sg-thead-h, 36px);
527
+ }
528
+
529
+ .sv-grid-container.sv-grid-container-custom-scrollbars {
530
+ scrollbar-width: none;
531
+ -ms-overflow-style: none;
532
+ }
533
+
534
+ .sv-grid-container.sv-grid-container-custom-scrollbars::-webkit-scrollbar {
535
+ display: none;
536
+ }
537
+
538
+ .sv-grid-scrollbar {
539
+ position: absolute;
540
+ /* Above pinned columns (z-index 30 via cellPinStyle) so a frozen
541
+ left/right column never paints over the custom scrollbar - that
542
+ was the bug behind "vertical scrollbar hidden under the frozen
543
+ column" in grids with a pinned column at the right edge. */
544
+ z-index: 40;
545
+ }
546
+
547
+ /* Scrollbars anchor to the inline-end edge so RTL flips them to the
548
+ * left automatically. `inset-inline-end` resolves to `right` in LTR
549
+ * and `left` in RTL, no manual override needed. */
550
+ .sv-grid-scrollbar-vertical {
551
+ top: 0;
552
+ inset-inline-end: 0;
553
+ width: 16px;
554
+ height: calc(100% - 16px);
555
+ }
556
+
557
+ .sv-grid-scrollbar-corner {
558
+ position: absolute;
559
+ top: 0;
560
+ inset-inline-end: 0;
561
+ width: 16px;
562
+ background: var(--sg-header-bg, #f5f7fb);
563
+ border-bottom: 1px solid rgba(15, 23, 42, 0.08);
564
+ /* Above pinned header cells (z-index 30) so the gap above the
565
+ vertical scrollbar stays clean over a frozen column. */
566
+ z-index: 41;
567
+ pointer-events: none;
568
+ }
569
+
570
+ .sv-grid-scrollbar-corner-br {
571
+ position: absolute;
572
+ inset-inline-end: 0;
573
+ bottom: 0;
574
+ width: 16px;
575
+ height: 16px;
576
+ background: var(--sg-header-bg, #eef2f8);
577
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
578
+ z-index: 42;
579
+ pointer-events: none;
580
+ }
581
+
582
+ .sv-grid-scrollbar-horizontal {
583
+ inset-inline-start: 0;
584
+ bottom: 0;
585
+ width: calc(100% - 16px);
586
+ height: 16px;
587
+ }
588
+
589
+ .sv-grid-selection-column,
590
+ .sv-grid-selection-cell {
591
+ text-align: center;
592
+ padding-inline: 6px;
593
+ position: sticky;
594
+ z-index: 4;
595
+ }
596
+
597
+ /* Row-number column: sticks to the left edge of the scroll viewport. */
598
+ .sv-grid-row-number-column,
599
+ .sv-grid-row-number-cell {
600
+ text-align: right;
601
+ padding-inline: 8px;
602
+ position: sticky;
603
+ left: 0;
604
+ z-index: 4;
605
+ color: var(--sg-muted, #64748b);
606
+ font-variant-numeric: tabular-nums;
607
+ }
608
+ .sv-grid-row-number-head {
609
+ color: inherit;
610
+ }
611
+
612
+ .sv-grid-filter-row-control {
613
+ display: flex;
614
+ flex-direction: row;
615
+ align-items: center;
616
+ gap: 4px;
617
+ }
618
+
619
+ .sv-grid-filter-operator {
620
+ flex: 2 1 0;
621
+ min-width: 0;
622
+ box-sizing: border-box;
623
+ }
624
+
625
+ .sv-grid-filter-value {
626
+ flex: 3 1 0;
627
+ min-width: 0;
628
+ box-sizing: border-box;
629
+ }
630
+
631
+ /* Brief glow used when the user clicks the funnel icon while the grid
632
+ is in row-filter mode - draws attention to where the input is so
633
+ the click isn't a no-op. */
634
+ .sv-grid-filter-value.sv-grid-filter-value-pulse {
635
+ animation: sv-grid-filter-pulse 700ms ease-out;
636
+ }
637
+ @keyframes sv-grid-filter-pulse {
638
+ 0% { box-shadow: 0 0 0 0 rgba(11, 99, 243, 0.55); }
639
+ 70% { box-shadow: 0 0 0 6px rgba(11, 99, 243, 0); }
640
+ 100% { box-shadow: 0 0 0 0 rgba(11, 99, 243, 0); }
641
+ }
642
+
643
+ .sv-grid-checkbox {
644
+ position: relative;
645
+ display: inline-flex;
646
+ align-items: center;
647
+ justify-content: center;
648
+ width: 16px;
649
+ height: 16px;
650
+ margin: 0 auto;
651
+ border: 1px solid var(--sg-input-border, #8794a8);
652
+ border-radius: 4px;
653
+ background: var(--sg-input-bg, #fff);
654
+ color: var(--sg-accent, #0b63f3);
655
+ cursor: pointer;
656
+ transition:
657
+ border-color 120ms ease,
658
+ background-color 120ms ease;
659
+ }
660
+
661
+ /* Color editor - native HTML color input filling the cell so the
662
+ swatch is clickable across the whole cell area, not just the tiny
663
+ OS default size. */
664
+ .sv-grid-cell-editor-color {
665
+ width: 100%;
666
+ height: 100%;
667
+ padding: 2px;
668
+ border: 0;
669
+ background: transparent;
670
+ cursor: pointer;
671
+ }
672
+ .sv-grid-cell-editor-color::-webkit-color-swatch-wrapper { padding: 0; }
673
+ .sv-grid-cell-editor-color::-webkit-color-swatch { border: 0; border-radius: 4px; }
674
+ .sv-grid-cell-editor-color::-moz-color-swatch { border: 0; border-radius: 4px; }
675
+
676
+ /* Rating editor - 5 clickable stars + clear button. Renders inline
677
+ in the cell when editorType="rating"; the readonly view renders a
678
+ filled-star count via the default text path (or a snippet cell). */
679
+ .sv-grid-rating-editor {
680
+ display: inline-flex;
681
+ align-items: center;
682
+ gap: 1px;
683
+ height: 100%;
684
+ }
685
+ .sv-grid-rating-star {
686
+ border: 0; background: transparent; cursor: pointer;
687
+ color: var(--sg-rating-empty, #cbd5e1);
688
+ font-size: 18px; line-height: 1;
689
+ padding: 0 1px;
690
+ transition: color 80ms ease, transform 80ms ease;
691
+ }
692
+ .sv-grid-rating-star-on { color: var(--sg-rating-on, #f59e0b); }
693
+ .sv-grid-rating-star:hover { color: var(--sg-rating-hover, #fbbf24); transform: scale(1.12); }
694
+ .sv-grid-rating-clear {
695
+ margin-left: 4px;
696
+ border: 0; background: transparent;
697
+ color: var(--sg-muted, #94a3b8);
698
+ cursor: pointer; font-size: 14px;
699
+ }
700
+ .sv-grid-rating-clear:hover { color: var(--sg-fg, #0f172a); }
701
+
702
+ .sv-grid-checkbox[aria-checked="true"],
703
+ .sv-grid-checkbox[aria-checked="mixed"] {
704
+ border-color: var(--sg-accent, #0b63f3);
705
+ background: var(--sg-selection-bg, #eaf2ff);
706
+ }
707
+
708
+ .sv-grid-checkbox[aria-checked="true"]::after {
709
+ content: "";
710
+ width: 5px;
711
+ height: 9px;
712
+ border-right: 2px solid currentColor;
713
+ border-bottom: 2px solid currentColor;
714
+ transform: rotate(40deg) translate(-1px, -1px);
715
+ }
716
+
717
+ .sv-grid-checkbox[aria-checked="mixed"]::after {
718
+ content: "";
719
+ width: 8px;
720
+ height: 2px;
721
+ border-radius: 1px;
722
+ background: currentColor;
723
+ }
724
+
725
+ .sv-grid-checkbox:focus-visible {
726
+ outline: 2px solid var(--sg-accent, #0b63f3);
727
+ outline-offset: 1px;
728
+ }
729
+
730
+ .sv-grid-checkbox-readonly {
731
+ cursor: default;
732
+ pointer-events: none;
733
+ }
734
+
735
+ .sv-grid-cell-active,
736
+ .sv-grid-cell-editing {
737
+ position: relative;
738
+ /* High enough to sit above pinned-column stacking contexts (z=4) so the
739
+ list/chips popover overlays adjacent cells instead of being clipped. */
740
+ z-index: 20;
741
+ /* `box-shadow: inset` is bound to the cell's own box, so the ring
742
+ clips cleanly with the cell when it's partially scrolled out of
743
+ view (and shows up consistently at the right edge of a virtualized
744
+ window). The previous `outline + outline-offset: -2px` rendered at
745
+ the wrong position on clipped cells in some browsers - it's drawn
746
+ outside the layout box, so the negative offset's effect was
747
+ inconsistent at scroll boundaries. */
748
+ box-shadow: inset 0 0 0 2px var(--sg-accent, #0b63f3);
749
+ outline: none;
750
+ /* Let list/chips popouts extend past the cell box (default cells have
751
+ overflow: hidden so the chips picker would otherwise be clipped). */
752
+ overflow: visible;
753
+ }
754
+
755
+ /* Excel-style fill handle: a 7×7 blue square anchored to the bottom-
756
+ right corner of the active cell or selection range. The parent
757
+ `.sv-grid-cell` is `position: relative` (sticky cells override
758
+ that with sticky - which is also a positioning context), so the
759
+ handle anchors to the cell box. */
760
+ /* Excel-style per-cell note indicator. A small triangle in the top-
761
+ * right corner that, when hovered, shows the note tooltip. The
762
+ * triangle IS the hot-zone (12×12 square clipped to a triangle via
763
+ * border tricks); a transparent invisible square on top widens the
764
+ * hit target a little so it's not painful to hit. */
765
+ .sv-grid-cell-note-corner {
766
+ position: absolute;
767
+ top: 0; right: 0;
768
+ width: 12px; height: 12px;
769
+ /* Triangle: 0,0 → 12,0 → 12,12 */
770
+ background:
771
+ linear-gradient(45deg, transparent 50%, var(--sg-note-corner, #f59e0b) 50%);
772
+ cursor: help;
773
+ z-index: 6;
774
+ }
775
+ /* Slightly larger invisible hit area so users don't have to land on
776
+ a 6×6 pixel triangle. */
777
+ .sv-grid-cell-note-corner::before {
778
+ content: '';
779
+ position: absolute;
780
+ inset: -3px -3px 0 0;
781
+ }
782
+
783
+ .sv-grid-fill-handle {
784
+ position: absolute;
785
+ /* Sit fully INSIDE the cell box so `overflow: hidden` doesn't clip
786
+ most of the handle. Previously the handle stuck 3px outside the
787
+ cell and the visible 4×4 corner was nearly unclickable - especially
788
+ on chip cells where pills filled the bottom edge. */
789
+ bottom: 0;
790
+ right: 0;
791
+ width: 9px;
792
+ height: 9px;
793
+ background: var(--sg-accent, #0b63f3);
794
+ border: 1px solid var(--sg-bg, #ffffff);
795
+ box-sizing: border-box;
796
+ cursor: crosshair;
797
+ z-index: 15;
798
+ touch-action: none;
799
+ }
800
+ .sv-grid-fill-handle:hover {
801
+ transform: scale(1.3);
802
+ transform-origin: bottom right;
803
+ }
804
+
805
+ /* Fill-preview overlay paints a dashed accent border on the cells the
806
+ user is about to fill. Source cells (still in the selection range)
807
+ keep their normal range styling. */
808
+ .sv-grid-cell[data-fill-preview="true"] {
809
+ box-shadow: inset 0 0 0 2px rgba(11, 99, 243, 0.5);
810
+ background: rgba(11, 99, 243, 0.08);
811
+ }
812
+
813
+ .sv-grid-cell-editing {
814
+ padding: 0;
815
+ }
816
+
817
+ /* The four CSS variables let us compose a single box-shadow that draws the
818
+ selection rectangle outline only on the cells that sit on its edges. */
819
+ .sv-grid-cell[data-selected-range="true"] {
820
+ background: var(--sg-selection-bg, #eef4ff);
821
+ --sv-range-top: 0 0 0 transparent;
822
+ --sv-range-bottom: 0 0 0 transparent;
823
+ --sv-range-left: 0 0 0 transparent;
824
+ --sv-range-right: 0 0 0 transparent;
825
+ box-shadow: var(--sv-range-top), var(--sv-range-bottom),
826
+ var(--sv-range-left), var(--sv-range-right);
827
+ }
828
+
829
+ /* Selection-range edges as inset box-shadows. We tried `border-*: 2px
830
+ solid` to dodge the 1px-notch artifact at cell boundaries, but
831
+ border width changes force a full table reflow on every selection
832
+ change - catastrophic during keyboard nav (every arrow key pressed
833
+ re-flows ~30 visible rows + their neighbours under border-collapse).
834
+ Box-shadow inset paints on the compositor only - no reflow. */
835
+ .sv-grid-cell[data-range-top="true"] {
836
+ --sv-range-top: inset 0 2px 0 var(--sg-accent, #0b63f3);
837
+ }
838
+ .sv-grid-cell[data-range-bottom="true"] {
839
+ --sv-range-bottom: inset 0 -2px 0 var(--sg-accent, #0b63f3);
840
+ }
841
+ .sv-grid-cell[data-range-left="true"] {
842
+ --sv-range-left: inset 2px 0 0 var(--sg-accent, #0b63f3);
843
+ }
844
+ .sv-grid-cell[data-range-right="true"] {
845
+ --sv-range-right: inset -2px 0 0 var(--sg-accent, #0b63f3);
846
+ }
847
+
848
+ /* Lift edge cells above their neighbours so the inset shadow renders
849
+ above adjacent cells' (collapsed) borders rather than under them. */
850
+ .sv-grid-cell[data-range-top="true"],
851
+ .sv-grid-cell[data-range-bottom="true"],
852
+ .sv-grid-cell[data-range-left="true"],
853
+ .sv-grid-cell[data-range-right="true"],
854
+ .sv-grid-cell.sv-merge-edge-right,
855
+ .sv-grid-cell.sv-merge-edge-bottom {
856
+ position: relative;
857
+ z-index: 3;
858
+ }
859
+
860
+ /* Inherited selection-range edges from `spreadsheetLayout` merges.
861
+ Same inset-shadow technique - no layout impact when toggling. */
862
+ .sv-grid-cell.sv-merge-edge-right {
863
+ box-shadow: inset -2px 0 0 var(--sg-accent, #0b63f3);
864
+ }
865
+ .sv-grid-cell.sv-merge-edge-bottom {
866
+ box-shadow: inset 0 -2px 0 var(--sg-accent, #0b63f3);
867
+ }
868
+ .sv-grid-cell.sv-merge-in-range {
869
+ background: var(--sg-selection-bg, #eef4ff);
870
+ }
871
+
872
+ .sv-grid-cell-editor {
873
+ position: absolute;
874
+ inset: 0;
875
+ width: 100%;
876
+ height: 100%;
877
+ border: 0;
878
+ outline: none;
879
+ background: var(--sg-input-bg, #fff);
880
+ box-sizing: border-box;
881
+ font: inherit;
882
+ color: inherit;
883
+ padding: 0 8px;
884
+ }
885
+
886
+ /* Filter-related inputs share the same focused-cell outline treatment. */
887
+ .sv-grid-global-filter input:focus,
888
+ .sv-grid-filter-value:focus,
889
+ .sv-grid-column-filter:focus,
890
+ .sv-grid-menu-search:focus,
891
+ .sv-grid-menu-condition-value:focus,
892
+ .sv-grid-menu-operator:focus {
893
+ outline: 2px solid var(--sg-accent, #0b63f3);
894
+ outline-offset: -2px;
895
+ border-color: var(--sg-accent, #0b63f3);
896
+ }
897
+
898
+ .sv-grid-cell-editor-number,
899
+ .sv-grid-cell-editor-date,
900
+ .sv-grid-cell-editor-datetime {
901
+ width: 100%;
902
+ height: 100%;
903
+ }
904
+
905
+ /* List editor: native <select>. For multi-select it grows into a
906
+ small popup-style listbox that hangs over the cell. */
907
+ .sv-grid-cell-editor-list {
908
+ width: 100%;
909
+ height: 100%;
910
+ appearance: auto;
911
+ font: inherit;
912
+ color: inherit;
913
+ background: var(--sg-input-bg, #fff);
914
+ border: 0;
915
+ padding: 0 6px;
916
+ box-sizing: border-box;
917
+ }
918
+ .sv-grid-cell-editor-list[multiple] {
919
+ position: absolute;
920
+ top: 0;
921
+ left: 0;
922
+ right: 0;
923
+ height: auto;
924
+ min-height: 100%;
925
+ max-height: 220px;
926
+ z-index: 5;
927
+ padding: 4px;
928
+ border: 1px solid var(--sg-accent, #0b63f3);
929
+ background: var(--sg-input-bg, #fff);
930
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
931
+ }
932
+
933
+ /* Free-form chips editor (multi-value cell with removable tokens).
934
+ Absolutely positioned so it can grow downward past the row without
935
+ pushing other rows. Theme-aware background + accent border + drop
936
+ shadow so it reads as a popout above the next row, not as part of
937
+ it. The cell's outer outline is suppressed for this editor - this
938
+ popout already provides its own border. */
939
+ .sv-grid-cell-editor-chips {
940
+ position: absolute;
941
+ top: -1px;
942
+ left: -1px;
943
+ right: -1px;
944
+ min-height: calc(100% + 2px);
945
+ background: var(--sg-header-bg, var(--sg-bg, #ffffff));
946
+ color: var(--sg-fg, #0f172a);
947
+ padding: 4px 6px;
948
+ box-sizing: border-box;
949
+ z-index: 1000;
950
+ overflow: visible;
951
+ display: flex;
952
+ align-items: flex-start;
953
+ border: 1px solid var(--sg-accent, #2563eb);
954
+ border-radius: var(--sg-radius, 6px);
955
+ box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
956
+ }
957
+ /* When the chips editor is mounted, the parent .sv-grid-cell-editing
958
+ no longer needs its own outline - the popout already shows one. */
959
+ .sv-grid-cell-editing:has(.sv-grid-cell-editor-chips) {
960
+ outline: none;
961
+ }
962
+ .sv-grid-chips-row {
963
+ display: flex;
964
+ flex-wrap: wrap;
965
+ align-items: center;
966
+ gap: 4px;
967
+ width: 100%;
968
+ }
969
+ .sv-grid-chip-input {
970
+ flex: 1 1 80px;
971
+ min-width: 60px;
972
+ border: 0;
973
+ outline: none;
974
+ background: transparent;
975
+ font: inherit;
976
+ color: inherit;
977
+ padding: 2px 4px;
978
+ }
979
+ .sv-grid-chip-picker {
980
+ flex: 1 1 100px;
981
+ min-width: 80px;
982
+ font: inherit;
983
+ color: inherit;
984
+ background: var(--sg-bg, #fff);
985
+ border: 1px solid rgba(15, 23, 42, 0.15);
986
+ border-radius: 4px;
987
+ padding: 2px 4px;
988
+ }
989
+ .sv-grid-chip-commit {
990
+ font-size: 11px;
991
+ text-transform: uppercase;
992
+ letter-spacing: 0.04em;
993
+ color: #fff;
994
+ background: var(--sg-accent, #0b63f3);
995
+ border: 0;
996
+ border-radius: 4px;
997
+ padding: 3px 8px;
998
+ cursor: pointer;
999
+ }
1000
+ .sv-grid-chip-commit:hover {
1001
+ filter: brightness(1.1);
1002
+ }
1003
+
1004
+ /* Chip badge - used both in readonly cell display and inside the
1005
+ chips editor. Subtle neutral chrome, scales to the row's font size.
1006
+ Readonly chip rows stay on one line (the parent <td> has
1007
+ overflow: hidden, so overflowing chips get clipped - widen the
1008
+ column or open the editor to see all). */
1009
+ .sv-grid-chips-display {
1010
+ display: inline-flex;
1011
+ flex-wrap: nowrap;
1012
+ align-items: center;
1013
+ gap: 4px;
1014
+ max-width: 100%;
1015
+ vertical-align: middle;
1016
+ }
1017
+ .sv-grid-sparkline {
1018
+ display: inline-block;
1019
+ vertical-align: middle;
1020
+ overflow: visible;
1021
+ }
1022
+ /* Conditional formatting overlays - behind the cell text. */
1023
+ .sv-grid-cf-bg {
1024
+ position: absolute;
1025
+ inset: 0;
1026
+ z-index: 0;
1027
+ pointer-events: none;
1028
+ }
1029
+ .sv-grid-cf-bar {
1030
+ position: absolute;
1031
+ left: 0;
1032
+ top: 0;
1033
+ bottom: 0;
1034
+ z-index: 0;
1035
+ opacity: 0.85;
1036
+ border-radius: 0 2px 2px 0;
1037
+ pointer-events: none;
1038
+ }
1039
+ .sv-grid-cell-cf {
1040
+ position: relative;
1041
+ }
1042
+ .sv-grid-status-bar {
1043
+ display: flex;
1044
+ flex-wrap: wrap;
1045
+ align-items: center;
1046
+ gap: 18px;
1047
+ padding: 6px 14px;
1048
+ font-size: 12px;
1049
+ color: var(--sg-fg);
1050
+ background: var(--sg-header-bg, #f1f5f9);
1051
+ border: 1px solid var(--sg-border, #e2e8f0);
1052
+ border-top: 0;
1053
+ flex-shrink: 0;
1054
+ }
1055
+ .sv-grid-status-item {
1056
+ font-variant-numeric: tabular-nums;
1057
+ font-weight: 600;
1058
+ }
1059
+ .sv-grid-status-label {
1060
+ color: var(--sg-muted, #64748b);
1061
+ font-weight: 400;
1062
+ margin-right: 5px;
1063
+ }
1064
+ .sv-grid-cf-content {
1065
+ position: relative;
1066
+ z-index: 1;
1067
+ }
1068
+ .sv-grid-cf-icon {
1069
+ margin-right: 5px;
1070
+ font-size: 0.95em;
1071
+ }
1072
+ .sv-grid-chip {
1073
+ display: inline-flex;
1074
+ align-items: center;
1075
+ gap: 4px;
1076
+ padding: 2px 8px;
1077
+ font-size: 0.85em;
1078
+ line-height: 1.4;
1079
+ background: color-mix(in srgb, var(--sg-accent, #2563eb) 18%, transparent);
1080
+ color: var(--sg-fg, inherit);
1081
+ border-radius: 999px;
1082
+ border: 1px solid
1083
+ color-mix(in srgb, var(--sg-accent, #2563eb) 35%, transparent);
1084
+ white-space: nowrap;
1085
+ }
1086
+ .sv-grid-chip-removable {
1087
+ padding-right: 2px;
1088
+ }
1089
+ .sv-grid-chip-remove {
1090
+ display: inline-flex;
1091
+ align-items: center;
1092
+ justify-content: center;
1093
+ width: 16px;
1094
+ height: 16px;
1095
+ border: 0;
1096
+ border-radius: 999px;
1097
+ background: color-mix(in srgb, var(--sg-fg, #0f172a) 18%, transparent);
1098
+ color: inherit;
1099
+ font-size: 12px;
1100
+ line-height: 1;
1101
+ cursor: pointer;
1102
+ padding: 0;
1103
+ }
1104
+ .sv-grid-chip-remove:hover {
1105
+ background: rgba(220, 38, 38, 0.7);
1106
+ color: #fff;
1107
+ }
1108
+
1109
+ .sv-grid-icon {
1110
+ width: 1em;
1111
+ height: 1em;
1112
+ display: block;
1113
+ flex: none;
1114
+ }
1115
+
1116
+ .sv-grid-header-cell {
1117
+ display: flex;
1118
+ align-items: center;
1119
+ gap: 2px;
1120
+ width: 100%;
1121
+ min-width: 0;
1122
+ }
1123
+
1124
+ .sv-grid-header-sort {
1125
+ display: flex;
1126
+ align-items: center;
1127
+ gap: 4px;
1128
+ flex: 1 1 auto;
1129
+ min-width: 0;
1130
+ padding: 2px;
1131
+ border: 0;
1132
+ background: transparent;
1133
+ font: inherit;
1134
+ color: inherit;
1135
+ text-align: left;
1136
+ cursor: pointer;
1137
+ }
1138
+
1139
+ /* Custom (function-valued) header rendering. Behaves like the sort
1140
+ button but is a div so the consumer's snippet can contain its own
1141
+ interactive elements (menu buttons, dropdowns, etc) - button-in-
1142
+ button DOM is invalid. */
1143
+ .sv-grid-header-custom {
1144
+ display: flex;
1145
+ align-items: center;
1146
+ gap: 4px;
1147
+ flex: 1 1 auto;
1148
+ min-width: 0;
1149
+ padding: 2px;
1150
+ text-align: left;
1151
+ cursor: pointer;
1152
+ outline: none;
1153
+ }
1154
+
1155
+ .sv-grid-header-label {
1156
+ /* min-width:0 lets this flex item shrink below its text width so a long
1157
+ label truncates to a single line with an ellipsis instead of overflowing
1158
+ or forcing the header taller. flex:0 1 auto keeps the sort icon snug to
1159
+ the label rather than pushed to the far edge. */
1160
+ flex: 0 1 auto;
1161
+ min-width: 0;
1162
+ overflow: hidden;
1163
+ text-overflow: ellipsis;
1164
+ white-space: nowrap;
1165
+ }
1166
+
1167
+ .sv-grid-header-icon {
1168
+ display: inline-flex;
1169
+ flex: none;
1170
+ font-size: 13px;
1171
+ color: var(--sg-muted, #5b6b85);
1172
+ }
1173
+
1174
+ .sv-grid-header-icon-hint {
1175
+ opacity: 0;
1176
+ transition: opacity 120ms ease;
1177
+ }
1178
+
1179
+ .sv-grid-column:hover .sv-grid-header-icon-hint {
1180
+ opacity: 0.4;
1181
+ }
1182
+
1183
+ .sv-grid-header-icon-flag {
1184
+ color: var(--sg-accent, #0b63f3);
1185
+ }
1186
+
1187
+ .sv-grid-col-menu-btn {
1188
+ display: inline-flex;
1189
+ align-items: center;
1190
+ justify-content: center;
1191
+ flex: none;
1192
+ /* Collapse to zero width when invisible so a non-hovered column
1193
+ has no dead space at the right; the funnel (when an active
1194
+ filter is on) can then sit flush against the right edge.
1195
+ Hover / focus / open expand it back to 22px. */
1196
+ width: 0;
1197
+ height: 22px;
1198
+ padding: 0;
1199
+ border: 0;
1200
+ border-radius: 4px;
1201
+ background: transparent;
1202
+ color: var(--sg-muted, #5b6b85);
1203
+ font-size: 15px;
1204
+ cursor: pointer;
1205
+ opacity: 0;
1206
+ pointer-events: none;
1207
+ overflow: hidden;
1208
+ transition:
1209
+ width 140ms ease,
1210
+ opacity 140ms ease,
1211
+ background-color 120ms ease;
1212
+ }
1213
+
1214
+ .sv-grid-column:hover .sv-grid-col-menu-btn,
1215
+ .sv-grid-col-menu-btn.is-open,
1216
+ .sv-grid-col-menu-btn:focus-visible {
1217
+ width: 22px;
1218
+ opacity: 1;
1219
+ pointer-events: auto;
1220
+ }
1221
+
1222
+ /* The funnel filter button is a sibling .sv-grid-col-menu-btn that
1223
+ ALSO carries .sv-grid-col-filter-btn. When the column has an
1224
+ active filter (.is-active) the funnel stays visible at full size
1225
+ even when the column isn't hovered - so users can see at a glance
1226
+ which columns are filtered. Because the 3-dot menu still collapses
1227
+ to width: 0 in that state, the funnel ends up flush against the
1228
+ right edge. On hover, the menu expands back to 22px and pushes the
1229
+ funnel left naturally. */
1230
+ .sv-grid-col-filter-btn.is-active {
1231
+ width: 22px;
1232
+ opacity: 1;
1233
+ pointer-events: auto;
1234
+ }
1235
+
1236
+ .sv-grid-col-menu-btn:hover,
1237
+ .sv-grid-col-menu-btn.is-open {
1238
+ background: var(--sg-row-hover-bg, #e2e8f3);
1239
+ }
1240
+
1241
+ .sv-grid-filter-operator-btn {
1242
+ display: inline-flex;
1243
+ align-items: center;
1244
+ gap: 2px;
1245
+ flex: none;
1246
+ height: 24px;
1247
+ padding: 0 4px;
1248
+ border: 1px solid var(--sg-input-border, #cbd5e1);
1249
+ border-radius: 4px;
1250
+ background: var(--sg-input-bg, #fff);
1251
+ color: var(--sg-fg, #334155);
1252
+ font-size: 13px;
1253
+ cursor: pointer;
1254
+ }
1255
+
1256
+ .sv-grid-filter-operator-btn.is-open {
1257
+ border-color: var(--sg-accent, #0b63f3);
1258
+ }
1259
+
1260
+ .sv-grid-caret {
1261
+ display: inline-flex;
1262
+ font-size: 9px;
1263
+ color: var(--sg-muted, #94a3b8);
1264
+ }
1265
+
1266
+ .sv-grid-menu-backdrop {
1267
+ position: fixed;
1268
+ inset: 0;
1269
+ z-index: 900;
1270
+ background: transparent;
1271
+ }
1272
+
1273
+ .sv-grid-menu {
1274
+ position: fixed;
1275
+ z-index: 901;
1276
+ max-height: calc(100vh - 24px);
1277
+ overflow: auto;
1278
+ padding: 4px;
1279
+ background: var(--sg-bg, #fff);
1280
+ border: 1px solid var(--sg-border, #d6dee9);
1281
+ border-radius: 8px;
1282
+ box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
1283
+ font-size: 13px;
1284
+ color: var(--sg-fg, #1f2937);
1285
+ }
1286
+
1287
+ .sv-grid-column-menu {
1288
+ width: 260px;
1289
+ }
1290
+
1291
+ .sv-grid-operator-menu {
1292
+ width: 184px;
1293
+ }
1294
+
1295
+ .sv-grid-context-menu {
1296
+ min-width: 180px;
1297
+ }
1298
+
1299
+ .sv-grid-comment-editor {
1300
+ width: 240px;
1301
+ padding: 8px;
1302
+ }
1303
+ .sv-grid-comment-textarea {
1304
+ width: 100%;
1305
+ resize: vertical;
1306
+ min-height: 60px;
1307
+ padding: 6px 8px;
1308
+ border: 1px solid var(--sg-input-border, #cbd5e1);
1309
+ border-radius: 4px;
1310
+ background: var(--sg-input-bg, #fff);
1311
+ color: var(--sg-fg, #0f172a);
1312
+ font: inherit;
1313
+ font-size: 13px;
1314
+ outline: none;
1315
+ }
1316
+ .sv-grid-comment-textarea:focus {
1317
+ border-color: var(--sg-accent, #6366f1);
1318
+ }
1319
+ .sv-grid-comment-actions {
1320
+ display: flex;
1321
+ align-items: center;
1322
+ gap: 6px;
1323
+ margin-top: 8px;
1324
+ }
1325
+ .sv-grid-comment-spacer {
1326
+ flex: 1 1 auto;
1327
+ }
1328
+ .sv-grid-comment-actions button {
1329
+ padding: 4px 10px;
1330
+ border-radius: 4px;
1331
+ border: 1px solid var(--sg-border, #cbd5e1);
1332
+ background: var(--sg-bg, #fff);
1333
+ color: var(--sg-fg, #1f2937);
1334
+ font: inherit;
1335
+ font-size: 12px;
1336
+ cursor: pointer;
1337
+ }
1338
+ .sv-grid-comment-save {
1339
+ border-color: var(--sg-accent, #6366f1) !important;
1340
+ background: var(--sg-accent, #6366f1) !important;
1341
+ color: #fff !important;
1342
+ }
1343
+ .sv-grid-comment-remove {
1344
+ color: var(--sg-danger, #dc2626) !important;
1345
+ }
1346
+
1347
+ .sv-grid-menu-item {
1348
+ display: flex;
1349
+ align-items: center;
1350
+ gap: 8px;
1351
+ width: 100%;
1352
+ padding: 7px 10px;
1353
+ border: 0;
1354
+ border-radius: 5px;
1355
+ background: transparent;
1356
+ color: inherit;
1357
+ font: inherit;
1358
+ text-align: left;
1359
+ cursor: pointer;
1360
+ }
1361
+
1362
+ .sv-grid-menu-item:hover {
1363
+ background: var(--sg-row-hover-bg, #eef2f8);
1364
+ }
1365
+
1366
+ .sv-grid-menu-item[aria-checked="true"] {
1367
+ background: var(--sg-selection-bg, #eaf2ff);
1368
+ color: var(--sg-accent, #0b63f3);
1369
+ }
1370
+
1371
+ .sv-grid-menu-sep {
1372
+ height: 1px;
1373
+ margin: 4px 6px;
1374
+ background: var(--sg-border, #e6ebf2);
1375
+ }
1376
+
1377
+ .sv-grid-menu-filter {
1378
+ padding: 4px 6px 6px;
1379
+ }
1380
+
1381
+ .sv-grid-menu-filter-head {
1382
+ display: flex;
1383
+ align-items: center;
1384
+ gap: 6px;
1385
+ padding: 2px 0 6px;
1386
+ font-weight: 600;
1387
+ color: var(--sg-muted, #475569);
1388
+ }
1389
+
1390
+ .sv-grid-menu-search {
1391
+ width: 100%;
1392
+ height: 28px;
1393
+ box-sizing: border-box;
1394
+ margin-bottom: 6px;
1395
+ padding: 0 8px;
1396
+ border: 1px solid var(--sg-input-border, #cbd5e1);
1397
+ border-radius: 5px;
1398
+ font: inherit;
1399
+ }
1400
+
1401
+ .sv-grid-menu-filter-row {
1402
+ display: flex;
1403
+ gap: 4px;
1404
+ margin-bottom: 6px;
1405
+ }
1406
+
1407
+ .sv-grid-menu-operator-group {
1408
+ display: flex;
1409
+ gap: 2px;
1410
+ margin-bottom: 6px;
1411
+ }
1412
+
1413
+ .sv-grid-menu-operator-btn {
1414
+ flex: 1 1 0;
1415
+ display: inline-flex;
1416
+ align-items: center;
1417
+ justify-content: center;
1418
+ height: 28px;
1419
+ padding: 0;
1420
+ border: 1px solid var(--sg-input-border, #cbd5e1);
1421
+ border-radius: 4px;
1422
+ background: var(--sg-input-bg, #fff);
1423
+ color: var(--sg-fg, #475569);
1424
+ cursor: pointer;
1425
+ transition:
1426
+ background-color 100ms ease,
1427
+ color 100ms ease,
1428
+ border-color 100ms ease;
1429
+ }
1430
+
1431
+ .sv-grid-menu-operator-btn:hover {
1432
+ background: var(--sg-row-hover-bg, #eef2f8);
1433
+ }
1434
+
1435
+ .sv-grid-menu-operator-btn.is-active {
1436
+ background: var(--sg-accent, #0b63f3);
1437
+ border-color: var(--sg-accent, #0b63f3);
1438
+ color: #fff;
1439
+ }
1440
+
1441
+ .sv-grid-menu-condition-value {
1442
+ flex: 1 1 0;
1443
+ min-width: 0;
1444
+ height: 28px;
1445
+ box-sizing: border-box;
1446
+ padding: 0 8px;
1447
+ border: 1px solid var(--sg-input-border, #cbd5e1);
1448
+ border-radius: 5px;
1449
+ font: inherit;
1450
+ }
1451
+
1452
+ .sv-grid-facet-list {
1453
+ max-height: 200px;
1454
+ overflow: auto;
1455
+ border: 1px solid var(--sg-border, #eaeef4);
1456
+ border-radius: 5px;
1457
+ }
1458
+
1459
+ .sv-grid-facet {
1460
+ display: flex;
1461
+ align-items: center;
1462
+ gap: 8px;
1463
+ padding: 4px 8px;
1464
+ cursor: pointer;
1465
+ }
1466
+
1467
+ .sv-grid-facet:hover {
1468
+ background: var(--sg-row-hover-bg, #f4f6fa);
1469
+ }
1470
+
1471
+ .sv-grid-facet-all {
1472
+ border-bottom: 1px solid var(--sg-border, #eaeef4);
1473
+ font-weight: 600;
1474
+ }
1475
+
1476
+ .sv-grid-facet input {
1477
+ flex: none;
1478
+ }
1479
+
1480
+ .sv-grid-facet-label {
1481
+ overflow: hidden;
1482
+ text-overflow: ellipsis;
1483
+ white-space: nowrap;
1484
+ }
1485
+
1486
+ .sv-grid-facet-empty,
1487
+ .sv-grid-facet-note {
1488
+ padding: 6px 8px;
1489
+ color: var(--sg-muted, #94a3b8);
1490
+ font-size: 12px;
1491
+ }
1492
+
1493
+ .sv-grid-menu-actions {
1494
+ display: flex;
1495
+ justify-content: flex-end;
1496
+ gap: 6px;
1497
+ padding-top: 8px;
1498
+ }
1499
+
1500
+ .sv-grid-menu-btn {
1501
+ padding: 5px 10px;
1502
+ border: 1px solid var(--sg-input-border, #cbd5e1);
1503
+ border-radius: 5px;
1504
+ background: var(--sg-input-bg, #fff);
1505
+ color: var(--sg-fg, #334155);
1506
+ font: inherit;
1507
+ cursor: pointer;
1508
+ }
1509
+
1510
+ .sv-grid-menu-btn-primary {
1511
+ background: var(--sg-accent, #0b63f3);
1512
+ border-color: var(--sg-accent, #0b63f3);
1513
+ color: #fff;
1514
+ }
1515
+
1516
+ .sv-grid-menu-item:disabled,
1517
+ .sv-grid-menu-btn:disabled {
1518
+ opacity: 0.4;
1519
+ cursor: default;
1520
+ }
1521
+
1522
+ .sv-grid-menu-item:disabled:hover {
1523
+ background: transparent;
1524
+ }
1525
+
1526
+ .sv-grid-group-row > .sv-grid-cell {
1527
+ background: var(--sg-header-bg, #eef2f8);
1528
+ font-weight: 600;
1529
+ cursor: pointer;
1530
+ }
1531
+
1532
+ .sv-grid-row-selected > .sv-grid-cell {
1533
+ background: var(--sg-selection-bg, #eaf2ff);
1534
+ }
1535
+
1536
+ .sv-grid-group-cell {
1537
+ padding: 0 12px;
1538
+ }
1539
+
1540
+ .sv-grid-group-content {
1541
+ display: inline-flex;
1542
+ align-items: center;
1543
+ gap: 6px;
1544
+ }
1545
+
1546
+ .sv-grid-group-toggle {
1547
+ border: 0;
1548
+ background: transparent;
1549
+ padding: 0 4px 0 0;
1550
+ font-size: 11px;
1551
+ line-height: 1;
1552
+ color: var(--sg-fg, #334155);
1553
+ cursor: pointer;
1554
+ }
1555
+
1556
+ .sv-grid-group-count {
1557
+ margin-left: 6px;
1558
+ font-weight: 400;
1559
+ font-size: 12px;
1560
+ color: var(--sg-muted, #64748b);
1561
+ }
1562
+ .sv-grid-group-agg {
1563
+ margin-left: 10px;
1564
+ font-size: 12px;
1565
+ font-weight: 600;
1566
+ color: var(--sg-fg);
1567
+ white-space: nowrap;
1568
+ }
1569
+ .sv-grid-group-agg-label {
1570
+ font-weight: 400;
1571
+ color: var(--sg-muted, #64748b);
1572
+ margin-right: 4px;
1573
+ }
1574
+ .sv-grid-group-agg-label::after {
1575
+ content: ":";
1576
+ }
1577
+
1578
+ .sv-grid-group-child-indent {
1579
+ display: inline-block;
1580
+ width: 18px;
1581
+ }
1582
+
1583
+ /* ---- Custom hover tooltip (column .tooltip + cell notes) ---- */
1584
+ .sv-grid-tooltip {
1585
+ position: fixed;
1586
+ z-index: 10000;
1587
+ max-width: 280px;
1588
+ padding: 8px 10px;
1589
+ background: #0f172a;
1590
+ color: #f1f5f9;
1591
+ border-radius: var(--sg-radius, 6px);
1592
+ font-size: 12px;
1593
+ line-height: 1.45;
1594
+ box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
1595
+ pointer-events: none;
1596
+ white-space: pre-wrap;
1597
+ word-wrap: break-word;
1598
+ }
1599
+ [data-theme="dark"] .sv-grid-tooltip { background: #f1f5f9; color: #0f172a; }
1600
+
1601
+ /* ---- Textarea editor ---- */
1602
+ .sv-grid-cell-editor-textarea {
1603
+ width: 100%;
1604
+ min-height: 80px;
1605
+ padding: 6px 8px;
1606
+ border: 1px solid var(--sg-accent, #6366f1);
1607
+ background: var(--sg-bg, #fff);
1608
+ color: var(--sg-fg, #0f172a);
1609
+ border-radius: 4px;
1610
+ font-family: inherit;
1611
+ font-size: 13px;
1612
+ line-height: 1.4;
1613
+ resize: vertical;
1614
+ outline: none;
1615
+ box-shadow: var(--sg-focus-ring, 0 0 0 2px rgba(99, 102, 241, 0.40));
1616
+ }
1617
+
1618
+ .sv-grid-autocomplete {
1619
+ position: relative;
1620
+ width: 100%;
1621
+ }
1622
+ .sv-grid-autocomplete-list {
1623
+ position: absolute;
1624
+ left: 0;
1625
+ right: 0;
1626
+ top: 100%;
1627
+ z-index: 30;
1628
+ max-height: 220px;
1629
+ overflow: auto;
1630
+ margin-top: 2px;
1631
+ padding: 4px;
1632
+ background: var(--sg-bg, #fff);
1633
+ border: 1px solid var(--sg-border, #d6dee9);
1634
+ border-radius: var(--sg-radius, 6px);
1635
+ box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
1636
+ }
1637
+ .sv-grid-autocomplete-option {
1638
+ display: block;
1639
+ width: 100%;
1640
+ text-align: left;
1641
+ padding: 5px 8px;
1642
+ border: 0;
1643
+ border-radius: 4px;
1644
+ background: transparent;
1645
+ color: var(--sg-fg, #1f2937);
1646
+ font: inherit;
1647
+ font-size: 13px;
1648
+ cursor: pointer;
1649
+ white-space: nowrap;
1650
+ overflow: hidden;
1651
+ text-overflow: ellipsis;
1652
+ }
1653
+ .sv-grid-autocomplete-option:hover,
1654
+ .sv-grid-autocomplete-option[aria-selected="true"] {
1655
+ background: var(--sg-row-hover-bg, rgba(99, 102, 241, 0.10));
1656
+ }
1657
+
1658
+ /* ---- Find-in-grid overlay ---- */
1659
+ .sv-grid-find {
1660
+ position: absolute;
1661
+ top: 8px; right: 8px;
1662
+ z-index: 60;
1663
+ display: inline-flex; align-items: center; gap: 4px;
1664
+ padding: 6px 8px;
1665
+ background: var(--sg-bg, #fff);
1666
+ color: var(--sg-fg, #0f172a);
1667
+ border: 1px solid var(--sg-border, #cbd5e1);
1668
+ border-radius: 8px;
1669
+ box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
1670
+ min-width: 280px;
1671
+ }
1672
+ .sv-grid-find-icon {
1673
+ width: 14px; height: 14px;
1674
+ color: var(--sg-muted, #94a3b8);
1675
+ flex: none;
1676
+ margin-left: 2px;
1677
+ }
1678
+ .sv-grid-find-input {
1679
+ flex: 1; min-width: 0;
1680
+ border: 0; outline: none;
1681
+ background: transparent;
1682
+ color: inherit;
1683
+ font-size: 13px;
1684
+ padding: 2px 6px;
1685
+ }
1686
+ .sv-grid-find-input::placeholder { color: var(--sg-muted, #94a3b8); }
1687
+ .sv-grid-find-count {
1688
+ font-size: 11px;
1689
+ color: var(--sg-muted, #64748b);
1690
+ font-variant-numeric: tabular-nums;
1691
+ padding: 0 4px;
1692
+ white-space: nowrap;
1693
+ }
1694
+ .sv-grid-find-step, .sv-grid-find-close {
1695
+ display: inline-flex; align-items: center; justify-content: center;
1696
+ width: 22px; height: 22px;
1697
+ background: transparent;
1698
+ border: 0;
1699
+ color: var(--sg-muted, #64748b);
1700
+ border-radius: 4px;
1701
+ cursor: pointer;
1702
+ font-size: 12px;
1703
+ }
1704
+ .sv-grid-find-step:hover:not(:disabled),
1705
+ .sv-grid-find-close:hover {
1706
+ background: var(--sg-row-hover-bg, rgba(148, 163, 184, 0.12));
1707
+ color: var(--sg-fg, #0f172a);
1708
+ }
1709
+ .sv-grid-find-step:disabled { opacity: 0.30; cursor: default; }