@bigcapitalhq/blueprintjs-react-table 0.1.0 → 0.3.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 (49) hide show
  1. package/README.md +245 -7
  2. package/dist/blueprintjs-react-table.cjs +6 -0
  3. package/dist/blueprintjs-react-table.cjs.map +1 -0
  4. package/dist/blueprintjs-react-table.js +2533 -0
  5. package/dist/blueprintjs-react-table.js.map +1 -0
  6. package/dist/styles.css +1 -0
  7. package/dist/types/components/BP_Table.d.ts +119 -6
  8. package/dist/types/components/body/TableBody.d.ts +18 -1
  9. package/dist/types/components/body/TableBodyCell.d.ts +6 -3
  10. package/dist/types/components/body/TableGhostCells.d.ts +18 -4
  11. package/dist/types/components/body/TableRowHeaderCell.d.ts +9 -3
  12. package/dist/types/components/body/TableRowHeaders.d.ts +16 -1
  13. package/dist/types/components/body/TableRowSelectionCell.d.ts +18 -0
  14. package/dist/types/components/common/cell-selection.d.ts +57 -0
  15. package/dist/types/components/common/cellCoordinates.d.ts +25 -4
  16. package/dist/types/components/common/classes.d.ts +8 -0
  17. package/dist/types/components/common/dimensions.d.ts +5 -0
  18. package/dist/types/components/common/menu-context.d.ts +81 -0
  19. package/dist/types/components/common/pinning.d.ts +44 -0
  20. package/dist/types/components/common/region.d.ts +26 -0
  21. package/dist/types/components/common/table-selection-context.d.ts +3 -3
  22. package/dist/types/components/container/TableContainer.d.ts +8 -2
  23. package/dist/types/components/head/TableColumnHeaders.d.ts +4 -1
  24. package/dist/types/components/head/TableHead.d.ts +3 -1
  25. package/dist/types/components/head/TableRowSelectionHeaderCell.d.ts +13 -0
  26. package/dist/types/components/layers/TableRegionLayer.d.ts +10 -2
  27. package/dist/types/components/layers/TableReorderGuides.d.ts +10 -1
  28. package/dist/types/components/layers/TableResizeGuides.d.ts +18 -5
  29. package/dist/types/components/pagination/TablePaginationBar.d.ts +30 -0
  30. package/dist/types/components/pagination/constants.d.ts +4 -0
  31. package/dist/types/components/pagination/withPagination.d.ts +51 -0
  32. package/dist/types/components/quadrant/TableQuadrant.d.ts +41 -10
  33. package/dist/types/components/quadrant/TableQuadrantStack.d.ts +38 -0
  34. package/dist/types/components/quadrant/quadrant-type.d.ts +10 -0
  35. package/dist/types/hooks/use-bp-table-instance.d.ts +31 -0
  36. package/dist/types/hooks/use-cell-selection.d.ts +62 -0
  37. package/dist/types/hooks/use-column-header-height.d.ts +24 -0
  38. package/dist/types/hooks/use-column-reorder.d.ts +7 -3
  39. package/dist/types/hooks/use-freeze-pinning.d.ts +25 -0
  40. package/dist/types/hooks/use-row-virtualizer.d.ts +13 -2
  41. package/dist/types/hooks/use-uncontrolled.d.ts +19 -0
  42. package/dist/types/index.d.ts +8 -0
  43. package/dist/types/types.d.ts +12 -1
  44. package/package.json +2 -2
  45. package/dist/types/components/body/TableStaticBody.d.ts +0 -10
  46. package/dist/types/components/body/VirtualBody.d.ts +0 -12
  47. package/dist/types/components/quadrant/TableBottomContainer.d.ts +0 -14
  48. package/dist/types/components/quadrant/TableTopContainer.d.ts +0 -11
  49. package/dist/types/hooks/use-cell-focus-selection.d.ts +0 -34
