@fluentui/react-table 9.0.0-alpha.9 → 9.0.0-rc.2
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 +798 -1
- package/CHANGELOG.md +207 -2
- package/dist/index.d.ts +239 -133
- package/lib/components/DataGrid/DataGrid.js +1 -2
- package/lib/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib/components/DataGrid/renderDataGrid.js +5 -2
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGrid.js +49 -3
- package/lib/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGridContextValues.js +11 -1
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib/components/DataGrid/useDataGridStyles.js +0 -1
- package/lib/components/DataGrid/useDataGridStyles.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.js +1 -2
- package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib/components/DataGridBody/renderDataGridBody.js +13 -3
- package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBody.js +16 -2
- package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBodyStyles.js +0 -1
- package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.js +1 -2
- package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/renderDataGridCell.js +0 -1
- package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCell.js +7 -3
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCellStyles.js +0 -1
- package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.js +1 -2
- package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/renderDataGridHeader.js +0 -1
- package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeader.js +2 -2
- package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +0 -1
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -2
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -1
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -3
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -4
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.js +1 -2
- package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib/components/DataGridRow/renderDataGridRow.js +15 -3
- package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRow.js +56 -3
- package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRowStyles.js +5 -2
- package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -2
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -1
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +33 -3
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -4
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
- package/lib/components/Table/Table.js +1 -2
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/renderTable.js +2 -2
- package/lib/components/Table/renderTable.js.map +1 -1
- package/lib/components/Table/useTable.js +0 -2
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.js +13 -19
- package/lib/components/Table/useTableStyles.js.map +1 -1
- package/lib/components/TableBody/TableBody.js +1 -2
- package/lib/components/TableBody/TableBody.js.map +1 -1
- package/lib/components/TableBody/renderTableBody.js +3 -4
- package/lib/components/TableBody/renderTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +0 -2
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.js +6 -10
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib/components/TableCell/TableCell.js +1 -2
- package/lib/components/TableCell/TableCell.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js +2 -2
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +4 -4
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.js +47 -26
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js +1 -2
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActions.js +2 -5
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActionsStyles.js +11 -19
- package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.js +1 -2
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib/components/TableCellLayout/renderTableCellLayout.js +10 -6
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js +5 -5
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +41 -35
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.js +1 -2
- package/lib/components/TableHeader/TableHeader.js.map +1 -1
- package/lib/components/TableHeader/renderTableHeader.js +2 -2
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js +1 -10
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.js +6 -16
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +11 -8
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -67
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib/components/TableRow/TableRow.js +1 -2
- package/lib/components/TableRow/TableRow.js.map +1 -1
- package/lib/components/TableRow/TableRow.types.js.map +1 -1
- package/lib/components/TableRow/renderTableRow.js +3 -4
- package/lib/components/TableRow/renderTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +7 -5
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.js +137 -162
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +9 -5
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -46
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib/contexts/columnIdContext.js +9 -0
- package/lib/contexts/columnIdContext.js.map +1 -0
- package/lib/contexts/dataGridContext.js +13 -0
- package/lib/contexts/dataGridContext.js.map +1 -0
- package/lib/contexts/rowIdContext.js +9 -0
- package/lib/contexts/rowIdContext.js.map +1 -0
- package/lib/contexts/tableContext.js +0 -1
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/contexts/tableHeaderContext.js.map +1 -1
- package/lib/hooks/createColumn.js +35 -0
- package/lib/hooks/createColumn.js.map +1 -0
- package/lib/hooks/index.js +4 -3
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/selectionManager.js +16 -32
- package/lib/hooks/selectionManager.js.map +1 -1
- package/lib/hooks/types.js.map +1 -1
- package/lib/hooks/{useTable.js → useTableFeatures.js} +12 -9
- package/lib/hooks/useTableFeatures.js.map +1 -0
- package/lib/hooks/{useSelection.js → useTableSelection.js} +18 -18
- package/lib/hooks/useTableSelection.js.map +1 -0
- package/lib/hooks/{useSort.js → useTableSort.js} +12 -21
- package/lib/hooks/useTableSort.js.map +1 -0
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/DataGrid.js +0 -2
- package/lib-commonjs/DataGrid.js.map +1 -1
- package/lib-commonjs/DataGridBody.js +0 -2
- package/lib-commonjs/DataGridBody.js.map +1 -1
- package/lib-commonjs/DataGridCell.js +0 -2
- package/lib-commonjs/DataGridCell.js.map +1 -1
- package/lib-commonjs/DataGridHeader.js +0 -2
- package/lib-commonjs/DataGridHeader.js.map +1 -1
- package/lib-commonjs/DataGridHeaderCell.js +0 -2
- package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/DataGridRow.js +0 -2
- package/lib-commonjs/DataGridRow.js.map +1 -1
- package/lib-commonjs/DataGridSelectionCell.js +0 -2
- package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/Table.js +0 -2
- package/lib-commonjs/Table.js.map +1 -1
- package/lib-commonjs/TableBody.js +0 -2
- package/lib-commonjs/TableBody.js.map +1 -1
- package/lib-commonjs/TableCell.js +0 -2
- package/lib-commonjs/TableCell.js.map +1 -1
- package/lib-commonjs/TableCellActions.js +0 -2
- package/lib-commonjs/TableCellActions.js.map +1 -1
- package/lib-commonjs/TableCellLayout.js +0 -2
- package/lib-commonjs/TableCellLayout.js.map +1 -1
- package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
- package/lib-commonjs/TableHeader.js +0 -2
- package/lib-commonjs/TableHeader.js.map +1 -1
- package/lib-commonjs/TableHeaderCell.js +0 -2
- package/lib-commonjs/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/TableRow.js +0 -2
- package/lib-commonjs/TableRow.js.map +1 -1
- package/lib-commonjs/TableSelectionCell.js +0 -2
- package/lib-commonjs/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.js +1 -8
- package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib-commonjs/components/DataGrid/index.js +0 -6
- package/lib-commonjs/components/DataGrid/index.js.map +1 -1
- package/lib-commonjs/components/DataGrid/renderDataGrid.js +5 -5
- package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGrid.js +49 -6
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +11 -4
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridStyles.js +0 -5
- package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -7
- package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/index.js +0 -6
- package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +13 -6
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js +16 -5
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +0 -5
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -7
- package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/index.js +0 -6
- package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +0 -4
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js +7 -6
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +0 -5
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -7
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/index.js +0 -6
- package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +0 -4
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +2 -5
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +0 -5
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -7
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -6
- package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -4
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -6
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -8
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -7
- package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/index.js +0 -6
- package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +15 -6
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js +56 -6
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +5 -6
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -7
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -6
- package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -4
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +33 -6
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -8
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
- package/lib-commonjs/components/Table/Table.js +1 -8
- package/lib-commonjs/components/Table/Table.js.map +1 -1
- package/lib-commonjs/components/Table/Table.types.js.map +1 -1
- package/lib-commonjs/components/Table/index.js +0 -6
- package/lib-commonjs/components/Table/index.js.map +1 -1
- package/lib-commonjs/components/Table/renderTable.js +2 -7
- package/lib-commonjs/components/Table/renderTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js +0 -5
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.js +13 -23
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js +1 -7
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
- package/lib-commonjs/components/TableBody/index.js +0 -6
- package/lib-commonjs/components/TableBody/index.js.map +1 -1
- package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +0 -6
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +6 -12
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js +1 -7
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
- package/lib-commonjs/components/TableCell/index.js +0 -6
- package/lib-commonjs/components/TableCell/index.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +4 -8
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +47 -30
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/index.js +0 -6
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -8
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +11 -23
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -8
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/index.js +0 -6
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +10 -11
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +5 -9
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +0 -3
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +41 -39
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib-commonjs/components/TableHeader/index.js +0 -6
- package/lib-commonjs/components/TableHeader/index.js.map +1 -1
- package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -7
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -15
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +6 -19
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +10 -14
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -71
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js +1 -7
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
- package/lib-commonjs/components/TableRow/index.js +0 -6
- package/lib-commonjs/components/TableRow/index.js.map +1 -1
- package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +7 -10
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +137 -170
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +8 -11
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -50
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib-commonjs/contexts/columnIdContext.js +16 -0
- package/lib-commonjs/contexts/columnIdContext.js.map +1 -0
- package/lib-commonjs/contexts/dataGridContext.js +20 -0
- package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
- package/lib-commonjs/contexts/rowIdContext.js +16 -0
- package/lib-commonjs/contexts/rowIdContext.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +0 -5
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/contexts/tableHeaderContext.js +0 -4
- package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
- package/lib-commonjs/hooks/createColumn.js +42 -0
- package/lib-commonjs/hooks/createColumn.js.map +1 -0
- package/lib-commonjs/hooks/index.js +4 -8
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/selectionManager.js +16 -34
- package/lib-commonjs/hooks/selectionManager.js.map +1 -1
- package/lib-commonjs/hooks/types.js.map +1 -1
- package/lib-commonjs/hooks/useTableFeatures.js +42 -0
- package/lib-commonjs/hooks/useTableFeatures.js.map +1 -0
- package/lib-commonjs/hooks/{useSelection.js → useTableSelection.js} +21 -28
- package/lib-commonjs/hooks/useTableSelection.js.map +1 -0
- package/lib-commonjs/hooks/{useSort.js → useTableSort.js} +15 -29
- package/lib-commonjs/hooks/useTableSort.js.map +1 -0
- package/lib-commonjs/index.js +27 -44
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +15 -11
- package/lib/hooks/useSelection.js.map +0 -1
- package/lib/hooks/useSort.js.map +0 -1
- package/lib/hooks/useTable.js.map +0 -1
- package/lib-commonjs/hooks/useSelection.js.map +0 -1
- package/lib-commonjs/hooks/useSort.js.map +0 -1
- package/lib-commonjs/hooks/useTable.js +0 -42
- package/lib-commonjs/hooks/useTable.js.map +0 -1
|
@@ -3,238 +3,213 @@ import { tokens } from '@fluentui/react-theme';
|
|
|
3
3
|
import { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles';
|
|
4
4
|
import { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles';
|
|
5
5
|
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
6
|
-
import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
|
|
7
6
|
export const tableRowClassName = 'fui-TableRow';
|
|
8
7
|
export const tableRowClassNames = {
|
|
9
8
|
root: tableRowClassName
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
const useTableLayoutStyles = /*#__PURE__*/__styles({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
"medium": {
|
|
17
|
-
"Bqenvij": "f1ft4266"
|
|
18
|
-
},
|
|
19
|
-
"small": {
|
|
20
|
-
"Bqenvij": "fbsu25e"
|
|
21
|
-
},
|
|
22
|
-
"smaller": {
|
|
23
|
-
"Bqenvij": "frvgh55"
|
|
11
|
+
root: {
|
|
12
|
+
mc9l5x: "f1u0rzck"
|
|
24
13
|
}
|
|
25
14
|
}, {
|
|
26
|
-
|
|
15
|
+
d: [".f1u0rzck{display:table-row;}"]
|
|
27
16
|
});
|
|
28
|
-
|
|
29
17
|
const useFlexLayoutStyles = /*#__PURE__*/__styles({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
"medium": {
|
|
35
|
-
"sshi5w": "f5pgtk9"
|
|
36
|
-
},
|
|
37
|
-
"small": {
|
|
38
|
-
"sshi5w": "fcep9tg"
|
|
39
|
-
},
|
|
40
|
-
"smaller": {
|
|
41
|
-
"sshi5w": "f1pha7fy"
|
|
18
|
+
root: {
|
|
19
|
+
mc9l5x: "f22iagw",
|
|
20
|
+
Bt984gj: "f122n59"
|
|
42
21
|
}
|
|
43
22
|
}, {
|
|
44
|
-
|
|
23
|
+
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;}"]
|
|
45
24
|
});
|
|
46
25
|
/**
|
|
47
26
|
* Styles for the root slot
|
|
48
27
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
28
|
const useStyles = /*#__PURE__*/__styles({
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
29
|
+
root: {
|
|
30
|
+
sj55zd: "f19n0e5",
|
|
31
|
+
B7ck84d: "f1ewtqcl",
|
|
32
|
+
Bconypa: "f1jazu75",
|
|
33
|
+
B6guboy: "f1xeqee6",
|
|
34
|
+
Bn4voq9: "fz36nt7",
|
|
35
|
+
g9k6zt: "f9znhxp",
|
|
36
|
+
Bfpq7zp: "fqrak0z",
|
|
37
|
+
kdpuga: ["f1o2ludy", "f1kjnpwc"],
|
|
38
|
+
Bw81rd7: ["f1kjnpwc", "f1o2ludy"],
|
|
39
|
+
B6xbmo0: ["fxmnebo", "f1witrsb"],
|
|
40
|
+
dm238s: ["f1witrsb", "fxmnebo"]
|
|
41
|
+
},
|
|
42
|
+
noAppearanceFocusWithin: {
|
|
43
|
+
Bm5rygw: "f13cic75"
|
|
62
44
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"Bi7d7a3": "f1boln4s",
|
|
73
|
-
"Bpt6rm4": "f1uorfem",
|
|
74
|
-
"Bt8cqyk": "frasl6z",
|
|
75
|
-
"ff6mpl": "fw60kww"
|
|
45
|
+
rootInteractive: {
|
|
46
|
+
ecr2s2: "f1wfn5kd",
|
|
47
|
+
lj723h: "f1g4hkjv",
|
|
48
|
+
B43xm9u: "f15ngxrw",
|
|
49
|
+
i921ia: "fjbbrdp",
|
|
50
|
+
Jwef8y: "f1t94bn6",
|
|
51
|
+
Bi91k9c: "feu1g3u",
|
|
52
|
+
Bpt6rm4: "f1uorfem",
|
|
53
|
+
ff6mpl: "fw60kww"
|
|
76
54
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
55
|
+
medium: {
|
|
56
|
+
Bn0qgzm: "f1vxd6vx",
|
|
57
|
+
oivjwe: "fg706s2",
|
|
58
|
+
B9xav0g: "frpde29"
|
|
81
59
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
60
|
+
small: {
|
|
61
|
+
Bn0qgzm: "f1vxd6vx",
|
|
62
|
+
oivjwe: "fg706s2",
|
|
63
|
+
B9xav0g: "frpde29"
|
|
86
64
|
},
|
|
87
|
-
"
|
|
88
|
-
|
|
65
|
+
"extra-small": {
|
|
66
|
+
Be2twd7: "fy9rknc"
|
|
89
67
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
68
|
+
brand: {
|
|
69
|
+
De3pzq: "f16xkysk",
|
|
70
|
+
sj55zd: "f1cgsbmv",
|
|
71
|
+
g2u3we: "frmsihh",
|
|
72
|
+
h3c5rm: ["frttxa5", "f11o2r7f"],
|
|
73
|
+
B9xav0g: "fem5et0",
|
|
74
|
+
zhjwy3: ["f11o2r7f", "frttxa5"],
|
|
75
|
+
Jwef8y: "f121v1wq",
|
|
76
|
+
ecr2s2: "ftepret",
|
|
77
|
+
gwxt9v: "fqlf3fd",
|
|
78
|
+
v3aym: ["f9dpb3h", "fw2muls"],
|
|
79
|
+
Bc736ss: "f1yat0gj",
|
|
80
|
+
Bk6ri7n: ["fw2muls", "f9dpb3h"],
|
|
81
|
+
Bk5ld8o: "f7nae3y",
|
|
82
|
+
c4eypz: ["fkbere7", "fa97sf3"],
|
|
83
|
+
felo30: "fmtyzcc",
|
|
84
|
+
Eshu5l: ["fa97sf3", "fkbere7"],
|
|
85
|
+
Bjwas2f: "fb6zhgp",
|
|
86
|
+
Bn1d65q: ["fyowp6c", "fz08sq8"],
|
|
87
|
+
Bxeuatn: "f9dii88",
|
|
88
|
+
n51gp8: ["fz08sq8", "fyowp6c"],
|
|
89
|
+
Beo2b4z: ["f1afxoft", "flqq2yx"],
|
|
90
|
+
h6lo6r: ["flqq2yx", "f1afxoft"],
|
|
91
|
+
Btyw6ap: ["f1b5xrmd", "f1831rx6"],
|
|
92
|
+
w1pwid: ["f1831rx6", "f1b5xrmd"],
|
|
93
|
+
Brwvgy3: "fd94n53",
|
|
94
|
+
yadkgm: "f1e0wld5"
|
|
117
95
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
96
|
+
neutral: {
|
|
97
|
+
gwxt9v: "fqlf3fd",
|
|
98
|
+
v3aym: ["f9dpb3h", "fw2muls"],
|
|
99
|
+
Bc736ss: "f1yat0gj",
|
|
100
|
+
Bk6ri7n: ["fw2muls", "f9dpb3h"],
|
|
101
|
+
Bk5ld8o: "f7nae3y",
|
|
102
|
+
c4eypz: ["fkbere7", "fa97sf3"],
|
|
103
|
+
felo30: "fmtyzcc",
|
|
104
|
+
Eshu5l: ["fa97sf3", "fkbere7"],
|
|
105
|
+
Bjwas2f: "fb6zhgp",
|
|
106
|
+
Bn1d65q: ["fyowp6c", "fz08sq8"],
|
|
107
|
+
Bxeuatn: "f9dii88",
|
|
108
|
+
n51gp8: ["fz08sq8", "fyowp6c"],
|
|
109
|
+
Beo2b4z: ["f1afxoft", "flqq2yx"],
|
|
110
|
+
h6lo6r: ["flqq2yx", "f1afxoft"],
|
|
111
|
+
Btyw6ap: ["f1b5xrmd", "f1831rx6"],
|
|
112
|
+
w1pwid: ["f1831rx6", "f1b5xrmd"],
|
|
113
|
+
Brwvgy3: "fd94n53",
|
|
114
|
+
yadkgm: "f1e0wld5",
|
|
115
|
+
De3pzq: "fq5gl1p",
|
|
116
|
+
sj55zd: "f1cgsbmv",
|
|
117
|
+
Jwef8y: "f1uqaxdt",
|
|
118
|
+
ecr2s2: "fa9o754",
|
|
119
|
+
g2u3we: "frmsihh",
|
|
120
|
+
h3c5rm: ["frttxa5", "f11o2r7f"],
|
|
121
|
+
B9xav0g: "fem5et0",
|
|
122
|
+
zhjwy3: ["f11o2r7f", "frttxa5"]
|
|
145
123
|
},
|
|
146
|
-
|
|
124
|
+
none: {}
|
|
147
125
|
}, {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
126
|
+
d: [".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1ewtqcl{box-sizing:border-box;}", ".f1jazu75[data-fui-focus-within]:focus-within .fui-TableSelectionCell{opacity:1;}", ".f1xeqee6[data-fui-focus-within]:focus-within .fui-TableCellActions{opacity:1;}", ".fz36nt7[data-fui-focus-visible]{outline-width:2px;}", ".f9znhxp[data-fui-focus-visible]{outline-style:solid;}", ".fqrak0z[data-fui-focus-visible]{outline-color:var(--colorStrokeFocus2);}", ".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);}", ".f13cic75[data-fui-focus-within]:focus-within{background-color:var(--colorSubtleBackgroundHover);}", ".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);}"],
|
|
127
|
+
a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}", ".f15ngxrw:active .fui-TableCellActions{opacity:1;}", ".fjbbrdp:active .fui-TableSelectionCell{opacity:1;}", ".ftepret:active{background-color:var(--colorBrandBackgroundInvertedSelected);}", ".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}"],
|
|
128
|
+
h: [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}", ".fw60kww:hover .fui-TableSelectionCell{opacity:1;}", ".f121v1wq:hover{background-color:var(--colorBrandBackground2);}", ".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}"],
|
|
129
|
+
m: [["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
|
|
130
|
+
m: "(forced-colors: active)"
|
|
153
131
|
}], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
|
|
154
|
-
|
|
132
|
+
m: "(forced-colors: active)"
|
|
155
133
|
}], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
|
|
156
|
-
|
|
134
|
+
m: "(forced-colors: active)"
|
|
157
135
|
}], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
|
|
158
|
-
|
|
136
|
+
m: "(forced-colors: active)"
|
|
159
137
|
}], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
|
|
160
|
-
|
|
138
|
+
m: "(forced-colors: active)"
|
|
161
139
|
}], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
|
|
162
|
-
|
|
140
|
+
m: "(forced-colors: active)"
|
|
163
141
|
}], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
|
|
164
|
-
|
|
142
|
+
m: "(forced-colors: active)"
|
|
165
143
|
}], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
|
|
166
|
-
|
|
144
|
+
m: "(forced-colors: active)"
|
|
167
145
|
}], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
|
|
168
|
-
|
|
146
|
+
m: "(forced-colors: active)"
|
|
169
147
|
}], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
|
|
170
|
-
|
|
148
|
+
m: "(forced-colors: active)"
|
|
171
149
|
}], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
|
|
172
|
-
|
|
150
|
+
m: "(forced-colors: active)"
|
|
173
151
|
}], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
|
|
174
|
-
|
|
152
|
+
m: "(forced-colors: active)"
|
|
175
153
|
}], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
|
|
176
|
-
|
|
154
|
+
m: "(forced-colors: active)"
|
|
177
155
|
}], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
|
|
178
|
-
|
|
156
|
+
m: "(forced-colors: active)"
|
|
179
157
|
}], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
|
|
180
|
-
|
|
158
|
+
m: "(forced-colors: active)"
|
|
181
159
|
}], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
|
|
182
|
-
|
|
160
|
+
m: "(forced-colors: active)"
|
|
183
161
|
}], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
|
|
184
|
-
|
|
162
|
+
m: "(forced-colors: active)"
|
|
185
163
|
}], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
|
|
186
|
-
|
|
164
|
+
m: "(forced-colors: active)"
|
|
187
165
|
}], ["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
|
|
188
|
-
|
|
166
|
+
m: "(forced-colors: active)"
|
|
189
167
|
}], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
|
|
190
|
-
|
|
168
|
+
m: "(forced-colors: active)"
|
|
191
169
|
}], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
|
|
192
|
-
|
|
170
|
+
m: "(forced-colors: active)"
|
|
193
171
|
}], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
|
|
194
|
-
|
|
172
|
+
m: "(forced-colors: active)"
|
|
195
173
|
}], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
|
|
196
|
-
|
|
174
|
+
m: "(forced-colors: active)"
|
|
197
175
|
}], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
|
|
198
|
-
|
|
176
|
+
m: "(forced-colors: active)"
|
|
199
177
|
}], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
|
|
200
|
-
|
|
178
|
+
m: "(forced-colors: active)"
|
|
201
179
|
}], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
|
|
202
|
-
|
|
180
|
+
m: "(forced-colors: active)"
|
|
203
181
|
}], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
|
|
204
|
-
|
|
182
|
+
m: "(forced-colors: active)"
|
|
205
183
|
}], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
|
|
206
|
-
|
|
184
|
+
m: "(forced-colors: active)"
|
|
207
185
|
}], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
|
|
208
|
-
|
|
186
|
+
m: "(forced-colors: active)"
|
|
209
187
|
}], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
|
|
210
|
-
|
|
188
|
+
m: "(forced-colors: active)"
|
|
211
189
|
}], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
|
|
212
|
-
|
|
190
|
+
m: "(forced-colors: active)"
|
|
213
191
|
}], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
|
|
214
|
-
|
|
192
|
+
m: "(forced-colors: active)"
|
|
215
193
|
}], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
|
|
216
|
-
|
|
194
|
+
m: "(forced-colors: active)"
|
|
217
195
|
}], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
|
|
218
|
-
|
|
196
|
+
m: "(forced-colors: active)"
|
|
219
197
|
}], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
|
|
220
|
-
|
|
198
|
+
m: "(forced-colors: active)"
|
|
221
199
|
}], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
|
|
222
|
-
|
|
200
|
+
m: "(forced-colors: active)"
|
|
223
201
|
}]]
|
|
224
202
|
});
|
|
225
203
|
/**
|
|
226
204
|
* Apply styling to the TableRow slots based on the state
|
|
227
205
|
*/
|
|
228
|
-
|
|
229
|
-
|
|
230
206
|
export const useTableRowStyles_unstable = state => {
|
|
231
|
-
const isHeaderRow = useIsInTableHeader();
|
|
232
207
|
const styles = useStyles();
|
|
233
208
|
const layoutStyles = {
|
|
234
209
|
table: useTableLayoutStyles(),
|
|
235
210
|
flex: useFlexLayoutStyles()
|
|
236
211
|
};
|
|
237
|
-
state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.
|
|
212
|
+
state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.appearance === 'none' && !state.isHeaderRow && styles.noAppearanceFocusWithin, state.root.className);
|
|
238
213
|
return state;
|
|
239
214
|
};
|
|
240
215
|
//# sourceMappingURL=useTableRowStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAG9C,SAASC,0BAA0B,QAAQ,+CAA+C;AAC1F,SAASC,4BAA4B,QAAQ,mDAAmD;AAChG,SAASC,+BAA+B,QAAQ,yBAAyB;AAEzE,OAAO,MAAMC,iBAAiB,GAAG,cAAc;AAC/C,OAAO,MAAMC,kBAAkB,GAAkC;EAC/DC,IAAI,EAAEF;CACP;AAED,MAAMG,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAK1B;AAEF;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;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,EAkHhB;AAEF;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAoB,IAAmB;EAChF,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAMI,YAAY,GAAG;IACnBC,KAAK,EAAEP,oBAAoB,EAAE;IAC7BQ,IAAI,EAAEP,mBAAmB;GAC1B;EACDG,KAAK,CAACL,IAAI,CAACU,SAAS,GAAGlB,YAAY,CACjCO,kBAAkB,CAACC,IAAI,EACvBM,MAAM,CAACN,IAAI,EACX,CAACK,KAAK,CAACM,WAAW,IAAIL,MAAM,CAACM,eAAe,EAC5CN,MAAM,CAACD,KAAK,CAACQ,IAAI,CAAC,EAClBR,KAAK,CAACS,gBAAgB,GAAGP,YAAY,CAACE,IAAI,CAACT,IAAI,GAAGO,YAAY,CAACC,KAAK,CAACR,IAAI,EACzEM,MAAM,CAACD,KAAK,CAACU,UAAU,CAAC,EACxBV,KAAK,CAACU,UAAU,KAAK,MAAM,IAAI,CAACV,KAAK,CAACM,WAAW,IAAIL,MAAM,CAACU,uBAAuB,EACnFX,KAAK,CAACL,IAAI,CAACU,SAAS,CACrB;EAED,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","tableCellActionsClassNames","tableSelectionCellClassNames","createCustomFocusIndicatorStyle","tableRowClassName","tableRowClassNames","root","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableRowStyles_unstable","state","styles","layoutStyles","table","flex","className","isHeaderRow","rootInteractive","size","noNativeElements","appearance","noAppearanceFocusWithin"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/useTableRowStyles.ts"],"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';\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\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\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 [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n },\n { selector: 'focus-within', enableOutline: true },\n ),\n ...createCustomFocusIndicatorStyle(\n {\n ...shorthands.outline('2px', 'solid', tokens.colorStrokeFocus2),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n { selector: 'focus', enableOutline: true },\n ),\n },\n\n // When focus is within the row the background colour\n // should be the same as hover, except when there is a brand\n // or neutral appearance applied on the row\n noAppearanceFocusWithin: {\n ...createCustomFocusIndicatorStyle(\n {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n { selector: 'focus-within', enableOutline: true },\n ),\n },\n\n rootInteractive: {\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\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 'extra-small': {\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\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 styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableRowClassNames.root,\n styles.root,\n !state.isHeaderRow && styles.rootInteractive,\n styles[state.size],\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n styles[state.appearance],\n state.appearance === 'none' && !state.isHeaderRow && styles.noAppearanceFocusWithin,\n state.root.className,\n );\n\n return state;\n};\n"]}
|
|
@@ -3,9 +3,8 @@ import { useTableSelectionCell_unstable } from './useTableSelectionCell';
|
|
|
3
3
|
import { renderTableSelectionCell_unstable } from './renderTableSelectionCell';
|
|
4
4
|
import { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles';
|
|
5
5
|
/**
|
|
6
|
-
* TableSelectionCell component
|
|
6
|
+
* TableSelectionCell component
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
8
|
export const TableSelectionCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
9
|
const state = useTableSelectionCell_unstable(props, ref);
|
|
11
10
|
useTableSelectionCellStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,8BAA8B,QAAQ,yBAAyB;AACxE,SAASC,iCAAiC,QAAQ,4BAA4B;AAC9E,SAASC,oCAAoC,QAAQ,+BAA+B;AAIpF;;;AAGA,OAAO,MAAMC,kBAAkB,gBAAiDJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9G,MAAMC,KAAK,GAAGP,8BAA8B,CAACK,KAAK,EAAEC,GAAG,CAAC;EAExDJ,oCAAoC,CAACK,KAAK,CAAC;EAC3C,OAAON,iCAAiC,CAACM,KAAK,CAAC;AACjD,CAAC,CAAC;AAEFJ,kBAAkB,CAACK,WAAW,GAAG,oBAAoB","names":["React","useTableSelectionCell_unstable","renderTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","TableSelectionCell","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/TableSelectionCell.tsx"],"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\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"]}
|
|
@@ -1 +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<
|
|
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<TableSelectionCellSlots>> & {\n /**\n * A table can have two kinds of selection modes.\n * @default checkbox\n */\n type?: 'checkbox' | 'radio';\n\n /**\n * @default false\n */\n checked?: CheckboxProps['checked'];\n\n /**\n * Only visible when checked or the parent row is hovered/focused\n * @default false\n */\n subtle?: boolean;\n\n /**\n * Completely hides the selection cell visually but takes up the same space\n * @default false\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"]}
|
|
@@ -3,15 +3,17 @@ import { getSlots } from '@fluentui/react-utilities';
|
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of TableSelectionCell
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
export const renderTableSelectionCell_unstable = state => {
|
|
8
7
|
const {
|
|
9
8
|
slots,
|
|
10
9
|
slotProps
|
|
11
10
|
} = getSlots(state);
|
|
12
|
-
return /*#__PURE__*/React.createElement(slots.root, {
|
|
13
|
-
|
|
14
|
-
}
|
|
11
|
+
return /*#__PURE__*/React.createElement(slots.root, {
|
|
12
|
+
...slotProps.root
|
|
13
|
+
}, state.type === 'checkbox' && slots.checkboxIndicator && /*#__PURE__*/React.createElement(slots.checkboxIndicator, {
|
|
14
|
+
...slotProps.checkboxIndicator
|
|
15
|
+
}), state.type === 'radio' && slots.radioIndicator && /*#__PURE__*/React.createElement(slots.radioIndicator, {
|
|
16
|
+
...slotProps.radioIndicator
|
|
15
17
|
}));
|
|
16
18
|
};
|
|
17
19
|
//# sourceMappingURL=renderTableSelectionCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA8B,IAAI;EAClF,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAA0BE,KAAK,CAAC;EAErE,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BH,KAAK,CAACI,IAAI,KAAK,UAAU,IAAIH,KAAK,CAACI,iBAAiB,iBACnDR,oBAACI,KAAK,CAACI,iBAAiB;IAAA,GAAKH,SAAS,CAACG;EAAiB,EACzD,EACAL,KAAK,CAACI,IAAI,KAAK,OAAO,IAAIH,KAAK,CAACK,cAAc,iBAAIT,oBAACI,KAAK,CAACK,cAAc;IAAA,GAAKJ,SAAS,CAACI;EAAc,EAAI,CAC9F;AAEjB,CAAC","names":["React","getSlots","renderTableSelectionCell_unstable","state","slots","slotProps","root","type","checkboxIndicator","radioIndicator"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/renderTableSelectionCell.tsx"],"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"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveShorthand } from '@fluentui/react-utilities';
|
|
1
|
+
import { resolveShorthand, useId } from '@fluentui/react-utilities';
|
|
2
2
|
import { Checkbox } from '@fluentui/react-checkbox';
|
|
3
3
|
import { Radio } from '@fluentui/react-radio';
|
|
4
4
|
import { useTableCell_unstable } from '../TableCell/useTableCell';
|
|
@@ -12,7 +12,6 @@ import { useTableContext } from '../../contexts/tableContext';
|
|
|
12
12
|
* @param props - props from this instance of TableSelectionCell
|
|
13
13
|
* @param ref - reference to root HTMLElement of TableSelectionCell
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
15
|
export const useTableSelectionCell_unstable = (props, ref) => {
|
|
17
16
|
const tableCellState = useTableCell_unstable(props, ref);
|
|
18
17
|
const {
|
|
@@ -24,8 +23,10 @@ export const useTableSelectionCell_unstable = (props, ref) => {
|
|
|
24
23
|
subtle = false,
|
|
25
24
|
hidden = false
|
|
26
25
|
} = props;
|
|
27
|
-
return {
|
|
28
|
-
|
|
26
|
+
return {
|
|
27
|
+
...tableCellState,
|
|
28
|
+
components: {
|
|
29
|
+
...tableCellState.components,
|
|
29
30
|
checkboxIndicator: Checkbox,
|
|
30
31
|
radioIndicator: Radio
|
|
31
32
|
},
|
|
@@ -38,7 +39,10 @@ export const useTableSelectionCell_unstable = (props, ref) => {
|
|
|
38
39
|
radioIndicator: resolveShorthand(props.radioIndicator, {
|
|
39
40
|
required: type === 'radio',
|
|
40
41
|
defaultProps: {
|
|
41
|
-
checked: !!checked
|
|
42
|
+
checked: !!checked,
|
|
43
|
+
input: {
|
|
44
|
+
name: useId('table-selection-radio')
|
|
45
|
+
}
|
|
42
46
|
}
|
|
43
47
|
}),
|
|
44
48
|
type,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AACA,SAASA,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AACnE,SAASC,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,KAAK,QAAQ,uBAAuB;AAE7C,SAASC,qBAAqB,QAAQ,2BAA2B;AACjE,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,8BAA8B,GAAG,CAC5CC,KAA8B,EAC9BC,GAA2B,KACA;EAC3B,MAAMC,cAAc,GAAGL,qBAAqB,CAACG,KAAK,EAAEC,GAAG,CAAC;EACxD,MAAM;IAAEE;EAAgB,CAAE,GAAGL,eAAe,EAAE;EAC9C,MAAM;IAAEM,IAAI,GAAG,UAAU;IAAEC,OAAO,GAAG,KAAK;IAAEC,MAAM,GAAG,KAAK;IAAEC,MAAM,GAAG;EAAK,CAAE,GAAGP,KAAK;EAEpF,OAAO;IACL,GAAGE,cAAc;IACjBM,UAAU,EAAE;MACV,GAAGN,cAAc,CAACM,UAAU;MAC5BC,iBAAiB,EAAEd,QAAQ;MAC3Be,cAAc,EAAEd;KACjB;IACDa,iBAAiB,EAAEhB,gBAAgB,CAACO,KAAK,CAACS,iBAAiB,EAAE;MAC3DE,QAAQ,EAAEP,IAAI,KAAK,UAAU;MAC7BQ,YAAY,EAAE;QAAEP,OAAO,EAAEL,KAAK,CAACK;MAAO;KACvC,CAAC;IACFK,cAAc,EAAEjB,gBAAgB,CAACO,KAAK,CAACU,cAAc,EAAE;MACrDC,QAAQ,EAAEP,IAAI,KAAK,OAAO;MAC1BQ,YAAY,EAAE;QAAEP,OAAO,EAAE,CAAC,CAACA,OAAO;QAAEQ,KAAK,EAAE;UAAEC,IAAI,EAAEpB,KAAK,CAAC,uBAAuB;QAAC;MAAE;KACpF,CAAC;IACFU,IAAI;IACJC,OAAO;IACPF,gBAAgB;IAChBG,MAAM;IACNC;GACD;AACH,CAAC","names":["resolveShorthand","useId","Checkbox","Radio","useTableCell_unstable","useTableContext","useTableSelectionCell_unstable","props","ref","tableCellState","noNativeElements","type","checked","subtle","hidden","components","checkboxIndicator","radioIndicator","required","defaultProps","input","name"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/useTableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { resolveShorthand, useId } 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, input: { name: useId('table-selection-radio') } },\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden,\n };\n};\n"]}
|