@kanunilabs/datagrid-react 1.2.2 → 1.4.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.
package/dist/styles.css CHANGED
@@ -869,6 +869,14 @@
869
869
  color: var(--dg-text-muted);
870
870
  }
871
871
 
872
+ /* Ticks every row under the group (multiple selection + checkbox column). */
873
+ .kanuni-datagrid-group-checkbox {
874
+ margin: 0;
875
+ margin-inline-end: 6px;
876
+ vertical-align: middle;
877
+ cursor: pointer;
878
+ }
879
+
872
880
  .kanuni-datagrid-group-caption {
873
881
  color: var(--dg-text-muted);
874
882
  font-weight: 400;
@@ -925,6 +933,22 @@
925
933
  cursor: default;
926
934
  }
927
935
 
936
+ /* `grouping.display: 'aligned'` — the group's name inside the first column's
937
+ cell, and each summary under its own column. The cell clips like any
938
+ other; the twisty and count stay with the name. */
939
+ .kanuni-datagrid-group-inline {
940
+ display: inline-flex;
941
+ align-items: center;
942
+ gap: 6px;
943
+ min-width: 0;
944
+ white-space: nowrap;
945
+ }
946
+
947
+ .kanuni-datagrid-group-aggregate-value {
948
+ font-weight: 600;
949
+ font-variant-numeric: tabular-nums;
950
+ }
951
+
928
952
  .kanuni-datagrid-group-row--focused {
929
953
  outline: 2px solid var(--dg-focus-ring);
930
954
  outline-offset: -2px;
@@ -1885,6 +1909,38 @@
1885
1909
  border-top: var(--dg-header-border);
1886
1910
  }
1887
1911
 
1912
+ /* Sticky group headers (grouping.stickyHeaders). A zero-height band that
1913
+ sticks under the header stack (and any pinned-top rows); the header copies
1914
+ hang from it at the offsets core computed, so the rows keep scrolling
1915
+ underneath and nothing below moves. Above the rows, below the header. */
1916
+ .kanuni-datagrid-sticky-groups {
1917
+ position: sticky;
1918
+ top: calc(
1919
+ var(--dg-band-offset, 0px) + var(--dg-header-height) * var(--dg-pinned-gap, 1) +
1920
+ var(--dg-sticky-below, 0px)
1921
+ );
1922
+ z-index: 2;
1923
+ height: 0;
1924
+ overflow: visible;
1925
+ }
1926
+
1927
+ .kanuni-datagrid-sticky-group {
1928
+ position: absolute;
1929
+ left: 0;
1930
+ /* As wide as the ROW, not the band: lead columns (checkbox, row number)
1931
+ make a row wider than the column layout the band is sized to, and the
1932
+ part past the band's edge showed the rows underneath through the copy. */
1933
+ width: max-content;
1934
+ min-width: 100%;
1935
+ /* The group colour may be translucent; the rows underneath must not show
1936
+ through the copy. */
1937
+ background: var(--dg-surface);
1938
+ }
1939
+
1940
+ .kanuni-datagrid-sticky-group--last {
1941
+ box-shadow: 0 2px 4px -2px color-mix(in srgb, var(--dg-text, #000) 25%, transparent);
1942
+ }
1943
+
1888
1944
  /* The rows inside keep the grid's cell geometry but not its striping — these
1889
1945
  are not part of the alternating rhythm of the data. */
1890
1946
  .kanuni-datagrid-pinned-rows .kanuni-datagrid-row,
@@ -2083,6 +2139,11 @@
2083
2139
  .kanuni-datagrid-tree-cell--ancestor {
2084
2140
  color: var(--dg-text-muted, #64748b);
2085
2141
  }
2142
+ /* A made-up step of a path tree (`tree.getDataPath`) — a folder, not a
2143
+ record: its name reads as a heading over the rows beneath it. */
2144
+ .kanuni-datagrid-tree-path-label {
2145
+ font-weight: 600;
2146
+ }
2086
2147
  /* ── Cell flash (P1.7) ─────────────────────────────────────
2087
2148
  The "this number just changed" pulse. Driven by a class the adapter adds
2088
2149
  and removes; the colour is a token so all six themes and dark mode inherit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanunilabs/datagrid-react",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "description": "High-performance React data grid — virtualized rows and columns, sticky pinned columns, sorting, filtering and theming",
5
5
  "keywords": [
6
6
  "react",
@@ -54,7 +54,7 @@
54
54
  "access": "public"
55
55
  },
56
56
  "dependencies": {
57
- "@kanunilabs/datagrid-core": "1.4.1"
57
+ "@kanunilabs/datagrid-core": "1.6.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": ">=18.0.0",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "scripts": {
67
67
  "lint": "tsc --noEmit",
68
- "build": "tsup && node scripts/build-css.mjs",
68
+ "build": "tsup && node scripts/build-css.mjs && node ../../scripts/check-esm-load.mjs",
69
69
  "build:css": "node scripts/build-css.mjs",
70
70
  "build:check": "tsc --noEmit && node ../../scripts/check-hook-order.mjs ../..",
71
71
  "test": "vitest run --passWithNoTests"