@@ -0,0 +1 @@
1
+ .bp6-table-cell{display:inline-block;font-size:12px;height:20px;line-height:20px;padding:0 8px;transition:color .3s}.bp6-dark .bp6-table-cell:not([class*=bp6-intent-]):not(.bp6-loading){color:#f6f7f9}.bp6-table-cell.bp6-intent-primary{background-color:#2d72d21a;color:#2d72d2}.bp6-dark .bp6-table-cell.bp6-intent-primary{background:#2d72d21a;color:#4c90f0}.bp6-table-cell.bp6-intent-success{background-color:#2385511a;color:#238551}.bp6-dark .bp6-table-cell.bp6-intent-success{background:#2385511a;color:#32a467}.bp6-table-cell.bp6-intent-warning{background-color:#c876191a;color:#c87619}.bp6-dark .bp6-table-cell.bp6-intent-warning{background:#c876191a;color:#ec9a3c}.bp6-table-cell.bp6-intent-danger{background-color:#cd42461a;color:#cd4246}.bp6-dark .bp6-table-cell.bp6-intent-danger{background:#cd42461a;color:#e76a6e}.bp6-table-editing-enabled .bp6-table-cell{cursor:text}.bp6-table-selection-enabled .bp6-table-cell{cursor:cell}.bp6-table-cell.bp6-table-truncated-cell{overflow:hidden}.bp6-table-cell.bp6-large,.bp6-large .bp6-table-cell{font-size:14px;height:30px;line-height:30px}.bp6-table-cell.bp6-loading{display:flex;flex-direction:column;justify-content:center;color:transparent}.bp6-table-cell:focus{outline:none}.bp6-table-cell-interactive{z-index:21}.bp6-table-striped .bp6-table-cell-ledger-even{background-color:#fff}.bp6-table-striped .bp6-table-cell-ledger-odd{background-color:#fafbfc}.bp6-dark .bp6-table-striped .bp6-table-cell-ledger-even{background-color:#2f343c}.bp6-dark .bp6-table-striped .bp6-table-cell-ledger-odd{background-color:#343941}.bp6-table-cell.bp6-table-row-selected{background-color:#2d72d21a}.bp6-dark .bp6-table-cell.bp6-table-row-selected{background-color:#4c90f01a}.bp6-table-editable-name input{height:20px}.bp6-table-editable-text{top:0;right:0;bottom:0;left:0;padding:0 8px;position:absolute}.bp6-table-cell-text-placeholder{color:#5f6b7c}.bp6-dark .bp6-table-cell-text-placeholder{color:#abb3bf}.bp6-table-null{color:#5f6b7c99}.bp6-table-truncated-value{left:8px;max-height:100%;overflow:hidden;position:absolute;right:35px;text-overflow:ellipsis;top:0}.bp6-table-truncated-format-text{left:8px;max-height:100%;overflow:hidden;position:absolute;right:10px;text-overflow:ellipsis;top:0}.bp6-table-truncated-popover-target{border-radius:4px;bottom:0;cursor:pointer;opacity:.3;padding:0 4px;position:absolute;right:4px;text-align:center;top:0}.bp6-table-truncated-popover-target .bp6-icon-standard{line-height:20px}.bp6-table-truncated-popover-target.bp6-popover-open{opacity:1}.bp6-table-truncated-popover-target.bp6-popover-open .bp6-icon-standard{color:#2d72d2}.bp6-table-truncated-popover-target:hover{opacity:1}.bp6-table-truncated-popover{font-family:monospace;max-height:300px;max-width:600px;min-width:200px;overflow:auto;padding:8px}.bp6-table-popover-whitespace-pre{white-space:pre}.bp6-table-popover-whitespace-normal{white-space:normal}.bp6-table-container{box-shadow:0 0 0 1px #11141826}.bp6-table-menu,.bp6-table-row-selection-header-cell{box-shadow:0 1px #11141826,1px 0 #11141826}.bp6-table-header{box-shadow:0 1px #11141826}.bp6-table-cell{box-shadow:inset 0 -1px #11141826,inset -1px 0 #11141826}.bp6-table-horizontal-cell-divider{box-shadow:inset 0 1px #11141826;height:1px}.bp6-table-column-headers .bp6-table-header{box-shadow:0 1px #11141826,inset -1px 0 #11141826}.bp6-table-column-headers .bp6-table-header:before{bottom:0;right:1px}.bp6-table-row-headers .bp6-table-header{box-shadow:inset 0 -1px #11141826,1px 0 #11141826}.bp6-table-row-headers .bp6-table-header:before{bottom:1px;right:0}.bp6-table-body .bp6-table-last-in-row{box-shadow:inset 0 -1px #11141826,1px 0 #11141826}.bp6-table-body .bp6-table-last-in-column{box-shadow:0 1px #11141826,inset -1px 0 #11141826}.bp6-table-body .bp6-table-last-in-row.bp6-table-last-in-column{box-shadow:0 1px #11141826,1px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-cell.bp6-table-last-in-row{box-shadow:inset 0 -1px #11141826,inset -3px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-cell.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141826,inset -1px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-cell.bp6-table-last-in-column.bp6-table-last-in-row{box-shadow:inset 0 -3px #11141826,inset -3px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-row{box-shadow:0 1px #11141826,inset -3px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-row:before{bottom:0;right:3px}.bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141826,1px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column:before{bottom:3px;right:0}.bp6-table-quadrant-left .bp6-table-cell.bp6-table-last-in-row{box-shadow:inset 0 -1px #11141826,inset -3px 0 #11141826}.bp6-table-quadrant-top .bp6-table-cell.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141826,inset -1px 0 #11141826}.bp6-dark .bp6-table-container{box-shadow:0 0 0 1px #11141866}.bp6-dark .bp6-table-menu,.bp6-dark .bp6-table-row-selection-header-cell{box-shadow:0 1px #11141866,1px 0 #11141866}.bp6-dark .bp6-table-header{box-shadow:0 1px #11141866}.bp6-dark .bp6-table-cell{box-shadow:inset 0 -1px #11141866,inset -1px 0 #11141866}.bp6-dark .bp6-table-horizontal-cell-divider{box-shadow:inset 0 1px #11141866;height:1px}.bp6-dark .bp6-table-column-headers .bp6-table-header{box-shadow:0 1px #11141866,inset -1px 0 #11141866}.bp6-dark .bp6-table-column-headers .bp6-table-header:before{bottom:0;right:1px}.bp6-dark .bp6-table-row-headers .bp6-table-header{box-shadow:inset 0 -1px #11141866,1px 0 #11141866}.bp6-dark .bp6-table-row-headers .bp6-table-header:before{bottom:1px;right:0}.bp6-dark .bp6-table-body .bp6-table-last-in-row{box-shadow:inset 0 -1px #11141866,1px 0 #11141866}.bp6-dark .bp6-table-body .bp6-table-last-in-column{box-shadow:0 1px #11141866,inset -1px 0 #11141866}.bp6-dark .bp6-table-body .bp6-table-last-in-row.bp6-table-last-in-column{box-shadow:0 1px #11141866,1px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-cell.bp6-table-last-in-row{box-shadow:inset 0 -1px #11141866,inset -3px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-cell.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141866,inset -1px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-cell.bp6-table-last-in-column.bp6-table-last-in-row{box-shadow:inset 0 -3px #11141866,inset -3px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-row{box-shadow:0 1px #11141866,inset -3px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-row:before{bottom:0;right:3px}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141866,1px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column:before{bottom:3px;right:0}.bp6-dark .bp6-table-quadrant-left .bp6-table-cell.bp6-table-last-in-row{box-shadow:inset 0 -1px #11141866,inset -3px 0 #11141866}.bp6-dark .bp6-table-quadrant-top .bp6-table-cell.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141866,inset -1px 0 #11141866}@keyframes skeleton-glow{0%{background:#d3d8de33;border-color:#d3d8de33}to{background:#5f6b7c33;border-color:#5f6b7c33}}.bp6-skeleton{animation:1s linear infinite alternate skeleton-glow;background:#d3d8de33;background-clip:padding-box!important;border-color:#d3d8de33!important;border-radius:2px;box-shadow:none!important;color:transparent!important;cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none}.bp6-skeleton:before,.bp6-skeleton:after,.bp6-skeleton *{visibility:hidden!important}@keyframes skeleton-fade-in{0%{opacity:0}to{opacity:1}}.bp6-table-header{align-items:flex-start;flex:1 1 auto;justify-content:space-between;position:relative;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.bp6-table-header:before{content:"";display:block;left:0;position:absolute;top:0}.bp6-table-header .bp6-table-row-name,.bp6-table-header .bp6-table-column-name,.bp6-table-header .bp6-table-header-content{position:relative;width:100%}.bp6-table-selection-enabled .bp6-table-header:hover:before,.bp6-table-header.bp6-table-header-active:before{background-color:#e5e8eb}.bp6-dark .bp6-table-selection-enabled .bp6-table-header:hover:before,.bp6-dark .bp6-table-header.bp6-table-header-active:before{background-color:#404854}.bp6-table-header.bp6-table-header-selected:before{background-image:linear-gradient(90deg,#2d72d21a,#2d72d21a)}.bp6-table-header.bp6-table-row-selected:before{background-color:#2d72d21a}.bp6-table-th-menu-container{flex-shrink:0;opacity:0;position:absolute;right:1px;text-align:right}.bp6-table-header:hover .bp6-table-th-menu-container,.bp6-table-header-active .bp6-table-th-menu-container,.bp6-table-th-menu-container.bp6-table-th-menu-open{opacity:1}.bp6-table-interaction-bar .bp6-table-th-menu-container{line-height:20px}.bp6-table-th-menu-container-background{height:30px;pointer-events:none;position:absolute;right:0;top:0;width:50px}.bp6-table-interaction-bar .bp6-table-th-menu-container-background{height:20px}.bp6-table-th-menu-open .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#f6f7f900,#f6f7f9 50%)}.bp6-dark .bp6-table-th-menu-open .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#383e4700,#383e47 50%)}.bp6-table-header:hover .bp6-table-th-menu-container-background,.bp6-table-header-active .bp6-table-th-menu-container-background,.bp6-table-th-menu-open .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#f6f7f900,#f6f7f9 50%)}.bp6-dark .bp6-table-header:hover .bp6-table-th-menu-container-background,.bp6-dark .bp6-table-header-active .bp6-table-th-menu-container-background,.bp6-dark .bp6-table-th-menu-open .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#383e4700,#383e47 50%)}.bp6-table-selection-enabled .bp6-table-header:hover .bp6-table-th-menu-container-background,.bp6-table-selection-enabled .bp6-table-header-active .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#e5e8eb00,#e5e8eb 50%)}.bp6-dark .bp6-table-selection-enabled .bp6-table-header:hover .bp6-table-th-menu-container-background,.bp6-dark .bp6-table-selection-enabled .bp6-table-header-active .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#40485400,#404854 50%)}.bp6-table-selection-enabled .bp6-table-header.bp6-table-header-selected .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#e2eaf500,#e2eaf5 50%)}.bp6-dark .bp6-table-selection-enabled .bp6-table-header.bp6-table-header-selected .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#37435500,#374355 50%)}.bp6-table-selection-enabled .bp6-table-header.bp6-table-header-selected:hover .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#d3dce800,#d3dce8 50%)}.bp6-dark .bp6-table-selection-enabled .bp6-table-header.bp6-table-header-selected:hover .bp6-table-th-menu-container-background{background-image:linear-gradient(90deg,#3e4c6100,#3e4c61 50%)}.bp6-table-th-menu{cursor:pointer;height:30px;position:relative;width:30px}.bp6-table-interaction-bar .bp6-table-th-menu{height:20px;right:1px;text-align:center;width:20px}.bp6-table-interaction-bar .bp6-table-th-menu .bp6-icon{margin:2px 2px 2px 3px;vertical-align:top}.bp6-table-th-menu .bp6-icon{background-color:#f6f7f9;border-radius:4px;box-shadow:inset 0 0 0 1px #11141833;color:#5f6b7c;margin-right:7px;margin-top:7px}.bp6-table-selection-enabled .bp6-table-th-menu .bp6-icon{background-color:#e5e8eb}.bp6-table-selection-enabled .bp6-table-header.bp6-table-header-selected .bp6-table-th-menu .bp6-icon{background-color:linear-gradient(90deg,rgba(88.5882352941%,91.6470588235%,96.1176470588%,0) 0%,rgb(88.5882352941%,91.6470588235%,96.1176470588%) 50%)}.bp6-dark .bp6-table-th-menu .bp6-icon{background-color:#383e47;box-shadow:inset 0 0 0 1px #fff3;color:#abb3bf}.bp6-dark .bp6-table-selection-enabled .bp6-table-th-menu .bp6-icon{background-color:#404854}.bp6-dark .bp6-table-selection-enabled .bp6-table-header.bp6-table-header-selected .bp6-table-th-menu .bp6-icon{background-color:linear-gradient(90deg,rgba(21.5294117647%,26.3529411765%,33.2941176471%,0) 0%,rgb(21.5294117647%,26.3529411765%,33.2941176471%) 50%)}.bp6-table-th-menu:hover .bp6-icon{box-shadow:inset 0 0 0 1px #11141866;color:#1c2127}.bp6-dark .bp6-table-th-menu:hover .bp6-icon{box-shadow:inset 0 0 0 1px #fff6;color:#f6f7f9}.bp6-table-th-menu.bp6-popover-open .bp6-icon,.bp6-dark .bp6-table-th-menu.bp6-popover-open .bp6-icon{background-color:#2d72d2;box-shadow:none;color:#fff}.bp6-table-thead{display:block;white-space:nowrap}.bp6-table-column-header-tr{display:flex}.bp6-table-column-header-tr .bp6-table-header{flex:0 0}.bp6-table-column-headers .bp6-table-interaction-bar{height:20px;position:relative}.bp6-table-column-headers .bp6-table-header{line-height:30px;min-height:30px;vertical-align:top}.bp6-table-row-headers .bp6-table-header{line-height:20px;min-width:30px;overflow:hidden}.bp6-table-column-name-text,.bp6-table-row-name-text{flex-grow:1;pointer-events:none}.bp6-table-truncated-text{max-height:100%;overflow:hidden;text-overflow:ellipsis}.bp6-table-no-wrap-text{white-space:nowrap}.bp6-table-column-name-text{padding:0 8px}.bp6-table-editable-name{display:block;pointer-events:all}.bp6-table-editable-name.bp6-editable-text:before{border-radius:0;bottom:0;left:-9px;right:-8px;top:-1px}.bp6-table-editable-name.bp6-editable-text:not(.bp6-editable-editing):before{box-shadow:none}.bp6-table-editable-name.bp6-editable-text.bp6-editable-editing:before{bottom:1px;cursor:text;left:-8px;right:-7px;top:0}.bp6-table-editable-name.bp6-editable-text.bp6-editable-editing.bp6-table-editable-text:before{left:0;right:1px}.bp6-table-column-name .bp6-table-editable-name.bp6-editable-text:before{bottom:-1px}.bp6-table-column-name .bp6-table-editable-name.bp6-editable-text.bp6-editable-editing:before{bottom:0}.bp6-table-column-name-text .bp6-table-editable-name input{height:30px}.bp6-table-column-name{display:flex;flex-direction:column;font-size:14px;text-align:left}.bp6-table-row-name{display:block;font-size:12px;padding:0 4px;text-align:right}.bp6-table-row-selection-cell,.bp6-table-row-selection-header-cell{align-items:center;display:flex;justify-content:center}.bp6-table-row-headers .bp6-table-row-selection-cell{min-width:0}.bp6-table-row-selection-checkbox{align-items:center;display:flex;flex:0 0 auto;justify-content:center}.bp6-table-row-selection-checkbox .bp6-control:not(.bp6-align-right){align-items:center;display:flex;justify-content:center;margin:0;padding-inline-start:0}.bp6-table-row-selection-checkbox .bp6-control:not(.bp6-align-right) .bp6-control-indicator{margin:0}.bp6-table-header-content{font-size:14px;white-space:normal}.bp6-table-header-content .is-searchable:not(.is-focused)>.Select-control{background:none;box-shadow:none}.bp6-table-header-content .is-searchable>.Select-control{border-radius:0}.bp6-table-header-content .is-searchable>.Select-control .Select-value{cursor:pointer}.bp6-table-header-content .Select-value{right:-1px}.bp6-table-column-name,.bp6-table-row-name{transition:color .3s}.bp6-table-header.bp6-loading{display:flex;flex-direction:column;justify-content:center}.bp6-table-header.bp6-loading .bp6-table-column-name,.bp6-table-header.bp6-loading .bp6-table-row-name{flex:1}.bp6-table-header.bp6-loading .bp6-table-column-name-text{display:flex;flex-direction:column;justify-content:center;padding:8px}.bp6-table-header.bp6-loading .bp6-table-column-name-text .bp6-skeleton{height:8px}.bp6-table-header.bp6-loading .bp6-table-row-name{display:flex;flex-direction:column;justify-content:center}.bp6-table-selection-enabled.bp6-table-column-headers .bp6-table-header.bp6-table-header-reorderable{cursor:grab}.bp6-table-selection-enabled.bp6-table-column-headers .bp6-table-header.bp6-table-header-reorderable:active{cursor:grabbing}.bp6-table-selection-enabled.bp6-table-column-headers .bp6-table-header.bp6-table-header-reorderable .bp6-table-interaction-bar{cursor:grab}.bp6-table-selection-enabled.bp6-table-column-headers .bp6-table-header.bp6-table-header-reorderable .bp6-table-interaction-bar:active{cursor:grabbing}.bp6-table-selection-enabled.bp6-table-column-headers .bp6-table-header{cursor:s-resize}.bp6-table-selection-enabled.bp6-table-row-headers .bp6-table-header.bp6-table-header-reorderable{cursor:grab}.bp6-table-selection-enabled.bp6-table-row-headers .bp6-table-header.bp6-table-header-reorderable:active{cursor:grabbing}.bp6-table-selection-enabled.bp6-table-row-headers .bp6-table-header.bp6-table-header-reorderable .bp6-table-interaction-bar{cursor:grab}.bp6-table-selection-enabled.bp6-table-row-headers .bp6-table-header.bp6-table-header-reorderable .bp6-table-interaction-bar:active{cursor:grabbing}.bp6-table-selection-enabled.bp6-table-row-headers .bp6-table-header{cursor:e-resize}.bp6-table-selection-enabled.bp6-table-menu{cursor:se-resize}.bp6-table-selection-enabled .bp6-editable-text:before,.bp6-table-selection-enabled .bp6-editable-content{cursor:cell}.bp6-table-column-header-cell.bp6-table-has-reorder-handle:not(.bp6-table-has-interaction-bar) .bp6-table-column-name-text{padding-left:22px}.bp6-table-column-header-cell.bp6-table-has-reorder-handle:not(.bp6-table-has-interaction-bar) .bp6-table-editable-name:before{left:-22px}.bp6-table-reorder-handle-target{cursor:grab}.bp6-table-reorder-handle-target:active{cursor:grabbing}.bp6-table-reorder-handle-target{align-items:center;bottom:0;color:#5f6b7c99;display:flex;justify-content:center;left:0;position:absolute;top:0;width:22px}.bp6-table-reorder-handle-target:hover{color:#1c2127}.bp6-table-reorder-handle-target:active{color:#2d72d2}.bp6-dark .bp6-table-reorder-handle-target{color:#abb3bf99}.bp6-dark .bp6-table-reorder-handle-target:hover{color:#f6f7f9}.bp6-dark .bp6-table-reorder-handle-target:active{color:#2d72d2}.bp6-table-reorder-handle{display:flex}.bp6-table-resize-handle-target{opacity:0;position:absolute;-webkit-user-select:none;user-select:none;z-index:20}.bp6-table-resize-handle-target:hover,.bp6-table-resize-handle-target.bp6-table-dragging{opacity:1}.bp6-table-resize-handle-target.bp6-table-resize-vertical{bottom:-1px;cursor:ew-resize;right:0;top:0;width:4px}.bp6-table-resize-handle-target.bp6-table-resize-horizontal{bottom:0;cursor:ns-resize;height:4px;left:0;right:-1px}.bp6-table-resize-handle{background-color:#2d72d2;position:absolute;z-index:20}.bp6-table-resize-handle.bp6-table-dragging{background-color:#2d72d2}.bp6-table-resize-vertical .bp6-table-resize-handle{bottom:0;left:2px;top:0;width:3px}.bp6-table-resize-horizontal .bp6-table-resize-handle{height:3px;left:0;right:0;top:2px}.bp6-table-resize-guides .bp6-table-horizontal-guide{background-color:#2d72d2;height:3px;margin-top:-3px}.bp6-table-resize-guides .bp6-table-horizontal-guide.bp6-table-horizontal-guide-flush-top{margin-top:0}.bp6-table-resize-guides .bp6-table-vertical-guide{background-color:#2d72d2;margin-left:-3px;width:3px}.bp6-table-resize-guides .bp6-table-vertical-guide.bp6-table-vertical-guide-flush-left{margin-left:0}.bp6-table-overlay-layer{top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;z-index:20}.bp6-table-overlay{position:absolute}.bp6-table-region{background-color:#8f99a81a;border:1px solid #8f99a8}.bp6-table-selection-region{background-color:#2d72d21a;border:1px solid #2d72d2}.bp6-dark .bp6-table-selection-region{background-color:#4c90f01a;border:1px solid #4c90f0}.bp6-table-column-headers .bp6-table-selection-region,.bp6-table-row-headers .bp6-table-selection-region{background-color:transparent}.bp6-table-focus-region{border:2px solid #2d72d2}.bp6-table-column-headers .bp6-table-region{border-bottom:none}.bp6-table-row-headers .bp6-table-region{border-right:none}.bp6-table-vertical-guide{bottom:0;top:0}.bp6-table-horizontal-guide{left:0;right:0}.bp6-table-reordering-cursor-overlay{cursor:grabbing}.bp6-table-reordering .bp6-table-reordering-cursor-overlay{pointer-events:all}.bp6-table-pagination-layout{display:flex;flex-direction:column;height:100%;min-height:0}.bp6-table-pagination-layout>.bp6-table-container{flex:1 1 auto}.bp6-table-pagination-bar{align-items:center;background-color:#f6f7f9;border-top:1px solid rgba(17,20,24,.15);color:#1c2127;display:flex;flex:0 0 auto;flex-wrap:wrap;gap:4px 16px;justify-content:space-between;min-height:36px;padding:4px 8px;-webkit-user-select:none;user-select:none}.bp6-dark .bp6-table-pagination-bar{background-color:#383e47;border-top-color:#11141866;color:#f6f7f9}.bp6-table-pagination-bar-controls{align-items:center;display:flex;gap:8px}.bp6-table-pagination-bar-text{color:#5f6b7c;font-size:12px;white-space:nowrap}.bp6-dark .bp6-table-pagination-bar-text{color:#abb3bf}.bp6-table-quadrant-stack{display:flex;height:100%;position:relative}.bp6-table-quadrant{background:#f6f7f9;left:0;overflow:hidden;position:absolute;top:0}.bp6-dark .bp6-table-quadrant{background-color:#383e47}.bp6-table-quadrant:not(.bp6-table-quadrant-main) .bp6-table-quadrant-scroll-container{overflow:hidden}.bp6-table-quadrant-scroll-container{top:0;right:0;bottom:0;left:0;overflow:auto;position:absolute;-webkit-user-select:none;user-select:none;will-change:transform}.bp6-table-no-vertical-scroll .bp6-table-quadrant-scroll-container{overflow-y:hidden}.bp6-table-no-horizontal-scroll .bp6-table-quadrant-scroll-container{overflow-x:hidden}.bp6-table-quadrant-body-container{position:relative}.bp6-table-quadrant-main{height:100%;left:auto;position:relative;top:auto;width:100%;z-index:0}.bp6-table-quadrant-main .bp6-table-quadrant-scroll-container{height:100%;width:100%}.bp6-table-quadrant-main .bp6-table-cell-client{background:#fff}.bp6-table-quadrant-top{z-index:1}.bp6-table-quadrant-left{transition:width .1s cubic-bezier(.4,1,.75,.9);z-index:2}.bp6-table-quadrant-left .bp6-table-body-virtual-client{min-width:1px}.bp6-table-quadrant-top-left{transition:width .1s cubic-bezier(.4,1,.75,.9);z-index:3}.bp6-table-quadrant-top-left .bp6-table-body-virtual-client{min-width:1px}.bp6-table-container{background-color:#f6f7f9;display:flex;flex-direction:column;height:100%;max-height:100%;max-width:100%;min-height:60px;overflow:hidden;will-change:transform}.bp6-dark .bp6-table-container{background-color:#383e47}.bp6-table-container .bp6-loading .bp6-skeleton{animation:.3s linear forwards skeleton-fade-in,1s linear infinite alternate skeleton-glow;animation-delay:0s,.3s;height:4px;opacity:0}.bp6-table-container .bp6-loading{color:transparent}.bp6-table-top-container{display:flex;flex:0 0 auto;min-height:0%}.bp6-table-container.bp6-table-no-rows .bp6-table-top-container{padding-bottom:1px}.bp6-table-bottom-container{color:#1c2127;display:flex;flex:1 1 auto;height:100%;min-height:0%}.bp6-dark .bp6-table-bottom-container{color:#f6f7f9}.bp6-table-menu{background-color:#f6f7f9;flex:0 0 auto;position:relative;z-index:13}.bp6-dark .bp6-table-menu{background-color:#383e47}.bp6-table-column-headers{background-color:#f6f7f9;color:#1c2127;display:block;position:relative;z-index:11}.bp6-dark .bp6-table-column-headers{background-color:#383e47;color:#f6f7f9}.bp6-table-row-headers{background-color:#f6f7f9;color:#5f6b7c;flex:0 0 auto;position:relative;transition:width .1s cubic-bezier(.4,1,.75,.9);z-index:12}.bp6-dark .bp6-table-row-headers{background-color:#383e47;color:#abb3bf}.bp6-table-body{flex:1 1 100%;overflow:scroll;position:relative;z-index:10}.bp6-table-body-virtual-client{position:relative}.bp6-table-cell-client{background:#fff}.bp6-dark .bp6-table-cell-client{background:#2f343c}.bp6-table-tbody{display:block;white-space:nowrap}.bp6-table-cell{display:inline-block}.bp6-table-no-layout{display:inline-block;position:absolute}
@@ -1,12 +1,45 @@
1
- import type { BP_RowData, BP_TableFeatures, BP_TableOptions, BP_VisibilityState, HTMLPropsRef } from '../types.js';
1
+ import type { BP_RowData, BP_RowSelectionState, BP_TableFeatures, BP_TableOptions, BP_VisibilityState, HTMLPropsRef } from '../types.js';
2
2
  import { TableLoadingOption } from '../types.js';
3
3
  import type { FocusedCellCoordinates, FocusedRegion, Region, RegionCardinality } from './common/region.js';
4
+ import type { BP_BodyContextMenuRenderer } from './common/menu-context.js';
4
5
  export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFeatures, TData> & {
6
+ /**
7
+ * Standard HTML attributes for the table's outer container element (the
8
+ * `<div>` wrapping the quadrants), e.g. `id`, `aria-*` attributes, and
9
+ * `className`, which is merged with the container's own classes. The `ref`
10
+ * points at this container, not the scrollable viewport.
11
+ */
5
12
  htmlProps?: HTMLPropsRef<HTMLDivElement>;
13
+ /** Height of each body row, in pixels. @default 20 */
6
14
  rowHeight?: number;
15
+ /** Width of the frozen row-header column, in pixels. @default 30 */
7
16
  rowHeaderWidth?: number;
17
+ /**
18
+ * If `false`, hides the row headers (the row-number column) and the corner
19
+ * settings menu, mirroring Blueprint's `enableRowHeader`. The row-selection
20
+ * checkboxes column (`showRowSelectionCheckboxes`) and frozen columns are
21
+ * unaffected. Row resizing (`enableRowResizing`) is unavailable without row
22
+ * headers, since its drag handle lives on the row header.
23
+ *
24
+ * @default true
25
+ */
26
+ enableRowHeader?: boolean;
27
+ /** Height of the frozen column-header row(s), in pixels. @default 30 */
8
28
  columnHeaderHeight?: number;
29
+ /**
30
+ * If `true`, column headers can be dragged horizontally to reorder the
31
+ * columns, mirroring Blueprint's `enableColumnReordering`.
32
+ *
33
+ * @default false
34
+ */
9
35
  enableColumnReordering?: boolean;
36
+ /**
37
+ * Skeleton placeholders rendered while data loads, mirroring Blueprint's
38
+ * `loadingOptions`: `CELLS` fills body cells, `COLUMN_HEADERS` fills column
39
+ * headers, and `ROW_HEADERS` fills row headers.
40
+ *
41
+ * @default []
42
+ */
10
43
  loadingOptions?: TableLoadingOption[];
11
44
  /**
12
45
  * If `true`, a chevron menu appears on each sortable column header (on
@@ -37,11 +70,29 @@ export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFe
37
70
  */
38
71
  enableGhostCells?: boolean;
39
72
  /**
40
- * A controlled focused cell. When provided, focus state is fully owned by the
41
- * caller and updated via `onFocusedCell`.
73
+ * An optional renderer for a custom context menu on the table body,
74
+ * mirroring Blueprint's `bodyContextMenuRenderer`. Right-clicking a cell
75
+ * opens the menu, and the renderer is supplied with a `BP_MenuContext`
76
+ * describing the region(s) of interest: the current selection when the
77
+ * click lands inside it, or the right-clicked cell otherwise. The context
78
+ * also exposes the right-clicked TanStack row and cell.
79
+ *
80
+ * Right-clicking a cell outside the current selection moves the selection
81
+ * (and the focused cell, when `enableFocusedCell` is enabled) to that cell
82
+ * before the menu opens.
83
+ */
84
+ bodyContextMenuRenderer?: BP_BodyContextMenuRenderer<TData>;
85
+ /**
86
+ * Whether the body context menu is enabled.
87
+ *
88
+ * @default true if bodyContextMenuRenderer is defined
89
+ */
90
+ enableBodyContextMenu?: boolean;
91
+ /**
92
+ * A callback invoked when the focused cell changes. The focused cell is
93
+ * the active cell of TanStack's cell selection feature (the anchor of the
94
+ * most recent selection range); it cannot be controlled directly.
42
95
  */
43
- focusedCell?: FocusedCellCoordinates;
44
- /** Callback invoked when the focused cell changes (controlled or uncontrolled). */
45
96
  onFocusedCell?: (cell: FocusedCellCoordinates) => void;
46
97
  /** Callback invoked when the focused region changes. */
47
98
  onFocusedRegion?: (region: FocusedRegion) => void;
@@ -64,6 +115,24 @@ export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFe
64
115
  * @default false
65
116
  */
66
117
  enableRowVirtualization?: boolean;
118
+ /**
119
+ * Number of leftmost columns that are frozen (pinned in place) while all
120
+ * other columns remain scrollable, mirroring Blueprint's
121
+ * `numFrozenColumns`. The frozen columns are derived from the current
122
+ * column order and column visibility, so reordering and hiding columns
123
+ * keeps freezing correct. Column headers and row headers are always frozen.
124
+ *
125
+ * @default 0
126
+ */
127
+ numFrozenColumns?: number;
128
+ /**
129
+ * Number of topmost rows that are frozen (pinned in place) while all other
130
+ * rows remain scrollable, mirroring Blueprint's `numFrozenRows`. The frozen
131
+ * rows are derived from the current row model, so freezing follows sorting.
132
+ *
133
+ * @default 0
134
+ */
135
+ numFrozenRows?: number;
67
136
  /**
68
137
  * Number of rows rendered above and below the visible viewport when
69
138
  * `enableRowVirtualization` is enabled.
@@ -102,5 +171,49 @@ export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFe
102
171
  minRowHeight?: number;
103
172
  /** Maximum height a row can be resized to. @default 100 */
104
173
  maxRowHeight?: number;
174
+ /**
175
+ * If `true`, a row-selection checkboxes column is rendered right after the
176
+ * row-number column: every row gets a checkbox, and the column's header is
177
+ * a select-all checkbox (with an indeterminate state). The checkboxes are
178
+ * wired to TanStack's row-selection state through the `rowSelection` /
179
+ * `defaultRowSelection` props (or the standard `state.rowSelection` /
180
+ * `initialState.rowSelection` options) and `onRowSelectionChange`, which
181
+ * fires in both the controlled and uncontrolled modes. Shift-clicking a
182
+ * checkbox selects the inclusive range of rows.
183
+ *
184
+ * This is independent of the region selection (`selectedRegions`):
185
+ * checking a row does not select a region, and clicking a row header still
186
+ * selects a full-row region. Rows checked here are highlighted and can be
187
+ * read back with TanStack's `table.getSelectedRowModel()`.
188
+ *
189
+ * When the table is sorted or paginated, pair it with `getRowId` so
190
+ * selection follows the data instead of the row position.
191
+ *
192
+ * @default false
193
+ */
194
+ showRowSelectionCheckboxes?: boolean;
195
+ /**
196
+ * Width of the row-selection checkboxes column, in pixels. Only used when
197
+ * `showRowSelectionCheckboxes` is enabled.
198
+ *
199
+ * @default 30
200
+ */
201
+ rowSelectionColumnWidth?: number;
202
+ /**
203
+ * Controlled row selection, mapping row ids to booleans (`true` =
204
+ * selected). When provided, selection is fully owned by the caller and
205
+ * updated via `onRowSelectionChange`, which receives the next selection
206
+ * value. Convenience alias for `state.rowSelection`; when both are
207
+ * provided, this prop wins.
208
+ */
209
+ rowSelection?: BP_RowSelectionState;
210
+ /**
211
+ * Initial row selection for the uncontrolled mode, mapping row ids to
212
+ * booleans (`true` = selected). Ignored when `rowSelection` (or
213
+ * `state.rowSelection`) is provided; falls back to
214
+ * `initialState.rowSelection`. Selection then lives inside the table and
215
+ * `onRowSelectionChange` still fires on every change.
216
+ */
217
+ defaultRowSelection?: BP_RowSelectionState;
105
218
  };
106
- export declare function BP_Table<TData extends BP_RowData>({ htmlProps, rowHeight, rowHeaderWidth, columnHeaderHeight, enableColumnReordering, enableSorting, loadingOptions, enableFocusedCell, enableGhostCells, focusedCell, onFocusedCell, onFocusedRegion, selectedRegions, onSelection, selectionModes, enableRowVirtualization, overscanRowCount, columnVisibility, enableRowResizing, rowHeights, defaultRowHeights, onRowHeightChanged, minRowHeight, maxRowHeight, ...tableOptions }: BP_TableProps<TData>): import("react").JSX.Element;
219
+ export declare function BP_Table<TData extends BP_RowData>({ htmlProps, rowHeight, showRowSelectionCheckboxes, rowSelectionColumnWidth, rowHeaderWidth, enableRowHeader, columnHeaderHeight, enableColumnReordering, enableSorting, loadingOptions, enableFocusedCell, enableGhostCells, bodyContextMenuRenderer, enableBodyContextMenu, onFocusedCell, onFocusedRegion, selectedRegions, onSelection, selectionModes, enableRowVirtualization, numFrozenColumns, numFrozenRows, overscanRowCount, columnVisibility, enableRowResizing, rowHeights, defaultRowHeights, onRowHeightChanged, minRowHeight, maxRowHeight, rowSelection, defaultRowSelection, ...tableOptions }: BP_TableProps<TData>): import("react").JSX.Element;
@@ -1,12 +1,29 @@
1
+ import { type ColumnRegion, type RowRegion } from '../common/pinning.js';
1
2
  import type { BP_GhostCells } from '../../hooks/use-ghost-cells.js';
2
3
  import type { BP_RowVirtualizer } from '../../hooks/use-row-virtualizer.js';
3
4
  import type { RowResizingApi } from '../../hooks/use-row-resizing.js';
4
5
  import type { BP_RowData, BP_TableInstance, HTMLPropsRef } from '../../types.js';
5
6
  export type TableBodyProps<TData extends BP_RowData> = HTMLPropsRef<HTMLDivElement> & {
6
7
  table: BP_TableInstance<TData>;
8
+ /** Which column region this body renders: frozen ("start") or scrollable ("center"). */
9
+ columnRegion: ColumnRegion;
10
+ /** Which row region this body renders: frozen ("top") or scrollable ("center"). */
11
+ rowRegion: RowRegion;
12
+ /** Vertical padding that places the body inside its quadrant's scroll content. */
13
+ offsetTop?: number;
14
+ /** Horizontal padding that places the body inside its quadrant's scroll content. */
15
+ offsetLeft?: number;
7
16
  areCellsLoading: boolean;
8
17
  rowVirtualizer?: BP_RowVirtualizer;
9
18
  rowResizing: RowResizingApi;
10
19
  ghosts?: BP_GhostCells;
11
20
  };
12
- export declare function TableBody<TData extends BP_RowData>({ table, areCellsLoading, rowVirtualizer, rowResizing, ghosts, className, ...restProps }: TableBodyProps<TData>): import("react").JSX.Element;
21
+ /**
22
+ * Renders the body cells of one quadrant. The quadrant determines the column
23
+ * and row regions; cells are grouped in their region's coordinate space (the
24
+ * region's first column/row is at offset zero) and padded by `offsetTop` /
25
+ * `offsetLeft` so that quadrants with scrollable content share the main
26
+ * quadrant's scroll ranges. Scrollable ("center") rows are virtualized when
27
+ * the table is virtualized; frozen rows are always rendered.
28
+ */
29
+ export declare function TableBody<TData extends BP_RowData>({ table, columnRegion, rowRegion, offsetTop, offsetLeft, areCellsLoading, rowVirtualizer, rowResizing, ghosts, className, ...restProps }: TableBodyProps<TData>): import("react").JSX.Element;
@@ -1,15 +1,18 @@
1
1
  import { type Cell } from '@tanstack/react-table';
2
+ import type { ColumnRegion } from '../common/pinning.js';
2
3
  import type { BP_RowData, BP_TableFeatures, BP_TableInstance } from '../../types.js';
3
4
  export type TableBodyCellProps<TData extends BP_RowData> = {
4
5
  table: BP_TableInstance<TData>;
5
6
  cell: Cell<BP_TableFeatures, TData, unknown>;
7
+ /** Absolute index of the row this cell belongs to. */
6
8
  rowIndex: number;
7
- /** Absolute top offset of the row within the body's virtual client. */
9
+ /** Top offset of the row within its quadrant's body, in pixels. */
8
10
  rowTop: number;
9
- columnIndex: number;
11
+ /** Which column region this cell belongs to; positions are relative to it. */
12
+ columnRegion: ColumnRegion;
10
13
  rowHeight: number;
11
14
  loading: boolean;
12
15
  isLastInRow: boolean;
13
16
  isLastInColumn: boolean;
14
17
  };
15
- export declare function TableBodyCell<TData extends BP_RowData>({ table, cell, rowIndex, rowTop, columnIndex, rowHeight, loading, isLastInRow, isLastInColumn, }: TableBodyCellProps<TData>): import("react").JSX.Element;
18
+ export declare function TableBodyCell<TData extends BP_RowData>({ table, cell, rowIndex, rowTop, columnRegion, rowHeight, loading, isLastInRow, isLastInColumn, }: TableBodyCellProps<TData>): import("react").JSX.Element;
@@ -1,13 +1,22 @@
1
1
  import type { BP_GhostCells } from '../../hooks/use-ghost-cells.js';
2
- import type { RowResizingApi } from '../../hooks/use-row-resizing.js';
2
+ import { type ColumnRegion, type RowRegion } from '../common/pinning.js';
3
3
  import type { BP_RowData, BP_TableInstance } from '../../types.js';
4
4
  export type TableGhostCellsProps<TData extends BP_RowData> = {
5
5
  table: BP_TableInstance<TData>;
6
6
  ghosts: BP_GhostCells;
7
7
  loading: boolean;
8
- /** Indices of the data rows rendered alongside the ghost cells. */
8
+ columnRegion: ColumnRegion;
9
+ rowRegion: RowRegion;
10
+ /** Absolute indices of the data rows rendered alongside the ghost columns. */
9
11
  rowIndices: number[];
10
- rowResizing: RowResizingApi;
12
+ /** Absolute top offset of this quadrant's row region. */
13
+ regionTop: number;
14
+ /** Total height of this quadrant's row region. */
15
+ regionHeight: number;
16
+ /** Resolved absolute top offset of the row at the given index. */
17
+ getRowTop: (index: number) => number;
18
+ /** Resolved height of the row at the given index. */
19
+ getRowHeight: (index: number) => number;
11
20
  };
12
21
  /**
13
22
  * Renders the ghost-cell "L" region that fills leftover viewport space when
@@ -15,5 +24,10 @@ export type TableGhostCellsProps<TData extends BP_RowData> = {
15
24
  * rendered data rows), empty rows below the data, and the corner block shared
16
25
  * by both. Mirrors Blueprint's ghost cells, which use the default row height /
17
26
  * column width regardless of the sizes of adjacent rows/columns.
27
+ *
28
+ * Each quadrant renders the part of the ghost region that belongs to it:
29
+ * ghost columns only exist in the scrollable ("center") column region (they
30
+ * follow the last data column) and ghost rows only exist in the scrollable
31
+ * ("center") row region (they follow the last data row).
18
32
  */
19
- export declare function TableGhostCells<TData extends BP_RowData>({ table, ghosts, loading, rowIndices, rowResizing, }: TableGhostCellsProps<TData>): import("react").JSX.Element;
33
+ export declare function TableGhostCells<TData extends BP_RowData>({ table, ghosts, loading, columnRegion, rowRegion, rowIndices, regionTop, regionHeight, getRowTop, getRowHeight, }: TableGhostCellsProps<TData>): import("react").JSX.Element;
@@ -1,6 +1,12 @@
1
+ import { type Row } from '@tanstack/react-table';
1
2
  import type { RowResizeStartEvent } from '../../hooks/use-row-resizing.js';
2
- import type { HTMLPropsRef } from '../../types.js';
3
- export type TableRowHeaderCellProps = HTMLPropsRef<HTMLDivElement> & {
3
+ import type { BP_RowData, BP_TableFeatures, HTMLPropsRef } from '../../types.js';
4
+ export type TableRowHeaderCellProps<TData extends BP_RowData> = HTMLPropsRef<HTMLDivElement> & {
5
+ /**
6
+ * The TanStack row rendered by this header, used for the row-selection
7
+ * highlight. Undefined only while the row model has no row at this index.
8
+ */
9
+ row?: Row<BP_TableFeatures, TData>;
4
10
  rowIndex: number;
5
11
  rowHeight: number;
6
12
  loading: boolean;
@@ -10,4 +16,4 @@ export type TableRowHeaderCellProps = HTMLPropsRef<HTMLDivElement> & {
10
16
  /** Handler for the horizontal resize handle; when undefined, the handle is hidden. */
11
17
  onResizeStart?: (event: RowResizeStartEvent) => void;
12
18
  };
13
- export declare function TableRowHeaderCell({ rowIndex, rowHeight, loading, isLastInColumn, isResizing, onResizeStart, className, ...restProps }: TableRowHeaderCellProps): import("react").JSX.Element;
19
+ export declare function TableRowHeaderCell<TData extends BP_RowData>({ row, rowIndex, rowHeight, loading, isLastInColumn, isResizing, onResizeStart, className, ...restProps }: TableRowHeaderCellProps<TData>): import("react").JSX.Element;
@@ -1,13 +1,28 @@
1
+ import { type RowRegion } from '../common/pinning.js';
1
2
  import type { BP_GhostCells } from '../../hooks/use-ghost-cells.js';
2
3
  import type { BP_RowVirtualizer } from '../../hooks/use-row-virtualizer.js';
3
4
  import type { RowResizingApi } from '../../hooks/use-row-resizing.js';
4
5
  import type { BP_RowData, BP_TableInstance, HTMLPropsRef } from '../../types.js';
5
6
  export type TableRowHeadersProps<TData extends BP_RowData> = HTMLPropsRef<HTMLDivElement> & {
6
7
  table: BP_TableInstance<TData>;
8
+ /** Which row region this row header renders: frozen ("top") or scrollable ("center"). */
9
+ rowRegion: RowRegion;
7
10
  rowHeaderWidth: number;
11
+ /** Whether to render the row-number column; when `false`, only the selection column renders. */
12
+ enableRowHeader?: boolean;
13
+ /** Width of the row-selection checkboxes column; `0` hides the column. */
14
+ selectionColumnWidth?: number;
8
15
  areRowHeadersLoading: boolean;
9
16
  rowVirtualizer?: BP_RowVirtualizer;
10
17
  rowResizing: RowResizingApi;
11
18
  ghosts?: BP_GhostCells;
12
19
  };
13
- export declare function TableRowHeaders<TData extends BP_RowData>({ table, rowHeaderWidth, areRowHeadersLoading, rowVirtualizer, rowResizing, ghosts, className, ...restProps }: TableRowHeadersProps<TData>): import("react").JSX.Element;
20
+ /**
21
+ * Renders the row-header cells of one quadrant's row region: the row numbers
22
+ * (when `enableRowHeader` is on), and, when enabled, the row-selection
23
+ * checkboxes column right after them. Rows keep their absolute indices (so
24
+ * labels, selection, and styling are stable across regions); scrollable
25
+ * ("center") rows are virtualized with the shared row virtualizer, while frozen
26
+ * rows are always rendered.
27
+ */
28
+ export declare function TableRowHeaders<TData extends BP_RowData>({ table, rowRegion, rowHeaderWidth, enableRowHeader, selectionColumnWidth, areRowHeadersLoading, rowVirtualizer, rowResizing, ghosts, className, ...restProps }: TableRowHeadersProps<TData>): import("react").JSX.Element | null;
@@ -0,0 +1,18 @@
1
+ import { type Row } from '@tanstack/react-table';
2
+ import type { BP_RowData, BP_TableFeatures } from '../../types.js';
3
+ export type TableRowSelectionCellProps<TData extends BP_RowData> = {
4
+ /**
5
+ * The TanStack row rendered by this cell. Undefined only while the row model
6
+ * has no row at the given index.
7
+ */
8
+ row?: Row<BP_TableFeatures, TData>;
9
+ rowIndex: number;
10
+ rowHeight: number;
11
+ loading: boolean;
12
+ isLastInColumn: boolean;
13
+ };
14
+ /**
15
+ * One row of the row-selection checkboxes column that sits between the row
16
+ * header (row numbers) and the frozen columns.
17
+ */
18
+ export declare function TableRowSelectionCell<TData extends BP_RowData>({ row, rowIndex, rowHeight, loading, isLastInColumn, }: TableRowSelectionCellProps<TData>): import("react").JSX.Element;
@@ -0,0 +1,57 @@
1
+ import type { Cell, Column } from '@tanstack/react-table';
2
+ import type { CellSelectionRange } from '@tanstack/react-table';
3
+ import type { BP_RowData, BP_TableFeatures, BP_TableInstance } from '../../types.js';
4
+ import { type CellCoordinates, type FocusedCellCoordinates, type Region } from './region.js';
5
+ /**
6
+ * Bridge between TanStack Table's `cellSelectionFeature` (selection state is an
7
+ * ordered list of `CellSelectionRange`s keyed by row and column ids) and the
8
+ * Blueprint-style `Region` API that `BP_Table` exposes publicly.
9
+ *
10
+ * The plugin's `getCellSelectionBounds()` resolves the range operations into
11
+ * disjoint positive rectangles in *display-order* index space:
12
+ *
13
+ * - Row indexes are `row.getDisplayIndex()` values, i.e. positions in the
14
+ * pre-pagination display order (which equals the current row model's order
15
+ * when the table is not paginated).
16
+ * - Column indexes index the columns in their actual render order: start
17
+ * pinned first, then center, then end — not `column.getIndex()`, which
18
+ * indexes the unpinned visible leaf order. The two orders coincide while
19
+ * `BP_Table`'s frozen columns are a prefix of the column order (the normal
20
+ * case), and this module translates between them so the overlays stay
21
+ * correct even when pinning is driven directly through TanStack state.
22
+ */
23
+ /**
24
+ * Returns the visible leaf columns in the order the table actually renders
25
+ * them (start pinned first, then center, then end), mirroring the index space
26
+ * the cell selection plugin's bounds use.
27
+ */
28
+ export declare function getDisplayOrderedColumns<TData extends BP_RowData>(table: BP_TableInstance<TData>): Array<Column<BP_TableFeatures, TData, unknown>>;
29
+ /**
30
+ * Returns the current selection as Blueprint `Region`s, resolved from the cell
31
+ * selection plugin's bounds against the currently rendered rows and columns.
32
+ * Ranges whose corners no longer resolve (filtered-out rows, hidden columns)
33
+ * are omitted, matching the plugin's own behavior.
34
+ */
35
+ export declare function getSelectedCellRegions<TData extends BP_RowData>(table: BP_TableInstance<TData>): Region[];
36
+ /**
37
+ * Converts Blueprint `Region`s into the cell selection plugin's
38
+ * `CellSelectionRange` list. Full-row/column/table regions are emulated as
39
+ * ranges spanning all currently visible rows and/or columns; the anchor corner
40
+ * is the region's first cell, so the focused cell lands where Blueprint would
41
+ * put it. Regions whose coordinates fall outside the current row/column
42
+ * counts are skipped.
43
+ */
44
+ export declare function regionsToCellSelectionRanges<TData extends BP_RowData>(table: BP_TableInstance<TData>, regions: Region[] | null | undefined): CellSelectionRange[];
45
+ /**
46
+ * Returns the table's active cell (the anchor of the most recent selection
47
+ * range) in the coordinate space `BP_Table` renders, or `undefined` when
48
+ * there is no active cell or it is not part of the currently rendered row
49
+ * model (e.g. it lives on another page).
50
+ */
51
+ export declare function getFocusedCellCoordinates<TData extends BP_RowData>(table: BP_TableInstance<TData>): FocusedCellCoordinates | undefined;
52
+ /**
53
+ * Returns the rendered cell at the given coordinates (row model index and
54
+ * natural visible column index), or `undefined` when the coordinates fall
55
+ * outside the current model.
56
+ */
57
+ export declare function getCellAtCoordinates<TData extends BP_RowData>(table: BP_TableInstance<TData>, coordinates: CellCoordinates): Cell<BP_TableFeatures, TData, unknown> | undefined;
@@ -1,8 +1,29 @@
1
+ import type { MutableRefObject } from 'react';
1
2
  import type { BP_RowData, BP_TableInstance } from '../../types.js';
2
3
  import type { CellCoordinates } from './region.js';
4
+ export type CellLookupOptions<TData extends BP_RowData> = {
5
+ table: BP_TableInstance<TData>;
6
+ /** The main (interactive) quadrant's scroll container. */
7
+ scrollContainerRef: MutableRefObject<HTMLDivElement | null>;
8
+ /** Width of the frozen row-header column. */
9
+ rowHeaderWidth: number;
10
+ /** Effective height of the column-header area. */
11
+ columnHeaderHeight: number;
12
+ /** Resolved absolute top offset of the row at the given index. */
13
+ getRowTop: (index: number) => number;
14
+ /** Resolved height of the row at the given index. */
15
+ getRowHeight: (index: number) => number;
16
+ };
3
17
  /**
4
- * Maps a point (relative to the top-left of the body cell client, where cells
5
- * are absolutely positioned) to a cell coordinate, or `undefined` when the
6
- * point falls outside the grid (e.g. on the ghost/empty area).
18
+ * Maps a client point (e.g. a pointer event's viewport coordinates) to a cell
19
+ * coordinate, or `undefined` when the point falls outside the grid.
20
+ *
21
+ * The main scroll container spans the whole table, so the point can be mapped
22
+ * to viewport-relative offsets within the columns area (right of the
23
+ * row-header column) and the rows area (below the column headers). The frozen
24
+ * columns/rows are pinned to the leading edge of those areas and never scroll;
25
+ * the scrollable region starts after them and is shifted by the container's
26
+ * scroll offset. This works from any quadrant, which makes selection drags
27
+ * that cross the frozen/scrollable boundary behave correctly.
7
28
  */
8
- export declare function getCellFromPoint<TData extends BP_RowData>(table: BP_TableInstance<TData>, offsetLeft: number, offsetTop: number, getRowTop: (index: number) => number, getRowHeight: (index: number) => number): CellCoordinates | undefined;
29
+ export declare function getCellFromClientPoint<TData extends BP_RowData>({ table, scrollContainerRef, rowHeaderWidth, columnHeaderHeight, getRowTop, getRowHeight, }: CellLookupOptions<TData>, clientX: number, clientY: number): CellCoordinates | undefined;
@@ -46,6 +46,10 @@ export declare const TABLE_NULL: string;
46
46
  export declare const TABLE_OVERLAY: string;
47
47
  export declare const TABLE_OVERLAY_LAYER: string;
48
48
  export declare const TABLE_OVERLAY_REORDERING_CURSOR: string;
49
+ export declare const TABLE_PAGINATION_BAR: string;
50
+ export declare const TABLE_PAGINATION_BAR_CONTROLS: string;
51
+ export declare const TABLE_PAGINATION_BAR_TEXT: string;
52
+ export declare const TABLE_PAGINATION_LAYOUT: string;
49
53
  export declare const TABLE_POPOVER_WHITESPACE_NORMAL: string;
50
54
  export declare const TABLE_POPOVER_WHITESPACE_PRE: string;
51
55
  export declare const TABLE_QUADRANT: string;
@@ -73,6 +77,10 @@ export declare const TABLE_ROW_HEADERS: string;
73
77
  export declare const TABLE_ROW_HEADERS_CELLS_CONTAINER: string;
74
78
  export declare const TABLE_ROW_NAME: string;
75
79
  export declare const TABLE_ROW_NAME_TEXT: string;
80
+ export declare const TABLE_ROW_SELECTED: string;
81
+ export declare const TABLE_ROW_SELECTION_CELL: string;
82
+ export declare const TABLE_ROW_SELECTION_CHECKBOX: string;
83
+ export declare const TABLE_ROW_SELECTION_HEADER_CELL: string;
76
84
  export declare const TABLE_SELECTION_ENABLED: string;
77
85
  export declare const TABLE_SELECTION_REGION: string;
78
86
  export declare const TABLE_TH_MENU: string;
@@ -1,6 +1,11 @@
1
1
  export declare const DEFAULT_ROW_HEIGHT = 20;
2
2
  export declare const DEFAULT_ROW_HEADER_WIDTH = 30;
3
3
  export declare const DEFAULT_COLUMN_HEADER_HEIGHT = 30;
4
+ /**
5
+ * Default width of the row-selection checkboxes column rendered (when enabled)
6
+ * between the row numbers and the frozen columns.
7
+ */
8
+ export declare const DEFAULT_ROW_SELECTION_COLUMN_WIDTH = 30;
4
9
  /**
5
10
  * Width of the empty "ghost" columns rendered when `enableGhostCells` is on.
6
11
  * Mirrors Blueprint's `Grid.DEFAULT_GHOST_WIDTH` (which also matches TanStack's
@@ -0,0 +1,81 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { Cell, Row } from '@tanstack/react-table';
3
+ import type { BP_RowData, BP_TableFeatures, BP_TableInstance } from '../../types.js';
4
+ import { type CellCoordinates, type NonNullRegion, type Region } from './region.js';
5
+ /**
6
+ * Describes the region(s) of interest for a body context menu, mirroring
7
+ * Blueprint's `MenuContext`.
8
+ */
9
+ export interface BP_MenuContext<TData extends BP_RowData = BP_RowData> {
10
+ /**
11
+ * Returns a region containing the single cell that was right-clicked to
12
+ * launch this context menu.
13
+ */
14
+ getTarget(): NonNullRegion;
15
+ /**
16
+ * Returns an array of `Region`s that represent the user-intended context of
17
+ * this menu. If the right-click happened inside the current selection, the
18
+ * array contains all selected regions. Otherwise it contains one `Region`
19
+ * that represents the right-clicked cell (the same region from
20
+ * `getTarget`).
21
+ */
22
+ getRegions(): Region[];
23
+ /**
24
+ * Returns the list of selected `Region`s in the table, regardless of where
25
+ * the user right-clicked to launch the context menu. For the user-intended
26
+ * regions for this context, use `getRegions` instead.
27
+ */
28
+ getSelectedRegions(): Region[];
29
+ /**
30
+ * Returns an array containing all of the unique, potentially non-contiguous,
31
+ * cells contained in all the regions from `getRegions`. The cell
32
+ * coordinates are sorted by row and then column.
33
+ */
34
+ getUniqueCells(): CellCoordinates[];
35
+ /**
36
+ * Returns the TanStack row that was right-clicked, or `undefined` when the
37
+ * click did not land on a body cell.
38
+ */
39
+ getTargetRow(): Row<BP_TableFeatures, TData> | undefined;
40
+ /**
41
+ * Returns the TanStack cell that was right-clicked, or `undefined` when the
42
+ * click did not land on a body cell.
43
+ */
44
+ getTargetCell(): Cell<BP_TableFeatures, TData, unknown> | undefined;
45
+ }
46
+ /**
47
+ * Renders a context menu for the table body, mirroring Blueprint's
48
+ * `bodyContextMenuRenderer`. Return `undefined` (or `null`) to fall back to
49
+ * the browser's native context menu.
50
+ */
51
+ export type BP_BodyContextMenuRenderer<TData extends BP_RowData = BP_RowData> = (context: BP_MenuContext<TData>) => ReactElement | null | undefined;
52
+ export type BP_MenuContextOptions<TData extends BP_RowData> = {
53
+ table: BP_TableInstance<TData>;
54
+ /** The right-clicked cell, as a single-cell region. */
55
+ target: NonNullRegion;
56
+ /** The table's current selection, unaffected by the right-click itself. */
57
+ selectedRegions: Region[];
58
+ numRows: number;
59
+ numCols: number;
60
+ };
61
+ /**
62
+ * Concrete {@link BP_MenuContext}. The user-intended regions are the current
63
+ * selection when it contains the right-clicked cell, and the cell itself
64
+ * otherwise.
65
+ */
66
+ export declare class BP_MenuContextImpl<TData extends BP_RowData> implements BP_MenuContext<TData> {
67
+ private readonly target;
68
+ private readonly regions;
69
+ private readonly selectedRegions;
70
+ private readonly numRows;
71
+ private readonly numCols;
72
+ private readonly targetRow;
73
+ private readonly targetCell;
74
+ constructor({ table, target, selectedRegions, numRows, numCols }: BP_MenuContextOptions<TData>);
75
+ getTarget(): NonNullRegion;
76
+ getRegions(): Region[];
77
+ getSelectedRegions(): Region[];
78
+ getUniqueCells(): CellCoordinates[];
79
+ getTargetRow(): Row<BP_TableFeatures, TData> | undefined;
80
+ getTargetCell(): Cell<BP_TableFeatures, TData, unknown> | undefined;
81
+ }
@@ -0,0 +1,44 @@
1
+ import type { Column } from '@tanstack/react-table';
2
+ import type { BP_RowData, BP_TableFeatures, BP_TableInstance } from '../../types.js';
3
+ /**
4
+ * A horizontal region of columns: frozen ("start") or scrollable ("center").
5
+ *
6
+ * `BP_Table` renders the frozen ("start") region in the left quadrants and the
7
+ * scrollable ("center") region in the main/top quadrants. Columns pinned to
8
+ * the logical "end" region are not supported and are excluded from both
9
+ * regions, matching Blueprint's left-only frozen columns.
10
+ */
11
+ export type ColumnRegion = 'start' | 'center';
12
+ /** A vertical region of rows: frozen ("top") or scrollable ("center"). */
13
+ export type RowRegion = 'top' | 'center';
14
+ /** Number of columns frozen to the logical "start" (left) region. */
15
+ export declare function getFrozenColumnCount<TData extends BP_RowData>(table: BP_TableInstance<TData>): number;
16
+ /** Number of rows frozen to the "top" region. */
17
+ export declare function getFrozenRowCount<TData extends BP_RowData>(table: BP_TableInstance<TData>): number;
18
+ /** Total pixel width of the frozen (start-pinned) columns. */
19
+ export declare function getFrozenColumnsWidth<TData extends BP_RowData>(table: BP_TableInstance<TData>): number;
20
+ /** Ordered visible leaf columns of a pinning region. */
21
+ export declare function getRegionColumns<TData extends BP_RowData>(table: BP_TableInstance<TData>, region: ColumnRegion): Array<Column<BP_TableFeatures, TData, unknown>>;
22
+ /** Total pixel width of a pinning region. */
23
+ export declare function getRegionWidth<TData extends BP_RowData>(table: BP_TableInstance<TData>, region: ColumnRegion): number;
24
+ /**
25
+ * Offset of a column's leading edge in the table's display coordinate space,
26
+ * where the frozen ("start") columns come first and the scrollable ("center")
27
+ * columns follow, shifted by the horizontal scroll offset.
28
+ */
29
+ export declare function getColumnDisplayOffset<TData extends BP_RowData>(table: BP_TableInstance<TData>, column: Column<BP_TableFeatures, TData, unknown>, scrollLeft: number): number;
30
+ /** Pixel height of the frozen ("top") rows. */
31
+ export declare function getFrozenRowsHeight<TData extends BP_RowData>(table: BP_TableInstance<TData>, getRowHeight: (index: number) => number): number;
32
+ /**
33
+ * Natural (visible leaf) index of the column that occupies the given
34
+ * region-local offset, or `undefined` when the offset falls outside the
35
+ * region. Used to map pointer positions back to column coordinates.
36
+ */
37
+ export declare function getColumnIndexAtRegionOffset<TData extends BP_RowData>(table: BP_TableInstance<TData>, region: ColumnRegion, offset: number): number | undefined;
38
+ /**
39
+ * Absolute row index of the row that occupies the given region-local offset,
40
+ * or `undefined` when the offset falls outside the region. Row offsets are
41
+ * resolved through the (possibly variable) row heights, so this stays correct
42
+ * while rows are being resized.
43
+ */
44
+ export declare function getRowIndexAtRegionOffset<TData extends BP_RowData>(table: BP_TableInstance<TData>, region: RowRegion, offset: number, getRowTop: (index: number) => number, getRowHeight: (index: number) => number): number | undefined;