@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
|
@@ -1,38 +1,226 @@
|
|
|
1
1
|
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
2
|
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
import { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles';
|
|
4
|
+
import { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles';
|
|
5
|
+
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
6
|
+
import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
|
|
3
7
|
export const tableRowClassName = 'fui-TableRow';
|
|
4
8
|
export const tableRowClassNames = {
|
|
5
9
|
root: tableRowClassName
|
|
6
10
|
};
|
|
11
|
+
|
|
12
|
+
const useTableLayoutStyles = /*#__PURE__*/__styles({
|
|
13
|
+
"root": {
|
|
14
|
+
"mc9l5x": "f1u0rzck"
|
|
15
|
+
},
|
|
16
|
+
"medium": {
|
|
17
|
+
"Bqenvij": "f1ft4266"
|
|
18
|
+
},
|
|
19
|
+
"small": {
|
|
20
|
+
"Bqenvij": "fbsu25e"
|
|
21
|
+
},
|
|
22
|
+
"smaller": {
|
|
23
|
+
"Bqenvij": "frvgh55"
|
|
24
|
+
}
|
|
25
|
+
}, {
|
|
26
|
+
"d": [".f1u0rzck{display:table-row;}", ".f1ft4266{height:44px;}", ".fbsu25e{height:34px;}", ".frvgh55{height:24px;}"]
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const useFlexLayoutStyles = /*#__PURE__*/__styles({
|
|
30
|
+
"root": {
|
|
31
|
+
"mc9l5x": "f22iagw",
|
|
32
|
+
"Bt984gj": "f122n59"
|
|
33
|
+
},
|
|
34
|
+
"medium": {
|
|
35
|
+
"sshi5w": "f5pgtk9"
|
|
36
|
+
},
|
|
37
|
+
"small": {
|
|
38
|
+
"sshi5w": "fcep9tg"
|
|
39
|
+
},
|
|
40
|
+
"smaller": {
|
|
41
|
+
"sshi5w": "f1pha7fy"
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f5pgtk9{min-height:44px;}", ".fcep9tg{min-height:34px;}", ".f1pha7fy{min-height:24px;}"]
|
|
45
|
+
});
|
|
7
46
|
/**
|
|
8
47
|
* Styles for the root slot
|
|
9
48
|
*/
|
|
10
49
|
|
|
50
|
+
|
|
11
51
|
const useStyles = /*#__PURE__*/__styles({
|
|
12
52
|
"root": {
|
|
13
|
-
"mc9l5x": "f22iagw",
|
|
14
53
|
"sj55zd": "f19n0e5",
|
|
15
|
-
"
|
|
54
|
+
"B7ck84d": "f1ewtqcl",
|
|
55
|
+
"Befpiv7": "fblfkud",
|
|
56
|
+
"Bn4voq9": "fz36nt7",
|
|
57
|
+
"g9k6zt": "f9znhxp",
|
|
58
|
+
"kdpuga": ["f1o2ludy", "f1kjnpwc"],
|
|
59
|
+
"Bw81rd7": ["f1kjnpwc", "f1o2ludy"],
|
|
60
|
+
"B6xbmo0": ["fxmnebo", "f1witrsb"],
|
|
61
|
+
"dm238s": ["f1witrsb", "fxmnebo"]
|
|
62
|
+
},
|
|
63
|
+
"rootInteractive": {
|
|
64
|
+
"ecr2s2": "f1wfn5kd",
|
|
65
|
+
"lj723h": "f1g4hkjv",
|
|
66
|
+
"Bw1l9kw": "flaujjr",
|
|
67
|
+
"B43xm9u": "f15ngxrw",
|
|
68
|
+
"Bs8fhbl": "fd28r7f",
|
|
69
|
+
"i921ia": "fjbbrdp",
|
|
70
|
+
"Jwef8y": "f1t94bn6",
|
|
71
|
+
"Bi91k9c": "feu1g3u",
|
|
72
|
+
"Bi7d7a3": "f1boln4s",
|
|
73
|
+
"Bpt6rm4": "f1uorfem",
|
|
74
|
+
"Bt8cqyk": "frasl6z",
|
|
75
|
+
"ff6mpl": "fw60kww"
|
|
16
76
|
},
|
|
17
77
|
"medium": {
|
|
18
|
-
"sshi5w": "f5pgtk9",
|
|
19
78
|
"Bn0qgzm": "f1vxd6vx",
|
|
20
79
|
"oivjwe": "fg706s2",
|
|
21
80
|
"B9xav0g": "frpde29"
|
|
22
81
|
},
|
|
23
82
|
"small": {
|
|
24
|
-
"sshi5w": "fcep9tg",
|
|
25
83
|
"Bn0qgzm": "f1vxd6vx",
|
|
26
84
|
"oivjwe": "fg706s2",
|
|
27
85
|
"B9xav0g": "frpde29"
|
|
28
86
|
},
|
|
29
87
|
"smaller": {
|
|
30
|
-
"sshi5w": "f1pha7fy",
|
|
31
88
|
"Be2twd7": "fy9rknc"
|
|
32
|
-
}
|
|
89
|
+
},
|
|
90
|
+
"brand": {
|
|
91
|
+
"De3pzq": "f16xkysk",
|
|
92
|
+
"sj55zd": "f1cgsbmv",
|
|
93
|
+
"g2u3we": "frmsihh",
|
|
94
|
+
"h3c5rm": ["frttxa5", "f11o2r7f"],
|
|
95
|
+
"B9xav0g": "fem5et0",
|
|
96
|
+
"zhjwy3": ["f11o2r7f", "frttxa5"],
|
|
97
|
+
"Jwef8y": "f121v1wq",
|
|
98
|
+
"ecr2s2": "ftepret",
|
|
99
|
+
"gwxt9v": "fqlf3fd",
|
|
100
|
+
"v3aym": ["f9dpb3h", "fw2muls"],
|
|
101
|
+
"Bc736ss": "f1yat0gj",
|
|
102
|
+
"Bk6ri7n": ["fw2muls", "f9dpb3h"],
|
|
103
|
+
"Bk5ld8o": "f7nae3y",
|
|
104
|
+
"c4eypz": ["fkbere7", "fa97sf3"],
|
|
105
|
+
"felo30": "fmtyzcc",
|
|
106
|
+
"Eshu5l": ["fa97sf3", "fkbere7"],
|
|
107
|
+
"Bjwas2f": "fb6zhgp",
|
|
108
|
+
"Bn1d65q": ["fyowp6c", "fz08sq8"],
|
|
109
|
+
"Bxeuatn": "f9dii88",
|
|
110
|
+
"n51gp8": ["fz08sq8", "fyowp6c"],
|
|
111
|
+
"Beo2b4z": ["f1afxoft", "flqq2yx"],
|
|
112
|
+
"h6lo6r": ["flqq2yx", "f1afxoft"],
|
|
113
|
+
"Btyw6ap": ["f1b5xrmd", "f1831rx6"],
|
|
114
|
+
"w1pwid": ["f1831rx6", "f1b5xrmd"],
|
|
115
|
+
"Brwvgy3": "fd94n53",
|
|
116
|
+
"yadkgm": "f1e0wld5"
|
|
117
|
+
},
|
|
118
|
+
"neutral": {
|
|
119
|
+
"gwxt9v": "fqlf3fd",
|
|
120
|
+
"v3aym": ["f9dpb3h", "fw2muls"],
|
|
121
|
+
"Bc736ss": "f1yat0gj",
|
|
122
|
+
"Bk6ri7n": ["fw2muls", "f9dpb3h"],
|
|
123
|
+
"Bk5ld8o": "f7nae3y",
|
|
124
|
+
"c4eypz": ["fkbere7", "fa97sf3"],
|
|
125
|
+
"felo30": "fmtyzcc",
|
|
126
|
+
"Eshu5l": ["fa97sf3", "fkbere7"],
|
|
127
|
+
"Bjwas2f": "fb6zhgp",
|
|
128
|
+
"Bn1d65q": ["fyowp6c", "fz08sq8"],
|
|
129
|
+
"Bxeuatn": "f9dii88",
|
|
130
|
+
"n51gp8": ["fz08sq8", "fyowp6c"],
|
|
131
|
+
"Beo2b4z": ["f1afxoft", "flqq2yx"],
|
|
132
|
+
"h6lo6r": ["flqq2yx", "f1afxoft"],
|
|
133
|
+
"Btyw6ap": ["f1b5xrmd", "f1831rx6"],
|
|
134
|
+
"w1pwid": ["f1831rx6", "f1b5xrmd"],
|
|
135
|
+
"Brwvgy3": "fd94n53",
|
|
136
|
+
"yadkgm": "f1e0wld5",
|
|
137
|
+
"De3pzq": "fq5gl1p",
|
|
138
|
+
"sj55zd": "f1cgsbmv",
|
|
139
|
+
"Jwef8y": "f1uqaxdt",
|
|
140
|
+
"ecr2s2": "fa9o754",
|
|
141
|
+
"g2u3we": "frmsihh",
|
|
142
|
+
"h3c5rm": ["frttxa5", "f11o2r7f"],
|
|
143
|
+
"B9xav0g": "fem5et0",
|
|
144
|
+
"zhjwy3": ["f11o2r7f", "frttxa5"]
|
|
145
|
+
},
|
|
146
|
+
"none": {}
|
|
33
147
|
}, {
|
|
34
|
-
"d": [".
|
|
35
|
-
"
|
|
148
|
+
"d": [".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1ewtqcl{box-sizing:border-box;}", ".fblfkud[data-fui-focus-visible]:focus-within .fui-TableSelectionCell{opacity:1;}", ".fz36nt7[data-fui-focus-visible]{outline-width:2px;}", ".f9znhxp[data-fui-focus-visible]{outline-style:solid;}", ".f1o2ludy[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1kjnpwc[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fxmnebo[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusMedium);}", ".f1witrsb[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusMedium);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fg706s2{border-bottom-style:solid;}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".f1cgsbmv{color:var(--colorNeutralForeground1Hover);}", ".frmsihh{border-top-color:var(--colorNeutralStrokeOnBrand);}", ".frttxa5{border-right-color:var(--colorNeutralStrokeOnBrand);}", ".f11o2r7f{border-left-color:var(--colorNeutralStrokeOnBrand);}", ".fem5et0{border-bottom-color:var(--colorNeutralStrokeOnBrand);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}"],
|
|
149
|
+
"a": [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}", ".flaujjr:active .fui-TableCellActions{background-color:var(--colorSubtleBackgroundPressed);}", ".f15ngxrw:active .fui-TableCellActions{opacity:1;}", ".fd28r7f:active .fui-TableSelectionCell{background-color:var(--colorNeutralBackground1Hover);}", ".fjbbrdp:active .fui-TableSelectionCell{opacity:1;}", ".ftepret:active{background-color:var(--colorBrandBackgroundInvertedSelected);}", ".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}"],
|
|
150
|
+
"h": [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f1boln4s:hover .fui-TableCellActions{background-color:var(--colorNeutralBackground1Hover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}", ".frasl6z:hover .fui-TableSelectionCell{background-color:var(--colorNeutralBackground1Hover);}", ".fw60kww:hover .fui-TableSelectionCell{opacity:1;}", ".f121v1wq:hover{background-color:var(--colorBrandBackground2);}", ".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}"],
|
|
151
|
+
"m": [["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
|
|
152
|
+
"m": "(forced-colors: active)"
|
|
153
|
+
}], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
|
|
154
|
+
"m": "(forced-colors: active)"
|
|
155
|
+
}], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
|
|
156
|
+
"m": "(forced-colors: active)"
|
|
157
|
+
}], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
|
|
158
|
+
"m": "(forced-colors: active)"
|
|
159
|
+
}], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
|
|
160
|
+
"m": "(forced-colors: active)"
|
|
161
|
+
}], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
|
|
162
|
+
"m": "(forced-colors: active)"
|
|
163
|
+
}], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
|
|
164
|
+
"m": "(forced-colors: active)"
|
|
165
|
+
}], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
|
|
166
|
+
"m": "(forced-colors: active)"
|
|
167
|
+
}], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
|
|
168
|
+
"m": "(forced-colors: active)"
|
|
169
|
+
}], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
|
|
170
|
+
"m": "(forced-colors: active)"
|
|
171
|
+
}], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
|
|
172
|
+
"m": "(forced-colors: active)"
|
|
173
|
+
}], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
|
|
174
|
+
"m": "(forced-colors: active)"
|
|
175
|
+
}], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
|
|
176
|
+
"m": "(forced-colors: active)"
|
|
177
|
+
}], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
|
|
178
|
+
"m": "(forced-colors: active)"
|
|
179
|
+
}], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
|
|
180
|
+
"m": "(forced-colors: active)"
|
|
181
|
+
}], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
|
|
182
|
+
"m": "(forced-colors: active)"
|
|
183
|
+
}], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
|
|
184
|
+
"m": "(forced-colors: active)"
|
|
185
|
+
}], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
|
|
186
|
+
"m": "(forced-colors: active)"
|
|
187
|
+
}], ["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
|
|
188
|
+
"m": "(forced-colors: active)"
|
|
189
|
+
}], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
|
|
190
|
+
"m": "(forced-colors: active)"
|
|
191
|
+
}], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
|
|
192
|
+
"m": "(forced-colors: active)"
|
|
193
|
+
}], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
|
|
194
|
+
"m": "(forced-colors: active)"
|
|
195
|
+
}], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
|
|
196
|
+
"m": "(forced-colors: active)"
|
|
197
|
+
}], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
|
|
198
|
+
"m": "(forced-colors: active)"
|
|
199
|
+
}], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
|
|
200
|
+
"m": "(forced-colors: active)"
|
|
201
|
+
}], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
|
|
202
|
+
"m": "(forced-colors: active)"
|
|
203
|
+
}], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
|
|
204
|
+
"m": "(forced-colors: active)"
|
|
205
|
+
}], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
|
|
206
|
+
"m": "(forced-colors: active)"
|
|
207
|
+
}], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
|
|
208
|
+
"m": "(forced-colors: active)"
|
|
209
|
+
}], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
|
|
210
|
+
"m": "(forced-colors: active)"
|
|
211
|
+
}], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
|
|
212
|
+
"m": "(forced-colors: active)"
|
|
213
|
+
}], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
|
|
214
|
+
"m": "(forced-colors: active)"
|
|
215
|
+
}], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
|
|
216
|
+
"m": "(forced-colors: active)"
|
|
217
|
+
}], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
|
|
218
|
+
"m": "(forced-colors: active)"
|
|
219
|
+
}], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
|
|
220
|
+
"m": "(forced-colors: active)"
|
|
221
|
+
}], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
|
|
222
|
+
"m": "(forced-colors: active)"
|
|
223
|
+
}]]
|
|
36
224
|
});
|
|
37
225
|
/**
|
|
38
226
|
* Apply styling to the TableRow slots based on the state
|
|
@@ -40,8 +228,13 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
40
228
|
|
|
41
229
|
|
|
42
230
|
export const useTableRowStyles_unstable = state => {
|
|
231
|
+
const isHeaderRow = useIsInTableHeader();
|
|
43
232
|
const styles = useStyles();
|
|
44
|
-
|
|
233
|
+
const layoutStyles = {
|
|
234
|
+
table: useTableLayoutStyles(),
|
|
235
|
+
flex: useFlexLayoutStyles()
|
|
236
|
+
};
|
|
237
|
+
state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size], styles[state.appearance], state.root.className);
|
|
45
238
|
return state;
|
|
46
239
|
};
|
|
47
240
|
//# sourceMappingURL=useTableRowStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableRow/useTableRowStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/useTableRowStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,SAAS,0BAAT,QAA2C,+CAA3C;AACA,SAAS,4BAAT,QAA6C,mDAA7C;AACA,SAAS,+BAAT,QAAgD,yBAAhD;AACA,SAAS,kBAAT,QAAmC,mCAAnC;AAEA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;AACP,OAAO,MAAM,kBAAkB,GAAkC;EAC/D,IAAI,EAAE;AADyD,CAA1D;;AAIP,MAAM,oBAAoB,gBAAG;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAkBA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAmBA;;AAEG;;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAAlB;AAwGA;;AAEG;;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAAwC;EAChF,MAAM,WAAW,GAAG,kBAAkB,EAAtC;EACA,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,kBAAkB,CAAC,IADc,EAEjC,MAAM,CAAC,IAF0B,EAGjC,CAAC,WAAD,IAAgB,MAAM,CAAC,eAHU,EAIjC,MAAM,CAAC,KAAK,CAAC,IAAP,CAJ2B,EAKjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IALpC,EAMjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,KAAK,CAAC,IAAxB,CAAzB,GAAyD,YAAY,CAAC,KAAb,CAAmB,KAAK,CAAC,IAAzB,CANxB,EAOjC,MAAM,CAAC,KAAK,CAAC,UAAP,CAP2B,EAQjC,KAAK,CAAC,IAAN,CAAW,SARsB,CAAnC;EAWA,OAAO,KAAP;AACD,CAnBM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableRowSlots, TableRowState } from './TableRow.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames: SlotClassNames<TableRowSlots> = {\n root: tableRowClassName,\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row',\n },\n\n medium: {\n height: '44px',\n },\n\n small: {\n height: '34px',\n },\n\n smaller: {\n height: '24px',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n },\n\n medium: {\n minHeight: '44px',\n },\n\n small: {\n minHeight: '34px',\n },\n\n smaller: {\n minHeight: '24px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n boxSizing: 'border-box',\n ...createCustomFocusIndicatorStyle(\n {\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n },\n { selector: 'focus-within' },\n ),\n ...createCustomFocusIndicatorStyle(\n {\n ...shorthands.outline('2px', 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n { selector: 'focus', enableOutline: true },\n ),\n },\n\n rootInteractive: {\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n opacity: 1,\n },\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n opacity: 1,\n },\n },\n },\n\n medium: {\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n small: {\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n smaller: {\n fontSize: tokens.fontSizeBase200,\n },\n\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorNeutralForeground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand),\n ':hover': {\n backgroundColor: tokens.colorBrandBackground2,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n },\n\n '@media(forced-colors: active)': {\n ...shorthands.border('2px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n },\n\n neutral: {\n '@media(forced-colors: active)': {\n ...shorthands.border('2px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground1Hover,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand),\n },\n\n none: {},\n});\n\n/**\n * Apply styling to the TableRow slots based on the state\n */\nexport const useTableRowStyles_unstable = (state: TableRowState): TableRowState => {\n const isHeaderRow = useIsInTableHeader();\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableRowClassNames.root,\n styles.root,\n !isHeaderRow && styles.rootInteractive,\n styles[state.size],\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size],\n styles[state.appearance],\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTableSelectionCell_unstable } from './useTableSelectionCell';
|
|
3
|
+
import { renderTableSelectionCell_unstable } from './renderTableSelectionCell';
|
|
4
|
+
import { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles';
|
|
5
|
+
/**
|
|
6
|
+
* TableSelectionCell component - TODO: add more docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const TableSelectionCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useTableSelectionCell_unstable(props, ref);
|
|
11
|
+
useTableSelectionCellStyles_unstable(state);
|
|
12
|
+
return renderTableSelectionCell_unstable(state);
|
|
13
|
+
});
|
|
14
|
+
TableSelectionCell.displayName = 'TableSelectionCell';
|
|
15
|
+
//# sourceMappingURL=TableSelectionCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableSelectionCell/TableSelectionCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,iCAAT,QAAkD,4BAAlD;AACA,SAAS,oCAAT,QAAqD,+BAArD;AAIA;;AAEG;;AACH,OAAO,MAAM,kBAAkB,gBAAiD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9G,MAAM,KAAK,GAAG,8BAA8B,CAAC,KAAD,EAAQ,GAAR,CAA5C;EAEA,oCAAoC,CAAC,KAAD,CAApC;EACA,OAAO,iCAAiC,CAAC,KAAD,CAAxC;AACD,CAL+E,CAAzE;AAOP,kBAAkB,CAAC,WAAnB,GAAiC,oBAAjC","sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles';\nimport type { TableSelectionCellProps } from './TableSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableSelectionCell component - TODO: add more docs\n */\nexport const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useTableSelectionCell_unstable(props, ref);\n\n useTableSelectionCellStyles_unstable(state);\n return renderTableSelectionCell_unstable(state);\n});\n\nTableSelectionCell.displayName = 'TableSelectionCell';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSelectionCell.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/TableSelectionCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Checkbox, CheckboxProps } from '@fluentui/react-checkbox';\nimport type { Radio } from '@fluentui/react-radio';\nimport { TableCellSlots } from '../TableCell/TableCell.types';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableSelectionCellSlots = {\n /**\n * Selection indicator if selection type is checkbox\n */\n checkboxIndicator: Slot<typeof Checkbox>;\n /**\n * Selection indicator if selection type is radio\n */\n radioIndicator: Slot<typeof Radio>;\n} & Pick<TableCellSlots, 'root'>;\n\n/**\n * TableSelectionCell Props\n */\nexport type TableSelectionCellProps = ComponentProps<Partial<Omit<TableSelectionCellSlots, 'media'>>> & {\n /**\n * A table can have two kinds of selection modes\n */\n type?: 'checkbox' | 'radio';\n checked?: CheckboxProps['checked'];\n /**\n * Only visible when checked or the parent row is hovered\n */\n subtle?: boolean;\n\n /**\n * Completely hides the selection cell visually but takes up the same space\n */\n hidden?: boolean;\n};\n\n/**\n * State used in rendering TableSelectionCell\n */\nexport type TableSelectionCellState = ComponentState<TableSelectionCellSlots> &\n Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle' | 'hidden'> &\n Pick<TableContextValue, 'noNativeElements'>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles';\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of TableSelectionCell
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const renderTableSelectionCell_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state);
|
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
13
|
+
}, state.type === 'checkbox' && slots.checkboxIndicator && /*#__PURE__*/React.createElement(slots.checkboxIndicator, { ...slotProps.checkboxIndicator
|
|
14
|
+
}), state.type === 'radio' && slots.radioIndicator && /*#__PURE__*/React.createElement(slots.radioIndicator, { ...slotProps.radioIndicator
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=renderTableSelectionCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableSelectionCell/renderTableSelectionCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAmC;EAClF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAA0B,KAA1B,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,IAAN,KAAe,UAAf,IAA6B,KAAK,CAAC,iBAAnC,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,iBAAP,EAAwB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAxB,CAFJ,EAIG,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,KAAK,CAAC,cAAhC,iBAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,cAAP,EAAqB,EAAA,GAAK,SAAS,CAAC;EAAf,CAArB,CAJrD,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell.types';\n\n/**\n * Render the final JSX of TableSelectionCell\n */\nexport const renderTableSelectionCell_unstable = (state: TableSelectionCellState) => {\n const { slots, slotProps } = getSlots<TableSelectionCellSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.type === 'checkbox' && slots.checkboxIndicator && (\n <slots.checkboxIndicator {...slotProps.checkboxIndicator} />\n )}\n {state.type === 'radio' && slots.radioIndicator && <slots.radioIndicator {...slotProps.radioIndicator} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { resolveShorthand } from '@fluentui/react-utilities';
|
|
2
|
+
import { Checkbox } from '@fluentui/react-checkbox';
|
|
3
|
+
import { Radio } from '@fluentui/react-radio';
|
|
4
|
+
import { useTableCell_unstable } from '../TableCell/useTableCell';
|
|
5
|
+
import { useTableContext } from '../../contexts/tableContext';
|
|
6
|
+
/**
|
|
7
|
+
* Create the state required to render TableSelectionCell.
|
|
8
|
+
*
|
|
9
|
+
* The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,
|
|
10
|
+
* before being passed to renderTableSelectionCell_unstable.
|
|
11
|
+
*
|
|
12
|
+
* @param props - props from this instance of TableSelectionCell
|
|
13
|
+
* @param ref - reference to root HTMLElement of TableSelectionCell
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export const useTableSelectionCell_unstable = (props, ref) => {
|
|
17
|
+
const tableCellState = useTableCell_unstable(props, ref);
|
|
18
|
+
const {
|
|
19
|
+
noNativeElements
|
|
20
|
+
} = useTableContext();
|
|
21
|
+
const {
|
|
22
|
+
type = 'checkbox',
|
|
23
|
+
checked = false,
|
|
24
|
+
subtle = false,
|
|
25
|
+
hidden = false
|
|
26
|
+
} = props;
|
|
27
|
+
return { ...tableCellState,
|
|
28
|
+
components: { ...tableCellState.components,
|
|
29
|
+
checkboxIndicator: Checkbox,
|
|
30
|
+
radioIndicator: Radio
|
|
31
|
+
},
|
|
32
|
+
checkboxIndicator: resolveShorthand(props.checkboxIndicator, {
|
|
33
|
+
required: type === 'checkbox',
|
|
34
|
+
defaultProps: {
|
|
35
|
+
checked: props.checked
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
radioIndicator: resolveShorthand(props.radioIndicator, {
|
|
39
|
+
required: type === 'radio',
|
|
40
|
+
defaultProps: {
|
|
41
|
+
checked: !!checked
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
type,
|
|
45
|
+
checked,
|
|
46
|
+
noNativeElements,
|
|
47
|
+
subtle,
|
|
48
|
+
hidden
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=useTableSelectionCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableSelectionCell/useTableSelectionCell.tsx"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SAAS,QAAT,QAAyB,0BAAzB;AACA,SAAS,KAAT,QAAsB,uBAAtB;AAEA,SAAS,qBAAT,QAAsC,2BAAtC;AACA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,8BAA8B,GAAG,CAC5C,KAD4C,EAE5C,GAF4C,KAGjB;EAC3B,MAAM,cAAc,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAA5C;EACA,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EACA,MAAM;IAAE,IAAI,GAAG,UAAT;IAAqB,OAAO,GAAG,KAA/B;IAAsC,MAAM,GAAG,KAA/C;IAAsD,MAAM,GAAG;EAA/D,IAAyE,KAA/E;EAEA,OAAO,EACL,GAAG,cADE;IAEL,UAAU,EAAE,EACV,GAAG,cAAc,CAAC,UADR;MAEV,iBAAiB,EAAE,QAFT;MAGV,cAAc,EAAE;IAHN,CAFP;IAOL,iBAAiB,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAP,EAA0B;MAC3D,QAAQ,EAAE,IAAI,KAAK,UADwC;MAE3D,YAAY,EAAE;QAAE,OAAO,EAAE,KAAK,CAAC;MAAjB;IAF6C,CAA1B,CAP9B;IAWL,cAAc,EAAE,gBAAgB,CAAC,KAAK,CAAC,cAAP,EAAuB;MACrD,QAAQ,EAAE,IAAI,KAAK,OADkC;MAErD,YAAY,EAAE;QAAE,OAAO,EAAE,CAAC,CAAC;MAAb;IAFuC,CAAvB,CAX3B;IAeL,IAfK;IAgBL,OAhBK;IAiBL,gBAjBK;IAkBL,MAlBK;IAmBL;EAnBK,CAAP;AAqBD,CA7BM","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */\nexport const useTableSelectionCell_unstable = (\n props: TableSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): TableSelectionCellState => {\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const { type = 'checkbox', checked = false, subtle = false, hidden = false } = props;\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio,\n },\n checkboxIndicator: resolveShorthand(props.checkboxIndicator, {\n required: type === 'checkbox',\n defaultProps: { checked: props.checked },\n }),\n radioIndicator: resolveShorthand(props.radioIndicator, {\n required: type === 'radio',\n defaultProps: { checked: !!checked },\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
3
|
+
export const tableSelectionCellClassNames = {
|
|
4
|
+
root: 'fui-TableSelectionCell',
|
|
5
|
+
checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',
|
|
6
|
+
radioIndicator: 'fui-TableSelectionCell__radioIndicator'
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const useTableLayoutStyles = /*#__PURE__*/__styles({
|
|
10
|
+
"root": {
|
|
11
|
+
"mc9l5x": "f15pt5es",
|
|
12
|
+
"a9b677": "fksc0bp"
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
"d": [".f15pt5es{display:table-cell;}", ".fksc0bp{width:44px;}"]
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const useFlexLayoutStyles = /*#__PURE__*/__styles({
|
|
19
|
+
"root": {
|
|
20
|
+
"mc9l5x": "f22iagw",
|
|
21
|
+
"Bh6795r": "fqerorx",
|
|
22
|
+
"Bnnss6s": "f1neuvcm",
|
|
23
|
+
"xawz": "fkjuxzh",
|
|
24
|
+
"Bf4jedk": "fvrlu0f",
|
|
25
|
+
"B2u0y6b": "f1c71y05",
|
|
26
|
+
"Brf1p80": "f4d9j23"
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".fvrlu0f{min-width:44px;}", ".f1c71y05{max-width:44px;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}"]
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Styles for the root slot
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
37
|
+
"root": {
|
|
38
|
+
"fsow6f": "f17mccla",
|
|
39
|
+
"Huce71": "fz5stix",
|
|
40
|
+
"z8tnut": "f1g0x7ka",
|
|
41
|
+
"z189sj": ["fhxju0i", "f1cnd47f"],
|
|
42
|
+
"Byoj8tv": "f1qch9an",
|
|
43
|
+
"uwmqm3": ["f1cnd47f", "fhxju0i"]
|
|
44
|
+
},
|
|
45
|
+
"radioIndicator": {
|
|
46
|
+
"mc9l5x": "f22iagw",
|
|
47
|
+
"Bh6795r": "fqerorx",
|
|
48
|
+
"Bt984gj": "f122n59",
|
|
49
|
+
"Brf1p80": "f4d9j23",
|
|
50
|
+
"B5pe6w7": "f1cqkysu",
|
|
51
|
+
"p4uzdd": "f1sgf1mg"
|
|
52
|
+
},
|
|
53
|
+
"subtle": {
|
|
54
|
+
"abs64n": "fk73vx1",
|
|
55
|
+
"Brovlpu": "ftqa4ok",
|
|
56
|
+
"B486eqv": "f2hkw1w",
|
|
57
|
+
"B113ap8": "f1upwfw9"
|
|
58
|
+
},
|
|
59
|
+
"hidden": {
|
|
60
|
+
"Bcdw1i0": "fd7fpy0"
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
"d": [".f17mccla{text-align:center;}", ".fz5stix{white-space:nowrap;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1cqkysu svg{width:16px;}", ".f1sgf1mg svg{height:16px;}", ".fk73vx1{opacity:0;}", ".f1upwfw9[data-fui-focus-visible]:focus-within{opacity:1;}", ".fd7fpy0{visibility:hidden;}"],
|
|
64
|
+
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
|
65
|
+
"i": [".f2hkw1w:focus-visible{outline-style:none;}"]
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* Apply styling to the TableSelectionCell slots based on the state
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
export const useTableSelectionCellStyles_unstable = state => {
|
|
73
|
+
const styles = useStyles();
|
|
74
|
+
const layoutStyles = {
|
|
75
|
+
table: useTableLayoutStyles(),
|
|
76
|
+
flex: useFlexLayoutStyles()
|
|
77
|
+
};
|
|
78
|
+
state.root.className = mergeClasses(tableSelectionCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.subtle && state.checked === false && styles.subtle, state.hidden && styles.hidden, state.root.className);
|
|
79
|
+
|
|
80
|
+
if (state.checkboxIndicator) {
|
|
81
|
+
state.checkboxIndicator.className = mergeClasses(tableSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (state.radioIndicator) {
|
|
85
|
+
state.radioIndicator.className = mergeClasses(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return state;
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=useTableSelectionCellStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableSelectionCell/useTableSelectionCellStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAGA,SAAS,+BAAT,QAAgD,yBAAhD;AAEA,OAAO,MAAM,4BAA4B,GAA4C;EACnF,IAAI,EAAE,wBAD6E;EAEnF,iBAAiB,EAAE,2CAFgE;EAGnF,cAAc,EAAE;AAHmE,CAA9E;;AAMP,MAAM,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAOA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAUA;;AAEG;;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAAlB;AAiCA;;AAEG;;;AACH,OAAO,MAAM,oCAAoC,GAAI,KAAD,IAA4D;EAC9G,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,4BAA4B,CAAC,IADI,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAHpC,EAIjC,KAAK,CAAC,MAAN,IAAgB,KAAK,CAAC,OAAN,KAAkB,KAAlC,IAA2C,MAAM,CAAC,MAJjB,EAKjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MALU,EAMjC,KAAK,CAAC,IAAN,CAAW,SANsB,CAAnC;;EAQA,IAAI,KAAK,CAAC,iBAAV,EAA6B;IAC3B,KAAK,CAAC,iBAAN,CAAwB,SAAxB,GAAoC,YAAY,CAC9C,4BAA4B,CAAC,iBADiB,EAE9C,KAAK,CAAC,iBAAN,CAAwB,SAFsB,CAAhD;EAID;;EAED,IAAI,KAAK,CAAC,cAAV,EAA0B;IACxB,KAAK,CAAC,cAAN,CAAqB,SAArB,GAAiC,YAAY,CAC3C,4BAA4B,CAAC,cADc,EAE3C,MAAM,CAAC,cAFoC,EAG3C,KAAK,CAAC,cAAN,CAAqB,SAHsB,CAA7C;EAKD;;EAED,OAAO,KAAP;AACD,CA9BM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { TableSelectionCellSlots, TableSelectionCellState } from './TableSelectionCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n\nexport const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots> = {\n root: 'fui-TableSelectionCell',\n checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-TableSelectionCell__radioIndicator',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n width: '44px',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.flex(1, 1, '0px'),\n minWidth: '44px',\n maxWidth: '44px',\n justifyContent: 'center',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n textAlign: 'center',\n whiteSpace: 'nowrap',\n ...shorthands.padding(0),\n },\n\n radioIndicator: {\n display: 'flex',\n flexGrow: 1,\n alignItems: 'center',\n justifyContent: 'center',\n '& svg': {\n width: '16px',\n height: '16px',\n },\n },\n\n subtle: {\n opacity: 0,\n ...createCustomFocusIndicatorStyle(\n {\n opacity: 1,\n },\n { selector: 'focus-within' },\n ),\n },\n\n hidden: {\n visibility: 'hidden',\n },\n});\n\n/**\n * Apply styling to the TableSelectionCell slots based on the state\n */\nexport const useTableSelectionCellStyles_unstable = (state: TableSelectionCellState): TableSelectionCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableSelectionCellClassNames.root,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.subtle && state.checked === false && styles.subtle,\n state.hidden && styles.hidden,\n state.root.className,\n );\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(\n tableSelectionCellClassNames.checkboxIndicator,\n state.checkboxIndicator.className,\n );\n }\n\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(\n tableSelectionCellClassNames.radioIndicator,\n styles.radioIndicator,\n state.radioIndicator.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
const tableContext = /*#__PURE__*/createContext(undefined);
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
const tableContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
3
|
export const tableContextDefaultValue = {
|
|
4
4
|
size: 'medium',
|
|
5
5
|
noNativeElements: false,
|
|
6
6
|
sortable: false
|
|
7
7
|
};
|
|
8
8
|
export const TableContextProvider = tableContext.Provider;
|
|
9
|
-
export const useTableContext =
|
|
9
|
+
export const useTableContext = () => {
|
|
10
|
+
var _a;
|
|
11
|
+
|
|
12
|
+
return (_a = React.useContext(tableContext)) !== null && _a !== void 0 ? _a : tableContextDefaultValue;
|
|
13
|
+
};
|
|
10
14
|
//# sourceMappingURL=tableContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["contexts/tableContext.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/contexts/tableContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,MAAM,YAAY,gBAAG,KAAK,CAAC,aAAN,CAAmD,SAAnD,CAArB;AAEA,OAAO,MAAM,wBAAwB,GAAsB;EACzD,IAAI,EAAE,QADmD;EAEzD,gBAAgB,EAAE,KAFuC;EAGzD,QAAQ,EAAE;AAH+C,CAApD;AAMP,OAAO,MAAM,oBAAoB,GAAG,YAAY,CAAC,QAA1C;AACP,OAAO,MAAM,eAAe,GAAG,MAAK;EAAA,IAAA,EAAA;;EAAC,OAAA,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,YAAjB,CAAA,MAA8B,IAA9B,IAA8B,EAAA,KAAA,KAAA,CAA9B,GAA8B,EAA9B,GAAkC,wBAAlC;AAA0D,CAAxF","sourcesContent":["import * as React from 'react';\nimport { TableContextValue } from '../components/Table/Table.types';\n\nconst tableContext = React.createContext<TableContextValue | undefined>(undefined);\n\nexport const tableContextDefaultValue: TableContextValue = {\n size: 'medium',\n noNativeElements: false,\n sortable: false,\n};\n\nexport const TableContextProvider = tableContext.Provider;\nexport const useTableContext = () => React.useContext(tableContext) ?? tableContextDefaultValue;\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
const tableHeaderContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
const tableHeaderContextDefaultValue = '';
|
|
4
|
+
export const TableHeaderContextProvider = tableHeaderContext.Provider;
|
|
5
|
+
export const useIsInTableHeader = () => React.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;
|
|
6
|
+
//# sourceMappingURL=tableHeaderContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/contexts/tableHeaderContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,MAAM,kBAAkB,gBAAG,KAAK,CAAC,aAAN,CAAwC,SAAxC,CAA3B;AAEA,MAAM,8BAA8B,GAAG,EAAvC;AAEA,OAAO,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,QAAtD;AACP,OAAO,MAAM,kBAAkB,GAAG,MAAM,KAAK,CAAC,UAAN,CAAiB,kBAAjB,MAAyC,8BAA1E","sourcesContent":["import * as React from 'react';\n\nconst tableHeaderContext = React.createContext<string | undefined>(undefined);\n\nconst tableHeaderContextDefaultValue = '';\n\nexport const TableHeaderContextProvider = tableHeaderContext.Provider;\nexport const useIsInTableHeader = () => React.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './types';\nexport * from './useTable';\nexport * from './useSort';\nexport * from './useSelection';\n"]}
|