@fluentui/react-table 9.0.0-alpha.1 → 9.0.0-alpha.10
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 +501 -4
- package/CHANGELOG.md +139 -5
- package/dist/index.d.ts +653 -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 +9 -0
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -0
- package/lib/components/DataGrid/useDataGrid.js +17 -0
- package/lib/components/DataGrid/useDataGrid.js.map +1 -0
- package/lib/components/DataGrid/useDataGridContextValues.js +5 -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 +17 -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 +17 -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 +17 -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 +17 -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/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/index.js +5 -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 +32 -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 +19 -0
- package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGrid.js +27 -0
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +15 -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 +27 -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 +27 -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 +27 -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 +27 -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/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/index.js +16 -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 +42 -0
- package/lib-commonjs/hooks/useTable.js.map +1 -0
- package/lib-commonjs/index.js +353 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +26 -17
- package/dist/tsdoc-metadata.json +0 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,214 @@
|
|
|
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
12
|
import type { Slot } from '@fluentui/react-utilities';
|
|
13
13
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
14
14
|
|
|
15
|
+
export declare interface ColumnDefinition<TItem> {
|
|
16
|
+
columnId: ColumnId;
|
|
17
|
+
compare?: (a: TItem, b: TItem) => number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare type ColumnId = string | number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* DataGrid component - TODO: add more docs
|
|
24
|
+
*/
|
|
25
|
+
export declare const DataGrid: ForwardRefComponent<DataGridProps>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* DataGridBody component - TODO: add more docs
|
|
29
|
+
*/
|
|
30
|
+
export declare const DataGridBody: ForwardRefComponent<DataGridBodyProps>;
|
|
31
|
+
|
|
32
|
+
export declare const dataGridBodyClassNames: SlotClassNames<DataGridBodySlots>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* DataGridBody Props
|
|
36
|
+
*/
|
|
37
|
+
export declare type DataGridBodyProps = TableBodyProps;
|
|
38
|
+
|
|
39
|
+
export declare type DataGridBodySlots = TableBodySlots;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* State used in rendering DataGridBody
|
|
43
|
+
*/
|
|
44
|
+
export declare type DataGridBodyState = TableBodyState;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* DataGridCell component - TODO: add more docs
|
|
48
|
+
*/
|
|
49
|
+
export declare const DataGridCell: ForwardRefComponent<DataGridCellProps>;
|
|
50
|
+
|
|
51
|
+
export declare const dataGridCellClassNames: SlotClassNames<DataGridCellSlots>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* DataGridCell Props
|
|
55
|
+
*/
|
|
56
|
+
export declare type DataGridCellProps = TableCellProps;
|
|
57
|
+
|
|
58
|
+
export declare type DataGridCellSlots = TableCellSlots;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* State used in rendering DataGridCell
|
|
62
|
+
*/
|
|
63
|
+
export declare type DataGridCellState = TableCellState;
|
|
64
|
+
|
|
65
|
+
export declare const dataGridClassNames: SlotClassNames<DataGridSlots>;
|
|
66
|
+
|
|
67
|
+
export declare type DataGridContextValues = TableContextValues;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* DataGridHeader component - TODO: add more docs
|
|
71
|
+
*/
|
|
72
|
+
export declare const DataGridHeader: ForwardRefComponent<DataGridHeaderProps>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* DataGridHeaderCell component - TODO: add more docs
|
|
76
|
+
*/
|
|
77
|
+
export declare const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps>;
|
|
78
|
+
|
|
79
|
+
export declare const dataGridHeaderCellClassNames: SlotClassNames<DataGridHeaderCellSlots>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* DataGridHeaderCell Props
|
|
83
|
+
*/
|
|
84
|
+
export declare type DataGridHeaderCellProps = TableHeaderCellProps;
|
|
85
|
+
|
|
86
|
+
export declare type DataGridHeaderCellSlots = TableHeaderCellSlots;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* State used in rendering DataGridHeaderCell
|
|
90
|
+
*/
|
|
91
|
+
export declare type DataGridHeaderCellState = TableHeaderCellState;
|
|
92
|
+
|
|
93
|
+
export declare const dataGridHeaderClassNames: SlotClassNames<DataGridHeaderSlots>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* DataGridHeader Props
|
|
97
|
+
*/
|
|
98
|
+
export declare type DataGridHeaderProps = TableHeaderProps;
|
|
99
|
+
|
|
100
|
+
export declare type DataGridHeaderSlots = TableHeaderSlots;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* State used in rendering DataGridHeader
|
|
104
|
+
*/
|
|
105
|
+
export declare type DataGridHeaderState = TableHeaderState;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* DataGrid Props
|
|
109
|
+
*/
|
|
110
|
+
export declare type DataGridProps = TableProps;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* DataGridRow component - TODO: add more docs
|
|
114
|
+
*/
|
|
115
|
+
export declare const DataGridRow: ForwardRefComponent<DataGridRowProps>;
|
|
116
|
+
|
|
117
|
+
export declare const dataGridRowClassNames: SlotClassNames<DataGridRowSlots>;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* DataGridRow Props
|
|
121
|
+
*/
|
|
122
|
+
export declare type DataGridRowProps = TableRowProps;
|
|
123
|
+
|
|
124
|
+
export declare type DataGridRowSlots = TableRowSlots;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* State used in rendering DataGridRow
|
|
128
|
+
*/
|
|
129
|
+
export declare type DataGridRowState = TableRowState;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* DataGridSelectionCell component - TODO: add more docs
|
|
133
|
+
*/
|
|
134
|
+
export declare const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps>;
|
|
135
|
+
|
|
136
|
+
export declare const dataGridSelectionCellClassNames: SlotClassNames<DataGridSelectionCellSlots>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* DataGridSelectionCell Props
|
|
140
|
+
*/
|
|
141
|
+
export declare type DataGridSelectionCellProps = TableSelectionCellProps;
|
|
142
|
+
|
|
143
|
+
export declare type DataGridSelectionCellSlots = TableSelectionCellSlots;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* State used in rendering DataGridSelectionCell
|
|
147
|
+
*/
|
|
148
|
+
export declare type DataGridSelectionCellState = TableSelectionCellState;
|
|
149
|
+
|
|
150
|
+
export declare type DataGridSlots = TableSlots;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* State used in rendering DataGrid
|
|
154
|
+
*/
|
|
155
|
+
export declare type DataGridState = TableState;
|
|
156
|
+
|
|
157
|
+
export declare interface HeadlessTableState<TItem> extends Pick<UseTableOptions<TItem>, 'items' | 'getRowId'> {
|
|
158
|
+
/**
|
|
159
|
+
* The row data for rendering
|
|
160
|
+
* @param rowEnhancer - Enhances the row with extra user data
|
|
161
|
+
*/
|
|
162
|
+
getRows: <TRowState extends RowState<TItem> = RowState<TItem>>(rowEnhancer?: RowEnhancer<TItem, TRowState>) => TRowState[];
|
|
163
|
+
/**
|
|
164
|
+
* State and actions to manage row selection
|
|
165
|
+
*/
|
|
166
|
+
selection: TableSelectionState;
|
|
167
|
+
/**
|
|
168
|
+
* State and actions to manage row sorting
|
|
169
|
+
*/
|
|
170
|
+
sort: TableSortState<TItem>;
|
|
171
|
+
/**
|
|
172
|
+
* Table columns
|
|
173
|
+
*/
|
|
174
|
+
columns: ColumnDefinition<TItem>[];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Render the final JSX of DataGrid
|
|
179
|
+
*/
|
|
180
|
+
export declare const renderDataGrid_unstable: (state: DataGridState, contextValues: DataGridContextValues) => JSX.Element;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Render the final JSX of DataGridBody
|
|
184
|
+
*/
|
|
185
|
+
export declare const renderDataGridBody_unstable: (state: DataGridBodyState) => JSX.Element;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Render the final JSX of DataGridCell
|
|
189
|
+
*/
|
|
190
|
+
export declare const renderDataGridCell_unstable: (state: DataGridCellState) => JSX.Element;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Render the final JSX of DataGridHeader
|
|
194
|
+
*/
|
|
195
|
+
export declare const renderDataGridHeader_unstable: (state: DataGridHeaderState) => JSX.Element;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Render the final JSX of DataGridHeaderCell
|
|
199
|
+
*/
|
|
200
|
+
export declare const renderDataGridHeaderCell_unstable: (state: DataGridHeaderCellState) => JSX.Element;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Render the final JSX of DataGridRow
|
|
204
|
+
*/
|
|
205
|
+
export declare const renderDataGridRow_unstable: (state: DataGridRowState) => JSX.Element;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Render the final JSX of DataGridSelectionCell
|
|
209
|
+
*/
|
|
210
|
+
export declare const renderDataGridSelectionCell_unstable: (state: DataGridSelectionCellState) => JSX.Element;
|
|
211
|
+
|
|
15
212
|
/**
|
|
16
213
|
* Render the final JSX of Table
|
|
17
214
|
*/
|
|
@@ -27,6 +224,16 @@ export declare const renderTableBody_unstable: (state: TableBodyState) => JSX.El
|
|
|
27
224
|
*/
|
|
28
225
|
export declare const renderTableCell_unstable: (state: TableCellState) => JSX.Element;
|
|
29
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Render the final JSX of TableCellActions
|
|
229
|
+
*/
|
|
230
|
+
export declare const renderTableCellActions_unstable: (state: TableCellActionsState) => JSX.Element;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Render the final JSX of TableCellLayout
|
|
234
|
+
*/
|
|
235
|
+
export declare const renderTableCellLayout_unstable: (state: TableCellLayoutState, contextValues: TableCellLayoutContextValues) => JSX.Element;
|
|
236
|
+
|
|
30
237
|
/**
|
|
31
238
|
* Render the final JSX of TableHeader
|
|
32
239
|
*/
|
|
@@ -42,12 +249,34 @@ export declare const renderTableHeaderCell_unstable: (state: TableHeaderCellStat
|
|
|
42
249
|
*/
|
|
43
250
|
export declare const renderTableRow_unstable: (state: TableRowState) => JSX.Element;
|
|
44
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Render the final JSX of TableSelectionCell
|
|
254
|
+
*/
|
|
255
|
+
export declare const renderTableSelectionCell_unstable: (state: TableSelectionCellState) => JSX.Element;
|
|
256
|
+
|
|
257
|
+
declare type RowEnhancer<TItem, TRowState extends RowState<TItem> = RowState<TItem>> = (row: RowState<TItem>) => TRowState;
|
|
258
|
+
|
|
259
|
+
export declare type RowId = string | number;
|
|
260
|
+
|
|
261
|
+
export declare interface RowState<TItem> {
|
|
262
|
+
/**
|
|
263
|
+
* User provided data
|
|
264
|
+
*/
|
|
265
|
+
item: TItem;
|
|
266
|
+
/**
|
|
267
|
+
* The row id, defaults to index position in the collection
|
|
268
|
+
*/
|
|
269
|
+
rowId: RowId;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
declare type SelectionMode_2 = 'single' | 'multiselect';
|
|
273
|
+
|
|
45
274
|
export declare type SortDirection = 'ascending' | 'descending';
|
|
46
275
|
|
|
47
|
-
declare
|
|
48
|
-
sortColumn:
|
|
49
|
-
sortDirection:
|
|
50
|
-
}
|
|
276
|
+
declare interface SortState {
|
|
277
|
+
sortColumn: ColumnId | undefined;
|
|
278
|
+
sortDirection: SortDirection;
|
|
279
|
+
}
|
|
51
280
|
|
|
52
281
|
/**
|
|
53
282
|
* Table component - TODO: add more docs
|
|
@@ -75,17 +304,91 @@ export declare type TableBodySlots = {
|
|
|
75
304
|
/**
|
|
76
305
|
* State used in rendering TableBody
|
|
77
306
|
*/
|
|
78
|
-
export declare type TableBodyState = ComponentState<TableBodySlots>;
|
|
307
|
+
export declare type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
79
308
|
|
|
80
309
|
/**
|
|
81
310
|
* TableCell component - TODO: add more docs
|
|
82
311
|
*/
|
|
83
312
|
export declare const TableCell: ForwardRefComponent<TableCellProps>;
|
|
84
313
|
|
|
314
|
+
/**
|
|
315
|
+
* TableCellActions component - TODO: add more docs
|
|
316
|
+
*/
|
|
317
|
+
export declare const TableCellActions: ForwardRefComponent<TableCellActionsProps>;
|
|
318
|
+
|
|
319
|
+
export declare const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots>;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* TableCellActions Props
|
|
323
|
+
*/
|
|
324
|
+
export declare type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {
|
|
325
|
+
/**
|
|
326
|
+
* When true, the actions are always visible regardless of row hover.
|
|
327
|
+
* Can be useful keeping the actions visible when a popout surface is opened.
|
|
328
|
+
*/
|
|
329
|
+
visible?: boolean;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export declare type TableCellActionsSlots = {
|
|
333
|
+
root: Slot<'div'>;
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* State used in rendering TableCellActions
|
|
338
|
+
*/
|
|
339
|
+
export declare type TableCellActionsState = ComponentState<TableCellActionsSlots> & Pick<Required<TableCellActionsProps>, 'visible'>;
|
|
340
|
+
|
|
85
341
|
export declare const tableCellClassName = "fui-TableCell";
|
|
86
342
|
|
|
87
343
|
export declare const tableCellClassNames: SlotClassNames<TableCellSlots>;
|
|
88
344
|
|
|
345
|
+
/**
|
|
346
|
+
* TableCellLayout component - TODO: add more docs
|
|
347
|
+
*/
|
|
348
|
+
export declare const TableCellLayout: ForwardRefComponent<TableCellLayoutProps>;
|
|
349
|
+
|
|
350
|
+
export declare const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots>;
|
|
351
|
+
|
|
352
|
+
declare type TableCellLayoutContextValues = {
|
|
353
|
+
avatar: {
|
|
354
|
+
size?: AvatarSizes;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* TableCellLayout Props
|
|
360
|
+
*/
|
|
361
|
+
export declare type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {
|
|
362
|
+
appearance?: 'primary';
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
export declare type TableCellLayoutSlots = {
|
|
366
|
+
root: Slot<'div'>;
|
|
367
|
+
/**
|
|
368
|
+
* Slot for an icon or other visual element
|
|
369
|
+
*/
|
|
370
|
+
media: Slot<'span'>;
|
|
371
|
+
/**
|
|
372
|
+
* Main text for the table cell. Children of the root slot are automatically rendered here
|
|
373
|
+
*/
|
|
374
|
+
main: Slot<'span'>;
|
|
375
|
+
/**
|
|
376
|
+
* Secondary text that describes or complements the main text
|
|
377
|
+
*/
|
|
378
|
+
description: Slot<'span'>;
|
|
379
|
+
/**
|
|
380
|
+
* A layout wrapper for the main and description slots
|
|
381
|
+
*/
|
|
382
|
+
wrapper: Slot<'div'>;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* State used in rendering TableCellLayout
|
|
387
|
+
*/
|
|
388
|
+
export declare type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'> & {
|
|
389
|
+
avatarSize: AvatarSizes | undefined;
|
|
390
|
+
};
|
|
391
|
+
|
|
89
392
|
/**
|
|
90
393
|
* TableCell Props
|
|
91
394
|
*/
|
|
@@ -93,23 +396,33 @@ export declare type TableCellProps = ComponentProps<TableCellSlots> & {};
|
|
|
93
396
|
|
|
94
397
|
export declare type TableCellSlots = {
|
|
95
398
|
root: Slot<'td', 'div'>;
|
|
96
|
-
media?: Slot<'span'>;
|
|
97
399
|
};
|
|
98
400
|
|
|
99
401
|
/**
|
|
100
402
|
* State used in rendering TableCell
|
|
101
403
|
*/
|
|
102
|
-
export declare type TableCellState = ComponentState<TableCellSlots>;
|
|
404
|
+
export declare type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
103
405
|
|
|
104
406
|
export declare const tableClassName = "fui-Table";
|
|
105
407
|
|
|
106
408
|
export declare const tableClassNames: SlotClassNames<TableSlots>;
|
|
107
409
|
|
|
108
|
-
export declare const TableContextProvider: Provider<TableContextValue | undefined
|
|
410
|
+
export declare const TableContextProvider: React_2.Provider<TableContextValue | undefined>;
|
|
109
411
|
|
|
110
412
|
export declare type TableContextValue = {
|
|
413
|
+
/**
|
|
414
|
+
* Affects the sizes of all table subcomponents
|
|
415
|
+
* @default medium
|
|
416
|
+
*/
|
|
111
417
|
size: 'small' | 'smaller' | 'medium';
|
|
418
|
+
/**
|
|
419
|
+
* Render all table elements as divs intead of semantic table elements
|
|
420
|
+
* Using divs no longer uses `display: table` layout but `display: flex`
|
|
421
|
+
*/
|
|
112
422
|
noNativeElements: boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Whether the table is sortable
|
|
425
|
+
*/
|
|
113
426
|
sortable: boolean;
|
|
114
427
|
};
|
|
115
428
|
|
|
@@ -150,9 +463,7 @@ export declare type TableHeaderCellSlots = {
|
|
|
150
463
|
/**
|
|
151
464
|
* State used in rendering TableHeaderCell
|
|
152
465
|
*/
|
|
153
|
-
export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> &
|
|
154
|
-
sortable: boolean;
|
|
155
|
-
};
|
|
466
|
+
export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'sortable'>;
|
|
156
467
|
|
|
157
468
|
export declare const tableHeaderClassName = "fui-TableHeader";
|
|
158
469
|
|
|
@@ -170,21 +481,12 @@ export declare type TableHeaderSlots = {
|
|
|
170
481
|
/**
|
|
171
482
|
* State used in rendering TableHeader
|
|
172
483
|
*/
|
|
173
|
-
export declare type TableHeaderState = ComponentState<TableHeaderSlots>;
|
|
484
|
+
export declare type TableHeaderState = ComponentState<TableHeaderSlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
174
485
|
|
|
175
486
|
/**
|
|
176
487
|
* Table Props
|
|
177
488
|
*/
|
|
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
|
-
};
|
|
489
|
+
export declare type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;
|
|
188
490
|
|
|
189
491
|
/**
|
|
190
492
|
* TableRow component - TODO: add more docs
|
|
@@ -198,7 +500,13 @@ export declare const tableRowClassNames: SlotClassNames<TableRowSlots>;
|
|
|
198
500
|
/**
|
|
199
501
|
* TableRow Props
|
|
200
502
|
*/
|
|
201
|
-
export declare type TableRowProps = ComponentProps<TableRowSlots> & {
|
|
503
|
+
export declare type TableRowProps = ComponentProps<TableRowSlots> & {
|
|
504
|
+
/**
|
|
505
|
+
* A table row can have different variants
|
|
506
|
+
* @default none
|
|
507
|
+
*/
|
|
508
|
+
appearance?: 'brand' | 'neutral' | 'none';
|
|
509
|
+
};
|
|
202
510
|
|
|
203
511
|
export declare type TableRowSlots = {
|
|
204
512
|
root: Slot<'tr', 'div'>;
|
|
@@ -207,19 +515,280 @@ export declare type TableRowSlots = {
|
|
|
207
515
|
/**
|
|
208
516
|
* State used in rendering TableRow
|
|
209
517
|
*/
|
|
210
|
-
export declare type TableRowState = ComponentState<TableRowSlots> &
|
|
211
|
-
|
|
518
|
+
export declare type TableRowState = ComponentState<TableRowSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'> & Pick<Required<TableRowProps>, 'appearance'>;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* TableSelectionCell component - TODO: add more docs
|
|
522
|
+
*/
|
|
523
|
+
export declare const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps>;
|
|
524
|
+
|
|
525
|
+
export declare const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots>;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* TableSelectionCell Props
|
|
529
|
+
*/
|
|
530
|
+
export declare type TableSelectionCellProps = ComponentProps<Partial<Omit<TableSelectionCellSlots, 'media'>>> & {
|
|
531
|
+
/**
|
|
532
|
+
* A table can have two kinds of selection modes
|
|
533
|
+
*/
|
|
534
|
+
type?: 'checkbox' | 'radio';
|
|
535
|
+
checked?: CheckboxProps['checked'];
|
|
536
|
+
/**
|
|
537
|
+
* Only visible when checked or the parent row is hovered
|
|
538
|
+
*/
|
|
539
|
+
subtle?: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* Completely hides the selection cell visually but takes up the same space
|
|
542
|
+
*/
|
|
543
|
+
hidden?: boolean;
|
|
212
544
|
};
|
|
213
545
|
|
|
546
|
+
export declare type TableSelectionCellSlots = {
|
|
547
|
+
/**
|
|
548
|
+
* Selection indicator if selection type is checkbox
|
|
549
|
+
*/
|
|
550
|
+
checkboxIndicator: Slot<typeof Checkbox>;
|
|
551
|
+
/**
|
|
552
|
+
* Selection indicator if selection type is radio
|
|
553
|
+
*/
|
|
554
|
+
radioIndicator: Slot<typeof Radio>;
|
|
555
|
+
} & Pick<TableCellSlots, 'root'>;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* State used in rendering TableSelectionCell
|
|
559
|
+
*/
|
|
560
|
+
export declare type TableSelectionCellState = ComponentState<TableSelectionCellSlots> & Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle' | 'hidden'> & Pick<TableContextValue, 'noNativeElements'>;
|
|
561
|
+
|
|
562
|
+
export declare interface TableSelectionState {
|
|
563
|
+
/**
|
|
564
|
+
* Clears all selected rows
|
|
565
|
+
*/
|
|
566
|
+
clearRows: () => void;
|
|
567
|
+
/**
|
|
568
|
+
* Selects single row
|
|
569
|
+
*/
|
|
570
|
+
selectRow: (rowId: RowId) => void;
|
|
571
|
+
/**
|
|
572
|
+
* De-selects single row
|
|
573
|
+
*/
|
|
574
|
+
deselectRow: (rowId: RowId) => void;
|
|
575
|
+
/**
|
|
576
|
+
* Toggle selection of all rows
|
|
577
|
+
*/
|
|
578
|
+
toggleAllRows: () => void;
|
|
579
|
+
/**
|
|
580
|
+
* Toggle selection of single row
|
|
581
|
+
*/
|
|
582
|
+
toggleRow: (rowId: RowId) => void;
|
|
583
|
+
/**
|
|
584
|
+
* Collection of row ids corresponding to selected rows
|
|
585
|
+
*/
|
|
586
|
+
selectedRows: Set<RowId>;
|
|
587
|
+
/**
|
|
588
|
+
* Whether all rows are selected
|
|
589
|
+
*/
|
|
590
|
+
allRowsSelected: boolean;
|
|
591
|
+
/**
|
|
592
|
+
* Whether some rows are selected
|
|
593
|
+
*/
|
|
594
|
+
someRowsSelected: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Checks if a given rowId is selected
|
|
597
|
+
*/
|
|
598
|
+
isRowSelected: (rowId: RowId) => boolean;
|
|
599
|
+
}
|
|
600
|
+
|
|
214
601
|
export declare type TableSlots = {
|
|
215
602
|
root: Slot<'table', 'div'>;
|
|
216
603
|
};
|
|
217
604
|
|
|
605
|
+
export declare interface TableSortState<TItem> {
|
|
606
|
+
/**
|
|
607
|
+
* Current sort direction
|
|
608
|
+
*/
|
|
609
|
+
sortDirection: SortDirection;
|
|
610
|
+
/**
|
|
611
|
+
* Column id of the currently sorted column
|
|
612
|
+
*/
|
|
613
|
+
sortColumn: ColumnId | undefined;
|
|
614
|
+
/**
|
|
615
|
+
* Set the sort direction for the specified column
|
|
616
|
+
*/
|
|
617
|
+
setColumnSort: (columnId: ColumnId, sortDirection: SortDirection) => void;
|
|
618
|
+
/**
|
|
619
|
+
* Toggles the sort direction for specified column
|
|
620
|
+
*/
|
|
621
|
+
toggleColumnSort: (columnId: ColumnId) => void;
|
|
622
|
+
/**
|
|
623
|
+
* Returns the sort direction if a column is sorted,
|
|
624
|
+
* returns undefined if the column is not sorted
|
|
625
|
+
*/
|
|
626
|
+
getSortDirection: (columnId: ColumnId) => SortDirection | undefined;
|
|
627
|
+
/**
|
|
628
|
+
* Sorts rows and returns a **shallow** copy of original items
|
|
629
|
+
*/
|
|
630
|
+
sort: <TRowState extends RowState<TItem>>(rows: TRowState[]) => TRowState[];
|
|
631
|
+
}
|
|
632
|
+
|
|
218
633
|
/**
|
|
219
634
|
* State used in rendering Table
|
|
220
635
|
*/
|
|
221
636
|
export declare type TableState = ComponentState<TableSlots> & Pick<Required<TableProps>, 'size' | 'noNativeElements'> & TableContextValue;
|
|
222
637
|
|
|
638
|
+
export declare type TableStatePlugin = <TItem>(tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Create the state required to render DataGrid.
|
|
642
|
+
*
|
|
643
|
+
* The returned state can be modified with hooks such as useDataGridStyles_unstable,
|
|
644
|
+
* before being passed to renderDataGrid_unstable.
|
|
645
|
+
*
|
|
646
|
+
* @param props - props from this instance of DataGrid
|
|
647
|
+
* @param ref - reference to root HTMLElement of DataGrid
|
|
648
|
+
*/
|
|
649
|
+
export declare const useDataGrid_unstable: (props: DataGridProps, ref: React_2.Ref<HTMLElement>) => DataGridState;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Create the state required to render DataGridBody.
|
|
653
|
+
*
|
|
654
|
+
* The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,
|
|
655
|
+
* before being passed to renderDataGridBody_unstable.
|
|
656
|
+
*
|
|
657
|
+
* @param props - props from this instance of DataGridBody
|
|
658
|
+
* @param ref - reference to root HTMLElement of DataGridBody
|
|
659
|
+
*/
|
|
660
|
+
export declare const useDataGridBody_unstable: (props: DataGridBodyProps, ref: React_2.Ref<HTMLElement>) => DataGridBodyState;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Apply styling to the DataGridBody slots based on the state
|
|
664
|
+
*/
|
|
665
|
+
export declare const useDataGridBodyStyles_unstable: (state: DataGridBodyState) => DataGridBodyState;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Create the state required to render DataGridCell.
|
|
669
|
+
*
|
|
670
|
+
* The returned state can be modified with hooks such as useDataGridCellStyles_unstable,
|
|
671
|
+
* before being passed to renderDataGridCell_unstable.
|
|
672
|
+
*
|
|
673
|
+
* @param props - props from this instance of DataGridCell
|
|
674
|
+
* @param ref - reference to root HTMLElement of DataGridCell
|
|
675
|
+
*/
|
|
676
|
+
export declare const useDataGridCell_unstable: (props: DataGridCellProps, ref: React_2.Ref<HTMLElement>) => DataGridCellState;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Apply styling to the DataGridCell slots based on the state
|
|
680
|
+
*/
|
|
681
|
+
export declare const useDataGridCellStyles_unstable: (state: DataGridCellState) => DataGridCellState;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Create the state required to render DataGridHeader.
|
|
685
|
+
*
|
|
686
|
+
* The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,
|
|
687
|
+
* before being passed to renderDataGridHeader_unstable.
|
|
688
|
+
*
|
|
689
|
+
* @param props - props from this instance of DataGridHeader
|
|
690
|
+
* @param ref - reference to root HTMLElement of DataGridHeader
|
|
691
|
+
*/
|
|
692
|
+
export declare const useDataGridHeader_unstable: (props: DataGridHeaderProps, ref: React_2.Ref<HTMLElement>) => DataGridHeaderState;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Create the state required to render DataGridHeaderCell.
|
|
696
|
+
*
|
|
697
|
+
* The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,
|
|
698
|
+
* before being passed to renderDataGridHeaderCell_unstable.
|
|
699
|
+
*
|
|
700
|
+
* @param props - props from this instance of DataGridHeaderCell
|
|
701
|
+
* @param ref - reference to root HTMLElement of DataGridHeaderCell
|
|
702
|
+
*/
|
|
703
|
+
export declare const useDataGridHeaderCell_unstable: (props: DataGridHeaderCellProps, ref: React_2.Ref<HTMLElement>) => DataGridHeaderCellState;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Apply styling to the DataGridHeaderCell slots based on the state
|
|
707
|
+
*/
|
|
708
|
+
export declare const useDataGridHeaderCellStyles_unstable: (state: DataGridHeaderCellState) => DataGridHeaderCellState;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Apply styling to the DataGridHeader slots based on the state
|
|
712
|
+
*/
|
|
713
|
+
export declare const useDataGridHeaderStyles_unstable: (state: DataGridHeaderState) => DataGridHeaderState;
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Create the state required to render DataGridRow.
|
|
717
|
+
*
|
|
718
|
+
* The returned state can be modified with hooks such as useDataGridRowStyles_unstable,
|
|
719
|
+
* before being passed to renderDataGridRow_unstable.
|
|
720
|
+
*
|
|
721
|
+
* @param props - props from this instance of DataGridRow
|
|
722
|
+
* @param ref - reference to root HTMLElement of DataGridRow
|
|
723
|
+
*/
|
|
724
|
+
export declare const useDataGridRow_unstable: (props: DataGridRowProps, ref: React_2.Ref<HTMLElement>) => DataGridRowState;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Apply styling to the DataGridRow slots based on the state
|
|
728
|
+
*/
|
|
729
|
+
export declare const useDataGridRowStyles_unstable: (state: DataGridRowState) => DataGridRowState;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Create the state required to render DataGridSelectionCell.
|
|
733
|
+
*
|
|
734
|
+
* The returned state can be modified with hooks such as useDataGridSelectionCellStyles_unstable,
|
|
735
|
+
* before being passed to renderDataGridSelectionCell_unstable.
|
|
736
|
+
*
|
|
737
|
+
* @param props - props from this instance of DataGridSelectionCell
|
|
738
|
+
* @param ref - reference to root HTMLElement of DataGridSelectionCell
|
|
739
|
+
*/
|
|
740
|
+
export declare const useDataGridSelectionCell_unstable: (props: DataGridSelectionCellProps, ref: React_2.Ref<HTMLElement>) => DataGridSelectionCellState;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Apply styling to the DataGridSelectionCell slots based on the state
|
|
744
|
+
*/
|
|
745
|
+
export declare const useDataGridSelectionCellStyles_unstable: (state: DataGridSelectionCellState) => DataGridSelectionCellState;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Apply styling to the DataGrid slots based on the state
|
|
749
|
+
*/
|
|
750
|
+
export declare const useDataGridStyles_unstable: (state: DataGridState) => DataGridState;
|
|
751
|
+
|
|
752
|
+
export declare function useSelection<TItem>(options: UseSelectionOptions): (tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
753
|
+
|
|
754
|
+
declare interface UseSelectionOptions {
|
|
755
|
+
/**
|
|
756
|
+
* Can be multi or single select
|
|
757
|
+
*/
|
|
758
|
+
selectionMode: SelectionMode_2;
|
|
759
|
+
/**
|
|
760
|
+
* Used in uncontrolled mode to set initial selected rows on mount
|
|
761
|
+
*/
|
|
762
|
+
defaultSelectedItems?: Set<RowId>;
|
|
763
|
+
/**
|
|
764
|
+
* Used to control row selection
|
|
765
|
+
*/
|
|
766
|
+
selectedItems?: Set<RowId>;
|
|
767
|
+
/**
|
|
768
|
+
* Called when selection changes
|
|
769
|
+
*/
|
|
770
|
+
onSelectionChange?: (selectedItems: Set<RowId>) => void;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export declare function useSort<TItem>(options: UseSortOptions): (tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
774
|
+
|
|
775
|
+
declare interface UseSortOptions {
|
|
776
|
+
/**
|
|
777
|
+
* Used to control sorting
|
|
778
|
+
*/
|
|
779
|
+
sortState?: SortState;
|
|
780
|
+
/**
|
|
781
|
+
* Used in uncontrolled mode to set initial sort column and direction on mount
|
|
782
|
+
*/
|
|
783
|
+
defaultSortState?: SortState;
|
|
784
|
+
/**
|
|
785
|
+
* Called when sort changes
|
|
786
|
+
*/
|
|
787
|
+
onSortChange?: (state: SortState) => void;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export declare function useTable<TItem>(options: UseTableOptions<TItem>, plugins?: TableStatePlugin[]): HeadlessTableState<TItem>;
|
|
791
|
+
|
|
223
792
|
/**
|
|
224
793
|
* Create the state required to render Table.
|
|
225
794
|
*
|
|
@@ -258,12 +827,44 @@ export declare const useTableBodyStyles_unstable: (state: TableBodyState) => Tab
|
|
|
258
827
|
*/
|
|
259
828
|
export declare const useTableCell_unstable: (props: TableCellProps, ref: React_2.Ref<HTMLElement>) => TableCellState;
|
|
260
829
|
|
|
830
|
+
/**
|
|
831
|
+
* Create the state required to render TableCellActions.
|
|
832
|
+
*
|
|
833
|
+
* The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
|
|
834
|
+
* before being passed to renderTableCellActions_unstable.
|
|
835
|
+
*
|
|
836
|
+
* @param props - props from this instance of TableCellActions
|
|
837
|
+
* @param ref - reference to root HTMLElement of TableCellActions
|
|
838
|
+
*/
|
|
839
|
+
export declare const useTableCellActions_unstable: (props: TableCellActionsProps, ref: React_2.Ref<HTMLElement>) => TableCellActionsState;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Apply styling to the TableCellActions slots based on the state
|
|
843
|
+
*/
|
|
844
|
+
export declare const useTableCellActionsStyles_unstable: (state: TableCellActionsState) => TableCellActionsState;
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Create the state required to render TableCellLayout.
|
|
848
|
+
*
|
|
849
|
+
* The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
|
|
850
|
+
* before being passed to renderTableCellLayout_unstable.
|
|
851
|
+
*
|
|
852
|
+
* @param props - props from this instance of TableCellLayout
|
|
853
|
+
* @param ref - reference to root HTMLElement of TableCellLayout
|
|
854
|
+
*/
|
|
855
|
+
export declare const useTableCellLayout_unstable: (props: TableCellLayoutProps, ref: React_2.Ref<HTMLElement>) => TableCellLayoutState;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Apply styling to the TableCellLayout slots based on the state
|
|
859
|
+
*/
|
|
860
|
+
export declare const useTableCellLayoutStyles_unstable: (state: TableCellLayoutState) => TableCellLayoutState;
|
|
861
|
+
|
|
261
862
|
/**
|
|
262
863
|
* Apply styling to the TableCell slots based on the state
|
|
263
864
|
*/
|
|
264
865
|
export declare const useTableCellStyles_unstable: (state: TableCellState) => TableCellState;
|
|
265
866
|
|
|
266
|
-
export declare const useTableContext:
|
|
867
|
+
export declare const useTableContext: () => TableContextValue;
|
|
267
868
|
|
|
268
869
|
/**
|
|
269
870
|
* Create the state required to render TableHeader.
|
|
@@ -297,6 +898,12 @@ export declare const useTableHeaderCellStyles_unstable: (state: TableHeaderCellS
|
|
|
297
898
|
*/
|
|
298
899
|
export declare const useTableHeaderStyles_unstable: (state: TableHeaderState) => TableHeaderState;
|
|
299
900
|
|
|
901
|
+
export declare interface UseTableOptions<TItem> {
|
|
902
|
+
columns: ColumnDefinition<TItem>[];
|
|
903
|
+
items: TItem[];
|
|
904
|
+
getRowId?: (item: TItem) => RowId;
|
|
905
|
+
}
|
|
906
|
+
|
|
300
907
|
/**
|
|
301
908
|
* Create the state required to render TableRow.
|
|
302
909
|
*
|
|
@@ -313,6 +920,22 @@ export declare const useTableRow_unstable: (props: TableRowProps, ref: React_2.R
|
|
|
313
920
|
*/
|
|
314
921
|
export declare const useTableRowStyles_unstable: (state: TableRowState) => TableRowState;
|
|
315
922
|
|
|
923
|
+
/**
|
|
924
|
+
* Create the state required to render TableSelectionCell.
|
|
925
|
+
*
|
|
926
|
+
* The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,
|
|
927
|
+
* before being passed to renderTableSelectionCell_unstable.
|
|
928
|
+
*
|
|
929
|
+
* @param props - props from this instance of TableSelectionCell
|
|
930
|
+
* @param ref - reference to root HTMLElement of TableSelectionCell
|
|
931
|
+
*/
|
|
932
|
+
export declare const useTableSelectionCell_unstable: (props: TableSelectionCellProps, ref: React_2.Ref<HTMLElement>) => TableSelectionCellState;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Apply styling to the TableSelectionCell slots based on the state
|
|
936
|
+
*/
|
|
937
|
+
export declare const useTableSelectionCellStyles_unstable: (state: TableSelectionCellState) => TableSelectionCellState;
|
|
938
|
+
|
|
316
939
|
/**
|
|
317
940
|
* Apply styling to the Table slots based on the state
|
|
318
941
|
*/
|