@svgrid/grid 3.0.1 → 3.0.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 (77) hide show
  1. package/dist/GridFooter.svelte +14 -5
  2. package/dist/GridFooter.svelte.d.ts +8 -0
  3. package/dist/GridMenus.svelte +18 -10
  4. package/dist/GridMenus.svelte.d.ts +2 -1
  5. package/dist/SvGrid.controller.svelte.d.ts +17 -0
  6. package/dist/SvGrid.controller.svelte.js +128 -14
  7. package/dist/SvGrid.css +79 -10
  8. package/dist/SvGrid.svelte +191 -186
  9. package/dist/SvGrid.types.d.ts +42 -1
  10. package/dist/SvGridChart.svelte +571 -41
  11. package/dist/SvGridChart.svelte.d.ts +63 -1
  12. package/dist/SvGridChartPanel.svelte +169 -21
  13. package/dist/SvGridChartView.svelte +9 -0
  14. package/dist/SvGridChartView.svelte.d.ts +7 -0
  15. package/dist/SvGroupCell.svelte +28 -3
  16. package/dist/SvGroupCell.svelte.d.ts +8 -0
  17. package/dist/SvRowGroupPanel.svelte +20 -4
  18. package/dist/SvRowGroupPanel.svelte.d.ts +8 -0
  19. package/dist/ai.d.ts +11 -2
  20. package/dist/ai.js +51 -7
  21. package/dist/cdn/GridMenus-CHOMnW-c.js +602 -0
  22. package/dist/cdn/{GridMenus-DFB6iwF8.js → GridMenus-DhdPF700.js} +152 -150
  23. package/dist/cdn/SvGridChart-1PMSp2LZ.js +1481 -0
  24. package/dist/cdn/SvGridChart-D02avhyr.js +1480 -0
  25. package/dist/cdn/SvGridChartPanel-DJnViOv4.js +834 -0
  26. package/dist/cdn/SvGridChartPanel-vPTNerFZ.js +810 -0
  27. package/dist/cdn/{SvGridChartView-BhUEJ5ki.js → SvGridChartView-C--HhdUo.js} +5 -3
  28. package/dist/cdn/{SvGridChartView-00LPUHL1.js → SvGridChartView-KyyFG-wY.js} +5 -3
  29. package/dist/cdn/cell-formatting-C2Hf5gqd.js +86 -0
  30. package/dist/cdn/chart-DLg3_zTQ.js +1652 -0
  31. package/dist/cdn/{export-format-Cv1Dll6k.js → export-format-CUDLy2yn.js} +84 -168
  32. package/dist/cdn/{src-C8QjSaq-.js → src-Bugf5XlI.js} +3608 -3414
  33. package/dist/cdn/{src-D0hO2eYN.js → src-D6XvA1Ij.js} +8617 -8423
  34. package/dist/cdn/svgrid.js +16 -15
  35. package/dist/cdn/svgrid.svelte-external.js +16 -15
  36. package/dist/cell-formatting.d.ts +7 -0
  37. package/dist/cell-formatting.js +7 -1
  38. package/dist/chart-export.d.ts +23 -2
  39. package/dist/chart-export.js +80 -6
  40. package/dist/chart.d.ts +410 -18
  41. package/dist/chart.js +824 -24
  42. package/dist/grid-icons.d.ts +49 -0
  43. package/dist/grid-icons.js +86 -0
  44. package/dist/index.d.ts +3 -2
  45. package/dist/index.js +3 -2
  46. package/package.json +11 -11
  47. package/src/GridFooter.svelte +14 -5
  48. package/src/GridMenus.svelte +18 -10
  49. package/src/SvGrid.controller.svelte.ts +146 -13
  50. package/src/SvGrid.css +79 -10
  51. package/src/SvGrid.svelte +191 -186
  52. package/src/SvGrid.types.ts +42 -1
  53. package/src/SvGridChart.svelte +571 -41
  54. package/src/SvGridChart.test.ts +243 -1
  55. package/src/SvGridChartPanel.svelte +169 -21
  56. package/src/SvGridChartView.svelte +9 -0
  57. package/src/SvGroupCell.svelte +28 -3
  58. package/src/SvRowGroupPanel.svelte +20 -4
  59. package/src/ai.test.ts +60 -1
  60. package/src/ai.ts +59 -6
  61. package/src/cell-formatting.ts +7 -1
  62. package/src/chart-export.test.ts +112 -0
  63. package/src/chart-export.ts +76 -8
  64. package/src/chart.test.ts +830 -1
  65. package/src/chart.ts +1053 -32
  66. package/src/grid-icons.test.ts +46 -0
  67. package/src/grid-icons.ts +184 -0
  68. package/src/icon-overrides.grid.test.ts +188 -0
  69. package/src/icon-seam.test.ts +100 -0
  70. package/src/index.ts +19 -0
  71. package/src/svgrid.charting.test.ts +120 -0
  72. package/dist/cdn/GridMenus-CYzOvmNQ.js +0 -600
  73. package/dist/cdn/SvGridChart-BEJmNNx9.js +0 -1203
  74. package/dist/cdn/SvGridChart-BwVos976.js +0 -1202
  75. package/dist/cdn/SvGridChartPanel-BOknOkrP.js +0 -561
  76. package/dist/cdn/SvGridChartPanel-D2PjII4O.js +0 -585
  77. package/dist/cdn/chart-i4XcXyHJ.js +0 -1214
