@fluentui/react-table 0.0.0-nightly-20221007-1237.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +354 -0
- package/CHANGELOG.md +104 -0
- package/LICENSE +15 -0
- package/README.md +5 -0
- package/Spec.md +63 -0
- package/dist/index.d.ts +647 -0
- package/lib/Table.js +2 -0
- package/lib/Table.js.map +1 -0
- package/lib/TableBody.js +2 -0
- package/lib/TableBody.js.map +1 -0
- package/lib/TableCell.js +2 -0
- package/lib/TableCell.js.map +1 -0
- 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 +2 -0
- package/lib/TableHeader.js.map +1 -0
- package/lib/TableHeaderCell.js +2 -0
- package/lib/TableHeaderCell.js.map +1 -0
- package/lib/TableRow.js +2 -0
- package/lib/TableRow.js.map +1 -0
- package/lib/TableSelectionCell.js +2 -0
- package/lib/TableSelectionCell.js.map +1 -0
- package/lib/components/Table/Table.js +16 -0
- package/lib/components/Table/Table.js.map +1 -0
- package/lib/components/Table/Table.types.js +2 -0
- package/lib/components/Table/Table.types.js.map +1 -0
- package/lib/components/Table/index.js +6 -0
- package/lib/components/Table/index.js.map +1 -0
- package/lib/components/Table/renderTable.js +18 -0
- package/lib/components/Table/renderTable.js.map +1 -0
- package/lib/components/Table/useTable.js +30 -0
- package/lib/components/Table/useTable.js.map +1 -0
- package/lib/components/Table/useTableContextValues.js +17 -0
- package/lib/components/Table/useTableContextValues.js.map +1 -0
- package/lib/components/Table/useTableStyles.js +53 -0
- package/lib/components/Table/useTableStyles.js.map +1 -0
- package/lib/components/TableBody/TableBody.js +15 -0
- package/lib/components/TableBody/TableBody.js.map +1 -0
- package/lib/components/TableBody/TableBody.types.js +2 -0
- package/lib/components/TableBody/TableBody.types.js.map +1 -0
- package/lib/components/TableBody/index.js +6 -0
- package/lib/components/TableBody/index.js.map +1 -0
- package/lib/components/TableBody/renderTableBody.js +16 -0
- package/lib/components/TableBody/renderTableBody.js.map +1 -0
- package/lib/components/TableBody/useTableBody.js +32 -0
- package/lib/components/TableBody/useTableBody.js.map +1 -0
- package/lib/components/TableBody/useTableBodyStyles.js +35 -0
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -0
- package/lib/components/TableCell/TableCell.js +15 -0
- package/lib/components/TableCell/TableCell.js.map +1 -0
- package/lib/components/TableCell/TableCell.types.js +2 -0
- package/lib/components/TableCell/TableCell.types.js.map +1 -0
- package/lib/components/TableCell/index.js +6 -0
- package/lib/components/TableCell/index.js.map +1 -0
- package/lib/components/TableCell/renderTableCell.js +15 -0
- package/lib/components/TableCell/renderTableCell.js.map +1 -0
- package/lib/components/TableCell/useTableCell.js +32 -0
- package/lib/components/TableCell/useTableCell.js.map +1 -0
- package/lib/components/TableCell/useTableCellStyles.js +59 -0
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -0
- 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 +15 -0
- package/lib/components/TableHeader/TableHeader.js.map +1 -0
- package/lib/components/TableHeader/TableHeader.types.js +2 -0
- package/lib/components/TableHeader/TableHeader.types.js.map +1 -0
- package/lib/components/TableHeader/index.js +6 -0
- package/lib/components/TableHeader/index.js.map +1 -0
- package/lib/components/TableHeader/renderTableHeader.js +15 -0
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -0
- package/lib/components/TableHeader/useTableHeader.js +39 -0
- package/lib/components/TableHeader/useTableHeader.js.map +1 -0
- package/lib/components/TableHeader/useTableHeaderStyles.js +41 -0
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.js +15 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js +2 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
- package/lib/components/TableHeaderCell/index.js +6 -0
- package/lib/components/TableHeaderCell/index.js.map +1 -0
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js +17 -0
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +62 -0
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +106 -0
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
- package/lib/components/TableRow/TableRow.js +15 -0
- package/lib/components/TableRow/TableRow.js.map +1 -0
- package/lib/components/TableRow/TableRow.types.js +2 -0
- package/lib/components/TableRow/TableRow.types.js.map +1 -0
- package/lib/components/TableRow/index.js +6 -0
- package/lib/components/TableRow/index.js.map +1 -0
- package/lib/components/TableRow/renderTableRow.js +16 -0
- package/lib/components/TableRow/renderTableRow.js.map +1 -0
- package/lib/components/TableRow/useTableRow.js +34 -0
- package/lib/components/TableRow/useTableRow.js.map +1 -0
- package/lib/components/TableRow/useTableRowStyles.js +88 -0
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -0
- 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 +47 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +81 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib/contexts/tableContext.js +14 -0
- package/lib/contexts/tableContext.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 +12 -0
- package/lib/index.js.map +1 -0
- package/lib/navigationModes/cell.js +250 -0
- package/lib/navigationModes/cell.js.map +1 -0
- package/lib/navigationModes/composite.js +208 -0
- package/lib/navigationModes/composite.js.map +1 -0
- package/lib/navigationModes/index.js +3 -0
- package/lib/navigationModes/index.js.map +1 -0
- package/lib/navigationModes/useNavigationMode.js +42 -0
- package/lib/navigationModes/useNavigationMode.js.map +1 -0
- package/lib-commonjs/Table.js +10 -0
- package/lib-commonjs/Table.js.map +1 -0
- package/lib-commonjs/TableBody.js +10 -0
- package/lib-commonjs/TableBody.js.map +1 -0
- package/lib-commonjs/TableCell.js +10 -0
- package/lib-commonjs/TableCell.js.map +1 -0
- 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 +10 -0
- package/lib-commonjs/TableHeader.js.map +1 -0
- package/lib-commonjs/TableHeaderCell.js +10 -0
- package/lib-commonjs/TableHeaderCell.js.map +1 -0
- package/lib-commonjs/TableRow.js +10 -0
- package/lib-commonjs/TableRow.js.map +1 -0
- package/lib-commonjs/TableSelectionCell.js +10 -0
- package/lib-commonjs/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/Table/Table.js +28 -0
- package/lib-commonjs/components/Table/Table.js.map +1 -0
- package/lib-commonjs/components/Table/Table.types.js +6 -0
- package/lib-commonjs/components/Table/Table.types.js.map +1 -0
- package/lib-commonjs/components/Table/index.js +18 -0
- package/lib-commonjs/components/Table/index.js.map +1 -0
- package/lib-commonjs/components/Table/renderTable.js +30 -0
- package/lib-commonjs/components/Table/renderTable.js.map +1 -0
- package/lib-commonjs/components/Table/useTable.js +40 -0
- package/lib-commonjs/components/Table/useTable.js.map +1 -0
- package/lib-commonjs/components/Table/useTableContextValues.js +27 -0
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -0
- package/lib-commonjs/components/Table/useTableStyles.js +64 -0
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -0
- package/lib-commonjs/components/TableBody/TableBody.js +26 -0
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -0
- package/lib-commonjs/components/TableBody/TableBody.types.js +6 -0
- package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -0
- package/lib-commonjs/components/TableBody/index.js +18 -0
- package/lib-commonjs/components/TableBody/index.js.map +1 -0
- package/lib-commonjs/components/TableBody/renderTableBody.js +27 -0
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -0
- package/lib-commonjs/components/TableBody/useTableBody.js +43 -0
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -0
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +44 -0
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -0
- package/lib-commonjs/components/TableCell/TableCell.js +26 -0
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/TableCell.types.js +6 -0
- package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -0
- package/lib-commonjs/components/TableCell/index.js +18 -0
- package/lib-commonjs/components/TableCell/index.js.map +1 -0
- package/lib-commonjs/components/TableCell/renderTableCell.js +26 -0
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/useTableCell.js +43 -0
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +70 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -0
- 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 +26 -0
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -0
- package/lib-commonjs/components/TableHeader/TableHeader.types.js +6 -0
- package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -0
- package/lib-commonjs/components/TableHeader/index.js +18 -0
- package/lib-commonjs/components/TableHeader/index.js.map +1 -0
- package/lib-commonjs/components/TableHeader/renderTableHeader.js +26 -0
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeader.js +51 -0
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +51 -0
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +26 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +6 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/index.js +18 -0
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +28 -0
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +76 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +117 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
- package/lib-commonjs/components/TableRow/TableRow.js +26 -0
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -0
- package/lib-commonjs/components/TableRow/TableRow.types.js +6 -0
- package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -0
- package/lib-commonjs/components/TableRow/index.js +18 -0
- package/lib-commonjs/components/TableRow/index.js.map +1 -0
- package/lib-commonjs/components/TableRow/renderTableRow.js +27 -0
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -0
- package/lib-commonjs/components/TableRow/useTableRow.js +45 -0
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +100 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -0
- 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 +62 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +91 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +25 -0
- package/lib-commonjs/contexts/tableContext.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 +377 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/navigationModes/cell.js +259 -0
- package/lib-commonjs/navigationModes/cell.js.map +1 -0
- package/lib-commonjs/navigationModes/composite.js +217 -0
- package/lib-commonjs/navigationModes/composite.js.map +1 -0
- package/lib-commonjs/navigationModes/index.js +16 -0
- package/lib-commonjs/navigationModes/index.js.map +1 -0
- package/lib-commonjs/navigationModes/useNavigationMode.js +55 -0
- package/lib-commonjs/navigationModes/useNavigationMode.js.map +1 -0
- package/package.json +50 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
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';
|
|
7
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
8
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
9
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
10
|
+
import * as React_2 from 'react';
|
|
11
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
12
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
13
|
+
|
|
14
|
+
export declare interface ColumnDefinition<TItem> {
|
|
15
|
+
columnId: ColumnId;
|
|
16
|
+
compare?: (a: TItem, b: TItem) => number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare type ColumnId = string | number;
|
|
20
|
+
|
|
21
|
+
export declare interface HeadlessTableState<TItem> extends Pick<UseTableOptions<TItem>, 'items' | 'getRowId'> {
|
|
22
|
+
/**
|
|
23
|
+
* The row data for rendering
|
|
24
|
+
* @param rowEnhancer - Enhances the row with extra user data
|
|
25
|
+
*/
|
|
26
|
+
getRows: <TRowState extends RowState<TItem> = RowState<TItem>>(rowEnhancer?: RowEnhancer<TItem, TRowState>) => TRowState[];
|
|
27
|
+
/**
|
|
28
|
+
* State and actions to manage row selection
|
|
29
|
+
*/
|
|
30
|
+
selection: TableSelectionState;
|
|
31
|
+
/**
|
|
32
|
+
* State and actions to manage row sorting
|
|
33
|
+
*/
|
|
34
|
+
sort: TableSortState<TItem>;
|
|
35
|
+
/**
|
|
36
|
+
* Table columns
|
|
37
|
+
*/
|
|
38
|
+
columns: ColumnDefinition<TItem>[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Render the final JSX of Table
|
|
43
|
+
*/
|
|
44
|
+
export declare const renderTable_unstable: (state: TableState, contextValues: TableContextValues) => JSX.Element;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Render the final JSX of TableBody
|
|
48
|
+
*/
|
|
49
|
+
export declare const renderTableBody_unstable: (state: TableBodyState) => JSX.Element;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Render the final JSX of TableCell
|
|
53
|
+
*/
|
|
54
|
+
export declare const renderTableCell_unstable: (state: TableCellState) => JSX.Element;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Render the final JSX of TableCellActions
|
|
58
|
+
*/
|
|
59
|
+
export declare const renderTableCellActions_unstable: (state: TableCellActionsState) => JSX.Element;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Render the final JSX of TableCellLayout
|
|
63
|
+
*/
|
|
64
|
+
export declare const renderTableCellLayout_unstable: (state: TableCellLayoutState, contextValues: TableCellLayoutContextValues) => JSX.Element;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Render the final JSX of TableHeader
|
|
68
|
+
*/
|
|
69
|
+
export declare const renderTableHeader_unstable: (state: TableHeaderState) => JSX.Element;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Render the final JSX of TableHeaderCell
|
|
73
|
+
*/
|
|
74
|
+
export declare const renderTableHeaderCell_unstable: (state: TableHeaderCellState) => JSX.Element;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Render the final JSX of TableRow
|
|
78
|
+
*/
|
|
79
|
+
export declare const renderTableRow_unstable: (state: TableRowState) => JSX.Element;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Render the final JSX of TableSelectionCell
|
|
83
|
+
*/
|
|
84
|
+
export declare const renderTableSelectionCell_unstable: (state: TableSelectionCellState) => JSX.Element;
|
|
85
|
+
|
|
86
|
+
declare type RowEnhancer<TItem, TRowState extends RowState<TItem> = RowState<TItem>> = (row: RowState<TItem>) => TRowState;
|
|
87
|
+
|
|
88
|
+
export declare type RowId = string | number;
|
|
89
|
+
|
|
90
|
+
export declare interface RowState<TItem> {
|
|
91
|
+
/**
|
|
92
|
+
* User provided data
|
|
93
|
+
*/
|
|
94
|
+
item: TItem;
|
|
95
|
+
/**
|
|
96
|
+
* The row id, defaults to index position in the collection
|
|
97
|
+
*/
|
|
98
|
+
rowId: RowId;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare type SelectionMode_2 = 'single' | 'multiselect';
|
|
102
|
+
|
|
103
|
+
export declare type SortDirection = 'ascending' | 'descending';
|
|
104
|
+
|
|
105
|
+
declare interface SortState {
|
|
106
|
+
sortColumn: ColumnId | undefined;
|
|
107
|
+
sortDirection: SortDirection;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Table component - TODO: add more docs
|
|
112
|
+
*/
|
|
113
|
+
export declare const Table: ForwardRefComponent<TableProps>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* TableBody component - TODO: add more docs
|
|
117
|
+
*/
|
|
118
|
+
export declare const TableBody: ForwardRefComponent<TableBodyProps>;
|
|
119
|
+
|
|
120
|
+
export declare const tableBodyClassName = "fui-TableBody";
|
|
121
|
+
|
|
122
|
+
export declare const tableBodyClassNames: SlotClassNames<TableBodySlots>;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* TableBody Props
|
|
126
|
+
*/
|
|
127
|
+
export declare type TableBodyProps = ComponentProps<TableBodySlots>;
|
|
128
|
+
|
|
129
|
+
export declare type TableBodySlots = {
|
|
130
|
+
root: Slot<'tbody', 'div'>;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* State used in rendering TableBody
|
|
135
|
+
*/
|
|
136
|
+
export declare type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* TableCell component - TODO: add more docs
|
|
140
|
+
*/
|
|
141
|
+
export declare const TableCell: ForwardRefComponent<TableCellProps>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* TableCellActions component - TODO: add more docs
|
|
145
|
+
*/
|
|
146
|
+
export declare const TableCellActions: ForwardRefComponent<TableCellActionsProps>;
|
|
147
|
+
|
|
148
|
+
export declare const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* TableCellActions Props
|
|
152
|
+
*/
|
|
153
|
+
export declare type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {
|
|
154
|
+
/**
|
|
155
|
+
* When true, the actions are always visible regardless of row hover.
|
|
156
|
+
* Can be useful keeping the actions visible when a popout surface is opened.
|
|
157
|
+
*/
|
|
158
|
+
visible?: boolean;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export declare type TableCellActionsSlots = {
|
|
162
|
+
root: Slot<'div'>;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* State used in rendering TableCellActions
|
|
167
|
+
*/
|
|
168
|
+
export declare type TableCellActionsState = ComponentState<TableCellActionsSlots> & Pick<Required<TableCellActionsProps>, 'visible'>;
|
|
169
|
+
|
|
170
|
+
export declare const tableCellClassName = "fui-TableCell";
|
|
171
|
+
|
|
172
|
+
export declare const tableCellClassNames: SlotClassNames<TableCellSlots>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* TableCellLayout component - TODO: add more docs
|
|
176
|
+
*/
|
|
177
|
+
export declare const TableCellLayout: ForwardRefComponent<TableCellLayoutProps>;
|
|
178
|
+
|
|
179
|
+
export declare const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots>;
|
|
180
|
+
|
|
181
|
+
declare type TableCellLayoutContextValues = {
|
|
182
|
+
avatar: {
|
|
183
|
+
size?: AvatarSizes;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* TableCellLayout Props
|
|
189
|
+
*/
|
|
190
|
+
export declare type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {
|
|
191
|
+
appearance?: 'primary';
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export declare type TableCellLayoutSlots = {
|
|
195
|
+
root: Slot<'div'>;
|
|
196
|
+
/**
|
|
197
|
+
* Slot for an icon or other visual element
|
|
198
|
+
*/
|
|
199
|
+
media: Slot<'span'>;
|
|
200
|
+
/**
|
|
201
|
+
* Main text for the table cell. Children of the root slot are automatically rendered here
|
|
202
|
+
*/
|
|
203
|
+
main: Slot<'span'>;
|
|
204
|
+
/**
|
|
205
|
+
* Secondary text that describes or complements the main text
|
|
206
|
+
*/
|
|
207
|
+
description: Slot<'span'>;
|
|
208
|
+
/**
|
|
209
|
+
* A layout wrapper for the main and description slots
|
|
210
|
+
*/
|
|
211
|
+
wrapper: Slot<'div'>;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* State used in rendering TableCellLayout
|
|
216
|
+
*/
|
|
217
|
+
export declare type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'> & {
|
|
218
|
+
avatarSize: AvatarSizes | undefined;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* TableCell Props
|
|
223
|
+
*/
|
|
224
|
+
export declare type TableCellProps = ComponentProps<TableCellSlots> & {};
|
|
225
|
+
|
|
226
|
+
export declare type TableCellSlots = {
|
|
227
|
+
root: Slot<'td', 'div'>;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* State used in rendering TableCell
|
|
232
|
+
*/
|
|
233
|
+
export declare type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
234
|
+
|
|
235
|
+
export declare const tableClassName = "fui-Table";
|
|
236
|
+
|
|
237
|
+
export declare const tableClassNames: SlotClassNames<TableSlots>;
|
|
238
|
+
|
|
239
|
+
export declare const TableContextProvider: React_2.Provider<TableContextValue | undefined>;
|
|
240
|
+
|
|
241
|
+
export declare type TableContextValue = {
|
|
242
|
+
/**
|
|
243
|
+
* Affects the sizes of all table subcomponents
|
|
244
|
+
* @default medium
|
|
245
|
+
*/
|
|
246
|
+
size: 'small' | 'smaller' | 'medium';
|
|
247
|
+
/**
|
|
248
|
+
* Render all table elements as divs intead of semantic table elements
|
|
249
|
+
* Using divs no longer uses `display: table` layout but `display: flex`
|
|
250
|
+
*/
|
|
251
|
+
noNativeElements: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Whether the table is sortable
|
|
254
|
+
*/
|
|
255
|
+
sortable: boolean;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export declare type TableContextValues = {
|
|
259
|
+
table: TableContextValue;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* TableHeader component - TODO: add more docs
|
|
264
|
+
*/
|
|
265
|
+
export declare const TableHeader: ForwardRefComponent<TableHeaderProps>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* TableHeaderCell component - TODO: add more docs
|
|
269
|
+
*/
|
|
270
|
+
export declare const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps>;
|
|
271
|
+
|
|
272
|
+
export declare const tableHeaderCellClassName = "fui-TableHeaderCell";
|
|
273
|
+
|
|
274
|
+
export declare const tableHeaderCellClassNames: SlotClassNames<TableHeaderCellSlots>;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* TableHeaderCell Props
|
|
278
|
+
*/
|
|
279
|
+
export declare type TableHeaderCellProps = ComponentProps<Partial<TableHeaderCellSlots>> & {
|
|
280
|
+
sortDirection?: SortDirection;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export declare type TableHeaderCellSlots = {
|
|
284
|
+
root: Slot<'th', 'div'>;
|
|
285
|
+
sortIcon: Slot<'span'>;
|
|
286
|
+
/**
|
|
287
|
+
* Button handles correct narration and interactions for sorting;
|
|
288
|
+
*/
|
|
289
|
+
button: NonNullable<Slot<ARIAButtonSlotProps>>;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* State used in rendering TableHeaderCell
|
|
294
|
+
*/
|
|
295
|
+
export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'sortable'>;
|
|
296
|
+
|
|
297
|
+
export declare const tableHeaderClassName = "fui-TableHeader";
|
|
298
|
+
|
|
299
|
+
export declare const tableHeaderClassNames: SlotClassNames<TableHeaderSlots>;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* TableHeader Props
|
|
303
|
+
*/
|
|
304
|
+
export declare type TableHeaderProps = ComponentProps<TableHeaderSlots> & {};
|
|
305
|
+
|
|
306
|
+
export declare type TableHeaderSlots = {
|
|
307
|
+
root: Slot<'thead', 'div'>;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* State used in rendering TableHeader
|
|
312
|
+
*/
|
|
313
|
+
export declare type TableHeaderState = ComponentState<TableHeaderSlots> & Pick<TableContextValue, 'noNativeElements'>;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Table Props
|
|
317
|
+
*/
|
|
318
|
+
export declare type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* TableRow component - TODO: add more docs
|
|
322
|
+
*/
|
|
323
|
+
export declare const TableRow: ForwardRefComponent<TableRowProps>;
|
|
324
|
+
|
|
325
|
+
export declare const tableRowClassName = "fui-TableRow";
|
|
326
|
+
|
|
327
|
+
export declare const tableRowClassNames: SlotClassNames<TableRowSlots>;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* TableRow Props
|
|
331
|
+
*/
|
|
332
|
+
export declare type TableRowProps = ComponentProps<TableRowSlots> & {};
|
|
333
|
+
|
|
334
|
+
export declare type TableRowSlots = {
|
|
335
|
+
root: Slot<'tr', 'div'>;
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* State used in rendering TableRow
|
|
340
|
+
*/
|
|
341
|
+
export declare type TableRowState = ComponentState<TableRowSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* TableSelectionCell component - TODO: add more docs
|
|
345
|
+
*/
|
|
346
|
+
export declare const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps>;
|
|
347
|
+
|
|
348
|
+
export declare const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots>;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* TableSelectionCell Props
|
|
352
|
+
*/
|
|
353
|
+
export declare type TableSelectionCellProps = ComponentProps<Partial<Omit<TableSelectionCellSlots, 'media'>>> & {
|
|
354
|
+
/**
|
|
355
|
+
* A table can have two kinds of selection modes
|
|
356
|
+
*/
|
|
357
|
+
type?: 'checkbox' | 'radio';
|
|
358
|
+
checked?: CheckboxProps['checked'];
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
export declare type TableSelectionCellSlots = {
|
|
362
|
+
/**
|
|
363
|
+
* Selection indicator if selection type is checkbox
|
|
364
|
+
*/
|
|
365
|
+
checkboxIndicator: Slot<typeof Checkbox>;
|
|
366
|
+
/**
|
|
367
|
+
* Selection indicator if selection type is radio
|
|
368
|
+
*/
|
|
369
|
+
radioIndicator: Slot<'span'>;
|
|
370
|
+
} & Pick<TableCellSlots, 'root'>;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* State used in rendering TableSelectionCell
|
|
374
|
+
*/
|
|
375
|
+
export declare type TableSelectionCellState = ComponentState<TableSelectionCellSlots> & Pick<Required<TableSelectionCellProps>, 'type' | 'checked'> & Pick<TableContextValue, 'noNativeElements'>;
|
|
376
|
+
|
|
377
|
+
export declare interface TableSelectionState {
|
|
378
|
+
/**
|
|
379
|
+
* Clears all selected rows
|
|
380
|
+
*/
|
|
381
|
+
clearRows: () => void;
|
|
382
|
+
/**
|
|
383
|
+
* Selects single row
|
|
384
|
+
*/
|
|
385
|
+
selectRow: (rowId: RowId) => void;
|
|
386
|
+
/**
|
|
387
|
+
* De-selects single row
|
|
388
|
+
*/
|
|
389
|
+
deselectRow: (rowId: RowId) => void;
|
|
390
|
+
/**
|
|
391
|
+
* Toggle selection of all rows
|
|
392
|
+
*/
|
|
393
|
+
toggleAllRows: () => void;
|
|
394
|
+
/**
|
|
395
|
+
* Toggle selection of single row
|
|
396
|
+
*/
|
|
397
|
+
toggleRow: (rowId: RowId) => void;
|
|
398
|
+
/**
|
|
399
|
+
* Collection of row ids corresponding to selected rows
|
|
400
|
+
*/
|
|
401
|
+
selectedRows: Set<RowId>;
|
|
402
|
+
/**
|
|
403
|
+
* Whether all rows are selected
|
|
404
|
+
*/
|
|
405
|
+
allRowsSelected: boolean;
|
|
406
|
+
/**
|
|
407
|
+
* Whether some rows are selected
|
|
408
|
+
*/
|
|
409
|
+
someRowsSelected: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* Checks if a given rowId is selected
|
|
412
|
+
*/
|
|
413
|
+
isRowSelected: (rowId: RowId) => boolean;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export declare type TableSlots = {
|
|
417
|
+
root: Slot<'table', 'div'>;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
export declare interface TableSortState<TItem> {
|
|
421
|
+
/**
|
|
422
|
+
* Current sort direction
|
|
423
|
+
*/
|
|
424
|
+
sortDirection: SortDirection;
|
|
425
|
+
/**
|
|
426
|
+
* Column id of the currently sorted column
|
|
427
|
+
*/
|
|
428
|
+
sortColumn: ColumnId | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* Set the sort direction for the specified column
|
|
431
|
+
*/
|
|
432
|
+
setColumnSort: (columnId: ColumnId, sortDirection: SortDirection) => void;
|
|
433
|
+
/**
|
|
434
|
+
* Toggles the sort direction for specified column
|
|
435
|
+
*/
|
|
436
|
+
toggleColumnSort: (columnId: ColumnId) => void;
|
|
437
|
+
/**
|
|
438
|
+
* Returns the sort direction if a column is sorted,
|
|
439
|
+
* returns undefined if the column is not sorted
|
|
440
|
+
*/
|
|
441
|
+
getSortDirection: (columnId: ColumnId) => SortDirection | undefined;
|
|
442
|
+
/**
|
|
443
|
+
* Sorts rows and returns a **shallow** copy of original items
|
|
444
|
+
*/
|
|
445
|
+
sort: (rows: RowState<TItem>[]) => RowState<TItem>[];
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* State used in rendering Table
|
|
450
|
+
*/
|
|
451
|
+
export declare type TableState = ComponentState<TableSlots> & Pick<Required<TableProps>, 'size' | 'noNativeElements'> & TableContextValue;
|
|
452
|
+
|
|
453
|
+
export declare type TableStatePlugin = <TItem>(tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
454
|
+
|
|
455
|
+
export declare function useSelection<TItem>(options: UseSelectionOptions): (tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
456
|
+
|
|
457
|
+
declare interface UseSelectionOptions {
|
|
458
|
+
/**
|
|
459
|
+
* Can be multi or single select
|
|
460
|
+
*/
|
|
461
|
+
selectionMode: SelectionMode_2;
|
|
462
|
+
/**
|
|
463
|
+
* Used in uncontrolled mode to set initial selected rows on mount
|
|
464
|
+
*/
|
|
465
|
+
defaultSelectedItems?: Set<RowId>;
|
|
466
|
+
/**
|
|
467
|
+
* Used to control row selection
|
|
468
|
+
*/
|
|
469
|
+
selectedItems?: Set<RowId>;
|
|
470
|
+
/**
|
|
471
|
+
* Called when selection changes
|
|
472
|
+
*/
|
|
473
|
+
onSelectionChange?: (selectedItems: Set<RowId>) => void;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export declare function useSort<TItem>(options: UseSortOptions): (tableState: HeadlessTableState<TItem>) => HeadlessTableState<TItem>;
|
|
477
|
+
|
|
478
|
+
declare interface UseSortOptions {
|
|
479
|
+
/**
|
|
480
|
+
* Used to control sorting
|
|
481
|
+
*/
|
|
482
|
+
sortState?: SortState;
|
|
483
|
+
/**
|
|
484
|
+
* Used in uncontrolled mode to set initial sort column and direction on mount
|
|
485
|
+
*/
|
|
486
|
+
defaultSortState?: SortState;
|
|
487
|
+
/**
|
|
488
|
+
* Called when sort changes
|
|
489
|
+
*/
|
|
490
|
+
onSortChange?: (state: SortState) => void;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export declare function useTable<TItem>(options: UseTableOptions<TItem>, plugins?: TableStatePlugin[]): HeadlessTableState<TItem>;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Create the state required to render Table.
|
|
497
|
+
*
|
|
498
|
+
* The returned state can be modified with hooks such as useTableStyles_unstable,
|
|
499
|
+
* before being passed to renderTable_unstable.
|
|
500
|
+
*
|
|
501
|
+
* @param props - props from this instance of Table
|
|
502
|
+
* @param ref - reference to root HTMLElement of Table
|
|
503
|
+
*/
|
|
504
|
+
export declare const useTable_unstable: (props: TableProps, ref: React_2.Ref<HTMLElement>) => TableState;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Create the state required to render TableBody.
|
|
508
|
+
*
|
|
509
|
+
* The returned state can be modified with hooks such as useTableBodyStyles_unstable,
|
|
510
|
+
* before being passed to renderTableBody_unstable.
|
|
511
|
+
*
|
|
512
|
+
* @param props - props from this instance of TableBody
|
|
513
|
+
* @param ref - reference to root HTMLElement of TableBody
|
|
514
|
+
*/
|
|
515
|
+
export declare const useTableBody_unstable: (props: TableBodyProps, ref: React_2.Ref<HTMLElement>) => TableBodyState;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Apply styling to the TableBody slots based on the state
|
|
519
|
+
*/
|
|
520
|
+
export declare const useTableBodyStyles_unstable: (state: TableBodyState) => TableBodyState;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Create the state required to render TableCell.
|
|
524
|
+
*
|
|
525
|
+
* The returned state can be modified with hooks such as useTableCellStyles_unstable,
|
|
526
|
+
* before being passed to renderTableCell_unstable.
|
|
527
|
+
*
|
|
528
|
+
* @param props - props from this instance of TableCell
|
|
529
|
+
* @param ref - reference to root HTMLElement of TableCell
|
|
530
|
+
*/
|
|
531
|
+
export declare const useTableCell_unstable: (props: TableCellProps, ref: React_2.Ref<HTMLElement>) => TableCellState;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Create the state required to render TableCellActions.
|
|
535
|
+
*
|
|
536
|
+
* The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
|
|
537
|
+
* before being passed to renderTableCellActions_unstable.
|
|
538
|
+
*
|
|
539
|
+
* @param props - props from this instance of TableCellActions
|
|
540
|
+
* @param ref - reference to root HTMLElement of TableCellActions
|
|
541
|
+
*/
|
|
542
|
+
export declare const useTableCellActions_unstable: (props: TableCellActionsProps, ref: React_2.Ref<HTMLElement>) => TableCellActionsState;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Apply styling to the TableCellActions slots based on the state
|
|
546
|
+
*/
|
|
547
|
+
export declare const useTableCellActionsStyles_unstable: (state: TableCellActionsState) => TableCellActionsState;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Create the state required to render TableCellLayout.
|
|
551
|
+
*
|
|
552
|
+
* The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
|
|
553
|
+
* before being passed to renderTableCellLayout_unstable.
|
|
554
|
+
*
|
|
555
|
+
* @param props - props from this instance of TableCellLayout
|
|
556
|
+
* @param ref - reference to root HTMLElement of TableCellLayout
|
|
557
|
+
*/
|
|
558
|
+
export declare const useTableCellLayout_unstable: (props: TableCellLayoutProps, ref: React_2.Ref<HTMLElement>) => TableCellLayoutState;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Apply styling to the TableCellLayout slots based on the state
|
|
562
|
+
*/
|
|
563
|
+
export declare const useTableCellLayoutStyles_unstable: (state: TableCellLayoutState) => TableCellLayoutState;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Apply styling to the TableCell slots based on the state
|
|
567
|
+
*/
|
|
568
|
+
export declare const useTableCellStyles_unstable: (state: TableCellState) => TableCellState;
|
|
569
|
+
|
|
570
|
+
export declare const useTableContext: () => TableContextValue;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Create the state required to render TableHeader.
|
|
574
|
+
*
|
|
575
|
+
* The returned state can be modified with hooks such as useTableHeaderStyles_unstable,
|
|
576
|
+
* before being passed to renderTableHeader_unstable.
|
|
577
|
+
*
|
|
578
|
+
* @param props - props from this instance of TableHeader
|
|
579
|
+
* @param ref - reference to root HTMLElement of TableHeader
|
|
580
|
+
*/
|
|
581
|
+
export declare const useTableHeader_unstable: (props: TableHeaderProps, ref: React_2.Ref<HTMLElement>) => TableHeaderState;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Create the state required to render TableHeaderCell.
|
|
585
|
+
*
|
|
586
|
+
* The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,
|
|
587
|
+
* before being passed to renderTableHeaderCell_unstable.
|
|
588
|
+
*
|
|
589
|
+
* @param props - props from this instance of TableHeaderCell
|
|
590
|
+
* @param ref - reference to root HTMLElement of TableHeaderCell
|
|
591
|
+
*/
|
|
592
|
+
export declare const useTableHeaderCell_unstable: (props: TableHeaderCellProps, ref: React_2.Ref<HTMLElement>) => TableHeaderCellState;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Apply styling to the TableHeaderCell slots based on the state
|
|
596
|
+
*/
|
|
597
|
+
export declare const useTableHeaderCellStyles_unstable: (state: TableHeaderCellState) => TableHeaderCellState;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Apply styling to the TableHeader slots based on the state
|
|
601
|
+
*/
|
|
602
|
+
export declare const useTableHeaderStyles_unstable: (state: TableHeaderState) => TableHeaderState;
|
|
603
|
+
|
|
604
|
+
export declare interface UseTableOptions<TItem> {
|
|
605
|
+
columns: ColumnDefinition<TItem>[];
|
|
606
|
+
items: TItem[];
|
|
607
|
+
getRowId?: (item: TItem) => RowId;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Create the state required to render TableRow.
|
|
612
|
+
*
|
|
613
|
+
* The returned state can be modified with hooks such as useTableRowStyles_unstable,
|
|
614
|
+
* before being passed to renderTableRow_unstable.
|
|
615
|
+
*
|
|
616
|
+
* @param props - props from this instance of TableRow
|
|
617
|
+
* @param ref - reference to root HTMLElement of TableRow
|
|
618
|
+
*/
|
|
619
|
+
export declare const useTableRow_unstable: (props: TableRowProps, ref: React_2.Ref<HTMLElement>) => TableRowState;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Apply styling to the TableRow slots based on the state
|
|
623
|
+
*/
|
|
624
|
+
export declare const useTableRowStyles_unstable: (state: TableRowState) => TableRowState;
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Create the state required to render TableSelectionCell.
|
|
628
|
+
*
|
|
629
|
+
* The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,
|
|
630
|
+
* before being passed to renderTableSelectionCell_unstable.
|
|
631
|
+
*
|
|
632
|
+
* @param props - props from this instance of TableSelectionCell
|
|
633
|
+
* @param ref - reference to root HTMLElement of TableSelectionCell
|
|
634
|
+
*/
|
|
635
|
+
export declare const useTableSelectionCell_unstable: (props: TableSelectionCellProps, ref: React_2.Ref<HTMLElement>) => TableSelectionCellState;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Apply styling to the TableSelectionCell slots based on the state
|
|
639
|
+
*/
|
|
640
|
+
export declare const useTableSelectionCellStyles_unstable: (state: TableSelectionCellState) => TableSelectionCellState;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Apply styling to the Table slots based on the state
|
|
644
|
+
*/
|
|
645
|
+
export declare const useTableStyles_unstable: (state: TableState) => TableState;
|
|
646
|
+
|
|
647
|
+
export { }
|
package/lib/Table.js
ADDED
package/lib/Table.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/Table.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Table/index';\n"]}
|
package/lib/TableBody.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableBody.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableBody.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './components/TableBody/index';\n"]}
|
package/lib/TableCell.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableCell.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './components/TableCell/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellActions.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableCellActions.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC","sourcesContent":["export * from './components/TableCellActions/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellLayout.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableCellLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellPrimaryLayout.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableCellPrimaryLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
|