@kanunilabs/datagrid-react 1.3.0 → 1.5.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/index.cjs +2 -2
- package/dist/index.d.cts +38 -6
- package/dist/index.d.ts +38 -6
- package/dist/index.js +2 -2
- package/dist/styles.css +91 -0
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -706,6 +706,29 @@
|
|
|
706
706
|
font-variant-numeric: tabular-nums;
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
+
/* Numbered page buttons (`pagination.pageButtons`). The current page is the
|
|
710
|
+
one marked `aria-current`, so the style follows the same attribute a screen
|
|
711
|
+
reader announces — the two cannot disagree. */
|
|
712
|
+
.kanuni-datagrid-pager-buttons .kanuni-datagrid-pager-page {
|
|
713
|
+
padding: 0 6px;
|
|
714
|
+
font-variant-numeric: tabular-nums;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/* `button` in the selector so it outranks the generic hover rule above. */
|
|
718
|
+
.kanuni-datagrid-pager-buttons button.kanuni-datagrid-pager-page[aria-current='page'] {
|
|
719
|
+
border-color: var(--dg-primary);
|
|
720
|
+
background: var(--dg-primary-soft);
|
|
721
|
+
color: var(--dg-primary);
|
|
722
|
+
font-weight: 600;
|
|
723
|
+
cursor: default;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.kanuni-datagrid-pager-gap {
|
|
727
|
+
min-width: 16px;
|
|
728
|
+
color: var(--dg-text-muted);
|
|
729
|
+
text-align: center;
|
|
730
|
+
}
|
|
731
|
+
|
|
709
732
|
/* ── Group panel ──────────────────────────────────────────── */
|
|
710
733
|
.kanuni-datagrid-group-panel {
|
|
711
734
|
display: flex;
|
|
@@ -1060,6 +1083,13 @@
|
|
|
1060
1083
|
cursor: pointer;
|
|
1061
1084
|
}
|
|
1062
1085
|
|
|
1086
|
+
/* A row `selection.isRowSelectable` refuses: the box stays (the column keeps
|
|
1087
|
+
its rhythm) but cannot be ticked. */
|
|
1088
|
+
.kanuni-datagrid-select-cell input:disabled {
|
|
1089
|
+
cursor: not-allowed;
|
|
1090
|
+
opacity: 0.45;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1063
1093
|
/* ── Row numbers (gap analysis P3.5) ───────────────────────── */
|
|
1064
1094
|
/* Muted and tabular on purpose. The number is an address, not data: at full
|
|
1065
1095
|
text weight it competes with the first real column, and proportional digits
|
|
@@ -1681,6 +1711,35 @@
|
|
|
1681
1711
|
}
|
|
1682
1712
|
}
|
|
1683
1713
|
|
|
1714
|
+
/* A block the server failed to send (P-SSRM-01): a message and a Retry button
|
|
1715
|
+
on each of its rows instead of a skeleton that never resolves. */
|
|
1716
|
+
.kanuni-datagrid-row--load-failed .kanuni-datagrid-loading-cell {
|
|
1717
|
+
display: flex;
|
|
1718
|
+
align-items: center;
|
|
1719
|
+
gap: 8px;
|
|
1720
|
+
color: var(--dg-text-muted);
|
|
1721
|
+
font-size: var(--dg-control-font-size);
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
.kanuni-datagrid-retry-button {
|
|
1725
|
+
padding: 2px 10px;
|
|
1726
|
+
border: 1px solid var(--dg-border-strong);
|
|
1727
|
+
border-radius: var(--dg-radius-control);
|
|
1728
|
+
background: var(--dg-surface);
|
|
1729
|
+
color: var(--dg-text);
|
|
1730
|
+
font: inherit;
|
|
1731
|
+
cursor: pointer;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.kanuni-datagrid-retry-button:hover {
|
|
1735
|
+
background: var(--dg-surface-hover);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.kanuni-datagrid-retry-button:focus-visible {
|
|
1739
|
+
outline: 2px solid var(--dg-focus-ring);
|
|
1740
|
+
outline-offset: 1px;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1684
1743
|
/* Respect a reduced-motion preference: the pulse is decoration, and a user who
|
|
1685
1744
|
asked for stillness should get a static placeholder. */
|
|
1686
1745
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1909,6 +1968,38 @@
|
|
|
1909
1968
|
border-top: var(--dg-header-border);
|
|
1910
1969
|
}
|
|
1911
1970
|
|
|
1971
|
+
/* Sticky group headers (grouping.stickyHeaders). A zero-height band that
|
|
1972
|
+
sticks under the header stack (and any pinned-top rows); the header copies
|
|
1973
|
+
hang from it at the offsets core computed, so the rows keep scrolling
|
|
1974
|
+
underneath and nothing below moves. Above the rows, below the header. */
|
|
1975
|
+
.kanuni-datagrid-sticky-groups {
|
|
1976
|
+
position: sticky;
|
|
1977
|
+
top: calc(
|
|
1978
|
+
var(--dg-band-offset, 0px) + var(--dg-header-height) * var(--dg-pinned-gap, 1) +
|
|
1979
|
+
var(--dg-sticky-below, 0px)
|
|
1980
|
+
);
|
|
1981
|
+
z-index: 2;
|
|
1982
|
+
height: 0;
|
|
1983
|
+
overflow: visible;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
.kanuni-datagrid-sticky-group {
|
|
1987
|
+
position: absolute;
|
|
1988
|
+
left: 0;
|
|
1989
|
+
/* As wide as the ROW, not the band: lead columns (checkbox, row number)
|
|
1990
|
+
make a row wider than the column layout the band is sized to, and the
|
|
1991
|
+
part past the band's edge showed the rows underneath through the copy. */
|
|
1992
|
+
width: max-content;
|
|
1993
|
+
min-width: 100%;
|
|
1994
|
+
/* The group colour may be translucent; the rows underneath must not show
|
|
1995
|
+
through the copy. */
|
|
1996
|
+
background: var(--dg-surface);
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
.kanuni-datagrid-sticky-group--last {
|
|
2000
|
+
box-shadow: 0 2px 4px -2px color-mix(in srgb, var(--dg-text, #000) 25%, transparent);
|
|
2001
|
+
}
|
|
2002
|
+
|
|
1912
2003
|
/* The rows inside keep the grid's cell geometry but not its striping — these
|
|
1913
2004
|
are not part of the alternating rhythm of the data. */
|
|
1914
2005
|
.kanuni-datagrid-pinned-rows .kanuni-datagrid-row,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanunilabs/datagrid-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.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.
|
|
57
|
+
"@kanunilabs/datagrid-core": "1.7.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"
|