@bigcapitalhq/blueprintjs-react-table 0.1.0 → 0.3.1

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 (52) hide show
  1. package/README.md +331 -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 +2681 -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 +130 -7
  8. package/dist/types/components/body/TableBody.d.ts +21 -3
  9. package/dist/types/components/body/TableBodyCell.d.ts +10 -5
  10. package/dist/types/components/body/TableGhostCells.d.ts +18 -4
  11. package/dist/types/components/body/TableRowExpander.d.ts +8 -0
  12. package/dist/types/components/body/TableRowHeaderCell.d.ts +10 -3
  13. package/dist/types/components/body/TableRowHeaders.d.ts +16 -1
  14. package/dist/types/components/body/TableRowSelectionCell.d.ts +19 -0
  15. package/dist/types/components/common/cell-selection.d.ts +57 -0
  16. package/dist/types/components/common/cellCoordinates.d.ts +25 -4
  17. package/dist/types/components/common/classes.d.ts +11 -0
  18. package/dist/types/components/common/dimensions.d.ts +5 -0
  19. package/dist/types/components/common/menu-context.d.ts +81 -0
  20. package/dist/types/components/common/pinning.d.ts +44 -0
  21. package/dist/types/components/common/region.d.ts +26 -0
  22. package/dist/types/components/common/table-selection-context.d.ts +3 -3
  23. package/dist/types/components/container/TableContainer.d.ts +12 -4
  24. package/dist/types/components/head/TableColumnHeaders.d.ts +4 -1
  25. package/dist/types/components/head/TableHead.d.ts +3 -1
  26. package/dist/types/components/head/TableRowSelectionHeaderCell.d.ts +13 -0
  27. package/dist/types/components/layers/TableRegionLayer.d.ts +10 -2
  28. package/dist/types/components/layers/TableReorderGuides.d.ts +10 -1
  29. package/dist/types/components/layers/TableResizeGuides.d.ts +18 -5
  30. package/dist/types/components/pagination/TablePaginationBar.d.ts +30 -0
  31. package/dist/types/components/pagination/constants.d.ts +4 -0
  32. package/dist/types/components/pagination/pagination-row-count-context.d.ts +2 -0
  33. package/dist/types/components/pagination/withPagination.d.ts +51 -0
  34. package/dist/types/components/quadrant/TableQuadrant.d.ts +42 -10
  35. package/dist/types/components/quadrant/TableQuadrantStack.d.ts +39 -0
  36. package/dist/types/components/quadrant/quadrant-type.d.ts +10 -0
  37. package/dist/types/hooks/use-bp-table-instance.d.ts +33 -0
  38. package/dist/types/hooks/use-cell-selection.d.ts +62 -0
  39. package/dist/types/hooks/use-column-header-height.d.ts +24 -0
  40. package/dist/types/hooks/use-column-reorder.d.ts +7 -3
  41. package/dist/types/hooks/use-freeze-pinning.d.ts +25 -0
  42. package/dist/types/hooks/use-row-resizing.d.ts +5 -1
  43. package/dist/types/hooks/use-row-virtualizer.d.ts +13 -2
  44. package/dist/types/hooks/use-uncontrolled.d.ts +20 -0
  45. package/dist/types/index.d.ts +8 -0
  46. package/dist/types/types.d.ts +33 -2
  47. package/package.json +2 -2
  48. package/dist/types/components/body/TableStaticBody.d.ts +0 -10
  49. package/dist/types/components/body/VirtualBody.d.ts +0 -12
  50. package/dist/types/components/quadrant/TableBottomContainer.d.ts +0 -14
  51. package/dist/types/components/quadrant/TableTopContainer.d.ts +0 -11
  52. 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-cell-with-expander{align-items:flex-start;display:flex;flex:1;height:100%;min-width:0}.bp6-table-cell-with-expander>.bp6-table-truncated-text{flex:1;min-width:0}.bp6-table-row-expander{align-items:center;align-self:center;background:transparent;border:0;color:inherit;cursor:pointer;display:inline-flex;flex-shrink:0;margin-inline-end:4px;padding:0}.bp6-table-row-expander:focus-visible{outline:2px solid #2d72d2;outline-offset:-1px}.bp6-table-row-detail{background:#fff;border-bottom:1px solid rgba(17,20,24,.15);box-sizing:border-box;overflow:auto;padding:8px;position:absolute;-webkit-user-select:text;user-select:text}.bp6-dark .bp6-table-row-detail{background:#2f343c;border-color:#11141866;color:#f6f7f9}.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-header{box-shadow:0 1px #11141826}.bp6-table-menu,.bp6-table-row-selection-header-cell,.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,.bp6-table-row-headers .bp6-table-header{box-shadow:inset 0 -1px #11141826,inset -1px 0 #11141826}.bp6-table-column-headers .bp6-table-header:before,.bp6-table-row-headers .bp6-table-header:before{bottom:1px;right:1px}.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:inset 0 -1px #11141826,inset -3px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-row:before{bottom:1px;right:3px}.bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141826,inset -1px 0 #11141826}.bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column:before{bottom:3px;right:1px}.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-header{box-shadow:0 1px #11141866}.bp6-dark .bp6-table-menu,.bp6-dark .bp6-table-row-selection-header-cell,.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,.bp6-dark .bp6-table-row-headers .bp6-table-header{box-shadow:inset 0 -1px #11141866,inset -1px 0 #11141866}.bp6-dark .bp6-table-column-headers .bp6-table-header:before,.bp6-dark .bp6-table-row-headers .bp6-table-header:before{bottom:1px;right:1px}.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:inset 0 -1px #11141866,inset -3px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-row:before{bottom:1px;right:3px}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column{box-shadow:inset 0 -3px #11141866,inset -1px 0 #11141866}.bp6-dark .bp6-table-quadrant-top-left .bp6-table-header.bp6-table-last-in-column:before{bottom:3px;right:1px}.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,55 @@
1
- import type { BP_RowData, BP_TableFeatures, BP_TableOptions, BP_VisibilityState, HTMLPropsRef } from '../types.js';
1
+ import type { BP_ExpandedRowsState, BP_RowData, BP_BodyPropsOptions, BP_RowExpanderOptions, BP_RowDetailRenderer, 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
- export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFeatures, TData> & {
4
+ import type { BP_BodyContextMenuRenderer } from './common/menu-context.js';
5
+ export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFeatures, TData> & BP_BodyPropsOptions<TData> & BP_RowExpanderOptions<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
+ /** Controlled expansion. Takes precedence over state.expanded. */
16
+ expandedRows?: BP_ExpandedRowsState;
17
+ /** Initial uncontrolled expansion and reset target. Takes precedence over initialState.expanded. */
18
+ initialExpandedRows?: BP_ExpandedRowsState;
19
+ /** Receives the next expanded state for each requested change in either mode. */
20
+ onExpandedRowsChange?: (expandedRows: BP_ExpandedRowsState) => void;
21
+ /** Render a detail panel beneath each expanded row. Use getRowCanExpand to limit eligible rows. */
22
+ renderRowDetail?: BP_RowDetailRenderer<TData>;
23
+ /** Height of an expanded detail panel in pixels. Longer content scrolls. @default 100 */
24
+ rowDetailHeight?: number;
25
+ /** Width of the frozen row-header column, in pixels. @default 30 */
7
26
  rowHeaderWidth?: number;
27
+ /**
28
+ * If `false`, hides the row headers (the row-number column) and the corner
29
+ * settings menu, mirroring Blueprint's `enableRowHeader`. The row-selection
30
+ * checkboxes column (`showRowSelectionCheckboxes`) and frozen columns are
31
+ * unaffected. Row resizing (`enableRowResizing`) is unavailable without row
32
+ * headers, since its drag handle lives on the row header.
33
+ *
34
+ * @default true
35
+ */
36
+ enableRowHeader?: boolean;
37
+ /** Height of the frozen column-header row(s), in pixels. @default 30 */
8
38
  columnHeaderHeight?: number;
39
+ /**
40
+ * If `true`, column headers can be dragged horizontally to reorder the
41
+ * columns, mirroring Blueprint's `enableColumnReordering`.
42
+ *
43
+ * @default false
44
+ */
9
45
  enableColumnReordering?: boolean;
46
+ /**
47
+ * Skeleton placeholders rendered while data loads, mirroring Blueprint's
48
+ * `loadingOptions`: `CELLS` fills body cells, `COLUMN_HEADERS` fills column
49
+ * headers, and `ROW_HEADERS` fills row headers.
50
+ *
51
+ * @default []
52
+ */
10
53
  loadingOptions?: TableLoadingOption[];
11
54
  /**
12
55
  * If `true`, a chevron menu appears on each sortable column header (on
@@ -37,11 +80,29 @@ export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFe
37
80
  */
38
81
  enableGhostCells?: boolean;
39
82
  /**
40
- * A controlled focused cell. When provided, focus state is fully owned by the
41
- * caller and updated via `onFocusedCell`.
83
+ * An optional renderer for a custom context menu on the table body,
84
+ * mirroring Blueprint's `bodyContextMenuRenderer`. Right-clicking a cell
85
+ * opens the menu, and the renderer is supplied with a `BP_MenuContext`
86
+ * describing the region(s) of interest: the current selection when the
87
+ * click lands inside it, or the right-clicked cell otherwise. The context
88
+ * also exposes the right-clicked TanStack row and cell.
89
+ *
90
+ * Right-clicking a cell outside the current selection moves the selection
91
+ * (and the focused cell, when `enableFocusedCell` is enabled) to that cell
92
+ * before the menu opens.
93
+ */
94
+ bodyContextMenuRenderer?: BP_BodyContextMenuRenderer<TData>;
95
+ /**
96
+ * Whether the body context menu is enabled.
97
+ *
98
+ * @default true if bodyContextMenuRenderer is defined
99
+ */
100
+ enableBodyContextMenu?: boolean;
101
+ /**
102
+ * A callback invoked when the focused cell changes. The focused cell is
103
+ * the active cell of TanStack's cell selection feature (the anchor of the
104
+ * most recent selection range); it cannot be controlled directly.
42
105
  */
43
- focusedCell?: FocusedCellCoordinates;
44
- /** Callback invoked when the focused cell changes (controlled or uncontrolled). */
45
106
  onFocusedCell?: (cell: FocusedCellCoordinates) => void;
46
107
  /** Callback invoked when the focused region changes. */
47
108
  onFocusedRegion?: (region: FocusedRegion) => void;
@@ -64,6 +125,24 @@ export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFe
64
125
  * @default false
65
126
  */
66
127
  enableRowVirtualization?: boolean;
128
+ /**
129
+ * Number of leftmost columns that are frozen (pinned in place) while all
130
+ * other columns remain scrollable, mirroring Blueprint's
131
+ * `numFrozenColumns`. The frozen columns are derived from the current
132
+ * column order and column visibility, so reordering and hiding columns
133
+ * keeps freezing correct. Column headers and row headers are always frozen.
134
+ *
135
+ * @default 0
136
+ */
137
+ numFrozenColumns?: number;
138
+ /**
139
+ * Number of topmost rows that are frozen (pinned in place) while all other
140
+ * rows remain scrollable, mirroring Blueprint's `numFrozenRows`. The frozen
141
+ * rows are derived from the current row model, so freezing follows sorting.
142
+ *
143
+ * @default 0
144
+ */
145
+ numFrozenRows?: number;
67
146
  /**
68
147
  * Number of rows rendered above and below the visible viewport when
69
148
  * `enableRowVirtualization` is enabled.
@@ -102,5 +181,49 @@ export type BP_TableProps<TData extends BP_RowData> = BP_TableOptions<BP_TableFe
102
181
  minRowHeight?: number;
103
182
  /** Maximum height a row can be resized to. @default 100 */
104
183
  maxRowHeight?: number;
184
+ /**
185
+ * If `true`, a row-selection checkboxes column is rendered right after the
186
+ * row-number column: every row gets a checkbox, and the column's header is
187
+ * a select-all checkbox (with an indeterminate state). The checkboxes are
188
+ * wired to TanStack's row-selection state through the `rowSelection` /
189
+ * `defaultRowSelection` props (or the standard `state.rowSelection` /
190
+ * `initialState.rowSelection` options) and `onRowSelectionChange`, which
191
+ * fires in both the controlled and uncontrolled modes. Shift-clicking a
192
+ * checkbox selects the inclusive range of rows.
193
+ *
194
+ * This is independent of the region selection (`selectedRegions`):
195
+ * checking a row does not select a region, and clicking a row header still
196
+ * selects a full-row region. Rows checked here are highlighted and can be
197
+ * read back with TanStack's `table.getSelectedRowModel()`.
198
+ *
199
+ * When the table is sorted or paginated, pair it with `getRowId` so
200
+ * selection follows the data instead of the row position.
201
+ *
202
+ * @default false
203
+ */
204
+ showRowSelectionCheckboxes?: boolean;
205
+ /**
206
+ * Width of the row-selection checkboxes column, in pixels. Only used when
207
+ * `showRowSelectionCheckboxes` is enabled.
208
+ *
209
+ * @default 30
210
+ */
211
+ rowSelectionColumnWidth?: number;
212
+ /**
213
+ * Controlled row selection, mapping row ids to booleans (`true` =
214
+ * selected). When provided, selection is fully owned by the caller and
215
+ * updated via `onRowSelectionChange`, which receives the next selection
216
+ * value. Convenience alias for `state.rowSelection`; when both are
217
+ * provided, this prop wins.
218
+ */
219
+ rowSelection?: BP_RowSelectionState;
220
+ /**
221
+ * Initial row selection for the uncontrolled mode, mapping row ids to
222
+ * booleans (`true` = selected). Ignored when `rowSelection` (or
223
+ * `state.rowSelection`) is provided; falls back to
224
+ * `initialState.rowSelection`. Selection then lives inside the table and
225
+ * `onRowSelectionChange` still fires on every change.
226
+ */
227
+ defaultRowSelection?: BP_RowSelectionState;
105
228
  };
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;
229
+ export declare function BP_Table<TData extends BP_RowData>({ htmlProps, rowHeight, expandedRows, initialExpandedRows, onExpandedRowsChange, renderRowDetail, getCellProps, rowExpanderButtonProps, rowExpanderIconProps, rowDetailHeight, 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,30 @@
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
- import type { BP_RowData, BP_TableInstance, HTMLPropsRef } from '../../types.js';
5
- export type TableBodyProps<TData extends BP_RowData> = HTMLPropsRef<HTMLDivElement> & {
5
+ import type { BP_RowData, BP_BodyPropsOptions, BP_RowExpanderOptions, BP_RowDetailRenderer, BP_TableInstance, HTMLPropsRef } from '../../types.js';
6
+ export type TableBodyProps<TData extends BP_RowData> = HTMLPropsRef<HTMLDivElement> & BP_BodyPropsOptions<TData> & BP_RowExpanderOptions<TData> & {
6
7
  table: BP_TableInstance<TData>;
8
+ renderRowDetail?: BP_RowDetailRenderer<TData>;
9
+ /** Which column region this body renders: frozen ("start") or scrollable ("center"). */
10
+ columnRegion: ColumnRegion;
11
+ /** Which row region this body renders: frozen ("top") or scrollable ("center"). */
12
+ rowRegion: RowRegion;
13
+ /** Vertical padding that places the body inside its quadrant's scroll content. */
14
+ offsetTop?: number;
15
+ /** Horizontal padding that places the body inside its quadrant's scroll content. */
16
+ offsetLeft?: number;
7
17
  areCellsLoading: boolean;
8
18
  rowVirtualizer?: BP_RowVirtualizer;
9
19
  rowResizing: RowResizingApi;
10
20
  ghosts?: BP_GhostCells;
11
21
  };
12
- export declare function TableBody<TData extends BP_RowData>({ table, areCellsLoading, rowVirtualizer, rowResizing, ghosts, className, ...restProps }: TableBodyProps<TData>): import("react").JSX.Element;
22
+ /**
23
+ * Renders the body cells of one quadrant. The quadrant determines the column
24
+ * and row regions; cells are grouped in their region's coordinate space (the
25
+ * region's first column/row is at offset zero) and padded by `offsetTop` /
26
+ * `offsetLeft` so that quadrants with scrollable content share the main
27
+ * quadrant's scroll ranges. Scrollable ("center") rows are virtualized when
28
+ * the table is virtualized; frozen rows are always rendered.
29
+ */
30
+ export declare function TableBody<TData extends BP_RowData>({ table, renderRowDetail, getCellProps, rowExpanderButtonProps, rowExpanderIconProps, columnRegion, rowRegion, offsetTop, offsetLeft, areCellsLoading, rowVirtualizer, rowResizing, ghosts, className, ...restProps }: TableBodyProps<TData>): import("react").JSX.Element;
@@ -1,15 +1,20 @@
1
1
  import { type Cell } from '@tanstack/react-table';
2
- import type { BP_RowData, BP_TableFeatures, BP_TableInstance } from '../../types.js';
3
- export type TableBodyCellProps<TData extends BP_RowData> = {
2
+ import type { ColumnRegion } from '../common/pinning.js';
3
+ import type { BP_BodyElementProps, BP_RowData, BP_RowExpanderOptions, BP_TableFeatures, BP_TableInstance } from '../../types.js';
4
+ export type TableBodyCellProps<TData extends BP_RowData> = BP_RowExpanderOptions<TData> & {
4
5
  table: BP_TableInstance<TData>;
5
6
  cell: Cell<BP_TableFeatures, TData, unknown>;
7
+ cellProps?: BP_BodyElementProps;
8
+ /** Absolute index of the row this cell belongs to. */
6
9
  rowIndex: number;
7
- /** Absolute top offset of the row within the body's virtual client. */
10
+ /** Top offset of the row within its quadrant's body, in pixels. */
8
11
  rowTop: number;
9
- columnIndex: number;
12
+ /** Which column region this cell belongs to; positions are relative to it. */
13
+ columnRegion: ColumnRegion;
10
14
  rowHeight: number;
11
15
  loading: boolean;
16
+ isExpansionCell: boolean;
12
17
  isLastInRow: boolean;
13
18
  isLastInColumn: boolean;
14
19
  };
15
- export declare function TableBodyCell<TData extends BP_RowData>({ table, cell, rowIndex, rowTop, columnIndex, rowHeight, loading, isLastInRow, isLastInColumn, }: TableBodyCellProps<TData>): import("react").JSX.Element;
20
+ export declare function TableBodyCell<TData extends BP_RowData>({ table, cell, cellProps, rowIndex, rowTop, columnRegion, rowHeight, loading, isExpansionCell, rowExpanderButtonProps, rowExpanderIconProps, 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;
@@ -0,0 +1,8 @@
1
+ import type { Row } from '@tanstack/react-table';
2
+ import type { BP_RowData, BP_RowExpanderOptions, BP_TableFeatures } from '../../types.js';
3
+ type TableRowExpanderProps<TData extends BP_RowData> = BP_RowExpanderOptions<TData> & {
4
+ row: Row<BP_TableFeatures, TData>;
5
+ rowIndex: number;
6
+ };
7
+ export declare function TableRowExpander<TData extends BP_RowData>({ row, rowIndex, rowExpanderButtonProps, rowExpanderIconProps, }: TableRowExpanderProps<TData>): import("react").JSX.Element;
8
+ export {};
@@ -1,8 +1,15 @@
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;
12
+ detailHeight: number;
6
13
  loading: boolean;
7
14
  isLastInColumn: boolean;
8
15
  /** Whether this row is currently being resized. */
@@ -10,4 +17,4 @@ export type TableRowHeaderCellProps = HTMLPropsRef<HTMLDivElement> & {
10
17
  /** Handler for the horizontal resize handle; when undefined, the handle is hidden. */
11
18
  onResizeStart?: (event: RowResizeStartEvent) => void;
12
19
  };
13
- export declare function TableRowHeaderCell({ rowIndex, rowHeight, loading, isLastInColumn, isResizing, onResizeStart, className, ...restProps }: TableRowHeaderCellProps): import("react").JSX.Element;
20
+ export declare function TableRowHeaderCell<TData extends BP_RowData>({ row, rowIndex, rowHeight, detailHeight, 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,19 @@
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
+ detailHeight: number;
12
+ loading: boolean;
13
+ isLastInColumn: boolean;
14
+ };
15
+ /**
16
+ * One row of the row-selection checkboxes column that sits between the row
17
+ * header (row numbers) and the frozen columns.
18
+ */
19
+ export declare function TableRowSelectionCell<TData extends BP_RowData>({ row, rowIndex, rowHeight, detailHeight, 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,13 @@ 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_CELL_WITH_EXPANDER: string;
81
+ export declare const TABLE_ROW_EXPANDER: string;
82
+ export declare const TABLE_ROW_DETAIL: string;
83
+ export declare const TABLE_ROW_SELECTED: string;
84
+ export declare const TABLE_ROW_SELECTION_CELL: string;
85
+ export declare const TABLE_ROW_SELECTION_CHECKBOX: string;
86
+ export declare const TABLE_ROW_SELECTION_HEADER_CELL: string;
76
87
  export declare const TABLE_SELECTION_ENABLED: string;
77
88
  export declare const TABLE_SELECTION_REGION: string;
78
89
  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
+ }