@svgrid/grid 1.1.2 → 1.2.3

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 (143) hide show
  1. package/dist/SvGrid.css +294 -16
  2. package/dist/SvGrid.svelte +4 -1
  3. package/dist/SvGridDropdown.svelte +7 -3
  4. package/dist/cdn/svgrid.js +13506 -0
  5. package/dist/cdn/svgrid.svelte-external.js +11190 -0
  6. package/package.json +12 -2
  7. package/src/SvGrid.css +294 -16
  8. package/src/SvGrid.svelte +4 -1
  9. package/src/SvGridDropdown.svelte +7 -3
  10. package/dist/SvGrid.helpers.test.d.ts +0 -1
  11. package/dist/SvGrid.helpers.test.js +0 -298
  12. package/dist/SvGridChart.test.d.ts +0 -1
  13. package/dist/SvGridChart.test.js +0 -62
  14. package/dist/a11y.contract.test.d.ts +0 -1
  15. package/dist/a11y.contract.test.js +0 -39
  16. package/dist/a11y.test.d.ts +0 -1
  17. package/dist/a11y.test.js +0 -44
  18. package/dist/aligned-grids.test.d.ts +0 -1
  19. package/dist/aligned-grids.test.js +0 -75
  20. package/dist/build-api.coverage.test.d.ts +0 -20
  21. package/dist/build-api.coverage.test.js +0 -505
  22. package/dist/cell-formatting.test.d.ts +0 -1
  23. package/dist/cell-formatting.test.js +0 -234
  24. package/dist/cell-render.test.d.ts +0 -1
  25. package/dist/cell-render.test.js +0 -338
  26. package/dist/chart-export.test.d.ts +0 -1
  27. package/dist/chart-export.test.js +0 -302
  28. package/dist/chart.coverage.test.d.ts +0 -1
  29. package/dist/chart.coverage.test.js +0 -748
  30. package/dist/chart.test.d.ts +0 -1
  31. package/dist/chart.test.js +0 -289
  32. package/dist/clipboard.test.d.ts +0 -1
  33. package/dist/clipboard.test.js +0 -700
  34. package/dist/collaboration.coverage.test.d.ts +0 -1
  35. package/dist/collaboration.coverage.test.js +0 -200
  36. package/dist/collaboration.test.d.ts +0 -1
  37. package/dist/collaboration.test.js +0 -65
  38. package/dist/column-groups.test.d.ts +0 -1
  39. package/dist/column-groups.test.js +0 -56
  40. package/dist/column-types.test.d.ts +0 -1
  41. package/dist/column-types.test.js +0 -62
  42. package/dist/columns.test.d.ts +0 -1
  43. package/dist/columns.test.js +0 -625
  44. package/dist/conditional-formatting.test.d.ts +0 -1
  45. package/dist/conditional-formatting.test.js +0 -87
  46. package/dist/core.coverage.test.d.ts +0 -1
  47. package/dist/core.coverage.test.js +0 -186
  48. package/dist/core.performance.test.d.ts +0 -1
  49. package/dist/core.performance.test.js +0 -29
  50. package/dist/createGrid.test.d.ts +0 -1
  51. package/dist/createGrid.test.js +0 -9
  52. package/dist/editing.test.d.ts +0 -1
  53. package/dist/editing.test.js +0 -732
  54. package/dist/editors/cell-editors.coverage.test.d.ts +0 -1
  55. package/dist/editors/cell-editors.coverage.test.js +0 -139
  56. package/dist/editors/cell-editors.test.d.ts +0 -1
  57. package/dist/editors/cell-editors.test.js +0 -75
  58. package/dist/facet-buckets.test.d.ts +0 -1
  59. package/dist/facet-buckets.test.js +0 -296
  60. package/dist/fill-patterns.test.d.ts +0 -1
  61. package/dist/fill-patterns.test.js +0 -81
  62. package/dist/filter-operators.test.d.ts +0 -1
  63. package/dist/filter-operators.test.js +0 -135
  64. package/dist/filtering/excel-filters.test.d.ts +0 -1
  65. package/dist/filtering/excel-filters.test.js +0 -116
  66. package/dist/filtering/locale-filter.test.d.ts +0 -13
  67. package/dist/filtering/locale-filter.test.js +0 -189
  68. package/dist/flex-render.test.d.ts +0 -1
  69. package/dist/flex-render.test.js +0 -142
  70. package/dist/group-aggregate.test.d.ts +0 -1
  71. package/dist/group-aggregate.test.js +0 -32
  72. package/dist/hyperformula-adapter.test.d.ts +0 -1
  73. package/dist/hyperformula-adapter.test.js +0 -205
  74. package/dist/keyboard-handlers.coverage.test.d.ts +0 -1
  75. package/dist/keyboard-handlers.coverage.test.js +0 -495
  76. package/dist/keyboard.test.d.ts +0 -1
  77. package/dist/keyboard.test.js +0 -27
  78. package/dist/menus.test.d.ts +0 -1
  79. package/dist/menus.test.js +0 -560
  80. package/dist/named-views.coverage.test.d.ts +0 -1
  81. package/dist/named-views.coverage.test.js +0 -180
  82. package/dist/named-views.test.d.ts +0 -1
  83. package/dist/named-views.test.js +0 -57
  84. package/dist/new-features.test.d.ts +0 -1
  85. package/dist/new-features.test.js +0 -183
  86. package/dist/render-component.test.d.ts +0 -1
  87. package/dist/render-component.test.js +0 -41
  88. package/dist/row-drag.test.d.ts +0 -1
  89. package/dist/row-drag.test.js +0 -142
  90. package/dist/row-resize.test.d.ts +0 -1
  91. package/dist/row-resize.test.js +0 -329
  92. package/dist/scroll-sync.test.d.ts +0 -1
  93. package/dist/scroll-sync.test.js +0 -290
  94. package/dist/selection.multi-range.test.d.ts +0 -1
  95. package/dist/selection.multi-range.test.js +0 -55
  96. package/dist/selection.test.d.ts +0 -1
  97. package/dist/selection.test.js +0 -647
  98. package/dist/server-data-source.coverage.test.d.ts +0 -1
  99. package/dist/server-data-source.coverage.test.js +0 -154
  100. package/dist/server-data-source.test.d.ts +0 -1
  101. package/dist/server-data-source.test.js +0 -81
  102. package/dist/sparkline.test.d.ts +0 -1
  103. package/dist/sparkline.test.js +0 -52
  104. package/dist/spreadsheet.test.d.ts +0 -1
  105. package/dist/spreadsheet.test.js +0 -446
  106. package/dist/subscribe.test.d.ts +0 -1
  107. package/dist/subscribe.test.js +0 -93
  108. package/dist/svgrid.api-extensions.test.d.ts +0 -14
  109. package/dist/svgrid.api-extensions.test.js +0 -334
  110. package/dist/svgrid.api.test.d.ts +0 -15
  111. package/dist/svgrid.api.test.js +0 -169
  112. package/dist/svgrid.behavior.test.d.ts +0 -15
  113. package/dist/svgrid.behavior.test.js +0 -625
  114. package/dist/svgrid.column-reorder.test.d.ts +0 -15
  115. package/dist/svgrid.column-reorder.test.js +0 -224
  116. package/dist/svgrid.comments-autocomplete.test.d.ts +0 -1
  117. package/dist/svgrid.comments-autocomplete.test.js +0 -96
  118. package/dist/svgrid.context-menu.test.d.ts +0 -1
  119. package/dist/svgrid.context-menu.test.js +0 -102
  120. package/dist/svgrid.features.test.d.ts +0 -1
  121. package/dist/svgrid.features.test.js +0 -129
  122. package/dist/svgrid.interaction.test.d.ts +0 -9
  123. package/dist/svgrid.interaction.test.js +0 -349
  124. package/dist/svgrid.locale-filtering.test.d.ts +0 -15
  125. package/dist/svgrid.locale-filtering.test.js +0 -261
  126. package/dist/svgrid.new-features.wrapper.test.d.ts +0 -1
  127. package/dist/svgrid.new-features.wrapper.test.js +0 -194
  128. package/dist/svgrid.row-pinning.test.d.ts +0 -14
  129. package/dist/svgrid.row-pinning.test.js +0 -250
  130. package/dist/svgrid.set-filter.test.d.ts +0 -17
  131. package/dist/svgrid.set-filter.test.js +0 -268
  132. package/dist/svgrid.wrapper.test.d.ts +0 -1
  133. package/dist/svgrid.wrapper.test.js +0 -59
  134. package/dist/test-setup.d.ts +0 -1
  135. package/dist/test-setup.js +0 -35
  136. package/dist/transaction.test.d.ts +0 -1
  137. package/dist/transaction.test.js +0 -89
  138. package/dist/virtualization/column-virtualizer.test.d.ts +0 -1
  139. package/dist/virtualization/column-virtualizer.test.js +0 -25
  140. package/dist/virtualization/scroll-scaling.test.d.ts +0 -1
  141. package/dist/virtualization/scroll-scaling.test.js +0 -127
  142. package/dist/virtualization/virtualizer.test.d.ts +0 -1
  143. package/dist/virtualization/virtualizer.test.js +0 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svgrid/grid",