package/src/SvGrid.css CHANGED
@@ -153,6 +153,10 @@
153
153
  /* Advanced-filter indicator. Reads as state rather than as another action, so
154
154
  it uses the accent fill the toolbar buttons reserve for `is-active` instead
155
155
  of the neutral button shell. */
156
+ .sv-grid-advf-chip > .sv-grid-icon {
157
+ width: 13px;
158
+ height: 13px;
159
+ }
156
160
  .sv-grid-advf-chip {
157
161
  display: inline-flex;
158
162
  align-items: center;
@@ -261,6 +265,12 @@
261
265
  flex-shrink: 0;
262
266
  }
263
267
  .sv-grid-tool-panel-btn {
268
+ /* Centred as flex because these draw an icon now, not a bare character: a
269
+ glyph default still centres, and an SVG override no longer sits on the
270
+ text baseline. */
271
+ display: inline-flex;
272
+ align-items: center;
273
+ justify-content: center;
264
274
  width: 22px;
265
275
  height: 22px;
266
276
  border: 0;
@@ -807,9 +817,18 @@
807
817
  color: var(--sg-accent, #2563eb);
808
818
  }
809
819
  .sv-grid-group-caret {
820
+ display: inline-flex;
821
+ align-items: center;
822
+ justify-content: center;
823
+ width: 10px;
824
+ height: 10px;
810
825
  flex-shrink: 0;
811
826
  transition: transform 140ms ease;
812
827
  }
828
+ .sv-grid-group-caret > .sv-grid-icon {
829
+ width: 100%;
830
+ height: 100%;
831
+ }
813
832
  /* Collapsed: point the caret right (like a closed disclosure). */
814
833
  .sv-grid-group-toggle.is-collapsed .sv-grid-group-caret {
815
834
  transform: rotate(-90deg);
@@ -1855,6 +1874,23 @@ select.sv-grid-fr-editor {
1855
1874
  display: block;
1856
1875
  flex: none;
1857
1876
  }
1877
+ /* A consumer icon from the `icons` prop. SvGrid wraps the override in this box
1878
+ rather than asking the consumer to add `.sv-grid-icon` themselves, so it
1879
+ inherits every per-site size rule below and the expander's rotate-on-open
1880
+ without needing to know those rules exist. Must stay AFTER .sv-grid-icon:
1881
+ equal specificity, and this display has to win. */
1882
+ .sv-grid-icon-custom {
1883
+ display: inline-flex;
1884
+ align-items: center;
1885
+ justify-content: center;
1886
+ line-height: 0;
1887
+ }
1888
+ .sv-grid-icon-custom > svg,
1889
+ .sv-grid-icon-custom > img {
1890
+ width: 100%;
1891
+ height: 100%;
1892
+ display: block;
1893
+ }
1858
1894
 
1859
1895
  .sv-grid-header-cell {
1860
1896
  display: flex;
@@ -2453,14 +2489,19 @@ select.sv-grid-fr-editor {
2453
2489
  group banners and auto-group columns, SvGroupCell and SvTree all draw the
2454
2490
  same `chevron-right` and rotate it open, rather than swapping between two
2455
2491
  different glyphs. */
2456
- .sv-grid-tree-toggle .sv-grid-icon,
2457
- .sv-grid-group-toggle .sv-grid-icon {
2492
+ /* Direct child, not descendant. The column-group header button also carries
2493
+ `sv-grid-group-toggle` + `aria-expanded`, and its caret is wrapped one level
2494
+ deeper - a descendant selector would rotate that caret 90deg too, so an
2495
+ expanded down-caret would point left. The three row/tree expanders render
2496
+ their icon as an immediate child, so `>` changes nothing for them. */
2497
+ .sv-grid-tree-toggle > .sv-grid-icon,
2498
+ .sv-grid-group-toggle > .sv-grid-icon {
2458
2499
  width: 12px;
2459
2500
  height: 12px;
2460
2501
  transition: transform 0.15s ease;
2461
2502
  }
2462
- .sv-grid-tree-toggle[aria-expanded="true"] .sv-grid-icon,
2463
- .sv-grid-group-toggle[aria-expanded="true"] .sv-grid-icon {
2503
+ .sv-grid-tree-toggle[aria-expanded="true"] > .sv-grid-icon,
2504
+ .sv-grid-group-toggle[aria-expanded="true"] > .sv-grid-icon {
2464
2505
  transform: rotate(90deg);
2465
2506
  }
2466
2507
  .sv-grid-tree-toggle:focus-visible {
@@ -2624,7 +2665,7 @@ select.sv-grid-fr-editor {
2624
2665
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
2625
2666
  min-width: 280px;
2626
2667
  }
2627
- .sv-grid-find-icon {
2668
+ .sv-grid-find > .sv-grid-icon {
2628
2669
  width: 14px; height: 14px;
2629
2670
  color: var(--sg-muted, #94a3b8);
2630
2671
  flex: none;
@@ -2868,13 +2909,26 @@ select.sv-grid-fr-editor {
2868
2909
  opacity: 1;
2869
2910
  }
2870
2911
 
2871
- /* Magnifier prefix on the menu's search input. */
2912
+ /* Magnifier prefix on the menu's search input. Real markup rather than a
2913
+ background-image, so it follows the theme and the `icons` prop can replace
2914
+ it; the input keeps its own class because focusFilterPanel() and a test both
2915
+ resolve `.sv-grid-menu-search`. */
2872
2916
  .sv-grid-menu-search {
2873
2917
  padding-left: 28px;
2874
- 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");
2875
- background-position: 8px center;
2876
- background-repeat: no-repeat;
2877
- background-size: 14px 14px;
2918
+ }
2919
+ .sv-grid-menu-search-wrap {
2920
+ position: relative;
2921
+ display: block;
2922
+ }
2923
+ .sv-grid-menu-search-wrap > .sv-grid-icon {
2924
+ position: absolute;
2925
+ left: 8px;
2926
+ top: 50%;
2927
+ transform: translateY(-50%);
2928
+ width: 14px;
2929
+ height: 14px;
2930
+ color: var(--sg-muted, #94a3b8);
2931
+ pointer-events: none;
2878
2932
  }
2879
2933
 
2880
2934
  /* Filter menu vertical rhythm. */
@@ -2910,6 +2964,11 @@ select.sv-grid-fr-editor {
2910
2964
  opacity: 1;
2911
2965
  }
2912
2966
 
2967
+ .sv-grid-board-search > .sv-grid-icon {
2968
+ width: 14px;
2969
+ height: 14px;
2970
+ }
2971
+
2913
2972
  /* Kanban board mode search box (board.searchable) */
2914
2973
  .sv-grid-board-search {
2915
2974
  display: flex;
@@ -3048,6 +3107,16 @@ select.sv-grid-fr-editor {
3048
3107
  .sv-grid-chart-actions { display: inline-flex; align-items: center; gap: 6px; }
3049
3108
  .sv-grid-chart-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
3050
3109
  .sv-grid-chart-controls:empty { display: none; }
3110
+ /* Says why the chosen chart type cannot draw yet - a missing Split by, too few
3111
+ groups. The picker deliberately does NOT hide such a type: options that come
3112
+ and go as the user filters are worse than one sentence of explanation. */
3113
+ .sv-grid-chart-hint {
3114
+ flex-basis: 100%;
3115
+ margin: 2px 0 0;
3116
+ font-size: 11.5px;
3117
+ font-weight: 400;
3118
+ color: var(--sg-muted, #64748b);
3119
+ }
3051
3120
  .sv-grid-chart-ctl { display: flex; flex-direction: column; gap: 2px; font-size: 11px; font-weight: 600; color: var(--sg-muted, #64748b); }
3052
3121
  .sv-grid-chart-ctl select {
3053
3122
  font: inherit; font-size: 12.5px; font-weight: 400; color: var(--sg-fg, #0f172a);