@fluentui/react-table 9.0.0-rc.4 → 9.0.0
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 +124 -8
- package/CHANGELOG.md +44 -9
- package/dist/index.d.ts +114 -3
- package/lib/TableResizeHandle.js +2 -0
- package/lib/TableResizeHandle.js.map +1 -0
- package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib/components/DataGrid/index.js +1 -0
- package/lib/components/DataGrid/index.js.map +1 -1
- package/lib/components/DataGrid/useDataGrid.js +16 -4
- package/lib/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGridContextValues.js +2 -1
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCell.js +5 -0
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +5 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js +1 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +18 -4
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js +3 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +3 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -4
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.js +14 -0
- package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -0
- package/lib/components/TableResizeHandle/TableResizeHandle.types.js +2 -0
- package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -0
- package/lib/components/TableResizeHandle/index.js +6 -0
- package/lib/components/TableResizeHandle/index.js.map +1 -0
- package/lib/components/TableResizeHandle/renderTableResizeHandle.js +15 -0
- package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -0
- package/lib/components/TableResizeHandle/useTableResizeHandle.js +28 -0
- package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -0
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.js +49 -0
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/types.js.map +1 -1
- package/lib/hooks/useMeasureElement.js +48 -0
- package/lib/hooks/useMeasureElement.js.map +1 -0
- package/lib/hooks/useTableColumnResizeMouseHandler.js +50 -0
- package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -0
- package/lib/hooks/useTableColumnResizeState.js +112 -0
- package/lib/hooks/useTableColumnResizeState.js.map +1 -0
- package/lib/hooks/useTableColumnSizing.js +77 -0
- package/lib/hooks/useTableColumnSizing.js.map +1 -0
- package/lib/hooks/useTableFeatures.js +10 -2
- package/lib/hooks/useTableFeatures.js.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/utils/columnResizeUtils.js +158 -0
- package/lib/utils/columnResizeUtils.js.map +1 -0
- package/lib-amd/DataGrid.js +6 -0
- package/lib-amd/DataGrid.js.map +1 -0
- package/lib-amd/DataGridBody.js +6 -0
- package/lib-amd/DataGridBody.js.map +1 -0
- package/lib-amd/DataGridCell.js +6 -0
- package/lib-amd/DataGridCell.js.map +1 -0
- package/lib-amd/DataGridHeader.js +6 -0
- package/lib-amd/DataGridHeader.js.map +1 -0
- package/lib-amd/DataGridHeaderCell.js +6 -0
- package/lib-amd/DataGridHeaderCell.js.map +1 -0
- package/lib-amd/DataGridRow.js +6 -0
- package/lib-amd/DataGridRow.js.map +1 -0
- package/lib-amd/DataGridSelectionCell.js +6 -0
- package/lib-amd/DataGridSelectionCell.js.map +1 -0
- package/lib-amd/Table.js +6 -0
- package/lib-amd/Table.js.map +1 -0
- package/lib-amd/TableBody.js +6 -0
- package/lib-amd/TableBody.js.map +1 -0
- package/lib-amd/TableCell.js +6 -0
- package/lib-amd/TableCell.js.map +1 -0
- package/lib-amd/TableCellActions.js +6 -0
- package/lib-amd/TableCellActions.js.map +1 -0
- package/lib-amd/TableCellLayout.js +6 -0
- package/lib-amd/TableCellLayout.js.map +1 -0
- package/lib-amd/TableHeader.js +6 -0
- package/lib-amd/TableHeader.js.map +1 -0
- package/lib-amd/TableHeaderCell.js +6 -0
- package/lib-amd/TableHeaderCell.js.map +1 -0
- package/lib-amd/TableResizeHandle.js +6 -0
- package/lib-amd/TableResizeHandle.js.map +1 -0
- package/lib-amd/TableRow.js +6 -0
- package/lib-amd/TableRow.js.map +1 -0
- package/lib-amd/TableSelectionCell.js +6 -0
- package/lib-amd/TableSelectionCell.js.map +1 -0
- package/lib-amd/components/DataGrid/DataGrid.js +15 -0
- package/lib-amd/components/DataGrid/DataGrid.js.map +1 -0
- package/lib-amd/components/DataGrid/DataGrid.types.js +5 -0
- package/lib-amd/components/DataGrid/DataGrid.types.js.map +1 -0
- package/lib-amd/components/DataGrid/index.js +11 -0
- package/lib-amd/components/DataGrid/index.js.map +1 -0
- package/lib-amd/components/DataGrid/renderDataGrid.js +13 -0
- package/lib-amd/components/DataGrid/renderDataGrid.js.map +1 -0
- package/lib-amd/components/DataGrid/useDataGrid.js +43 -0
- package/lib-amd/components/DataGrid/useDataGrid.js.map +1 -0
- package/lib-amd/components/DataGrid/useDataGridContextValues.js +11 -0
- package/lib-amd/components/DataGrid/useDataGridContextValues.js.map +1 -0
- package/lib-amd/components/DataGrid/useDataGridStyles.js +18 -0
- package/lib-amd/components/DataGrid/useDataGridStyles.js.map +1 -0
- package/lib-amd/components/DataGridBody/DataGridBody.js +15 -0
- package/lib-amd/components/DataGridBody/DataGridBody.js.map +1 -0
- package/lib-amd/components/DataGridBody/DataGridBody.types.js +5 -0
- package/lib-amd/components/DataGridBody/DataGridBody.types.js.map +1 -0
- package/lib-amd/components/DataGridBody/index.js +10 -0
- package/lib-amd/components/DataGridBody/index.js.map +1 -0
- package/lib-amd/components/DataGridBody/renderDataGridBody.js +14 -0
- package/lib-amd/components/DataGridBody/renderDataGridBody.js.map +1 -0
- package/lib-amd/components/DataGridBody/useDataGridBody.js +24 -0
- package/lib-amd/components/DataGridBody/useDataGridBody.js.map +1 -0
- package/lib-amd/components/DataGridBody/useDataGridBodyStyles.js +18 -0
- package/lib-amd/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
- package/lib-amd/components/DataGridCell/DataGridCell.js +15 -0
- package/lib-amd/components/DataGridCell/DataGridCell.js.map +1 -0
- package/lib-amd/components/DataGridCell/DataGridCell.types.js +5 -0
- package/lib-amd/components/DataGridCell/DataGridCell.types.js.map +1 -0
- package/lib-amd/components/DataGridCell/index.js +10 -0
- package/lib-amd/components/DataGridCell/index.js.map +1 -0
- package/lib-amd/components/DataGridCell/renderDataGridCell.js +13 -0
- package/lib-amd/components/DataGridCell/renderDataGridCell.js.map +1 -0
- package/lib-amd/components/DataGridCell/useDataGridCell.js +23 -0
- package/lib-amd/components/DataGridCell/useDataGridCell.js.map +1 -0
- package/lib-amd/components/DataGridCell/useDataGridCellStyles.js +18 -0
- package/lib-amd/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
- package/lib-amd/components/DataGridHeader/DataGridHeader.js +15 -0
- package/lib-amd/components/DataGridHeader/DataGridHeader.js.map +1 -0
- package/lib-amd/components/DataGridHeader/DataGridHeader.types.js +5 -0
- package/lib-amd/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
- package/lib-amd/components/DataGridHeader/index.js +10 -0
- package/lib-amd/components/DataGridHeader/index.js.map +1 -0
- package/lib-amd/components/DataGridHeader/renderDataGridHeader.js +13 -0
- package/lib-amd/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
- package/lib-amd/components/DataGridHeader/useDataGridHeader.js +19 -0
- package/lib-amd/components/DataGridHeader/useDataGridHeader.js.map +1 -0
- package/lib-amd/components/DataGridHeader/useDataGridHeaderStyles.js +18 -0
- package/lib-amd/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
- package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js +15 -0
- package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
- package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.types.js +5 -0
- package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
- package/lib-amd/components/DataGridHeaderCell/index.js +10 -0
- package/lib-amd/components/DataGridHeaderCell/index.js.map +1 -0
- package/lib-amd/components/DataGridHeaderCell/renderDataGridHeaderCell.js +13 -0
- package/lib-amd/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
- package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCell.js +34 -0
- package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
- package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +30 -0
- package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
- package/lib-amd/components/DataGridRow/DataGridRow.js +15 -0
- package/lib-amd/components/DataGridRow/DataGridRow.js.map +1 -0
- package/lib-amd/components/DataGridRow/DataGridRow.types.js +5 -0
- package/lib-amd/components/DataGridRow/DataGridRow.types.js.map +1 -0
- package/lib-amd/components/DataGridRow/index.js +10 -0
- package/lib-amd/components/DataGridRow/index.js.map +1 -0
- package/lib-amd/components/DataGridRow/renderDataGridRow.js +16 -0
- package/lib-amd/components/DataGridRow/renderDataGridRow.js.map +1 -0
- package/lib-amd/components/DataGridRow/useDataGridRow.js +49 -0
- package/lib-amd/components/DataGridRow/useDataGridRow.js.map +1 -0
- package/lib-amd/components/DataGridRow/useDataGridRowStyles.js +22 -0
- package/lib-amd/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
- package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js +15 -0
- package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
- package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.types.js +5 -0
- package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
- package/lib-amd/components/DataGridSelectionCell/index.js +10 -0
- package/lib-amd/components/DataGridSelectionCell/index.js.map +1 -0
- package/lib-amd/components/DataGridSelectionCell/renderDataGridSelectionCell.js +13 -0
- package/lib-amd/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
- package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCell.js +39 -0
- package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
- package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +26 -0
- package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
- package/lib-amd/components/Table/Table.js +15 -0
- package/lib-amd/components/Table/Table.js.map +1 -0
- package/lib-amd/components/Table/Table.types.js +5 -0
- package/lib-amd/components/Table/Table.types.js.map +1 -0
- package/lib-amd/components/Table/index.js +10 -0
- package/lib-amd/components/Table/index.js.map +1 -0
- package/lib-amd/components/Table/renderTable.js +15 -0
- package/lib-amd/components/Table/renderTable.js.map +1 -0
- package/lib-amd/components/Table/useTable.js +29 -0
- package/lib-amd/components/Table/useTable.js.map +1 -0
- package/lib-amd/components/Table/useTableContextValues.js +18 -0
- package/lib-amd/components/Table/useTableContextValues.js.map +1 -0
- package/lib-amd/components/Table/useTableStyles.js +45 -0
- package/lib-amd/components/Table/useTableStyles.js.map +1 -0
- package/lib-amd/components/TableBody/TableBody.js +15 -0
- package/lib-amd/components/TableBody/TableBody.js.map +1 -0
- package/lib-amd/components/TableBody/TableBody.types.js +5 -0
- package/lib-amd/components/TableBody/TableBody.types.js.map +1 -0
- package/lib-amd/components/TableBody/index.js +10 -0
- package/lib-amd/components/TableBody/index.js.map +1 -0
- package/lib-amd/components/TableBody/renderTableBody.js +14 -0
- package/lib-amd/components/TableBody/renderTableBody.js.map +1 -0
- package/lib-amd/components/TableBody/useTableBody.js +28 -0
- package/lib-amd/components/TableBody/useTableBody.js.map +1 -0
- package/lib-amd/components/TableBody/useTableBodyStyles.js +32 -0
- package/lib-amd/components/TableBody/useTableBodyStyles.js.map +1 -0
- package/lib-amd/components/TableCell/TableCell.js +15 -0
- package/lib-amd/components/TableCell/TableCell.js.map +1 -0
- package/lib-amd/components/TableCell/TableCell.types.js +5 -0
- package/lib-amd/components/TableCell/TableCell.types.js.map +1 -0
- package/lib-amd/components/TableCell/index.js +10 -0
- package/lib-amd/components/TableCell/index.js.map +1 -0
- package/lib-amd/components/TableCell/renderTableCell.js +14 -0
- package/lib-amd/components/TableCell/renderTableCell.js.map +1 -0
- package/lib-amd/components/TableCell/useTableCell.js +29 -0
- package/lib-amd/components/TableCell/useTableCell.js.map +1 -0
- package/lib-amd/components/TableCell/useTableCellStyles.js +56 -0
- package/lib-amd/components/TableCell/useTableCellStyles.js.map +1 -0
- package/lib-amd/components/TableCellActions/TableCellActions.js +15 -0
- package/lib-amd/components/TableCellActions/TableCellActions.js.map +1 -0
- package/lib-amd/components/TableCellActions/TableCellActions.types.js +5 -0
- package/lib-amd/components/TableCellActions/TableCellActions.types.js.map +1 -0
- package/lib-amd/components/TableCellActions/index.js +10 -0
- package/lib-amd/components/TableCellActions/index.js.map +1 -0
- package/lib-amd/components/TableCellActions/renderTableCellActions.js +14 -0
- package/lib-amd/components/TableCellActions/renderTableCellActions.js.map +1 -0
- package/lib-amd/components/TableCellActions/useTableCellActions.js +26 -0
- package/lib-amd/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib-amd/components/TableCellActions/useTableCellActionsStyles.js +35 -0
- package/lib-amd/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib-amd/components/TableCellLayout/TableCellLayout.js +15 -0
- package/lib-amd/components/TableCellLayout/TableCellLayout.js.map +1 -0
- package/lib-amd/components/TableCellLayout/TableCellLayout.types.js +5 -0
- package/lib-amd/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
- package/lib-amd/components/TableCellLayout/index.js +10 -0
- package/lib-amd/components/TableCellLayout/index.js.map +1 -0
- package/lib-amd/components/TableCellLayout/renderTableCellLayout.js +19 -0
- package/lib-amd/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib-amd/components/TableCellLayout/useTableCellLayout.js +42 -0
- package/lib-amd/components/TableCellLayout/useTableCellLayout.js.map +1 -0
- package/lib-amd/components/TableCellLayout/useTableCellLayoutContextValues.js +16 -0
- package/lib-amd/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
- package/lib-amd/components/TableCellLayout/useTableCellLayoutStyles.js +79 -0
- package/lib-amd/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
- package/lib-amd/components/TableHeader/TableHeader.js +15 -0
- package/lib-amd/components/TableHeader/TableHeader.js.map +1 -0
- package/lib-amd/components/TableHeader/TableHeader.types.js +5 -0
- package/lib-amd/components/TableHeader/TableHeader.types.js.map +1 -0
- package/lib-amd/components/TableHeader/index.js +10 -0
- package/lib-amd/components/TableHeader/index.js.map +1 -0
- package/lib-amd/components/TableHeader/renderTableHeader.js +15 -0
- package/lib-amd/components/TableHeader/renderTableHeader.js.map +1 -0
- package/lib-amd/components/TableHeader/useTableHeader.js +28 -0
- package/lib-amd/components/TableHeader/useTableHeader.js.map +1 -0
- package/lib-amd/components/TableHeader/useTableHeaderStyles.js +32 -0
- package/lib-amd/components/TableHeader/useTableHeaderStyles.js.map +1 -0
- package/lib-amd/components/TableHeaderCell/TableHeaderCell.js +15 -0
- package/lib-amd/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
- package/lib-amd/components/TableHeaderCell/TableHeaderCell.types.js +5 -0
- package/lib-amd/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
- package/lib-amd/components/TableHeaderCell/index.js +10 -0
- package/lib-amd/components/TableHeaderCell/index.js.map +1 -0
- package/lib-amd/components/TableHeaderCell/renderTableHeaderCell.js +18 -0
- package/lib-amd/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
- package/lib-amd/components/TableHeaderCell/useTableHeaderCell.js +48 -0
- package/lib-amd/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
- package/lib-amd/components/TableHeaderCell/useTableHeaderCellStyles.js +67 -0
- package/lib-amd/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
- package/lib-amd/components/TableResizeHandle/TableResizeHandle.js +15 -0
- package/lib-amd/components/TableResizeHandle/TableResizeHandle.js.map +1 -0
- package/lib-amd/components/TableResizeHandle/TableResizeHandle.types.js +5 -0
- package/lib-amd/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -0
- package/lib-amd/components/TableResizeHandle/index.js +10 -0
- package/lib-amd/components/TableResizeHandle/index.js.map +1 -0
- package/lib-amd/components/TableResizeHandle/renderTableResizeHandle.js +14 -0
- package/lib-amd/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -0
- package/lib-amd/components/TableResizeHandle/useTableResizeHandle.js +29 -0
- package/lib-amd/components/TableResizeHandle/useTableResizeHandle.js.map +1 -0
- package/lib-amd/components/TableResizeHandle/useTableResizeHandleStyles.js +37 -0
- package/lib-amd/components/TableResizeHandle/useTableResizeHandleStyles.js.map +1 -0
- package/lib-amd/components/TableRow/TableRow.js +15 -0
- package/lib-amd/components/TableRow/TableRow.js.map +1 -0
- package/lib-amd/components/TableRow/TableRow.types.js +5 -0
- package/lib-amd/components/TableRow/TableRow.types.js.map +1 -0
- package/lib-amd/components/TableRow/index.js +10 -0
- package/lib-amd/components/TableRow/index.js.map +1 -0
- package/lib-amd/components/TableRow/renderTableRow.js +14 -0
- package/lib-amd/components/TableRow/renderTableRow.js.map +1 -0
- package/lib-amd/components/TableRow/useTableRow.js +34 -0
- package/lib-amd/components/TableRow/useTableRow.js.map +1 -0
- package/lib-amd/components/TableRow/useTableRowStyles.js +98 -0
- package/lib-amd/components/TableRow/useTableRowStyles.js.map +1 -0
- package/lib-amd/components/TableSelectionCell/TableSelectionCell.js +15 -0
- package/lib-amd/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
- package/lib-amd/components/TableSelectionCell/TableSelectionCell.types.js +5 -0
- package/lib-amd/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
- package/lib-amd/components/TableSelectionCell/index.js +10 -0
- package/lib-amd/components/TableSelectionCell/index.js.map +1 -0
- package/lib-amd/components/TableSelectionCell/renderTableSelectionCell.js +16 -0
- package/lib-amd/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
- package/lib-amd/components/TableSelectionCell/useTableSelectionCell.js +28 -0
- package/lib-amd/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib-amd/components/TableSelectionCell/useTableSelectionCellStyles.js +58 -0
- package/lib-amd/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib-amd/contexts/columnIdContext.js +11 -0
- package/lib-amd/contexts/columnIdContext.js.map +1 -0
- package/lib-amd/contexts/dataGridContext.js +16 -0
- package/lib-amd/contexts/dataGridContext.js.map +1 -0
- package/lib-amd/contexts/rowIdContext.js +11 -0
- package/lib-amd/contexts/rowIdContext.js.map +1 -0
- package/lib-amd/contexts/tableContext.js +15 -0
- package/lib-amd/contexts/tableContext.js.map +1 -0
- package/lib-amd/contexts/tableHeaderContext.js +11 -0
- package/lib-amd/contexts/tableHeaderContext.js.map +1 -0
- package/lib-amd/hooks/createColumn.js +36 -0
- package/lib-amd/hooks/createColumn.js.map +1 -0
- package/lib-amd/hooks/index.js +11 -0
- package/lib-amd/hooks/index.js.map +1 -0
- package/lib-amd/hooks/selectionManager.js +82 -0
- package/lib-amd/hooks/selectionManager.js.map +1 -0
- package/lib-amd/hooks/types.js +5 -0
- package/lib-amd/hooks/types.js.map +1 -0
- package/lib-amd/hooks/useMeasureElement.js +46 -0
- package/lib-amd/hooks/useMeasureElement.js.map +1 -0
- package/lib-amd/hooks/useTableColumnResizeMouseHandler.js +50 -0
- package/lib-amd/hooks/useTableColumnResizeMouseHandler.js.map +1 -0
- package/lib-amd/hooks/useTableColumnResizeState.js +73 -0
- package/lib-amd/hooks/useTableColumnResizeState.js.map +1 -0
- package/lib-amd/hooks/useTableColumnSizing.js +56 -0
- package/lib-amd/hooks/useTableColumnSizing.js.map +1 -0
- package/lib-amd/hooks/useTableFeatures.js +39 -0
- package/lib-amd/hooks/useTableFeatures.js.map +1 -0
- package/lib-amd/hooks/useTableSelection.js +70 -0
- package/lib-amd/hooks/useTableSelection.js.map +1 -0
- package/lib-amd/hooks/useTableSort.js +74 -0
- package/lib-amd/hooks/useTableSort.js.map +1 -0
- package/lib-amd/index.js +107 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-amd/utils/columnResizeUtils.js +158 -0
- package/lib-amd/utils/columnResizeUtils.js.map +1 -0
- package/lib-commonjs/TableResizeHandle.js +8 -0
- package/lib-commonjs/TableResizeHandle.js.map +1 -0
- package/lib-commonjs/components/DataGrid/index.js +1 -0
- package/lib-commonjs/components/DataGrid/index.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGrid.js +15 -3
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +2 -1
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js +5 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +5 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +18 -4
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +3 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +3 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -4
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +20 -0
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -0
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js +6 -0
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -0
- package/lib-commonjs/components/TableResizeHandle/index.js +12 -0
- package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -0
- package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +22 -0
- package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -0
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +35 -0
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -0
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.js +56 -0
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +2 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib-commonjs/hooks/index.js +1 -0
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureElement.js +55 -0
- package/lib-commonjs/hooks/useMeasureElement.js.map +1 -0
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +57 -0
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -0
- package/lib-commonjs/hooks/useTableColumnResizeState.js +119 -0
- package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -0
- package/lib-commonjs/hooks/useTableColumnSizing.js +84 -0
- package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -0
- package/lib-commonjs/hooks/useTableFeatures.js +10 -2
- package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
- package/lib-commonjs/index.js +46 -2
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/columnResizeUtils.js +172 -0
- package/lib-commonjs/utils/columnResizeUtils.js.map +1 -0
- package/package.json +10 -11
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
define(["require", "exports", "react", "./useTableCell", "./renderTableCell", "./useTableCellStyles"], function (require, exports, React, useTableCell_1, renderTableCell_1, useTableCellStyles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TableCell = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* TableCell component
|
|
7
|
+
*/
|
|
8
|
+
exports.TableCell = React.forwardRef(function (props, ref) {
|
|
9
|
+
var state = useTableCell_1.useTableCell_unstable(props, ref);
|
|
10
|
+
useTableCellStyles_1.useTableCellStyles_unstable(state);
|
|
11
|
+
return renderTableCell_1.renderTableCell_unstable(state);
|
|
12
|
+
});
|
|
13
|
+
exports.TableCell.displayName = 'TableCell';
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=TableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/TableCell.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,SAAS,GAAwC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACxF,IAAM,KAAK,GAAG,oCAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEhD,gDAA2B,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,0CAAwB,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCell component\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/TableCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./TableCell", "./TableCell.types", "./renderTableCell", "./useTableCell", "./useTableCellStyles"], function (require, exports, tslib_1, TableCell_1, TableCell_types_1, renderTableCell_1, useTableCell_1, useTableCellStyles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(TableCell_1, exports);
|
|
5
|
+
tslib_1.__exportStar(TableCell_types_1, exports);
|
|
6
|
+
tslib_1.__exportStar(renderTableCell_1, exports);
|
|
7
|
+
tslib_1.__exportStar(useTableCell_1, exports);
|
|
8
|
+
tslib_1.__exportStar(useTableCellStyles_1, exports);
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/index.ts"],"names":[],"mappings":";;;IAAA,2CAA4B;IAC5B,iDAAkC;IAClC,iDAAkC;IAClC,8CAA+B;IAC/B,oDAAqC","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.renderTableCell_unstable = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Render the final JSX of TableCell
|
|
7
|
+
*/
|
|
8
|
+
var renderTableCell_unstable = function (state) {
|
|
9
|
+
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
|
10
|
+
return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root));
|
|
11
|
+
};
|
|
12
|
+
exports.renderTableCell_unstable = renderTableCell_unstable;
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=renderTableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderTableCell.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/renderTableCell.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,wBAAwB,GAAG,UAAC,KAAqB;QACtD,IAAA,KAAuB,0BAAQ,CAAiB,KAAK,CAAC,EAApD,KAAK,WAAA,EAAE,SAAS,eAAoC,CAAC;QAE7D,OAAO,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CAAC;IAC5C,CAAC,CAAC;IAJW,QAAA,wBAAwB,4BAInC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n const { slots, slotProps } = getSlots<TableCellSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "@fluentui/react-utilities", "../../contexts/tableContext"], function (require, exports, tslib_1, react_utilities_1, tableContext_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useTableCell_unstable = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Create the state required to render TableCell.
|
|
7
|
+
*
|
|
8
|
+
* The returned state can be modified with hooks such as useTableCellStyles_unstable,
|
|
9
|
+
* before being passed to renderTableCell_unstable.
|
|
10
|
+
*
|
|
11
|
+
* @param props - props from this instance of TableCell
|
|
12
|
+
* @param ref - reference to root HTMLElement of TableCell
|
|
13
|
+
*/
|
|
14
|
+
var useTableCell_unstable = function (props, ref) {
|
|
15
|
+
var _a;
|
|
16
|
+
var _b = tableContext_1.useTableContext(), noNativeElements = _b.noNativeElements, size = _b.size;
|
|
17
|
+
var rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'td';
|
|
18
|
+
return {
|
|
19
|
+
components: {
|
|
20
|
+
root: rootComponent,
|
|
21
|
+
},
|
|
22
|
+
root: react_utilities_1.getNativeElementProps(rootComponent, tslib_1.__assign({ ref: ref, role: rootComponent === 'div' ? 'cell' : undefined }, props)),
|
|
23
|
+
noNativeElements: noNativeElements,
|
|
24
|
+
size: size,
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.useTableCell_unstable = useTableCell_unstable;
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=useTableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableCell.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/useTableCell.ts"],"names":[],"mappings":";;;;IAKA;;;;;;;;OAQG;IACI,IAAM,qBAAqB,GAAG,UAAC,KAAqB,EAAE,GAA2B;;QAChF,IAAA,KAA6B,8BAAe,EAAE,EAA5C,gBAAgB,sBAAA,EAAE,IAAI,UAAsB,CAAC;QAErD,IAAM,aAAa,GAAG,CAAA,MAAA,KAAK,CAAC,EAAE,mCAAI,gBAAgB,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QAElE,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;aACpB;YACD,IAAI,EAAE,uCAAqB,CAAC,aAAa,qBACvC,GAAG,KAAA,EACH,IAAI,EAAE,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,IAC/C,KAAK,EACR;YACF,gBAAgB,kBAAA;YAChB,IAAI,MAAA;SACL,CAAC;IACJ,CAAC,CAAC;IAjBW,QAAA,qBAAqB,yBAiBhC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellProps, TableCellState } from './TableCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableCell.\n *\n * The returned state can be modified with hooks such as useTableCellStyles_unstable,\n * before being passed to renderTableCell_unstable.\n *\n * @param props - props from this instance of TableCell\n * @param ref - reference to root HTMLElement of TableCell\n */\nexport const useTableCell_unstable = (props: TableCellProps, ref: React.Ref<HTMLElement>): TableCellState => {\n const { noNativeElements, size } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n noNativeElements,\n size,\n };\n};\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-theme", "@fluentui/react-tabster"], function (require, exports, tslib_1, react_1, react_theme_1, react_tabster_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useTableCellStyles_unstable = exports.tableCellClassNames = exports.tableCellClassName = void 0;
|
|
5
|
+
exports.tableCellClassName = 'fui-TableCell';
|
|
6
|
+
exports.tableCellClassNames = {
|
|
7
|
+
root: exports.tableCellClassName,
|
|
8
|
+
};
|
|
9
|
+
var useTableLayoutStyles = react_1.makeStyles({
|
|
10
|
+
root: {
|
|
11
|
+
display: 'table-cell',
|
|
12
|
+
verticalAlign: 'middle',
|
|
13
|
+
},
|
|
14
|
+
medium: {
|
|
15
|
+
height: '44px',
|
|
16
|
+
},
|
|
17
|
+
small: {
|
|
18
|
+
height: '34px',
|
|
19
|
+
},
|
|
20
|
+
'extra-small': {
|
|
21
|
+
height: '24px',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
var useFlexLayoutStyles = react_1.makeStyles({
|
|
25
|
+
root: tslib_1.__assign({ display: 'flex', minWidth: '0px', alignItems: 'center' }, react_1.shorthands.flex(1, 1, '0px')),
|
|
26
|
+
medium: {
|
|
27
|
+
minHeight: '44px',
|
|
28
|
+
},
|
|
29
|
+
small: {
|
|
30
|
+
minHeight: '34px',
|
|
31
|
+
},
|
|
32
|
+
'extra-small': {
|
|
33
|
+
minHeight: '24px',
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Styles for the root slot
|
|
38
|
+
*/
|
|
39
|
+
var useStyles = react_1.makeStyles({
|
|
40
|
+
root: tslib_1.__assign(tslib_1.__assign({ backgroundColor: 'inherit', position: 'relative' }, react_1.shorthands.padding('0px', react_theme_1.tokens.spacingHorizontalS)), react_tabster_1.createCustomFocusIndicatorStyle(tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.outline('2px', 'solid', react_theme_1.tokens.colorStrokeFocus2)), react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusMedium)), { selector: 'focus', enableOutline: true })),
|
|
41
|
+
});
|
|
42
|
+
/**
|
|
43
|
+
* Apply styling to the TableCell slots based on the state
|
|
44
|
+
*/
|
|
45
|
+
var useTableCellStyles_unstable = function (state) {
|
|
46
|
+
var styles = useStyles();
|
|
47
|
+
var layoutStyles = {
|
|
48
|
+
table: useTableLayoutStyles(),
|
|
49
|
+
flex: useFlexLayoutStyles(),
|
|
50
|
+
};
|
|
51
|
+
state.root.className = react_1.mergeClasses(exports.tableCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size], state.root.className);
|
|
52
|
+
return state;
|
|
53
|
+
};
|
|
54
|
+
exports.useTableCellStyles_unstable = useTableCellStyles_unstable;
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=useTableCellStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableCellStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/useTableCellStyles.ts"],"names":[],"mappings":";;;;IAMa,QAAA,kBAAkB,GAAG,eAAe,CAAC;IACrC,QAAA,mBAAmB,GAAmC;QACjE,IAAI,EAAE,0BAAkB;KACzB,CAAC;IAEF,IAAM,oBAAoB,GAAG,kBAAU,CAAC;QACtC,IAAI,EAAE;YACJ,OAAO,EAAE,YAAY;YACrB,aAAa,EAAE,QAAQ;SACxB;QAED,MAAM,EAAE;YACN,MAAM,EAAE,MAAM;SACf;QAED,KAAK,EAAE;YACL,MAAM,EAAE,MAAM;SACf;QAED,aAAa,EAAE;YACb,MAAM,EAAE,MAAM;SACf;KACF,CAAC,CAAC;IAEH,IAAM,mBAAmB,GAAG,kBAAU,CAAC;QACrC,IAAI,qBACF,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,KAAK,EACf,UAAU,EAAE,QAAQ,IACjB,kBAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAChC;QAED,MAAM,EAAE;YACN,SAAS,EAAE,MAAM;SAClB;QAED,KAAK,EAAE;YACL,SAAS,EAAE,MAAM;SAClB;QAED,aAAa,EAAE;YACb,SAAS,EAAE,MAAM;SAClB;KACF,CAAC,CAAC;IAEH;;OAEG;IACH,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,sCACF,eAAe,EAAE,SAAS,EAC1B,QAAQ,EAAE,UAAU,IACjB,kBAAU,CAAC,OAAO,CAAC,KAAK,EAAE,oBAAM,CAAC,kBAAkB,CAAC,GAEpD,+CAA+B,uCAE3B,kBAAU,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,oBAAM,CAAC,iBAAiB,CAAC,GAC5D,kBAAU,CAAC,YAAY,CAAC,oBAAM,CAAC,kBAAkB,CAAC,GAEvD,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAC3C,CACF;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,2BAA2B,GAAG,UAAC,KAAqB;QAC/D,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,IAAM,YAAY,GAAG;YACnB,KAAK,EAAE,oBAAoB,EAAE;YAC7B,IAAI,EAAE,mBAAmB,EAAE;SAC5B,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,2BAAmB,CAAC,IAAI,EACxB,MAAM,CAAC,IAAI,EACX,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EACzE,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EACvF,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAdW,QAAA,2BAA2B,+BActC","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { TableCellSlots, TableCellState } from './TableCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellClassName = 'fui-TableCell';\nexport const tableCellClassNames: SlotClassNames<TableCellSlots> = {\n root: tableCellClassName,\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n },\n\n medium: {\n height: '44px',\n },\n\n small: {\n height: '34px',\n },\n\n 'extra-small': {\n height: '24px',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n minWidth: '0px',\n alignItems: 'center',\n ...shorthands.flex(1, 1, '0px'),\n },\n\n medium: {\n minHeight: '44px',\n },\n\n small: {\n minHeight: '34px',\n },\n\n 'extra-small': {\n minHeight: '24px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n backgroundColor: 'inherit',\n position: 'relative',\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\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\n/**\n * Apply styling to the TableCell slots based on the state\n */\nexport const useTableCellStyles_unstable = (state: TableCellState): TableCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableCellClassNames.root,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size],\n state.root.className,\n );\n return state;\n};\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
define(["require", "exports", "react", "./useTableCellActions", "./renderTableCellActions", "./useTableCellActionsStyles"], function (require, exports, React, useTableCellActions_1, renderTableCellActions_1, useTableCellActionsStyles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TableCellActions = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* TableCellActions component
|
|
7
|
+
*/
|
|
8
|
+
exports.TableCellActions = React.forwardRef(function (props, ref) {
|
|
9
|
+
var state = useTableCellActions_1.useTableCellActions_unstable(props, ref);
|
|
10
|
+
useTableCellActionsStyles_1.useTableCellActionsStyles_unstable(state);
|
|
11
|
+
return renderTableCellActions_1.renderTableCellActions_unstable(state);
|
|
12
|
+
});
|
|
13
|
+
exports.TableCellActions.displayName = 'TableCellActions';
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=TableCellActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellActions.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/TableCellActions.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,gBAAgB,GAA+C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACtG,IAAM,KAAK,GAAG,kDAA4B,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEvD,8DAAkC,CAAC,KAAK,CAAC,CAAC;QAC1C,OAAO,wDAA+B,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTableCellActions_unstable } from './useTableCellActions';\nimport { renderTableCellActions_unstable } from './renderTableCellActions';\nimport { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles';\nimport type { TableCellActionsProps } from './TableCellActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellActions component\n */\nexport const TableCellActions: ForwardRefComponent<TableCellActionsProps> = React.forwardRef((props, ref) => {\n const state = useTableCellActions_unstable(props, ref);\n\n useTableCellActionsStyles_unstable(state);\n return renderTableCellActions_unstable(state);\n});\n\nTableCellActions.displayName = 'TableCellActions';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellActions.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/TableCellActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellActionsSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * TableCellActions Props\n */\nexport type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {\n /**\n * When true, the actions are always visible regardless of row hover.\n * Can be useful keeping the actions visible when a popout surface is opened.\n */\n visible?: boolean;\n};\n\n/**\n * State used in rendering TableCellActions\n */\nexport type TableCellActionsState = ComponentState<TableCellActionsSlots> &\n Pick<Required<TableCellActionsProps>, 'visible'>;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./TableCellActions", "./TableCellActions.types", "./renderTableCellActions", "./useTableCellActions", "./useTableCellActionsStyles"], function (require, exports, tslib_1, TableCellActions_1, TableCellActions_types_1, renderTableCellActions_1, useTableCellActions_1, useTableCellActionsStyles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(TableCellActions_1, exports);
|
|
5
|
+
tslib_1.__exportStar(TableCellActions_types_1, exports);
|
|
6
|
+
tslib_1.__exportStar(renderTableCellActions_1, exports);
|
|
7
|
+
tslib_1.__exportStar(useTableCellActions_1, exports);
|
|
8
|
+
tslib_1.__exportStar(useTableCellActionsStyles_1, exports);
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/index.ts"],"names":[],"mappings":";;;IAAA,kDAAmC;IACnC,wDAAyC;IACzC,wDAAyC;IACzC,qDAAsC;IACtC,2DAA4C","sourcesContent":["export * from './TableCellActions';\nexport * from './TableCellActions.types';\nexport * from './renderTableCellActions';\nexport * from './useTableCellActions';\nexport * from './useTableCellActionsStyles';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.renderTableCellActions_unstable = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Render the final JSX of TableCellActions
|
|
7
|
+
*/
|
|
8
|
+
var renderTableCellActions_unstable = function (state) {
|
|
9
|
+
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
|
10
|
+
return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root));
|
|
11
|
+
};
|
|
12
|
+
exports.renderTableCellActions_unstable = renderTableCellActions_unstable;
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=renderTableCellActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderTableCellActions.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/renderTableCellActions.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,+BAA+B,GAAG,UAAC,KAA4B;QACpE,IAAA,KAAuB,0BAAQ,CAAwB,KAAK,CAAC,EAA3D,KAAK,WAAA,EAAE,SAAS,eAA2C,CAAC;QAEpE,OAAO,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CAAC;IAC5C,CAAC,CAAC;IAJW,QAAA,+BAA+B,mCAI1C","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n const { slots, slotProps } = getSlots<TableCellActionsSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "@fluentui/react-utilities"], function (require, exports, tslib_1, react_utilities_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useTableCellActions_unstable = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Create the state required to render TableCellActions.
|
|
7
|
+
*
|
|
8
|
+
* The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
|
|
9
|
+
* before being passed to renderTableCellActions_unstable.
|
|
10
|
+
*
|
|
11
|
+
* @param props - props from this instance of TableCellActions
|
|
12
|
+
* @param ref - reference to root HTMLElement of TableCellActions
|
|
13
|
+
*/
|
|
14
|
+
var useTableCellActions_unstable = function (props, ref) {
|
|
15
|
+
var _a;
|
|
16
|
+
return {
|
|
17
|
+
components: {
|
|
18
|
+
root: 'div',
|
|
19
|
+
},
|
|
20
|
+
root: react_utilities_1.getNativeElementProps('div', tslib_1.__assign({ ref: ref }, props)),
|
|
21
|
+
visible: (_a = props.visible) !== null && _a !== void 0 ? _a : false,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.useTableCellActions_unstable = useTableCellActions_unstable;
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=useTableCellActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableCellActions.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/useTableCellActions.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;;OAQG;IACI,IAAM,4BAA4B,GAAG,UAC1C,KAA4B,EAC5B,GAA2B;;QAE3B,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YACD,IAAI,EAAE,uCAAqB,CAAC,KAAK,qBAC/B,GAAG,KAAA,IACA,KAAK,EACR;YACF,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,KAAK;SAChC,CAAC;IACJ,CAAC,CAAC;IAdW,QAAA,4BAA4B,gCAcvC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellActionsProps, TableCellActionsState } from './TableCellActions.types';\n\n/**\n * Create the state required to render TableCellActions.\n *\n * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,\n * before being passed to renderTableCellActions_unstable.\n *\n * @param props - props from this instance of TableCellActions\n * @param ref - reference to root HTMLElement of TableCellActions\n */\nexport const useTableCellActions_unstable = (\n props: TableCellActionsProps,\n ref: React.Ref<HTMLElement>,\n): TableCellActionsState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n visible: props.visible ?? false,\n };\n};\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
define(["require", "exports", "@griffel/react"], function (require, exports, react_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useTableCellActionsStyles_unstable = exports.tableCellActionsClassNames = void 0;
|
|
5
|
+
exports.tableCellActionsClassNames = {
|
|
6
|
+
root: 'fui-TableCellActions',
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Styles for the root slot
|
|
10
|
+
*/
|
|
11
|
+
var useStyles = react_1.makeStyles({
|
|
12
|
+
root: {
|
|
13
|
+
backgroundColor: 'inherit',
|
|
14
|
+
position: 'absolute',
|
|
15
|
+
right: '0px',
|
|
16
|
+
top: '50%',
|
|
17
|
+
transform: 'translateY(-50%)',
|
|
18
|
+
opacity: 0,
|
|
19
|
+
marginLeft: 'auto',
|
|
20
|
+
},
|
|
21
|
+
visible: {
|
|
22
|
+
opacity: 1,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Apply styling to the TableCellActions slots based on the state
|
|
27
|
+
*/
|
|
28
|
+
var useTableCellActionsStyles_unstable = function (state) {
|
|
29
|
+
var styles = useStyles();
|
|
30
|
+
state.root.className = react_1.mergeClasses(exports.tableCellActionsClassNames.root, styles.root, state.visible && styles.visible, state.root.className);
|
|
31
|
+
return state;
|
|
32
|
+
};
|
|
33
|
+
exports.useTableCellActionsStyles_unstable = useTableCellActionsStyles_unstable;
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=useTableCellActionsStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableCellActionsStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/useTableCellActionsStyles.ts"],"names":[],"mappings":";;;;IAIa,QAAA,0BAA0B,GAA0C;QAC/E,IAAI,EAAE,sBAAsB;KAC7B,CAAC;IAEF;;OAEG;IACH,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,EAAE;YACJ,eAAe,EAAE,SAAS;YAC1B,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,KAAK;YACV,SAAS,EAAE,kBAAkB;YAC7B,OAAO,EAAE,CAAC;YACV,UAAU,EAAE,MAAM;SACnB;QAED,OAAO,EAAE;YACP,OAAO,EAAE,CAAC;SACX;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,kCAAkC,GAAG,UAAC,KAA4B;QAC7E,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,kCAA0B,CAAC,IAAI,EAC/B,MAAM,CAAC,IAAI,EACX,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAC/B,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAVW,QAAA,kCAAkC,sCAU7C","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TableCellActionsSlots, TableCellActionsState } from './TableCellActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots> = {\n root: 'fui-TableCellActions',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n backgroundColor: 'inherit',\n position: 'absolute',\n right: '0px',\n top: '50%',\n transform: 'translateY(-50%)',\n opacity: 0,\n marginLeft: 'auto',\n },\n\n visible: {\n opacity: 1,\n },\n});\n\n/**\n * Apply styling to the TableCellActions slots based on the state\n */\nexport const useTableCellActionsStyles_unstable = (state: TableCellActionsState): TableCellActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n tableCellActionsClassNames.root,\n styles.root,\n state.visible && styles.visible,\n state.root.className,\n );\n\n return state;\n};\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
define(["require", "exports", "react", "./useTableCellLayout", "./renderTableCellLayout", "./useTableCellLayoutStyles", "./useTableCellLayoutContextValues"], function (require, exports, React, useTableCellLayout_1, renderTableCellLayout_1, useTableCellLayoutStyles_1, useTableCellLayoutContextValues_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TableCellLayout = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* TableCellLayout component
|
|
7
|
+
*/
|
|
8
|
+
exports.TableCellLayout = React.forwardRef(function (props, ref) {
|
|
9
|
+
var state = useTableCellLayout_1.useTableCellLayout_unstable(props, ref);
|
|
10
|
+
useTableCellLayoutStyles_1.useTableCellLayoutStyles_unstable(state);
|
|
11
|
+
return renderTableCellLayout_1.renderTableCellLayout_unstable(state, useTableCellLayoutContextValues_1.useTableCellLayoutContextValues_unstable(state));
|
|
12
|
+
});
|
|
13
|
+
exports.TableCellLayout.displayName = 'TableCellLayout';
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=TableCellLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellLayout.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/TableCellLayout.tsx"],"names":[],"mappings":";;;;IAQA;;OAEG;IACU,QAAA,eAAe,GAA8C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACpG,IAAM,KAAK,GAAG,gDAA2B,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEtD,4DAAiC,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,sDAA8B,CAAC,KAAK,EAAE,0EAAwC,CAAC,KAAK,CAAC,CAAC,CAAC;IAChG,CAAC,CAAC,CAAC;IAEH,uBAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTableCellLayout_unstable } from './useTableCellLayout';\nimport { renderTableCellLayout_unstable } from './renderTableCellLayout';\nimport { useTableCellLayoutStyles_unstable } from './useTableCellLayoutStyles';\nimport { useTableCellLayoutContextValues_unstable } from './useTableCellLayoutContextValues';\nimport type { TableCellLayoutProps } from './TableCellLayout.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellLayout component\n */\nexport const TableCellLayout: ForwardRefComponent<TableCellLayoutProps> = React.forwardRef((props, ref) => {\n const state = useTableCellLayout_unstable(props, ref);\n\n useTableCellLayoutStyles_unstable(state);\n return renderTableCellLayout_unstable(state, useTableCellLayoutContextValues_unstable(state));\n});\n\nTableCellLayout.displayName = 'TableCellLayout';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellLayout.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/TableCellLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { AvatarSize } from '@fluentui/react-avatar';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellLayoutContextValues = {\n avatar: {\n size?: AvatarSize;\n };\n};\n\nexport type TableCellLayoutSlots = {\n root: Slot<'div'>;\n\n /**\n * Slot for an icon or other visual element\n */\n media: Slot<'span'>;\n\n /**\n * Main text for the table cell. Children of the root slot are automatically rendered here\n */\n main: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n description: Slot<'span'>;\n\n /**\n * A layout wrapper for the main and description slots\n */\n content: Slot<'div'>;\n};\n\n/**\n * TableCellLayout Props\n */\nexport type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {\n /**\n * Renders design variants of the table cell\n * @default undefined\n */\n appearance?: 'primary';\n\n /**\n * Renders content with overflow: hidden and text-overflow: ellipsis\n */\n truncate?: boolean;\n};\n\n/**\n * State used in rendering TableCellLayout\n */\nexport type TableCellLayoutState = ComponentState<TableCellLayoutSlots> &\n Pick<TableCellLayoutProps, 'appearance' | 'truncate'> & { avatarSize: AvatarSize | undefined } & Pick<\n TableContextValue,\n 'size'\n >;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./TableCellLayout", "./TableCellLayout.types", "./renderTableCellLayout", "./useTableCellLayout", "./useTableCellLayoutStyles"], function (require, exports, tslib_1, TableCellLayout_1, TableCellLayout_types_1, renderTableCellLayout_1, useTableCellLayout_1, useTableCellLayoutStyles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(TableCellLayout_1, exports);
|
|
5
|
+
tslib_1.__exportStar(TableCellLayout_types_1, exports);
|
|
6
|
+
tslib_1.__exportStar(renderTableCellLayout_1, exports);
|
|
7
|
+
tslib_1.__exportStar(useTableCellLayout_1, exports);
|
|
8
|
+
tslib_1.__exportStar(useTableCellLayoutStyles_1, exports);
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/index.ts"],"names":[],"mappings":";;;IAAA,iDAAkC;IAClC,uDAAwC;IACxC,uDAAwC;IACxC,oDAAqC;IACrC,0DAA2C","sourcesContent":["export * from './TableCellLayout';\nexport * from './TableCellLayout.types';\nexport * from './renderTableCellLayout';\nexport * from './useTableCellLayout';\nexport * from './useTableCellLayoutStyles';\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "@fluentui/react-avatar"], function (require, exports, tslib_1, React, react_utilities_1, react_avatar_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.renderTableCellLayout_unstable = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Render the final JSX of TableCellLayout
|
|
7
|
+
*/
|
|
8
|
+
var renderTableCellLayout_unstable = function (state, contextValues) {
|
|
9
|
+
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
|
10
|
+
return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
|
|
11
|
+
slots.media && (React.createElement(react_avatar_1.AvatarContextProvider, { value: contextValues.avatar },
|
|
12
|
+
React.createElement(slots.media, tslib_1.__assign({}, slotProps.media)))),
|
|
13
|
+
slots.content && (React.createElement(slots.content, tslib_1.__assign({}, slotProps.content),
|
|
14
|
+
slots.main && React.createElement(slots.main, tslib_1.__assign({}, slotProps.main), slotProps.root.children),
|
|
15
|
+
slots.description && React.createElement(slots.description, tslib_1.__assign({}, slotProps.description))))));
|
|
16
|
+
};
|
|
17
|
+
exports.renderTableCellLayout_unstable = renderTableCellLayout_unstable;
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=renderTableCellLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderTableCellLayout.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/renderTableCellLayout.tsx"],"names":[],"mappings":";;;;IAKA;;OAEG;IACI,IAAM,8BAA8B,GAAG,UAC5C,KAA2B,EAC3B,aAA2C;QAErC,IAAA,KAAuB,0BAAQ,CAAuB,KAAK,CAAC,EAA1D,KAAK,WAAA,EAAE,SAAS,eAA0C,CAAC;QAEnE,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI;YAC3B,KAAK,CAAC,KAAK,IAAI,CACd,oBAAC,oCAAqB,IAAC,KAAK,EAAE,aAAa,CAAC,MAAM;gBAChD,oBAAC,KAAK,CAAC,KAAK,uBAAK,SAAS,CAAC,KAAK,EAAI,CACd,CACzB;YACA,KAAK,CAAC,OAAO,IAAI,CAChB,oBAAC,KAAK,CAAC,OAAO,uBAAK,SAAS,CAAC,OAAO;gBACjC,KAAK,CAAC,IAAI,IAAI,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAc;gBACpF,KAAK,CAAC,WAAW,IAAI,oBAAC,KAAK,CAAC,WAAW,uBAAK,SAAS,CAAC,WAAW,EAAI,CACxD,CACjB,CACU,CACd,CAAC;IACJ,CAAC,CAAC;IArBW,QAAA,8BAA8B,kCAqBzC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\nimport type { TableCellLayoutState, TableCellLayoutSlots, TableCellLayoutContextValues } from './TableCellLayout.types';\n\n/**\n * Render the final JSX of TableCellLayout\n */\nexport const renderTableCellLayout_unstable = (\n state: TableCellLayoutState,\n contextValues: TableCellLayoutContextValues,\n) => {\n const { slots, slotProps } = getSlots<TableCellLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <slots.media {...slotProps.media} />\n </AvatarContextProvider>\n )}\n {slots.content && (\n <slots.content {...slotProps.content}>\n {slots.main && <slots.main {...slotProps.main}>{slotProps.root.children}</slots.main>}\n {slots.description && <slots.description {...slotProps.description} />}\n </slots.content>\n )}\n </slots.root>\n );\n};\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "@fluentui/react-utilities", "../../contexts/tableContext"], function (require, exports, tslib_1, react_utilities_1, tableContext_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useTableCellLayout_unstable = void 0;
|
|
5
|
+
var tableAvatarSizeMap = {
|
|
6
|
+
medium: 32,
|
|
7
|
+
small: 24,
|
|
8
|
+
'extra-small': 20,
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Create the state required to render TableCellLayout.
|
|
12
|
+
*
|
|
13
|
+
* The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
|
|
14
|
+
* before being passed to renderTableCellLayout_unstable.
|
|
15
|
+
*
|
|
16
|
+
* @param props - props from this instance of TableCellLayout
|
|
17
|
+
* @param ref - reference to root HTMLElement of TableCellLayout
|
|
18
|
+
*/
|
|
19
|
+
var useTableCellLayout_unstable = function (props, ref) {
|
|
20
|
+
var size = tableContext_1.useTableContext().size;
|
|
21
|
+
return {
|
|
22
|
+
components: {
|
|
23
|
+
root: 'div',
|
|
24
|
+
main: 'span',
|
|
25
|
+
description: 'span',
|
|
26
|
+
content: 'div',
|
|
27
|
+
media: 'span',
|
|
28
|
+
},
|
|
29
|
+
root: react_utilities_1.getNativeElementProps('div', tslib_1.__assign({ ref: ref }, props)),
|
|
30
|
+
appearance: props.appearance,
|
|
31
|
+
truncate: props.truncate,
|
|
32
|
+
main: react_utilities_1.resolveShorthand(props.main, { required: true }),
|
|
33
|
+
media: react_utilities_1.resolveShorthand(props.media),
|
|
34
|
+
description: react_utilities_1.resolveShorthand(props.description),
|
|
35
|
+
content: react_utilities_1.resolveShorthand(props.content, { required: !!props.description || !!props.children }),
|
|
36
|
+
avatarSize: tableAvatarSizeMap[size],
|
|
37
|
+
size: size,
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
exports.useTableCellLayout_unstable = useTableCellLayout_unstable;
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=useTableCellLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableCellLayout.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayout.ts"],"names":[],"mappings":";;;;IAKA,IAAM,kBAAkB,GAAG;QACzB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,aAAa,EAAE,EAAE;KACT,CAAC;IAEX;;;;;;;;OAQG;IACI,IAAM,2BAA2B,GAAG,UACzC,KAA2B,EAC3B,GAA2B;QAEnB,IAAA,IAAI,GAAK,8BAAe,EAAE,KAAtB,CAAuB;QAEnC,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,MAAM;gBACnB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,MAAM;aACd;YACD,IAAI,EAAE,uCAAqB,CAAC,KAAK,qBAAI,GAAG,KAAA,IAAK,KAAK,EAAG;YACrD,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,IAAI,EAAE,kCAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACtD,KAAK,EAAE,kCAAgB,CAAC,KAAK,CAAC,KAAK,CAAC;YACpC,WAAW,EAAE,kCAAgB,CAAC,KAAK,CAAC,WAAW,CAAC;YAChD,OAAO,EAAE,kCAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC/F,UAAU,EAAE,kBAAkB,CAAC,IAAI,CAAC;YACpC,IAAI,MAAA;SACL,CAAC;IACJ,CAAC,CAAC;IAxBW,QAAA,2BAA2B,+BAwBtC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n 'extra-small': 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n content: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n truncate: props.truncate,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n content: resolveShorthand(props.content, { required: !!props.description || !!props.children }),\n avatarSize: tableAvatarSizeMap[size],\n size,\n };\n};\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
define(["require", "exports", "react"], function (require, exports, React) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useTableCellLayoutContextValues_unstable = void 0;
|
|
5
|
+
function useTableCellLayoutContextValues_unstable(state) {
|
|
6
|
+
var avatarSize = state.avatarSize;
|
|
7
|
+
var avatar = React.useMemo(function () { return ({
|
|
8
|
+
size: avatarSize,
|
|
9
|
+
}); }, [avatarSize]);
|
|
10
|
+
return {
|
|
11
|
+
avatar: avatar,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.useTableCellLayoutContextValues_unstable = useTableCellLayoutContextValues_unstable;
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=useTableCellLayoutContextValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableCellLayoutContextValues.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutContextValues.ts"],"names":[],"mappings":";;;;IAGA,SAAgB,wCAAwC,CAAC,KAA2B;QAC1E,IAAA,UAAU,GAAK,KAAK,WAAV,CAAW;QAE7B,IAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,cAAM,OAAA,CAAC;YACL,IAAI,EAAE,UAAU;SACjB,CAAC,EAFI,CAEJ,EACF,CAAC,UAAU,CAAC,CACb,CAAC;QAEF,OAAO;YACL,MAAM,QAAA;SACP,CAAC;IACJ,CAAC;IAbD,4FAaC","sourcesContent":["import * as React from 'react';\nimport type { TableCellLayoutState, TableCellLayoutContextValues } from './TableCellLayout.types';\n\nexport function useTableCellLayoutContextValues_unstable(state: TableCellLayoutState): TableCellLayoutContextValues {\n const { avatarSize } = state;\n\n const avatar = React.useMemo(\n () => ({\n size: avatarSize,\n }),\n [avatarSize],\n );\n\n return {\n avatar,\n };\n}\n"]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-theme", "@fluentui/react-theme"], function (require, exports, tslib_1, react_1, react_theme_1, react_theme_2) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useTableCellLayoutStyles_unstable = exports.tableCellLayoutClassNames = void 0;
|
|
5
|
+
exports.tableCellLayoutClassNames = {
|
|
6
|
+
root: 'fui-TableCellLayout',
|
|
7
|
+
media: 'fui-TableCellLayout__media',
|
|
8
|
+
main: 'fui-TableCellLayout__main',
|
|
9
|
+
description: 'fui-TableCellLayout__description',
|
|
10
|
+
content: 'fui-TableCellLayout__content',
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Styles for the root slot
|
|
14
|
+
*/
|
|
15
|
+
var useStyles = react_1.makeStyles({
|
|
16
|
+
root: tslib_1.__assign(tslib_1.__assign({ display: 'flex', alignItems: 'center' }, react_1.shorthands.gap(react_theme_1.tokens.spacingHorizontalS)), react_1.shorthands.flex(1, 1, '0px')),
|
|
17
|
+
rootTruncate: {
|
|
18
|
+
overflowX: 'hidden',
|
|
19
|
+
},
|
|
20
|
+
content: {
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
},
|
|
24
|
+
contentTruncate: {
|
|
25
|
+
overflowX: 'hidden',
|
|
26
|
+
},
|
|
27
|
+
media: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
},
|
|
31
|
+
mediaExtraSmall: {
|
|
32
|
+
fontSize: '16px',
|
|
33
|
+
},
|
|
34
|
+
mediaSmallAndMedium: {
|
|
35
|
+
fontSize: '20px',
|
|
36
|
+
},
|
|
37
|
+
mediaPrimary: {
|
|
38
|
+
fontSize: '24px',
|
|
39
|
+
},
|
|
40
|
+
mainPrimary: {
|
|
41
|
+
fontWeight: react_theme_1.tokens.fontWeightSemibold,
|
|
42
|
+
},
|
|
43
|
+
mainTruncate: {
|
|
44
|
+
overflowX: 'hidden',
|
|
45
|
+
whiteSpace: 'nowrap',
|
|
46
|
+
textOverflow: 'ellipsis',
|
|
47
|
+
},
|
|
48
|
+
description: tslib_1.__assign({ color: react_theme_1.tokens.colorNeutralForeground2 }, react_theme_2.typographyStyles.caption1),
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Apply styling to the TableCellLayout slots based on the state
|
|
52
|
+
*/
|
|
53
|
+
var useTableCellLayoutStyles_unstable = function (state) {
|
|
54
|
+
var styles = useStyles();
|
|
55
|
+
var truncate = state.truncate;
|
|
56
|
+
state.root.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.root, styles.root, truncate && styles.rootTruncate, state.root.className);
|
|
57
|
+
var primary = state.appearance === 'primary';
|
|
58
|
+
if (state.media) {
|
|
59
|
+
var mediaSizedStyles = {
|
|
60
|
+
small: styles.mediaSmallAndMedium,
|
|
61
|
+
medium: styles.mediaSmallAndMedium,
|
|
62
|
+
'extra-small': styles.mediaExtraSmall,
|
|
63
|
+
};
|
|
64
|
+
state.media.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.media, styles.media, mediaSizedStyles[state.size], primary && styles.mediaPrimary, state.media.className);
|
|
65
|
+
}
|
|
66
|
+
if (state.main) {
|
|
67
|
+
state.main.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.main, truncate && styles.mainTruncate, primary && styles.mainPrimary, state.main.className);
|
|
68
|
+
}
|
|
69
|
+
if (state.description) {
|
|
70
|
+
state.description.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.description, styles.description, state.description.className);
|
|
71
|
+
}
|
|
72
|
+
if (state.content) {
|
|
73
|
+
state.content.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.content, styles.content, truncate && styles.contentTruncate, state.content.className);
|
|
74
|
+
}
|
|
75
|
+
return state;
|
|
76
|
+
};
|
|
77
|
+
exports.useTableCellLayoutStyles_unstable = useTableCellLayoutStyles_unstable;
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=useTableCellLayoutStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableCellLayoutStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"names":[],"mappings":";;;;IAMa,QAAA,yBAAyB,GAAyC;QAC7E,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,4BAA4B;QACnC,IAAI,EAAE,2BAA2B;QACjC,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,8BAA8B;KACxC,CAAC;IAEF;;OAEG;IACH,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,sCACF,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,QAAQ,IACjB,kBAAU,CAAC,GAAG,CAAC,oBAAM,CAAC,kBAAkB,CAAC,GACzC,kBAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAChC;QAED,YAAY,EAAE;YACZ,SAAS,EAAE,QAAQ;SACpB;QAED,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;SACxB;QAED,eAAe,EAAE;YACf,SAAS,EAAE,QAAQ;SACpB;QAED,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;SACrB;QAED,eAAe,EAAE;YACf,QAAQ,EAAE,MAAM;SACjB;QAED,mBAAmB,EAAE;YACnB,QAAQ,EAAE,MAAM;SACjB;QAED,YAAY,EAAE;YACZ,QAAQ,EAAE,MAAM;SACjB;QAED,WAAW,EAAE;YACX,UAAU,EAAE,oBAAM,CAAC,kBAAkB;SACtC;QAED,YAAY,EAAE;YACZ,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE,UAAU;SACzB;QAED,WAAW,qBACT,KAAK,EAAE,oBAAM,CAAC,uBAAuB,IAClC,8BAAgB,CAAC,QAAQ,CAC7B;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,iCAAiC,GAAG,UAAC,KAA2B;QAC3E,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QACnB,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;QAE3B,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,iCAAyB,CAAC,IAAI,EAC9B,MAAM,CAAC,IAAI,EACX,QAAQ,IAAI,MAAM,CAAC,YAAY,EAC/B,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;QACF,IAAM,OAAO,GAAG,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC;QAE/C,IAAI,KAAK,CAAC,KAAK,EAAE;YACf,IAAM,gBAAgB,GAAG;gBACvB,KAAK,EAAE,MAAM,CAAC,mBAAmB;gBACjC,MAAM,EAAE,MAAM,CAAC,mBAAmB;gBAClC,aAAa,EAAE,MAAM,CAAC,eAAe;aACtC,CAAC;YAEF,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,oBAAY,CAClC,iCAAyB,CAAC,KAAK,EAC/B,MAAM,CAAC,KAAK,EACZ,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,EAC5B,OAAO,IAAI,MAAM,CAAC,YAAY,EAC9B,KAAK,CAAC,KAAK,CAAC,SAAS,CACtB,CAAC;SACH;QAED,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,iCAAyB,CAAC,IAAI,EAC9B,QAAQ,IAAI,MAAM,CAAC,YAAY,EAC/B,OAAO,IAAI,MAAM,CAAC,WAAW,EAC7B,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;SACH;QAED,IAAI,KAAK,CAAC,WAAW,EAAE;YACrB,KAAK,CAAC,WAAW,CAAC,SAAS,GAAG,oBAAY,CACxC,iCAAyB,CAAC,WAAW,EACrC,MAAM,CAAC,WAAW,EAClB,KAAK,CAAC,WAAW,CAAC,SAAS,CAC5B,CAAC;SACH;QAED,IAAI,KAAK,CAAC,OAAO,EAAE;YACjB,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,oBAAY,CACpC,iCAAyB,CAAC,OAAO,EACjC,MAAM,CAAC,OAAO,EACd,QAAQ,IAAI,MAAM,CAAC,eAAe,EAClC,KAAK,CAAC,OAAO,CAAC,SAAS,CACxB,CAAC;SACH;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAvDW,QAAA,iCAAiC,qCAuD5C","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n content: 'fui-TableCellLayout__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n\n rootTruncate: {\n overflowX: 'hidden',\n },\n\n content: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n contentTruncate: {\n overflowX: 'hidden',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaExtraSmall: {\n fontSize: '16px',\n },\n\n mediaSmallAndMedium: {\n fontSize: '20px',\n },\n\n mediaPrimary: {\n fontSize: '24px',\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n mainTruncate: {\n overflowX: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n\n description: {\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n const { truncate } = state;\n\n state.root.className = mergeClasses(\n tableCellLayoutClassNames.root,\n styles.root,\n truncate && styles.rootTruncate,\n state.root.className,\n );\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n const mediaSizedStyles = {\n small: styles.mediaSmallAndMedium,\n medium: styles.mediaSmallAndMedium,\n 'extra-small': styles.mediaExtraSmall,\n };\n\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n mediaSizedStyles[state.size],\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n truncate && styles.mainTruncate,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.content) {\n state.content.className = mergeClasses(\n tableCellLayoutClassNames.content,\n styles.content,\n truncate && styles.contentTruncate,\n state.content.className,\n );\n }\n\n return state;\n};\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
define(["require", "exports", "react", "./useTableHeader", "./renderTableHeader", "./useTableHeaderStyles"], function (require, exports, React, useTableHeader_1, renderTableHeader_1, useTableHeaderStyles_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TableHeader = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* TableHeader component
|
|
7
|
+
*/
|
|
8
|
+
exports.TableHeader = React.forwardRef(function (props, ref) {
|
|
9
|
+
var state = useTableHeader_1.useTableHeader_unstable(props, ref);
|
|
10
|
+
useTableHeaderStyles_1.useTableHeaderStyles_unstable(state);
|
|
11
|
+
return renderTableHeader_1.renderTableHeader_unstable(state);
|
|
12
|
+
});
|
|
13
|
+
exports.TableHeader.displayName = 'TableHeader';
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=TableHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeader/TableHeader.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,WAAW,GAA0C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC5F,IAAM,KAAK,GAAG,wCAAuB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElD,oDAA6B,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,8CAA0B,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"]}
|