3
- "version": "1.1.2",
3
+ "version": "1.2.3",
4
4
  "description": "SvGrid - a headless-first, Svelte 5-native data grid engine and render component.",
5
5
  "author": "jQWidgets <boikom@jqwidgets.com>",
6
6
  "license": "MIT",
@@ -21,12 +21,22 @@
21
21
  "types": "dist/index.d.ts",
22
22
  "module": "dist/index.js",
23
23
  "svelte": "./dist/index.js",
24
+ "unpkg": "./dist/cdn/svgrid.js",
25
+ "jsdelivr": "./dist/cdn/svgrid.js",
24
26
  "exports": {
25
27
  ".": {
26
28
  "types": "./dist/index.d.ts",
27
29
  "svelte": "./dist/index.js",
28
30
  "import": "./dist/index.js"
29
31
  },
32
+ "./cdn": {
33
+ "import": "./dist/cdn/svgrid.js",
34
+ "default": "./dist/cdn/svgrid.js"
35
+ },
36
+ "./cdn/svelte-external": {
37
+ "import": "./dist/cdn/svgrid.svelte-external.js",
38
+ "default": "./dist/cdn/svgrid.svelte-external.js"
39
+ },
30
40
  "./static-functions": {
31
41
  "types": "./dist/static-functions.d.ts",
32
42
  "svelte": "./dist/static-functions.js",
@@ -52,7 +62,7 @@
52
62
  "test:types": "svelte-check --tsconfig ./tsconfig.json",
53
63
  "test:lib": "vitest run --coverage",
54
64
  "test:build": "publint --strict",
55
- "build": "svelte-package --input ./src --output ./dist"
65
+ "build": "svelte-package --input ./src --output ./dist && node ../../tools/strip-dist-tests.mjs ./dist && node ./scripts/build-cdn.mjs"
56
66
  },
57
67
  "devDependencies": {
58
68
  "@sveltejs/package": "^2.5.7",
package/src/SvGrid.css CHANGED
@@ -336,6 +336,21 @@
336
336
  background: var(--sg-bg, #fff);
337
337
  color: var(--sg-fg, #0f172a);
338
338
  user-select: none;
339
+ /* Grid lines ship with the grid so it looks complete out of the box - no
340
+ host stylesheet required. Only right + bottom per cell (border-spacing is
341
+ 0), so adjacent cells share a single 1px line rather than doubling. */
342
+ border-right: 1px solid var(--sg-border, #e2e8f0);
343
+ border-bottom: 1px solid var(--sg-border, #e2e8f0);
344
+ }
345
+ /* The last cell / column in each row drops its right border so the grid's
346
+ right edge stays clean (the shell provides the outer frame). */
347
+ .sv-grid-table tr > :last-child.sv-grid-column,
348
+ .sv-grid-table tr > :last-child.sv-grid-cell {
349
+ border-right: 0;
350
+ }
351
+ /* Row hover tint. */
352
+ .sv-grid-table tbody tr:hover > .sv-grid-cell {
353
+ background: var(--sg-row-hover-bg, #eef2ff);
339
354
  }
340
355
  /* Only the active cell + the cell hosting the fill handle become a
341
356
  positioning context (so the absolutely-positioned handle anchors
@@ -384,14 +399,14 @@
384
399
  always points toward the scrollable middle. */
385
400
  .sv-grid-cell[data-pinned="left"],
386
401
  .sv-grid-column[data-pinned="left"] {
387
- background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
402
+ background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 92%, var(--sg-accent, #2563eb) 8%));
388
403
  box-shadow:
389
404
  inset -1px 0 0 var(--sg-pinned-divider, var(--sg-border, #cbd5e1)),
390
405
  8px 0 12px -6px rgba(15, 23, 42, 0.22);
391
406
  }
392
407
  .sv-grid-cell[data-pinned="right"],
393
408
  .sv-grid-column[data-pinned="right"] {
394
- background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
409
+ background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 92%, var(--sg-accent, #2563eb) 8%));
395
410
  box-shadow:
396
411
  inset 1px 0 0 var(--sg-pinned-divider, var(--sg-border, #cbd5e1)),
397
412
  -8px 0 12px -6px rgba(15, 23, 42, 0.22);
@@ -400,7 +415,7 @@
400
415
  so the frozen header itself reads as part of the grid chrome. */
401
416
  .sv-grid-head .sv-grid-column[data-pinned="left"],
402
417
  .sv-grid-head .sv-grid-column[data-pinned="right"] {
403
- background: var(--sg-pinned-header-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 60%, var(--sg-accent, #2563eb) 14%));
418
+ background: var(--sg-pinned-header-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 86%, var(--sg-accent, #2563eb) 14%));
404
419
  font-weight: 600;
405
420
  }
406
421
  /* Zebra striping, opt-in via the `zebraRows` prop (which adds
@@ -414,7 +429,7 @@
414
429
  /* Zebra rows: keep the pinned tint visible (don't let the row-alt
415
430
  background bleed through) by re-painting the pinned cells. */
416
431
  .sv-grid-row-alt > .sv-grid-cell[data-pinned] {
417
- background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
432
+ background: var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 92%, var(--sg-accent, #2563eb) 8%));
418
433
  }
419
434
  /* When the row is selected, keep the pinned tint but layer the
420
435
  selection color over it so the row still reads as selected. */
@@ -424,7 +439,7 @@
424
439
  color-mix(in srgb, var(--sg-selection-bg, #dbeafe) 65%, transparent),
425
440
  color-mix(in srgb, var(--sg-selection-bg, #dbeafe) 65%, transparent)
426
441
  ),
427
- var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
442
+ var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 92%, var(--sg-accent, #2563eb) 8%));
428
443
  }
429
444
  /* Hovered row keeps the pinned tint distinguishable from the hover. */
430
445
  .sv-grid-row:hover > .sv-grid-cell[data-pinned] {
@@ -433,7 +448,7 @@
433
448
  color-mix(in srgb, var(--sg-row-hover-bg, #eef2ff) 55%, transparent),
434
449
  color-mix(in srgb, var(--sg-row-hover-bg, #eef2ff) 55%, transparent)
435
450
  ),
436
- var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 70%, var(--sg-accent, #2563eb) 8%));
451
+ var(--sg-pinned-bg, color-mix(in oklab, var(--sg-header-bg, #f1f5f9) 92%, var(--sg-accent, #2563eb) 8%));
437
452
  }
438
453
 
439
454
  .sv-grid-column {
@@ -462,6 +477,14 @@
462
477
  .sv-grid-column[data-align="right"] .sv-grid-header-sort {
463
478
  justify-content: flex-end;
464
479
  }
480
+ /* The custom vertical scrollbar overlays the right 16px of the viewport
481
+ (absolute, z-index 40). Nudge the last column's right-aligned content in by
482
+ that width when the scrollbar is visible, so numbers/values aren't hidden
483
+ underneath it. Left/center content already clears the right edge. */
484
+ .sv-grid-has-vscroll .sv-grid-table tr > :last-child.sv-grid-cell[data-align="right"],
485
+ .sv-grid-has-vscroll .sv-grid-table tr > :last-child.sv-grid-column[data-align="right"] {
486
+ padding-right: calc(var(--sg-cell-px, 7px) + 16px);
487
+ }
465
488
  .sv-grid-column[data-align="center"] .sv-grid-header-sort {
466
489
  justify-content: center;
467
490
  }
@@ -478,9 +501,26 @@
478
501
  transition: background-color 100ms ease;
479
502
  }
480
503
 
481
- .sv-grid-resize-handle:hover,
482
- .sv-grid-resize-handle.is-resizing {
483
- background: color-mix(in srgb, var(--sg-accent, #0b63f3) 30%, transparent);
504
+ /* An accent center pill (rather than tinting the whole strip): faint on column
505
+ hover, bright when the handle itself is hovered or while dragging. */
506
+ .sv-grid-resize-handle::after {
507
+ content: "";
508
+ position: absolute;
509
+ inset: 0;
510
+ margin: auto 2px;
511
+ width: 2px;
512
+ background: var(--sg-fg, #0f172a);
513
+ opacity: 0;
514
+ border-radius: 1px;
515
+ transition: background-color 100ms ease, opacity 100ms ease;
516
+ }
517
+ .sv-grid-column:hover .sv-grid-resize-handle::after {
518
+ opacity: 0.3;
519
+ }
520
+ .sv-grid-column:hover .sv-grid-resize-handle:hover::after,
521
+ .sv-grid-resize-handle.is-resizing::after {
522
+ background: var(--sg-accent, #2563eb);
523
+ opacity: 1;
484
524
  }
485
525
 
486
526
  /* Row resize handle (counterpart of the column resize handle). Lives
@@ -907,8 +947,9 @@ select.sv-grid-fr-editor {
907
947
 
908
948
  .sv-grid-checkbox[aria-checked="true"],
909
949
  .sv-grid-checkbox[aria-checked="mixed"] {
910
- border-color: var(--sg-accent, #0b63f3);
911
- background: var(--sg-selection-bg, #eaf2ff);
950
+ border-color: var(--sg-accent, #2563eb);
951
+ background: var(--sg-accent, #2563eb);
952
+ color: var(--sg-on-accent, #fff);
912
953
  }
913
954
 
914
955
  .sv-grid-checkbox[aria-checked="true"]::after {
@@ -1108,16 +1149,49 @@ select.sv-grid-fr-editor {
1108
1149
  padding: 0 8px;
1109
1150
  }
1110
1151
 
1111
- /* Filter-related inputs share the same focused-cell outline treatment. */
1152
+ /* Base look for the filter inputs (header filter row, per-column filter, the
1153
+ global search box, and the menu's search / condition inputs). The inline cell
1154
+ editor is styled separately - it's borderless and fills its cell. Shipping
1155
+ this with the grid means filters look like real inputs with no host
1156
+ stylesheet. */
1157
+ .sv-grid-column-filter,
1158
+ .sv-grid-filter-value,
1159
+ .sv-grid-global-filter input,
1160
+ .sv-grid-menu-search,
1161
+ .sv-grid-menu-condition-value {
1162
+ background: var(--sg-input-bg, #fff);
1163
+ color: var(--sg-fg, #0f172a);
1164
+ border: 1px solid var(--sg-input-border, #cbd5e1);
1165
+ border-radius: 5px;
1166
+ padding: 0 8px;
1167
+ box-sizing: border-box;
1168
+ font: inherit;
1169
+ }
1170
+ .sv-grid-column-filter {
1171
+ height: 28px;
1172
+ width: 100%;
1173
+ font-size: 0.8125rem;
1174
+ }
1175
+ .sv-grid-column-filter::placeholder,
1176
+ .sv-grid-filter-value::placeholder,
1177
+ .sv-grid-menu-search::placeholder,
1178
+ .sv-grid-global-filter input::placeholder,
1179
+ .sv-grid-cell-editor::placeholder {
1180
+ color: var(--sg-muted, #64748b);
1181
+ opacity: 0.7;
1182
+ }
1183
+
1184
+ /* Calm, theme-aware focus (a soft box-shadow rather than a hard outline). */
1112
1185
  .sv-grid-global-filter input:focus,
1113
1186
  .sv-grid-filter-value:focus,
1114
1187
  .sv-grid-column-filter:focus,
1115
1188
  .sv-grid-menu-search:focus,
1116
1189
  .sv-grid-menu-condition-value:focus,
1117
- .sv-grid-menu-operator:focus {
1118
- outline: 2px solid var(--sg-accent, #0b63f3);
1119
- outline-offset: -2px;
1120
- border-color: var(--sg-accent, #0b63f3);
1190
+ .sv-grid-menu-operator:focus,
1191
+ .sv-grid-cell-editor:focus {
1192
+ outline: none;
1193
+ border-color: var(--sg-accent, #2563eb);
1194
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--sg-accent, #2563eb) 30%, transparent);
1121
1195
  }
1122
1196
 
1123
1197
  .sv-grid-cell-editor-number,
@@ -2010,3 +2084,207 @@ select.sv-grid-fr-editor {
2010
2084
  color: var(--sg-fg, #0f172a);
2011
2085
  }
2012
2086
  .sv-grid-find-step:disabled { opacity: 0.30; cursor: default; }
2087
+
2088
+ /* ---- Pagination footer (GridFooter.svelte) ------------------------------
2089
+ Ships with the grid so the pager is styled out of the box - previously this
2090
+ lived only in the examples' host stylesheet, leaving bare consumers with an
2091
+ unstyled pager. Uses --sg-* tokens with fallbacks like the rest of the theme. */
2092
+ .sv-grid-pagination {
2093
+ display: flex;
2094
+ align-items: center;
2095
+ justify-content: flex-end;
2096
+ gap: 24px;
2097
+ padding: 12px 16px;
2098
+ margin-top: 0;
2099
+ border: 1px solid var(--sg-border, #e2e8f0);
2100
+ border-top: 0;
2101
+ border-radius: 0 0 var(--sg-radius, 6px) var(--sg-radius, 6px);
2102
+ background: var(--sg-header-bg, #f1f5f9);
2103
+ color: var(--sg-fg, #0f172a);
2104
+ font-size: 13px;
2105
+ }
2106
+ .sv-grid-pagination-pagesize {
2107
+ display: inline-flex;
2108
+ align-items: center;
2109
+ gap: 8px;
2110
+ color: var(--sg-muted, #64748b);
2111
+ }
2112
+ .sv-grid-pagination-pagesize select {
2113
+ height: 28px;
2114
+ padding: 0 22px 0 8px;
2115
+ border: 1px solid var(--sg-input-border, #cbd5e1);
2116
+ border-radius: 5px;
2117
+ background: var(--sg-input-bg, #fff);
2118
+ color: var(--sg-fg, #0f172a);
2119
+ font: inherit;
2120
+ font-size: 13px;
2121
+ cursor: pointer;
2122
+ appearance: none;
2123
+ -webkit-appearance: none;
2124
+ background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
2125
+ linear-gradient(135deg, currentColor 50%, transparent 50%);
2126
+ background-position: calc(100% - 12px) 12px, calc(100% - 8px) 12px;
2127
+ background-size: 4px 4px, 4px 4px;
2128
+ background-repeat: no-repeat;
2129
+ }
2130
+ .sv-grid-pagination-pagesize select:focus {
2131
+ outline: none;
2132
+ border-color: var(--sg-accent, #2563eb);
2133
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--sg-accent, #2563eb) 30%, transparent);
2134
+ }
2135
+ .sv-grid-pagination-range {
2136
+ color: var(--sg-fg, #0f172a);
2137
+ }
2138
+ .sv-grid-pagination-nav {
2139
+ display: inline-flex;
2140
+ align-items: center;
2141
+ gap: 4px;
2142
+ }
2143
+ .sv-grid-pagination-btn {
2144
+ display: inline-flex;
2145
+ align-items: center;
2146
+ justify-content: center;
2147
+ width: 28px;
2148
+ height: 28px;
2149
+ padding: 0;
2150
+ border: 0;
2151
+ border-radius: 5px;
2152
+ background: transparent;
2153
+ color: var(--sg-fg, #0f172a);
2154
+ font: inherit;
2155
+ font-size: 16px;
2156
+ cursor: pointer;
2157
+ transition: background-color 100ms ease, color 100ms ease;
2158
+ }
2159
+ .sv-grid-pagination-btn:hover:not(:disabled) {
2160
+ background: var(--sg-input-bg, #fff);
2161
+ color: var(--sg-accent, #2563eb);
2162
+ }
2163
+ .sv-grid-pagination-btn:disabled {
2164
+ color: var(--sg-muted, #64748b);
2165
+ opacity: 0.4;
2166
+ cursor: default;
2167
+ }
2168
+ .sv-grid-pagination-label {
2169
+ margin: 0 8px;
2170
+ color: var(--sg-fg, #0f172a);
2171
+ }
2172
+
2173
+ /* ---- Menu / filter chrome completeness -----------------------------------
2174
+ These styles previously lived only in the examples' host stylesheet. Shipping
2175
+ them here means the column menu, filter/choose-columns popovers, facet
2176
+ checklist, operator select, filter buttons, and the scrollbar corner are
2177
+ fully themed out of the box for any consumer - all via --sg-* tokens. */
2178
+
2179
+ /* Hide the scrollbar corner when its scrollbar is absent. */
2180
+ .sv-grid-no-scroll .sv-grid-scrollbar-corner,
2181
+ .sv-grid-no-scroll .sv-grid-scrollbar {
2182
+ display: none;
2183
+ }
2184
+ /* Scrollbar corner divider uses the theme border token. */
2185
+ .sv-grid-scrollbar-corner,
2186
+ .sv-grid-scrollbar-corner-br {
2187
+ border-bottom-color: var(--sg-border, #e2e8f0);
2188
+ }
2189
+
2190
+ /* Filter operator <select> (the dropdown that replaced the radio group). */
2191
+ .sv-grid-menu-operator-select {
2192
+ width: 100%;
2193
+ height: 28px;
2194
+ padding: 0 22px 0 8px;
2195
+ margin-bottom: 6px;
2196
+ border: 1px solid var(--sg-input-border, #cbd5e1);
2197
+ border-radius: 5px;
2198
+ background: var(--sg-input-bg, #fff);
2199
+ color: var(--sg-fg, #0f172a);
2200
+ font: inherit;
2201
+ font-size: 13px;
2202
+ cursor: pointer;
2203
+ appearance: none;
2204
+ -webkit-appearance: none;
2205
+ background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
2206
+ linear-gradient(135deg, currentColor 50%, transparent 50%);
2207
+ background-position: calc(100% - 12px) 12px, calc(100% - 8px) 12px;
2208
+ background-size: 4px 4px, 4px 4px;
2209
+ background-repeat: no-repeat;
2210
+ }
2211
+ .sv-grid-menu-operator-select:focus {
2212
+ outline: none;
2213
+ border-color: var(--sg-accent, #2563eb);
2214
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--sg-accent, #2563eb) 40%, transparent);
2215
+ }
2216
+ /* Operator toggle button (active) uses the on-accent token. */
2217
+ .sv-grid-menu-operator-btn.is-active {
2218
+ color: var(--sg-on-accent, #fff);
2219
+ }
2220
+
2221
+ /* Filter-only + choose-columns popover widths. */
2222
+ .sv-grid-filter-menu {
2223
+ width: 260px;
2224
+ }
2225
+ .sv-grid-choose-columns-menu {
2226
+ width: 240px;
2227
+ }
2228
+ .sv-grid-choose-columns-menu .sv-grid-facet-list {
2229
+ max-height: 280px;
2230
+ }
2231
+
2232
+ /* Native checkboxes in the facet list pick up the theme accent. */
2233
+ .sv-grid-facet input[type="checkbox"] {
2234
+ accent-color: var(--sg-accent, #2563eb);
2235
+ width: 14px;
2236
+ height: 14px;
2237
+ cursor: pointer;
2238
+ }
2239
+
2240
+ /* Submenu right-chevron on the "Choose columns" item. */
2241
+ .sv-grid-menu-item-chevron {
2242
+ margin-left: auto;
2243
+ transform: rotate(-90deg);
2244
+ opacity: 0.55;
2245
+ }
2246
+ .sv-grid-menu-item.is-open .sv-grid-menu-item-chevron {
2247
+ opacity: 1;
2248
+ }
2249
+
2250
+ /* Magnifier prefix on the menu's search input. */
2251
+ .sv-grid-menu-search {
2252
+ padding-left: 28px;
2253
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E");
2254
+ background-position: 8px center;
2255
+ background-repeat: no-repeat;
2256
+ background-size: 14px 14px;
2257
+ }
2258
+
2259
+ /* Filter menu vertical rhythm. */
2260
+ .sv-grid-menu-filter > * + * {
2261
+ margin-top: 6px;
2262
+ }
2263
+
2264
+ /* Column-header filter (funnel) button tints accent when a filter is active. */
2265
+ .sv-grid-col-filter-btn.is-active {
2266
+ color: var(--sg-accent, #2563eb);
2267
+ }
2268
+
2269
+ /* Row-number gutter: neutralize the right border so it fuses with the header. */
2270
+ .sv-grid-row-number-column,
2271
+ .sv-grid-row-number-cell {
2272
+ border-right-color: var(--sg-header-bg, #f1f5f9);
2273
+ }
2274
+
2275
+ /* Group row label colour. */
2276
+ .sv-grid-group-row > .sv-grid-cell {
2277
+ color: var(--sg-header-fg, #0f172a);
2278
+ }
2279
+
2280
+ /* Filter-row operator button: soften when idle, accent border on hover/open. */
2281
+ .sv-grid-filter-operator-btn {
2282
+ opacity: 0.85;
2283
+ }
2284
+ .sv-grid-filter-operator-btn:hover {
2285
+ opacity: 1;
2286
+ border-color: var(--sg-accent, #2563eb);
2287
+ }
2288
+ .sv-grid-filter-operator-btn.is-open {
2289
+ opacity: 1;
2290
+ }
package/src/SvGrid.svelte CHANGED
@@ -196,7 +196,6 @@
196
196
  function flashClassFor(
197
197
  cfg: boolean | { className?: string } | undefined,
198
198
  ): string {
199
- console.log("flash cell");
200
199
  if (cfg && typeof cfg === "object" && cfg.className) return cfg.className;
201
200
  return "sv-grid-cell-flash";
202
201
  }
@@ -929,6 +928,7 @@
929
928
  {:else}
930
929
  <!-- Free-form chips: typed tags. Enter / comma commits a chip,
931
930
  Backspace on empty input removes the last chip, blur saves. -->
931
+ <!-- svelte-ignore a11y_no_noninteractive_tabindex -->
932
932
  <div
933
933
  class="sv-grid-cell-editor sv-grid-cell-editor-chips"
934
934
  role="group"
@@ -1189,6 +1189,7 @@
1189
1189
  >
1190
1190
  <div
1191
1191
  class="sv-grid-container sv-grid-container-custom-scrollbars"
1192
+ class:sv-grid-has-vscroll={hasMeasured && hasVerticalOverflow}
1192
1193
  bind:this={ctrl.scrollContainer}
1193
1194
  onscroll={onBodyScroll}
1194
1195
  style={`overflow: auto; position: relative; height: calc(100% - ${hasMeasured && hasHorizontalOverflow ? 16 : 0}px);`}
@@ -1885,10 +1886,12 @@
1885
1886
  cells on release. Rendered inside the bottom-
1886
1887
  right cell of the selection range (or active
1887
1888
  cell if there's no range). -->
1889
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
1888
1890
  <div
1889
1891
  class="sv-grid-fill-handle"
1890
1892
  role="button"
1891
1893
  aria-label="Fill handle"
1894
+ tabindex={-1}
1892
1895
  onpointerdown={(event) =>
1893
1896
  startFillDrag(event, rowIndex, colIndex)}
1894
1897
  ></div>
@@ -334,14 +334,18 @@
334
334
  style={opt?.color ? colorfulChipStyleInline(opt.color) : ''}
335
335
  >
336
336
  {opt ? opt.label : String(v)}
337
- <button
338
- type="button"
337
+ <!-- A <button> can't be nested inside the trigger <button>; this is a
338
+ pointer-only affordance (tabindex -1), so a role="button" span is
339
+ valid HTML and preserves identical behaviour. -->
340
+ <!-- svelte-ignore a11y_no_static_element_interactions a11y_click_events_have_key_events -->
341
+ <span
339
342
  class="sv-grid-chip-remove"
343
+ role="button"
340
344
  aria-label="Remove {opt ? opt.label : String(v)}"
341
345
  tabindex={-1}
342
346
  onmousedown={(event) => event.preventDefault()}
343
347
  onclick={(event) => removeChip(v, event)}
344
- >×</button>
348
+ >×</span>
345
349
  </span>
346
350
  {/each}
347
351
  </span>
@@ -1 +0,0 @@
1
- export {};