@fluentui/react-table 9.0.0-alpha.1 → 9.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +590 -4
- package/CHANGELOG.md +159 -5
- package/dist/index.d.ts +697 -30
- package/lib/DataGrid.js +2 -0
- package/lib/DataGrid.js.map +1 -0
- package/lib/DataGridBody.js +2 -0
- package/lib/DataGridBody.js.map +1 -0
- package/lib/DataGridCell.js +2 -0
- package/lib/DataGridCell.js.map +1 -0
- package/lib/DataGridHeader.js +2 -0
- package/lib/DataGridHeader.js.map +1 -0
- package/lib/DataGridHeaderCell.js +2 -0
- package/lib/DataGridHeaderCell.js.map +1 -0
- package/lib/DataGridRow.js +2 -0
- package/lib/DataGridRow.js.map +1 -0
- package/lib/DataGridSelectionCell.js +2 -0
- package/lib/DataGridSelectionCell.js.map +1 -0
- package/lib/Table.js.map +1 -1
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js.map +1 -1
- package/lib/TableCellActions.js +2 -0
- package/lib/TableCellActions.js.map +1 -0
- package/lib/TableCellLayout.js +2 -0
- package/lib/TableCellLayout.js.map +1 -0
- package/lib/TableCellPrimaryLayout.js +2 -0
- package/lib/TableCellPrimaryLayout.js.map +1 -0
- package/lib/TableHeader.js.map +1 -1
- package/lib/TableHeaderCell.js.map +1 -1
- package/lib/TableRow.js.map +1 -1
- package/lib/TableSelectionCell.js +2 -0
- package/lib/TableSelectionCell.js.map +1 -0
- package/lib/components/DataGrid/DataGrid.js +16 -0
- package/lib/components/DataGrid/DataGrid.js.map +1 -0
- package/lib/components/DataGrid/DataGrid.types.js +2 -0
- package/lib/components/DataGrid/DataGrid.types.js.map +1 -0
- package/lib/components/DataGrid/index.js +6 -0
- package/lib/components/DataGrid/index.js.map +1 -0
- package/lib/components/DataGrid/renderDataGrid.js +13 -0
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -0
- package/lib/components/DataGrid/useDataGrid.js +39 -0
- package/lib/components/DataGrid/useDataGrid.js.map +1 -0
- package/lib/components/DataGrid/useDataGridContextValues.js +10 -0
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -0
- package/lib/components/DataGrid/useDataGridStyles.js +15 -0
- package/lib/components/DataGrid/useDataGridStyles.js.map +1 -0
- package/lib/components/DataGridBody/DataGridBody.js +15 -0
- package/lib/components/DataGridBody/DataGridBody.js.map +1 -0
- package/lib/components/DataGridBody/DataGridBody.types.js +2 -0
- package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -0
- package/lib/components/DataGridBody/index.js +6 -0
- package/lib/components/DataGridBody/index.js.map +1 -0
- package/lib/components/DataGridBody/renderDataGridBody.js +9 -0
- package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -0
- package/lib/components/DataGridBody/useDataGridBody.js +25 -0
- package/lib/components/DataGridBody/useDataGridBody.js.map +1 -0
- package/lib/components/DataGridBody/useDataGridBodyStyles.js +15 -0
- package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
- package/lib/components/DataGridCell/DataGridCell.js +15 -0
- package/lib/components/DataGridCell/DataGridCell.js.map +1 -0
- package/lib/components/DataGridCell/DataGridCell.types.js +2 -0
- package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -0
- package/lib/components/DataGridCell/index.js +6 -0
- package/lib/components/DataGridCell/index.js.map +1 -0
- package/lib/components/DataGridCell/renderDataGridCell.js +9 -0
- package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -0
- package/lib/components/DataGridCell/useDataGridCell.js +22 -0
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -0
- package/lib/components/DataGridCell/useDataGridCellStyles.js +15 -0
- package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
- package/lib/components/DataGridHeader/DataGridHeader.js +15 -0
- package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -0
- package/lib/components/DataGridHeader/DataGridHeader.types.js +2 -0
- package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
- package/lib/components/DataGridHeader/index.js +6 -0
- package/lib/components/DataGridHeader/index.js.map +1 -0
- package/lib/components/DataGridHeader/renderDataGridHeader.js +9 -0
- package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
- package/lib/components/DataGridHeader/useDataGridHeader.js +17 -0
- package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -0
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +15 -0
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +15 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +2 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
- package/lib/components/DataGridHeaderCell/index.js +6 -0
- package/lib/components/DataGridHeaderCell/index.js.map +1 -0
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +9 -0
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +17 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +26 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
- package/lib/components/DataGridRow/DataGridRow.js +15 -0
- package/lib/components/DataGridRow/DataGridRow.js.map +1 -0
- package/lib/components/DataGridRow/DataGridRow.types.js +2 -0
- package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -0
- package/lib/components/DataGridRow/index.js +6 -0
- package/lib/components/DataGridRow/index.js.map +1 -0
- package/lib/components/DataGridRow/renderDataGridRow.js +9 -0
- package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -0
- package/lib/components/DataGridRow/useDataGridRow.js +24 -0
- package/lib/components/DataGridRow/useDataGridRow.js.map +1 -0
- package/lib/components/DataGridRow/useDataGridRowStyles.js +15 -0
- package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +15 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +2 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
- package/lib/components/DataGridSelectionCell/index.js +6 -0
- package/lib/components/DataGridSelectionCell/index.js.map +1 -0
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +9 -0
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +19 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +26 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Table/renderTable.js.map +1 -1
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js +7 -5
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.js +29 -3
- package/lib/components/Table/useTableStyles.js.map +1 -1
- package/lib/components/TableBody/TableBody.js.map +1 -1
- package/lib/components/TableBody/TableBody.types.js.map +1 -1
- package/lib/components/TableBody/index.js.map +1 -1
- package/lib/components/TableBody/renderTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +5 -2
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.js +23 -2
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib/components/TableCell/TableCell.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/index.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js +2 -4
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +7 -6
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.js +32 -21
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js +15 -0
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/TableCellActions.types.js +2 -0
- package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -0
- package/lib/components/TableCellActions/index.js +6 -0
- package/lib/components/TableCellActions/index.js.map +1 -0
- package/lib/components/TableCellActions/renderTableCellActions.js +16 -0
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/useTableCellActions.js +27 -0
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js +40 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.js +16 -0
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.types.js +2 -0
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
- package/lib/components/TableCellLayout/index.js +6 -0
- package/lib/components/TableCellLayout/index.js.map +1 -0
- package/lib/components/TableCellLayout/renderTableCellLayout.js +22 -0
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js +46 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +74 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
- package/lib/components/TableHeader/TableHeader.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib/components/TableHeader/index.js.map +1 -1
- package/lib/components/TableHeader/renderTableHeader.js +5 -2
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js +6 -3
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.js +29 -2
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib/components/TableHeaderCell/index.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +6 -3
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +42 -10
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib/components/TableRow/TableRow.js.map +1 -1
- package/lib/components/TableRow/TableRow.types.js.map +1 -1
- package/lib/components/TableRow/index.js.map +1 -1
- package/lib/components/TableRow/renderTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +12 -6
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.js +202 -9
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js +15 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js +2 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
- package/lib/components/TableSelectionCell/index.js +6 -0
- package/lib/components/TableSelectionCell/index.js.map +1 -0
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js +17 -0
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +51 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +90 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib/contexts/dataGridContext.js +9 -0
- package/lib/contexts/dataGridContext.js.map +1 -0
- package/lib/contexts/tableContext.js +7 -3
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/contexts/tableHeaderContext.js +6 -0
- package/lib/contexts/tableHeaderContext.js.map +1 -0
- package/lib/hooks/createColumn.js +41 -0
- package/lib/hooks/createColumn.js.map +1 -0
- package/lib/hooks/index.js +6 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/selectionManager.js +89 -0
- package/lib/hooks/selectionManager.js.map +1 -0
- package/lib/hooks/types.js +2 -0
- package/lib/hooks/types.js.map +1 -0
- package/lib/hooks/useSelection.js +74 -0
- package/lib/hooks/useSelection.js.map +1 -0
- package/lib/hooks/useSort.js +94 -0
- package/lib/hooks/useSort.js.map +1 -0
- package/lib/hooks/useTable.js +40 -0
- package/lib/hooks/useTable.js.map +1 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/DataGrid.js +10 -0
- package/lib-commonjs/DataGrid.js.map +1 -0
- package/lib-commonjs/DataGridBody.js +10 -0
- package/lib-commonjs/DataGridBody.js.map +1 -0
- package/lib-commonjs/DataGridCell.js +10 -0
- package/lib-commonjs/DataGridCell.js.map +1 -0
- package/lib-commonjs/DataGridHeader.js +10 -0
- package/lib-commonjs/DataGridHeader.js.map +1 -0
- package/lib-commonjs/DataGridHeaderCell.js +10 -0
- package/lib-commonjs/DataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/DataGridRow.js +10 -0
- package/lib-commonjs/DataGridRow.js.map +1 -0
- package/lib-commonjs/DataGridSelectionCell.js +10 -0
- package/lib-commonjs/DataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/Table.js.map +1 -1
- package/lib-commonjs/TableBody.js.map +1 -1
- package/lib-commonjs/TableCell.js.map +1 -1
- package/lib-commonjs/TableCellActions.js +10 -0
- package/lib-commonjs/TableCellActions.js.map +1 -0
- package/lib-commonjs/TableCellLayout.js +10 -0
- package/lib-commonjs/TableCellLayout.js.map +1 -0
- package/lib-commonjs/TableCellPrimaryLayout.js +10 -0
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -0
- package/lib-commonjs/TableHeader.js.map +1 -1
- package/lib-commonjs/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/TableRow.js.map +1 -1
- package/lib-commonjs/TableSelectionCell.js +10 -0
- package/lib-commonjs/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/DataGrid/DataGrid.js +28 -0
- package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/DataGrid.types.js +6 -0
- package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -0
- package/lib-commonjs/components/DataGrid/index.js +18 -0
- package/lib-commonjs/components/DataGrid/index.js.map +1 -0
- package/lib-commonjs/components/DataGrid/renderDataGrid.js +25 -0
- package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGrid.js +51 -0
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +20 -0
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridStyles.js +26 -0
- package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.js +26 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +6 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/index.js +18 -0
- package/lib-commonjs/components/DataGridBody/index.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +19 -0
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js +36 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +26 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.js +26 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +6 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/index.js +18 -0
- package/lib-commonjs/components/DataGridCell/index.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +19 -0
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js +33 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +26 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +26 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +6 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/index.js +18 -0
- package/lib-commonjs/components/DataGridHeader/index.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +19 -0
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +27 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +26 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +26 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +6 -0
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/index.js +18 -0
- package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +19 -0
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +27 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +37 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.js +26 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +6 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/index.js +18 -0
- package/lib-commonjs/components/DataGridRow/index.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +19 -0
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js +35 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +26 -0
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +26 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +6 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/index.js +18 -0
- package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +19 -0
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +29 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +37 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
- package/lib-commonjs/components/Table/Table.js.map +1 -1
- package/lib-commonjs/components/Table/index.js.map +1 -1
- package/lib-commonjs/components/Table/renderTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTableContextValues.js +8 -5
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.js +30 -3
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/index.js.map +1 -1
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +5 -2
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +21 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/index.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js +2 -4
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +6 -5
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +32 -21
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +26 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +6 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/index.js +18 -0
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +27 -0
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +38 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +51 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +28 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +6 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/index.js +18 -0
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +34 -0
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +57 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +23 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +85 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/index.js.map +1 -1
- package/lib-commonjs/components/TableHeader/renderTableHeader.js +6 -2
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js +6 -3
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +28 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +6 -3
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +42 -10
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/index.js.map +1 -1
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +12 -5
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +206 -9
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +26 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +6 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/index.js +18 -0
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +28 -0
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +65 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +101 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib-commonjs/contexts/dataGridContext.js +21 -0
- package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +7 -3
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/contexts/tableHeaderContext.js +17 -0
- package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -0
- package/lib-commonjs/hooks/createColumn.js +50 -0
- package/lib-commonjs/hooks/createColumn.js.map +1 -0
- package/lib-commonjs/hooks/index.js +18 -0
- package/lib-commonjs/hooks/index.js.map +1 -0
- package/lib-commonjs/hooks/selectionManager.js +98 -0
- package/lib-commonjs/hooks/selectionManager.js.map +1 -0
- package/lib-commonjs/hooks/types.js +6 -0
- package/lib-commonjs/hooks/types.js.map +1 -0
- package/lib-commonjs/hooks/useSelection.js +89 -0
- package/lib-commonjs/hooks/useSelection.js.map +1 -0
- package/lib-commonjs/hooks/useSort.js +107 -0
- package/lib-commonjs/hooks/useSort.js.map +1 -0
- package/lib-commonjs/hooks/useTable.js +51 -0
- package/lib-commonjs/hooks/useTable.js.map +1 -0
- package/lib-commonjs/index.js +359 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +27 -17
- package/dist/tsdoc-metadata.json +0 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,256 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
|
|
3
3
|
import { ARIAButtonSlotProps } from '@fluentui/react-aria';
|
|
4
|
+
import type { AvatarSizes } from '@fluentui/react-avatar';
|
|
5
|
+
import type { Checkbox } from '@fluentui/react-checkbox';
|
|
6
|
+
import type { CheckboxProps } from '@fluentui/react-checkbox';
|
|
4
7
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
5
8
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
6
|
-
import { ContextSelector } from '@fluentui/react-context-selector';
|
|
7
|
-
import { FC } from 'react';
|
|
8
9
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
9
|
-
import {
|
|
10
|
-
import { ProviderProps } from 'react';
|
|
10
|
+
import type { Radio } from '@fluentui/react-radio';
|
|
11
11
|
import * as React_2 from 'react';
|
|
12
|
+
import { ReactNode } from 'react';
|
|
12
13
|
import type { Slot } from '@fluentui/react-utilities';
|
|
13
14
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
14
15
|
|
|
16
|
+
export declare type CellRenderFunction = (column: ColumnDefinition<any>) => React_2.ReactNode;
|
|
17
|
+
|
|
18
|
+
export declare interface ColumnDefinition<TItem> {
|
|
19
|
+
columnId: ColumnId;
|
|
20
|
+
compare: (a: TItem, b: TItem) => number;
|
|
21
|
+
renderHeaderCell: () => React_2.ReactNode;
|
|
22
|
+
renderCell: (item: TItem) => React_2.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare type ColumnId = string | number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Helper function to create column definition with defaults
|
|
29
|
+
* @param options - column definition options
|
|
30
|
+
* @returns - column definition with defaults
|
|
31
|
+
*/
|
|
32
|
+
export declare function createColumn<TItem>(options: CreateColumnOptions<TItem>): {
|
|
33
|
+
columnId: ColumnId;
|
|
34
|
+
renderCell: (item: TItem) => ReactNode;
|
|
35
|
+
renderHeaderCell: () => ReactNode;
|
|
36
|
+
compare: (a: TItem, b: TItem) => number;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export declare interface CreateColumnOptions<TItem> extends Partial<ColumnDefinition<TItem>> {
|
|
40
|
+
columnId: ColumnId;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* DataGrid component - TODO: add more docs
|
|
45
|
+
*/
|
|
46
|
+
export declare const DataGrid: ForwardRefComponent<DataGridProps>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* DataGridBody component - TODO: add more docs
|
|
50
|
+
*/
|
|
51
|
+
export declare const DataGridBody: ForwardRefComponent<DataGridBodyProps>;
|
|
52
|
+
|
|
53
|
+
export declare const dataGridBodyClassNames: SlotClassNames<DataGridBodySlots>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* DataGridBody Props
|
|
57
|
+
*/
|
|
58
|
+
export declare type DataGridBodyProps = Omit<TableBodyProps, 'children'> & {
|
|
59
|
+
/**
|
|
60
|
+
* Render function for rows
|
|
61
|
+
*/
|
|
62
|
+
children: RowRenderFunction;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export declare type DataGridBodySlots = TableBodySlots;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* State used in rendering DataGridBody
|
|
69
|
+
*/
|
|
70
|
+
export declare type DataGridBodyState = TableBodyState;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* DataGridCell component - TODO: add more docs
|
|
74
|
+
*/
|
|
75
|
+
export declare const DataGridCell: ForwardRefComponent<DataGridCellProps>;
|
|
76
|
+
|
|
77
|
+
export declare const dataGridCellClassNames: SlotClassNames<DataGridCellSlots>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* DataGridCell Props
|
|
81
|
+
*/
|
|
82
|
+
export declare type DataGridCellProps = TableCellProps;
|
|
83
|
+
|
|
84
|
+
export declare type DataGridCellSlots = TableCellSlots;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* State used in rendering DataGridCell
|
|
88
|
+
*/
|
|
89
|
+
export declare type DataGridCellState = TableCellState;
|
|
90
|
+
|
|
91
|
+
export declare const dataGridClassNames: SlotClassNames<DataGridSlots>;
|
|
92
|
+
|
|
93
|
+
export declare type DataGridContextValue = HeadlessTableState<any> & {
|
|
94
|
+
/**
|
|
95
|
+
* How focus navigation will work in the datagrid
|
|
96
|
+
* @default none
|
|
97
|
+
*/
|
|
98
|
+
focusMode: FocusMode;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export declare type DataGridContextValues = TableContextValues & {
|
|
102
|
+
dataGrid: DataGridContextValue;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* DataGridHeader component - TODO: add more docs
|
|
107
|
+
*/
|
|
108
|
+
export declare const DataGridHeader: ForwardRefComponent<DataGridHeaderProps>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* DataGridHeaderCell component - TODO: add more docs
|
|
112
|
+
*/
|
|
113
|
+
export declare const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps>;
|
|
114
|
+
|
|
115
|
+
export declare const dataGridHeaderCellClassNames: SlotClassNames<DataGridHeaderCellSlots>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* DataGridHeaderCell Props
|
|
119
|
+
*/
|
|
120
|
+
export declare type DataGridHeaderCellProps = TableHeaderCellProps;
|
|
121
|
+
|
|
122
|
+
export declare type DataGridHeaderCellSlots = TableHeaderCellSlots;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* State used in rendering DataGridHeaderCell
|
|
126
|
+
*/
|
|
127
|
+
export declare type DataGridHeaderCellState = TableHeaderCellState;
|
|
128
|
+
|
|
129
|
+
export declare const dataGridHeaderClassNames: SlotClassNames<DataGridHeaderSlots>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* DataGridHeader Props
|
|
133
|
+
*/
|
|
134
|
+
export declare type DataGridHeaderProps = TableHeaderProps;
|
|
135
|
+
|
|
136
|
+
export declare type DataGridHeaderSlots = TableHeaderSlots;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* State used in rendering DataGridHeader
|
|
140
|
+
*/
|
|
141
|
+
export declare type DataGridHeaderState = TableHeaderState;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* DataGrid Props
|
|
145
|
+
*/
|
|
146
|
+
export declare type DataGridProps = TableProps & Pick<DataGridContextValue, 'items' | 'columns'> & Pick<Partial<DataGridContextValue>, 'focusMode'>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* DataGridRow component - TODO: add more docs
|
|
150
|
+
*/
|
|
151
|
+
export declare const DataGridRow: ForwardRefComponent<DataGridRowProps>;
|
|
152
|
+
|
|
153
|
+
export declare const dataGridRowClassNames: SlotClassNames<DataGridRowSlots>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* DataGridRow Props
|
|
157
|
+
*/
|
|
158
|
+
export declare type DataGridRowProps = Omit<TableRowProps, 'children'> & {
|
|
159
|
+
children: CellRenderFunction;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export declare type DataGridRowSlots = TableRowSlots;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* State used in rendering DataGridRow
|
|
166
|
+
*/
|
|
167
|
+
export declare type DataGridRowState = TableRowState;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* DataGridSelectionCell component - TODO: add more docs
|
|
171
|
+
*/
|
|
172
|
+
export declare const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps>;
|
|
173
|
+
|
|
174
|
+
export declare const dataGridSelectionCellClassNames: SlotClassNames<DataGridSelectionCellSlots>;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* DataGridSelectionCell Props
|
|
178
|
+
*/
|
|
179
|
+
export declare type DataGridSelectionCellProps = TableSelectionCellProps;
|
|
180
|
+
|
|
181
|
+
export declare type DataGridSelectionCellSlots = TableSelectionCellSlots;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* State used in rendering DataGridSelectionCell
|
|
185
|
+
*/
|
|
186
|
+
export declare type DataGridSelectionCellState = TableSelectionCellState;
|
|
187
|
+
|
|
188
|
+
export declare type DataGridSlots = TableSlots;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* State used in rendering DataGrid
|
|
192
|
+
*/
|
|
193
|
+
export declare type DataGridState = TableState & {
|
|
194
|
+
tableState: HeadlessTableState<unknown>;
|
|
195
|
+
} & Pick<DataGridContextValue, 'focusMode'>;
|
|
196
|
+
|
|
197
|
+
export declare type FocusMode = 'none' | 'cell';
|
|
198
|
+
|
|
199
|
+
export declare interface HeadlessTableState<TItem> extends Pick<UseTableOptions<TItem>, 'items' | 'getRowId'> {
|
|
200
|
+
/**
|
|
201
|
+
* The row data for rendering
|
|
202
|
+
* @param rowEnhancer - Enhances the row with extra user data
|
|
203
|
+
*/
|
|
204
|
+
getRows: <TRowState extends RowState<TItem> = RowState<TItem>>(rowEnhancer?: RowEnhancer<TItem, TRowState>) => TRowState[];
|
|
205
|
+
/**
|
|
206
|
+
* State and actions to manage row selection
|
|
207
|
+
*/
|
|
208
|
+
selection: TableSelectionState;
|
|
209
|
+
/**
|
|
210
|
+
* State and actions to manage row sorting
|
|
211
|
+
*/
|
|
212
|
+
sort: TableSortState<TItem>;
|
|
213
|
+
/**
|
|
214
|
+
* Table columns
|
|
215
|
+
*/
|
|
216
|
+
columns: ColumnDefinition<TItem>[];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Render the final JSX of DataGrid
|
|
221
|
+
*/
|
|
222
|
+
export declare const renderDataGrid_unstable: (state: DataGridState, contextValues: DataGridContextValues) => JSX.Element;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Render the final JSX of DataGridBody
|
|
226
|
+
*/
|
|
227
|
+
export declare const renderDataGridBody_unstable: (state: DataGridBodyState) => JSX.Element;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Render the final JSX of DataGridCell
|
|
231
|
+
*/
|
|
232
|
+
export declare const renderDataGridCell_unstable: (state: DataGridCellState) => JSX.Element;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Render the final JSX of DataGridHeader
|
|
236
|
+
*/
|
|
237
|
+
export declare const renderDataGridHeader_unstable: (state: DataGridHeaderState) => JSX.Element;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Render the final JSX of DataGridHeaderCell
|
|
241
|
+
*/
|
|
242
|
+
export declare const renderDataGridHeaderCell_unstable: (state: DataGridHeaderCellState) => JSX.Element;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Render the final JSX of DataGridRow
|
|
246
|
+
*/
|
|
247
|
+
export declare const renderDataGridRow_unstable: (state: DataGridRowState) => JSX.Element;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Render the final JSX of DataGridSelectionCell
|
|
251
|
+
*/
|
|
252
|
+
export declare const renderDataGridSelectionCell_unstable: (state: DataGridSelectionCellState) => JSX.Element;
|
|
253
|
+
|
|
15
254
|
/**
|
|
16
255
|
* Render the final JSX of Table
|
|
17
256
|
*/
|
|
@@ -27,6 +266,16 @@ export declare const renderTableBody_unstable: (state: TableBodyState) => JSX.El
|
|
|
27
266
|
*/
|
|
28
267
|
export declare const renderTableCell_unstable: (state: TableCellState) => JSX.Element;
|
|
29
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Render the final JSX of TableCellActions
|
|
271
|
+
*/
|
|
272
|
+
export declare const renderTableCellActions_unstable: (state: TableCellActionsState) => JSX.Element;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Render the final JSX of TableCellLayout
|
|
276
|
+
*/
|
|
277
|
+
export declare const renderTableCellLayout_unstable: (state: TableCellLayoutState, contextValues: TableCellLayoutContextValues) => JSX.Element;
|
|
278
|
+
|
|
30
279
|
/**
|
|
31
280
|
* Render the final JSX of TableHeader
|
|
32
281
|
*/
|
|
@@ -42,12 +291,36 @@ export declare const renderTableHeaderCell_unstable: (state: TableHeaderCellStat
|
|
|
42
291
|
*/
|
|
43
292
|
export declare const renderTableRow_unstable: (state: TableRowState) => JSX.Element;
|
|
44
293
|
|
|
294
|
+
/**
|
|
295
|
+
* Render the final JSX of TableSelectionCell
|
|
296
|
+
*/
|
|
297
|
+
export declare const renderTableSelectionCell_unstable: (state: TableSelectionCellState) => JSX.Element;
|
|
298
|
+
|
|
299
|
+
declare type RowEnhancer<TItem, TRowState extends RowState<TItem> = RowState<TItem>> = (row: RowState<TItem>) => TRowState;
|
|
300
|
+
|
|
301
|
+
export declare type RowId = string | number;
|
|
302
|
+
|
|
303
|
+
export declare type RowRenderFunction<TItem = any> = (row: RowState<TItem>) => React_2.ReactNode;
|
|
304
|
+
|
|
305
|
+
export declare interface RowState<TItem> {
|
|
306
|
+
/**
|
|
307
|
+
* User provided data
|
|
308
|
+
*/
|
|
309
|
+
item: TItem;
|
|
310
|
+
/**
|
|
311
|
+
* The row id, defaults to index position in the collection
|
|
312
|
+
*/
|
|
313
|
+
rowId: RowId;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
declare type SelectionMode_2 = 'single' | 'multiselect';
|
|
317
|
+
|
|
45
318
|
export declare type SortDirection = 'ascending' | 'descending';
|
|
46
319
|
|
|
47
|
-
declare
|
|
48
|
-
sortColumn:
|
|
49
|
-
sortDirection:
|
|
50
|
-
}
|
|
320
|
+
declare interface SortState {
|
|
321
|
+
sortColumn: ColumnId | undefined;
|
|
322
|
+
sortDirection: SortDirection;
|
|
323
|
+
}
|
|
51
324
|
|
|
52
325
|
/**
|
|
53
326
|
* Table component - TODO: add more docs
|
|
@@ -75,17 +348,91 @@ export declare type TableBodySlots = {
|
|
|
75
348
|
/**
|
|
76
349
|
* State used in rendering TableBody
|
|
77
350
|
*/
|
|
78
|
-
export declare type TableBodyState = ComponentState<TableBodySlots>;
|
|
351
|
+
export declare type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
79
352
|
|
|
80
353
|
/**
|
|
81
354
|
* TableCell component - TODO: add more docs
|
|
82
355
|
*/
|
|
83
356
|
export declare const TableCell: ForwardRefComponent<TableCellProps>;
|
|
84
357
|
|
|
358
|
+
/**
|
|
359
|
+
* TableCellActions component - TODO: add more docs
|
|
360
|
+
*/
|
|
361
|
+
export declare const TableCellActions: ForwardRefComponent<TableCellActionsProps>;
|
|
362
|
+
|
|
363
|
+
export declare const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* TableCellActions Props
|
|
367
|
+
*/
|
|
368
|
+
export declare type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {
|
|
369
|
+
/**
|
|
370
|
+
* When true, the actions are always visible regardless of row hover.
|
|
371
|
+
* Can be useful keeping the actions visible when a popout surface is opened.
|
|
372
|
+
*/
|
|
373
|
+
visible?: boolean;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
export declare type TableCellActionsSlots = {
|
|
377
|
+
root: Slot<'div'>;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* State used in rendering TableCellActions
|
|
382
|
+
*/
|
|
383
|
+
export declare type TableCellActionsState = ComponentState<TableCellActionsSlots> & Pick<Required<TableCellActionsProps>, 'visible'>;
|
|
384
|
+
|
|
85
385
|
export declare const tableCellClassName = "fui-TableCell";
|
|
86
386
|
|
|
87
387
|
export declare const tableCellClassNames: SlotClassNames<TableCellSlots>;
|
|
88
388
|
|
|
389
|
+
/**
|
|
390
|
+
* TableCellLayout component - TODO: add more docs
|
|
391
|
+
*/
|
|
392
|
+
export declare const TableCellLayout: ForwardRefComponent<TableCellLayoutProps>;
|
|
393
|
+
|
|
394
|
+
export declare const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots>;
|
|
395
|
+
|
|
396
|
+
declare type TableCellLayoutContextValues = {
|
|
397
|
+
avatar: {
|
|
398
|
+
size?: AvatarSizes;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* TableCellLayout Props
|
|
404
|
+
*/
|
|
405
|
+
export declare type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {
|
|
406
|
+
appearance?: 'primary';
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
export declare type TableCellLayoutSlots = {
|
|
410
|
+
root: Slot<'div'>;
|
|
411
|
+
/**
|
|
412
|
+
* Slot for an icon or other visual element
|
|
413
|
+
*/
|
|
414
|
+
media: Slot<'span'>;
|
|
415
|
+
/**
|
|
416
|
+
* Main text for the table cell. Children of the root slot are automatically rendered here
|
|
417
|
+
*/
|
|
418
|
+
main: Slot<'span'>;
|
|
419
|
+
/**
|
|
420
|
+
* Secondary text that describes or complements the main text
|
|
421
|
+
*/
|
|
422
|
+
description: Slot<'span'>;
|
|
423
|
+
/**
|
|
424
|
+
* A layout wrapper for the main and description slots
|
|
425
|
+
*/
|
|
426
|
+
wrapper: Slot<'div'>;
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* State used in rendering TableCellLayout
|
|
431
|
+
*/
|
|
432
|
+
export declare type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'> & {
|
|
433
|
+
avatarSize: AvatarSizes | undefined;
|
|
434
|
+
};
|
|
435
|
+
|
|
89
436
|
/**
|
|
90
437
|
* TableCell Props
|
|
91
438
|
*/
|
|
@@ -93,23 +440,33 @@ export declare type TableCellProps = ComponentProps<TableCellSlots> & {};
|
|
|
93
440
|
|
|
94
441
|
export declare type TableCellSlots = {
|
|
95
442
|
root: Slot<'td', 'div'>;
|
|
96
|
-
media?: Slot<'span'>;
|
|
97
443
|
};
|
|
98
444
|
|
|
99
445
|
/**
|
|
100
446
|
* State used in rendering TableCell
|
|
101
447
|
*/
|
|
102
|
-
export declare type TableCellState = ComponentState<TableCellSlots>;
|
|
448
|
+
export declare type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
103
449
|
|
|
104
450
|
export declare const tableClassName = "fui-Table";
|
|
105
451
|
|
|
106
452
|
export declare const tableClassNames: SlotClassNames<TableSlots>;
|
|
107
453
|
|
|
108
|
-
export declare const TableContextProvider: Provider<TableContextValue | undefined
|
|
454
|
+
export declare const TableContextProvider: React_2.Provider<TableContextValue | undefined>;
|
|
109
455
|
|
|
110
456
|
export declare type TableContextValue = {
|
|
457
|
+
/**
|
|
458
|
+
* Affects the sizes of all table subcomponents
|
|
459
|
+
* @default medium
|
|
460
|
+
*/
|
|
111
461
|
size: 'small' | 'smaller' | 'medium';
|
|
462
|
+
/**
|
|
463
|
+
* Render all table elements as divs intead of semantic table elements
|
|
464
|
+
* Using divs no longer uses `display: table` layout but `display: flex`
|
|
465
|
+
*/
|
|
112
466
|
noNativeElements: boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Whether the table is sortable
|
|
469
|
+
*/
|
|
113
470
|
sortable: boolean;
|
|
114
471
|
};
|
|
115
472
|
|
|
@@ -150,9 +507,7 @@ export declare type TableHeaderCellSlots = {
|
|
|
150
507
|
/**
|
|
151
508
|
* State used in rendering TableHeaderCell
|
|
152
509
|
*/
|
|
153
|
-
export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> &
|
|
154
|
-
sortable: boolean;
|
|
155
|
-
};
|
|
510
|
+
export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'sortable'>;
|
|
156
511
|
|
|
157
512
|
export declare const tableHeaderClassName = "fui-TableHeader";
|
|
158
513
|
|
|
@@ -170,21 +525,12 @@ export declare type TableHeaderSlots = {
|
|
|
170
525
|
/**
|
|
171
526
|
* State used in rendering TableHeader
|
|
172
527
|
*/
|
|
173
|
-
export declare type TableHeaderState = ComponentState<TableHeaderSlots>;
|
|
528
|
+
export declare type TableHeaderState = ComponentState<TableHeaderSlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
174
529
|
|
|
175
530
|
/**
|
|
176
531
|
* Table Props
|
|
177
532
|
*/
|
|
178
|
-
export declare type TableProps = ComponentProps<TableSlots> &
|
|
179
|
-
/**
|
|
180
|
-
* Called when the sorted column changes
|
|
181
|
-
*/
|
|
182
|
-
onSortColumnChange?: (e: React_2.MouseEvent<HTMLElement> | React_2.KeyboardEvent<HTMLElement>, data: {
|
|
183
|
-
sortState: SortState;
|
|
184
|
-
}) => void;
|
|
185
|
-
sortState?: SortState;
|
|
186
|
-
defaultSortState?: SortState;
|
|
187
|
-
};
|
|
533
|
+
export declare type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;
|
|
188
534
|
|
|
189
535
|
/**
|
|
190
536
|
* TableRow component - TODO: add more docs
|
|
@@ -198,7 +544,13 @@ export declare const tableRowClassNames: SlotClassNames<TableRowSlots>;
|
|
|
198
544
|
/**
|
|
199
545
|
* TableRow Props
|
|
200
546
|
*/
|
|
201
|
-
export declare type TableRowProps = ComponentProps<TableRowSlots> & {
|
|
547
|
+
export declare type TableRowProps = ComponentProps<TableRowSlots> & {
|
|
548
|
+
/**
|
|
549
|
+
* A table row can have different variants
|
|
550
|
+
* @default none
|
|
551
|
+
*/
|
|
552
|
+
appearance?: 'brand' | 'neutral' | 'none';
|
|
553
|
+
};
|
|
202
554
|
|
|
203
555
|
export declare type TableRowSlots = {
|
|
204
556
|
root: Slot<'tr', 'div'>;
|
|
@@ -207,19 +559,280 @@ export declare type TableRowSlots = {
|
|
|
207
559
|
/**
|
|
208
560
|
* State used in rendering TableRow
|
|
209
561
|
*/
|
|
210
|
-
export declare type TableRowState = ComponentState<TableRowSlots> &
|
|
211
|
-
|
|
562
|
+
export declare type TableRowState = ComponentState<TableRowSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'> & Pick<Required<TableRowProps>, 'appearance'>;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* TableSelectionCell component - TODO: add more docs
|
|
566
|
+
*/
|
|
567
|
+
export declare const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps>;
|
|
568
|
+
|
|
569
|
+
export declare const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots>;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* TableSelectionCell Props
|
|
573
|
+
*/
|
|
574
|
+
export declare type TableSelectionCellProps = ComponentProps<Partial<Omit<TableSelectionCellSlots, 'media'>>> & {
|
|
575
|
+
/**
|
|
576
|
+
* A table can have two kinds of selection modes
|
|
577
|
+
*/
|
|
578
|
+
type?: 'checkbox' | 'radio';
|
|
579
|
+
checked?: CheckboxProps['checked'];
|
|
580
|
+
/**
|
|
581
|
+
* Only visible when checked or the parent row is hovered
|
|
582
|
+
*/
|
|
583
|
+
subtle?: boolean;
|
|
584
|
+
/**
|
|
585
|
+
* Completely hides the selection cell visually but takes up the same space
|
|
586
|
+
*/
|
|
587
|
+
hidden?: boolean;
|
|
212
588
|
};
|
|
213
589
|
|
|
590
|
+
export declare type TableSelectionCellSlots = {
|
|
591
|
+
/**
|
|
592
|
+
* Selection indicator if selection type is checkbox
|
|
593
|
+
*/
|
|
594
|
+
checkboxIndicator: Slot<typeof Checkbox>;
|
|
595
|
+
/**
|
|
596
|
+
* Selection indicator if selection type is radio
|
|
597
|
+
*/
|
|
598
|
+
radioIndicator: Slot<typeof Radio>;
|
|
599
|
+
} & Pick<TableCellSlots, 'root'>;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* State used in rendering TableSelectionCell
|
|
603
|
+
*/
|
|
604
|
+
export declare type TableSelectionCellState = ComponentState<TableSelectionCellSlots> & Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle' | 'hidden'> & Pick<TableContextValue, 'noNativeElements'>;
|
|
605
|
+
|
|
606
|
+
export declare interface TableSelectionState {
|
|
607
|
+
/**
|
|
608
|
+
* Clears all selected rows
|
|
609
|
+
*/
|
|
610
|
+
clearRows: () => void;
|
|
611
|
+
/**
|
|
612
|
+
* Selects single row
|
|
613
|
+
*/
|
|
614
|
+
selectRow: (rowId: RowId) => void;
|
|
615
|
+
/**
|
|
616
|
+
* De-selects single row
|
|
617
|
+
*/
|
|
618
|
+
deselectRow: (rowId: RowId) => void;
|
|
619
|
+
/**
|
|
620
|
+
* Toggle selection of all rows
|
|
621
|
+
*/
|
|
622
|
+
toggleAllRows: () => void;
|
|
623
|
+
/**
|
|
624
|
+
* Toggle selection of single row
|
|
625
|
+
*/
|
|
626
|
+
toggleRow: (rowId: RowId) => void;
|
|
627
|
+
/**
|
|
628
|
+
* Collection of row ids corresponding to selected rows
|
|
629
|
+
*/
|
|
630
|
+
selectedRows: Set<RowId>;
|
|
631
|
+
/**
|
|
632
|
+
* Whether all rows are selected
|
|
633
|
+
*/
|
|
634
|
+
allRowsSelected: boolean;
|
|
635
|
+
/**
|
|
636
|
+
* Whether some rows are selected
|
|
637
|
+
*/
|
|
638
|
+
someRowsSelected: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* Checks if a given rowId is selected
|
|
641
|
+
*/
|
|
642
|
+
isRowSelected: (rowId: RowId) => boolean;
|
|
643
|
+
}
|
|
644
|
+
|
|
214
645
|
export declare type TableSlots = {
|
|
215
646
|
root: Slot<'table', 'div'>;
|
|
216
647
|
};
|
|
217
648
|
|
|
649
|
+
export declare interface TableSortState<TItem> {
|
|
650
|
+
/**
|
|
651
|
+
* Current sort direction
|
|
652
|
+
*/
|
|
653
|
+
sortDirection: SortDirection;
|
|
654
|
+
/**
|
|
655
|
+
* Column id of the currently sorted column
|
|
656
|
+
*/
|
|
657
|
+
sortColumn: ColumnId | undefined;
|
|
658
|
+
/**
|
|
659
|
+
* Set the sort direction for the specified column
|
|
660
|
+
*/
|
|
661
|
+
setColumnSort: (columnId: ColumnId, sortDirection: SortDirection) => void;
|
|
662
|
+
/**
|
|
663
|
+
* Toggles the sort direction for specified column
|
|
664
|
+
*/
|
|
665
|
+
toggleColumnSort: (columnId: ColumnId) => void;
|
|
666
|
+
/**
|
|
667
|
+
* Returns the sort direction if a column is sorted,
|
|
668
|
+
* returns undefined if the column is not sorted
|
|
669
|
+
*/
|
|
670
|
+
getSortDirection: (columnId: ColumnId) => SortDirection | undefined;
|
|
671
|
+
/**
|
|
672
|
+
* Sorts rows and returns a **shallow** copy of original items
|
|
673
|
+
*/
|
|
674
|
+
sort: <TRowState extends RowState<TItem>>(rows: TRowState[]) => TRowState[];
|
|
675
|
+
}
|
|
676
|
+
|
|
218
677
|
/**
|
|
219
678
|
* State used in rendering Table
|
|
220
679
|
*/
|
|
221
680
|
export declare type TableState = ComponentState<TableSlots> & Pick<Required<TableProps>, 'size' | 'noNativeElements'> & TableContextValue;
|
|
222
681
|
|
|
682
|
+
export declare type TableStatePlugin = <TItem>(tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Create the state required to render DataGrid.
|
|
686
|
+
*
|
|
687
|
+
* The returned state can be modified with hooks such as useDataGridStyles_unstable,
|
|
688
|
+
* before being passed to renderDataGrid_unstable.
|
|
689
|
+
*
|
|
690
|
+
* @param props - props from this instance of DataGrid
|
|
691
|
+
* @param ref - reference to root HTMLElement of DataGrid
|
|
692
|
+
*/
|
|
693
|
+
export declare const useDataGrid_unstable: (props: DataGridProps, ref: React_2.Ref<HTMLElement>) => DataGridState;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Create the state required to render DataGridBody.
|
|
697
|
+
*
|
|
698
|
+
* The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,
|
|
699
|
+
* before being passed to renderDataGridBody_unstable.
|
|
700
|
+
*
|
|
701
|
+
* @param props - props from this instance of DataGridBody
|
|
702
|
+
* @param ref - reference to root HTMLElement of DataGridBody
|
|
703
|
+
*/
|
|
704
|
+
export declare const useDataGridBody_unstable: (props: DataGridBodyProps, ref: React_2.Ref<HTMLElement>) => DataGridBodyState;
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* Apply styling to the DataGridBody slots based on the state
|
|
708
|
+
*/
|
|
709
|
+
export declare const useDataGridBodyStyles_unstable: (state: DataGridBodyState) => DataGridBodyState;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Create the state required to render DataGridCell.
|
|
713
|
+
*
|
|
714
|
+
* The returned state can be modified with hooks such as useDataGridCellStyles_unstable,
|
|
715
|
+
* before being passed to renderDataGridCell_unstable.
|
|
716
|
+
*
|
|
717
|
+
* @param props - props from this instance of DataGridCell
|
|
718
|
+
* @param ref - reference to root HTMLElement of DataGridCell
|
|
719
|
+
*/
|
|
720
|
+
export declare const useDataGridCell_unstable: (props: DataGridCellProps, ref: React_2.Ref<HTMLElement>) => DataGridCellState;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Apply styling to the DataGridCell slots based on the state
|
|
724
|
+
*/
|
|
725
|
+
export declare const useDataGridCellStyles_unstable: (state: DataGridCellState) => DataGridCellState;
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Create the state required to render DataGridHeader.
|
|
729
|
+
*
|
|
730
|
+
* The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,
|
|
731
|
+
* before being passed to renderDataGridHeader_unstable.
|
|
732
|
+
*
|
|
733
|
+
* @param props - props from this instance of DataGridHeader
|
|
734
|
+
* @param ref - reference to root HTMLElement of DataGridHeader
|
|
735
|
+
*/
|
|
736
|
+
export declare const useDataGridHeader_unstable: (props: DataGridHeaderProps, ref: React_2.Ref<HTMLElement>) => DataGridHeaderState;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Create the state required to render DataGridHeaderCell.
|
|
740
|
+
*
|
|
741
|
+
* The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,
|
|
742
|
+
* before being passed to renderDataGridHeaderCell_unstable.
|
|
743
|
+
*
|
|
744
|
+
* @param props - props from this instance of DataGridHeaderCell
|
|
745
|
+
* @param ref - reference to root HTMLElement of DataGridHeaderCell
|
|
746
|
+
*/
|
|
747
|
+
export declare const useDataGridHeaderCell_unstable: (props: DataGridHeaderCellProps, ref: React_2.Ref<HTMLElement>) => DataGridHeaderCellState;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Apply styling to the DataGridHeaderCell slots based on the state
|
|
751
|
+
*/
|
|
752
|
+
export declare const useDataGridHeaderCellStyles_unstable: (state: DataGridHeaderCellState) => DataGridHeaderCellState;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Apply styling to the DataGridHeader slots based on the state
|
|
756
|
+
*/
|
|
757
|
+
export declare const useDataGridHeaderStyles_unstable: (state: DataGridHeaderState) => DataGridHeaderState;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Create the state required to render DataGridRow.
|
|
761
|
+
*
|
|
762
|
+
* The returned state can be modified with hooks such as useDataGridRowStyles_unstable,
|
|
763
|
+
* before being passed to renderDataGridRow_unstable.
|
|
764
|
+
*
|
|
765
|
+
* @param props - props from this instance of DataGridRow
|
|
766
|
+
* @param ref - reference to root HTMLElement of DataGridRow
|
|
767
|
+
*/
|
|
768
|
+
export declare const useDataGridRow_unstable: (props: DataGridRowProps, ref: React_2.Ref<HTMLElement>) => DataGridRowState;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Apply styling to the DataGridRow slots based on the state
|
|
772
|
+
*/
|
|
773
|
+
export declare const useDataGridRowStyles_unstable: (state: DataGridRowState) => DataGridRowState;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Create the state required to render DataGridSelectionCell.
|
|
777
|
+
*
|
|
778
|
+
* The returned state can be modified with hooks such as useDataGridSelectionCellStyles_unstable,
|
|
779
|
+
* before being passed to renderDataGridSelectionCell_unstable.
|
|
780
|
+
*
|
|
781
|
+
* @param props - props from this instance of DataGridSelectionCell
|
|
782
|
+
* @param ref - reference to root HTMLElement of DataGridSelectionCell
|
|
783
|
+
*/
|
|
784
|
+
export declare const useDataGridSelectionCell_unstable: (props: DataGridSelectionCellProps, ref: React_2.Ref<HTMLElement>) => DataGridSelectionCellState;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Apply styling to the DataGridSelectionCell slots based on the state
|
|
788
|
+
*/
|
|
789
|
+
export declare const useDataGridSelectionCellStyles_unstable: (state: DataGridSelectionCellState) => DataGridSelectionCellState;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Apply styling to the DataGrid slots based on the state
|
|
793
|
+
*/
|
|
794
|
+
export declare const useDataGridStyles_unstable: (state: DataGridState) => DataGridState;
|
|
795
|
+
|
|
796
|
+
export declare function useSelection<TItem>(options: UseSelectionOptions): (tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
797
|
+
|
|
798
|
+
declare interface UseSelectionOptions {
|
|
799
|
+
/**
|
|
800
|
+
* Can be multi or single select
|
|
801
|
+
*/
|
|
802
|
+
selectionMode: SelectionMode_2;
|
|
803
|
+
/**
|
|
804
|
+
* Used in uncontrolled mode to set initial selected rows on mount
|
|
805
|
+
*/
|
|
806
|
+
defaultSelectedItems?: Set<RowId>;
|
|
807
|
+
/**
|
|
808
|
+
* Used to control row selection
|
|
809
|
+
*/
|
|
810
|
+
selectedItems?: Set<RowId>;
|
|
811
|
+
/**
|
|
812
|
+
* Called when selection changes
|
|
813
|
+
*/
|
|
814
|
+
onSelectionChange?: (selectedItems: Set<RowId>) => void;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export declare function useSort<TItem>(options: UseSortOptions): (tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
818
|
+
|
|
819
|
+
declare interface UseSortOptions {
|
|
820
|
+
/**
|
|
821
|
+
* Used to control sorting
|
|
822
|
+
*/
|
|
823
|
+
sortState?: SortState;
|
|
824
|
+
/**
|
|
825
|
+
* Used in uncontrolled mode to set initial sort column and direction on mount
|
|
826
|
+
*/
|
|
827
|
+
defaultSortState?: SortState;
|
|
828
|
+
/**
|
|
829
|
+
* Called when sort changes
|
|
830
|
+
*/
|
|
831
|
+
onSortChange?: (state: SortState) => void;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export declare function useTable<TItem>(options: UseTableOptions<TItem>, plugins?: TableStatePlugin[]): HeadlessTableState<TItem>;
|
|
835
|
+
|
|
223
836
|
/**
|
|
224
837
|
* Create the state required to render Table.
|
|
225
838
|
*
|
|
@@ -258,12 +871,44 @@ export declare const useTableBodyStyles_unstable: (state: TableBodyState) => Tab
|
|
|
258
871
|
*/
|
|
259
872
|
export declare const useTableCell_unstable: (props: TableCellProps, ref: React_2.Ref<HTMLElement>) => TableCellState;
|
|
260
873
|
|
|
874
|
+
/**
|
|
875
|
+
* Create the state required to render TableCellActions.
|
|
876
|
+
*
|
|
877
|
+
* The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
|
|
878
|
+
* before being passed to renderTableCellActions_unstable.
|
|
879
|
+
*
|
|
880
|
+
* @param props - props from this instance of TableCellActions
|
|
881
|
+
* @param ref - reference to root HTMLElement of TableCellActions
|
|
882
|
+
*/
|
|
883
|
+
export declare const useTableCellActions_unstable: (props: TableCellActionsProps, ref: React_2.Ref<HTMLElement>) => TableCellActionsState;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Apply styling to the TableCellActions slots based on the state
|
|
887
|
+
*/
|
|
888
|
+
export declare const useTableCellActionsStyles_unstable: (state: TableCellActionsState) => TableCellActionsState;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Create the state required to render TableCellLayout.
|
|
892
|
+
*
|
|
893
|
+
* The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
|
|
894
|
+
* before being passed to renderTableCellLayout_unstable.
|
|
895
|
+
*
|
|
896
|
+
* @param props - props from this instance of TableCellLayout
|
|
897
|
+
* @param ref - reference to root HTMLElement of TableCellLayout
|
|
898
|
+
*/
|
|
899
|
+
export declare const useTableCellLayout_unstable: (props: TableCellLayoutProps, ref: React_2.Ref<HTMLElement>) => TableCellLayoutState;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Apply styling to the TableCellLayout slots based on the state
|
|
903
|
+
*/
|
|
904
|
+
export declare const useTableCellLayoutStyles_unstable: (state: TableCellLayoutState) => TableCellLayoutState;
|
|
905
|
+
|
|
261
906
|
/**
|
|
262
907
|
* Apply styling to the TableCell slots based on the state
|
|
263
908
|
*/
|
|
264
909
|
export declare const useTableCellStyles_unstable: (state: TableCellState) => TableCellState;
|
|
265
910
|
|
|
266
|
-
export declare const useTableContext:
|
|
911
|
+
export declare const useTableContext: () => TableContextValue;
|
|
267
912
|
|
|
268
913
|
/**
|
|
269
914
|
* Create the state required to render TableHeader.
|
|
@@ -297,6 +942,12 @@ export declare const useTableHeaderCellStyles_unstable: (state: TableHeaderCellS
|
|
|
297
942
|
*/
|
|
298
943
|
export declare const useTableHeaderStyles_unstable: (state: TableHeaderState) => TableHeaderState;
|
|
299
944
|
|
|
945
|
+
export declare interface UseTableOptions<TItem> {
|
|
946
|
+
columns: ColumnDefinition<TItem>[];
|
|
947
|
+
items: TItem[];
|
|
948
|
+
getRowId?: (item: TItem) => RowId;
|
|
949
|
+
}
|
|
950
|
+
|
|
300
951
|
/**
|
|
301
952
|
* Create the state required to render TableRow.
|
|
302
953
|
*
|
|
@@ -313,6 +964,22 @@ export declare const useTableRow_unstable: (props: TableRowProps, ref: React_2.R
|
|
|
313
964
|
*/
|
|
314
965
|
export declare const useTableRowStyles_unstable: (state: TableRowState) => TableRowState;
|
|
315
966
|
|
|
967
|
+
/**
|
|
968
|
+
* Create the state required to render TableSelectionCell.
|
|
969
|
+
*
|
|
970
|
+
* The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,
|
|
971
|
+
* before being passed to renderTableSelectionCell_unstable.
|
|
972
|
+
*
|
|
973
|
+
* @param props - props from this instance of TableSelectionCell
|
|
974
|
+
* @param ref - reference to root HTMLElement of TableSelectionCell
|
|
975
|
+
*/
|
|
976
|
+
export declare const useTableSelectionCell_unstable: (props: TableSelectionCellProps, ref: React_2.Ref<HTMLElement>) => TableSelectionCellState;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* Apply styling to the TableSelectionCell slots based on the state
|
|
980
|
+
*/
|
|
981
|
+
export declare const useTableSelectionCellStyles_unstable: (state: TableSelectionCellState) => TableSelectionCellState;
|
|
982
|
+
|
|
316
983
|
/**
|
|
317
984
|
* Apply styling to the Table slots based on the state
|
|
318
985
|
*/
|