@fluentui/react-table 9.18.5 → 9.19.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.md +54 -11
- package/dist/index.d.ts +19 -20
- package/lib/components/DataGrid/DataGrid.js +1 -0
- package/lib/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGrid.js +1 -0
- package/lib/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGridContextValues.js +1 -0
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib/components/DataGrid/useDataGridStyles.styles.js +2 -0
- package/lib/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
- package/lib/components/DataGrid/useDataGridStyles.styles.raw.js +1 -0
- package/lib/components/DataGrid/useDataGridStyles.styles.raw.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.js +1 -0
- package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBody.js +1 -0
- package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBodyStyles.styles.js +2 -0
- package/lib/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBodyStyles.styles.raw.js +1 -0
- package/lib/components/DataGridBody/useDataGridBodyStyles.styles.raw.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.js +1 -0
- package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCell.js +1 -0
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCellStyles.styles.js +2 -0
- package/lib/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCellStyles.styles.raw.js +1 -0
- package/lib/components/DataGridCell/useDataGridCellStyles.styles.raw.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.js +1 -0
- package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeader.js +1 -0
- package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.js +2 -0
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js +1 -0
- package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -0
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +8 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +2 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js +1 -0
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.js +1 -0
- package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRow.js +2 -6
- package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRowStyles.styles.js +5 -10
- package/lib/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRowStyles.styles.raw.js +2 -18
- package/lib/components/DataGridRow/useDataGridRowStyles.styles.raw.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -0
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +2 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +2 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js +1 -0
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js.map +1 -1
- package/lib/components/Table/Table.js +1 -0
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/renderTable.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js +1 -0
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.styles.js +2 -0
- package/lib/components/Table/useTableStyles.styles.js.map +1 -1
- package/lib/components/Table/useTableStyles.styles.raw.js +1 -0
- package/lib/components/Table/useTableStyles.styles.raw.js.map +1 -1
- package/lib/components/TableBody/TableBody.js +1 -0
- package/lib/components/TableBody/TableBody.js.map +1 -1
- package/lib/components/TableBody/renderTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +1 -0
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.styles.js +2 -0
- package/lib/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.styles.raw.js +1 -0
- package/lib/components/TableBody/useTableBodyStyles.styles.raw.js.map +1 -1
- package/lib/components/TableCell/TableCell.js +1 -0
- package/lib/components/TableCell/TableCell.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +1 -0
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.styles.js +2 -0
- package/lib/components/TableCell/useTableCellStyles.styles.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.styles.raw.js +1 -0
- package/lib/components/TableCell/useTableCellStyles.styles.raw.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js +1 -0
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js +2 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActionsStyles.styles.raw.js +1 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.styles.raw.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.js +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/renderTableCellLayout.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/useTableCellLayoutContextValues.js +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js +2 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.js +1 -0
- package/lib/components/TableHeader/TableHeader.js.map +1 -1
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js +1 -0
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.styles.js +2 -0
- package/lib/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.styles.raw.js +1 -0
- package/lib/components/TableHeader/useTableHeaderStyles.styles.raw.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +5 -6
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +2 -0
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js +1 -0
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.js +1 -0
- package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandle.js +1 -0
- package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +2 -0
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js +1 -0
- package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js.map +1 -1
- package/lib/components/TableRow/TableRow.js +1 -0
- package/lib/components/TableRow/TableRow.js.map +1 -1
- package/lib/components/TableRow/renderTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +1 -0
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.styles.js +2 -0
- package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.styles.raw.js +1 -0
- package/lib/components/TableRow/useTableRowStyles.styles.raw.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +2 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js.map +1 -1
- package/lib/contexts/columnIdContext.js +1 -0
- package/lib/contexts/columnIdContext.js.map +1 -1
- package/lib/contexts/dataGridContext.js +1 -0
- package/lib/contexts/dataGridContext.js.map +1 -1
- package/lib/contexts/rowIdContext.js +1 -0
- package/lib/contexts/rowIdContext.js.map +1 -1
- package/lib/contexts/tableContext.js +1 -0
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/contexts/tableHeaderContext.js +1 -0
- package/lib/contexts/tableHeaderContext.js.map +1 -1
- package/lib/hooks/createColumn.js +1 -0
- package/lib/hooks/createColumn.js.map +1 -1
- package/lib/hooks/useKeyboardResizing.js +2 -1
- package/lib/hooks/useKeyboardResizing.js.map +1 -1
- package/lib/hooks/useMeasureElement.js +1 -0
- package/lib/hooks/useMeasureElement.js.map +1 -1
- package/lib/hooks/useTableColumnResizeMouseHandler.js +1 -0
- package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib/hooks/useTableColumnResizeState.js +1 -0
- package/lib/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib/hooks/useTableColumnSizing.js +1 -0
- package/lib/hooks/useTableColumnSizing.js.map +1 -1
- package/lib/hooks/useTableCompositeNavigation.js +1 -0
- package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
- package/lib/hooks/useTableFeatures.js +1 -0
- package/lib/hooks/useTableFeatures.js.map +1 -1
- package/lib/hooks/useTableSelection.js +1 -0
- package/lib/hooks/useTableSelection.js.map +1 -1
- package/lib/hooks/useTableSort.js +1 -0
- package/lib/hooks/useTableSort.js.map +1 -1
- package/lib/utils/columnResizeUtils.js +10 -1
- package/lib/utils/columnResizeUtils.js.map +1 -1
- package/lib/utils/isColumnSortable.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.js +1 -0
- package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGrid.js +1 -0
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -0
- package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js +1 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +1 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -0
- package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js +1 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +1 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -0
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +1 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +1 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -0
- 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/renderDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +8 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -0
- package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js +2 -6
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +2 -10
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.raw.js +2 -18
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +2 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Table/Table.js +1 -0
- package/lib-commonjs/components/Table/Table.js.map +1 -1
- package/lib-commonjs/components/Table/renderTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTableContextValues.js +1 -0
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.styles.js +1 -0
- package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/Table/useTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js +1 -0
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +1 -0
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +1 -0
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js +1 -0
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +1 -0
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +1 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.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/useTableCellLayoutContextValues.js +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.js +1 -0
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +5 -6
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +1 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +1 -0
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +1 -0
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +1 -0
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js +1 -0
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +1 -0
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +1 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/contexts/columnIdContext.js +1 -0
- package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
- package/lib-commonjs/contexts/dataGridContext.js +1 -0
- package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
- package/lib-commonjs/contexts/rowIdContext.js +1 -0
- package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
- package/lib-commonjs/contexts/tableContext.js +1 -0
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/contexts/tableHeaderContext.js +1 -0
- package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
- package/lib-commonjs/hooks/createColumn.js +2 -0
- package/lib-commonjs/hooks/createColumn.js.map +1 -1
- package/lib-commonjs/hooks/useKeyboardResizing.js +2 -1
- package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureElement.js +1 -0
- package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +1 -0
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeState.js +1 -0
- package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnSizing.js +1 -0
- package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
- package/lib-commonjs/hooks/useTableCompositeNavigation.js +1 -0
- package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
- package/lib-commonjs/hooks/useTableFeatures.js +1 -0
- package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
- package/lib-commonjs/hooks/useTableSelection.js +1 -0
- package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
- package/lib-commonjs/hooks/useTableSort.js +1 -0
- package/lib-commonjs/hooks/useTableSort.js.map +1 -1
- package/lib-commonjs/utils/columnResizeUtils.js +10 -1
- package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
- package/lib-commonjs/utils/isColumnSortable.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableBody/useTableBody.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableBody/useTableBody.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableBodyProps, TableBodyState } from './TableBody.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableBody.\n *\n * The returned state can be modified with hooks such as useTableBodyStyles_unstable,\n * before being passed to renderTableBody_unstable.\n *\n * @param props - props from this instance of TableBody\n * @param ref - reference to root HTMLElement of TableBody\n */\nexport const useTableBody_unstable = (props: TableBodyProps, ref: React.Ref<HTMLElement>): TableBodyState => {\n const { noNativeElements } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tbody';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","useTableBody_unstable","props","ref","noNativeElements","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAE,GAAGJ;QACPE;IAAtB,MAAMG,gBAAgBH,CAAAA,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,OAAO;QACLG,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMT,KAAKU,MAAM,CACfX,yBAAyBO,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FF,KAAKA;YACLO,MAAML,kBAAkB,QAAQ,aAAaM;YAC7C,GAAGT,KAAK;QACV,IACA;YAAEU,aAAaP;QAAc;QAE/BD;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mergeClasses","__styles","useTableLayoutStyles","root","mc9l5x","d","useFlexLayoutStyles","tableBodyClassName","tableBodyClassNames","useTableBodyStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"sources":["useTableBodyStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["mergeClasses","__styles","useTableLayoutStyles","root","mc9l5x","d","useFlexLayoutStyles","tableBodyClassName","tableBodyClassNames","useTableBodyStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"sources":["useTableBodyStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses, makeStyles } from '@griffel/react';\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block'\n }\n});\nexport const tableBodyClassName = 'fui-TableBody';\nexport const tableBodyClassNames = {\n root: 'fui-TableBody'\n};\n/**\n * Apply styling to the TableBody slots based on the state\n */ export const useTableBodyStyles_unstable = (state)=>{\n 'use no memo';\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableBodyClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,YAAY,EAAAC,QAAA,QAAoB,gBAAgB;AACzD,MAAMC,oBAAoB,gBAAGD,QAAA;EAAAE,IAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAI5B,CAAC;AACF,MAAMC,mBAAmB,gBAAGL,QAAA;EAAAE,IAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAI3B,CAAC;AACF,OAAO,MAAME,kBAAkB,GAAG,eAAe;AACjD,OAAO,MAAMC,mBAAmB,GAAG;EAC/BL,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMM,2BAA2B,GAAIC,KAAK,IAAG;EACpD,aAAa;;EACb,MAAMC,YAAY,GAAG;IACjBC,KAAK,EAAEV,oBAAoB,CAAC,CAAC;IAC7BW,IAAI,EAAEP,mBAAmB,CAAC;EAC9B,CAAC;EACDI,KAAK,CAACP,IAAI,CAACW,SAAS,GAAGd,YAAY,CAACO,kBAAkB,EAAEG,KAAK,CAACK,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACV,IAAI,GAAGQ,YAAY,CAACC,KAAK,CAACT,IAAI,EAAEO,KAAK,CAACP,IAAI,CAACW,SAAS,CAAC;EACxJ,OAAOJ,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableBody/useTableBodyStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableBody/useTableBodyStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nexport const tableBodyClassName = 'fui-TableBody';\nexport const tableBodyClassNames: SlotClassNames<TableBodySlots> = {\n root: 'fui-TableBody',\n};\n\n/**\n * Apply styling to the TableBody slots based on the state\n */\nexport const useTableBodyStyles_unstable = (state: TableBodyState): TableBodyState => {\n 'use no memo';\n\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableBodyClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["mergeClasses","makeStyles","useTableLayoutStyles","root","display","useFlexLayoutStyles","tableBodyClassName","tableBodyClassNames","useTableBodyStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"mappings":"AAAA;AAEA,SAASA,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAI1D,MAAMC,uBAAuBD,WAAW;IACtCE,MAAM;QACJC,SAAS;IACX;AACF;AAEA,MAAMC,sBAAsBJ,WAAW;IACrCE,MAAM;QACJC,SAAS;IACX;AACF;AAEA,OAAO,MAAME,qBAAqB,gBAAgB;AAClD,OAAO,MAAMC,sBAAsD;IACjEJ,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,OAAO,MAAMK,8BAA8B,CAACC;IAC1C;IAEA,MAAMC,eAAe;QACnBC,OAAOT;QACPU,MAAMP;IACR;IACAI,MAAMN,IAAI,CAACU,SAAS,GAAGb,aACrBM,oBACAG,MAAMK,gBAAgB,GAAGJ,aAAaE,IAAI,CAACT,IAAI,GAAGO,aAAaC,KAAK,CAACR,IAAI,EACzEM,MAAMN,IAAI,CAACU,SAAS;IAGtB,OAAOJ;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCell/TableCell.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCell/TableCell.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles.styles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useTableCellStyles_unstable')(state);\n\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"names":["React","useTableCell_unstable","renderTableCell_unstable","useTableCellStyles_unstable","useCustomStyleHook_unstable","TableCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,8BAA8B;AAG1E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAE5BL,4BAA4B,+BAA+BK;IAE3D,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCell/renderTableCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<TableCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableCell_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCell/renderTableCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } 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): JSXElement => {\n assertSlots<TableCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableCell_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC;IACvCF,YAA4BE;IAE5B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCell/useTableCell.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCell/useTableCell.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n size,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","useTableCell_unstable","props","ref","noNativeElements","size","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGL;QAEbE;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,OAAO;QACLI,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMV,KAAKW,MAAM,CACfZ,yBAAyBQ,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKA;YACLQ,MAAML,kBAAkB,QAAQ,SAASM;YACzC,GAAGV,KAAK;QACV,IACA;YAAEW,aAAaP;QAAc;QAE/BF;QACAC;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","tokens","createCustomFocusIndicatorStyle","tableCellClassName","tableCellClassNames","root","useTableLayoutStyles","mc9l5x","ha4doy","medium","Bqenvij","small","d","useFlexLayoutStyles","Bf4jedk","Bt984gj","xawz","Bh6795r","Bnnss6s","fkmc3a","sshi5w","p","useStyles","qhf8xq","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","useTableCellStyles_unstable","state","styles","layoutStyles","table","flex","className","noNativeElements","size"],"sources":["useTableCellStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tokens","createCustomFocusIndicatorStyle","tableCellClassName","tableCellClassNames","root","useTableLayoutStyles","mc9l5x","ha4doy","medium","Bqenvij","small","d","useFlexLayoutStyles","Bf4jedk","Bt984gj","xawz","Bh6795r","Bnnss6s","fkmc3a","sshi5w","p","useStyles","qhf8xq","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","useTableCellStyles_unstable","state","styles","layoutStyles","table","flex","className","noNativeElements","size"],"sources":["useTableCellStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const tableCellClassName = 'fui-TableCell';\nexport const tableCellClassNames = {\n root: tableCellClassName\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle'\n },\n medium: {\n height: '44px'\n },\n small: {\n height: '34px'\n },\n 'extra-small': {\n height: '24px'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n minWidth: '0px',\n alignItems: 'center',\n flex: '1 1 0px'\n },\n medium: {\n minHeight: '44px'\n },\n small: {\n minHeight: '34px'\n },\n 'extra-small': {\n minHeight: '24px'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n position: 'relative',\n padding: `0px ${tokens.spacingHorizontalS}`,\n ...createCustomFocusIndicatorStyle({\n outline: `2px solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium\n }, {\n selector: 'focus'\n })\n }\n});\n/**\n * Apply styling to the TableCell slots based on the state\n */ export const useTableCellStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(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);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,OAAO,MAAMC,kBAAkB,GAAG,eAAe;AACjD,OAAO,MAAMC,mBAAmB,GAAG;EAC/BC,IAAI,EAAEF;AACV,CAAC;AACD,MAAMG,oBAAoB,gBAAGP,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,KAAA;IAAAD,OAAA;EAAA;EAAA;IAAAA,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,CAc5B,CAAC;AACF,MAAMC,mBAAmB,gBAAGd,QAAA;EAAAM,IAAA;IAAAE,MAAA;IAAAO,OAAA;IAAAC,OAAA;IAAAC,IAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAV,MAAA;IAAAW,MAAA;EAAA;EAAAT,KAAA;IAAAS,MAAA;EAAA;EAAA;IAAAA,MAAA;EAAA;AAAA;EAAAR,CAAA;IAAAS,CAAA;EAAA;AAAA,CAgB3B,CAAC;AACF;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGvB,QAAA;EAAAM,IAAA;IAAAkB,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAzB,CAAA;IAAAS,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAWrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMiB,2BAA2B,GAAIC,KAAK,IAAG;EACpD,aAAa;;EACb,MAAMC,MAAM,GAAGlB,SAAS,CAAC,CAAC;EAC1B,MAAMmB,YAAY,GAAG;IACjBC,KAAK,EAAEpC,oBAAoB,CAAC,CAAC;IAC7BqC,IAAI,EAAE9B,mBAAmB,CAAC;EAC9B,CAAC;EACD0B,KAAK,CAAClC,IAAI,CAACuC,SAAS,GAAG5C,YAAY,CAACI,mBAAmB,CAACC,IAAI,EAAEmC,MAAM,CAACnC,IAAI,EAAEkC,KAAK,CAACM,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACtC,IAAI,GAAGoC,YAAY,CAACC,KAAK,CAACrC,IAAI,EAAEkC,KAAK,CAACM,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACJ,KAAK,CAACO,IAAI,CAAC,GAAGL,YAAY,CAACC,KAAK,CAACH,KAAK,CAACO,IAAI,CAAC,EAAEP,KAAK,CAAClC,IAAI,CAACuC,SAAS,CAAC;EACpQ,OAAOL,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCell/useTableCellStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCell/useTableCellStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } 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 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 position: 'relative',\n padding: `0px ${tokens.spacingHorizontalS}`,\n\n ...createCustomFocusIndicatorStyle(\n { outline: `2px solid ${tokens.colorStrokeFocus2}`, borderRadius: tokens.borderRadiusMedium },\n { selector: 'focus' },\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 'use no memo';\n\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"],"names":["makeStyles","mergeClasses","tokens","createCustomFocusIndicatorStyle","tableCellClassName","tableCellClassNames","root","useTableLayoutStyles","display","verticalAlign","medium","height","small","useFlexLayoutStyles","minWidth","alignItems","flex","minHeight","useStyles","position","padding","spacingHorizontalS","outline","colorStrokeFocus2","borderRadius","borderRadiusMedium","selector","useTableCellStyles_unstable","state","styles","layoutStyles","table","className","noNativeElements","size"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,+BAA+B,QAAQ,0BAA0B;AAI1E,OAAO,MAAMC,qBAAqB,gBAAgB;AAClD,OAAO,MAAMC,sBAAsD;IACjEC,MAAMF;AACR,EAAE;AAEF,MAAMG,uBAAuBP,WAAW;IACtCM,MAAM;QACJE,SAAS;QACTC,eAAe;IACjB;IAEAC,QAAQ;QACNC,QAAQ;IACV;IAEAC,OAAO;QACLD,QAAQ;IACV;IAEA,eAAe;QACbA,QAAQ;IACV;AACF;AAEA,MAAME,sBAAsBb,WAAW;IACrCM,MAAM;QACJE,SAAS;QACTM,UAAU;QACVC,YAAY;QACZC,MAAM;IACR;IAEAN,QAAQ;QACNO,WAAW;IACb;IAEAL,OAAO;QACLK,WAAW;IACb;IAEA,eAAe;QACbA,WAAW;IACb;AACF;AAEA;;CAEC,GACD,MAAMC,YAAYlB,WAAW;IAC3BM,MAAM;QACJa,UAAU;QACVC,SAAS,CAAC,IAAI,EAAElB,OAAOmB,kBAAkB,EAAE;QAE3C,GAAGlB,gCACD;YAAEmB,SAAS,CAAC,UAAU,EAAEpB,OAAOqB,iBAAiB,EAAE;YAAEC,cAActB,OAAOuB,kBAAkB;QAAC,GAC5F;YAAEC,UAAU;QAAQ,EACrB;IACH;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1C;IAEA,MAAMC,SAASX;IACf,MAAMY,eAAe;QACnBC,OAAOxB;QACPS,MAAMH;IACR;IACAe,MAAMtB,IAAI,CAAC0B,SAAS,GAAG/B,aACrBI,oBAAoBC,IAAI,EACxBuB,OAAOvB,IAAI,EACXsB,MAAMK,gBAAgB,GAAGH,aAAad,IAAI,CAACV,IAAI,GAAGwB,aAAaC,KAAK,CAACzB,IAAI,EACzEsB,MAAMK,gBAAgB,GAAGH,aAAad,IAAI,CAACY,MAAMM,IAAI,CAAC,GAAGJ,aAAaC,KAAK,CAACH,MAAMM,IAAI,CAAC,EACvFN,MAAMtB,IAAI,CAAC0B,SAAS;IAEtB,OAAOJ;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellActions/TableCellActions.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellActions/TableCellActions.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTableCellActions_unstable } from './useTableCellActions';\nimport { renderTableCellActions_unstable } from './renderTableCellActions';\nimport { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles.styles';\nimport type { TableCellActionsProps } from './TableCellActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useTableCellActionsStyles_unstable')(state);\n\n return renderTableCellActions_unstable(state);\n});\n\nTableCellActions.displayName = 'TableCellActions';\n"],"names":["React","useTableCellActions_unstable","renderTableCellActions_unstable","useTableCellActionsStyles_unstable","useCustomStyleHook_unstable","TableCellActions","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,qCAAqC;AAGxF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,iCAA+DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQR,6BAA6BM,OAAOC;IAElDL,mCAAmCM;IAEnCL,4BAA4B,sCAAsCK;IAElE,OAAOP,gCAAgCO;AACzC,GAAG;AAEHJ,iBAAiBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellActions/renderTableCellActions.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<TableCellActionsSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableCellActions_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellActions/renderTableCellActions.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } 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): JSXElement => {\n assertSlots<TableCellActionsSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableCellActions_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9CF,YAAmCE;IAEnC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","tableCellActionsClassNames","root","useStyles","De3pzq","qhf8xq","j35jbq","Bhzewxz","Bz10aip","abs64n","Frg6f3","visible","d","useTableCellActionsStyles_unstable","state","styles","className"],"sources":["useTableCellActionsStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tableCellActionsClassNames","root","useStyles","De3pzq","qhf8xq","j35jbq","Bhzewxz","Bz10aip","abs64n","Frg6f3","visible","d","useTableCellActionsStyles_unstable","state","styles","className"],"sources":["useTableCellActionsStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const tableCellActionsClassNames = {\n root: 'fui-TableCellActions'\n};\n/**\n * Styles for the root slot\n */ const 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 visible: {\n opacity: 1\n }\n});\n/**\n * Apply styling to the TableCellActions slots based on the state\n */ export const useTableCellActionsStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.visible && styles.visible, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,0BAA0B,GAAG;EACtCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGJ,QAAA;EAAAG,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,OAAA;IAAAF,MAAA;EAAA;AAAA;EAAAG,CAAA;AAAA,CAarB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,kCAAkC,GAAIC,KAAK,IAAG;EAC3D,aAAa;;EACb,MAAMC,MAAM,GAAGZ,SAAS,CAAC,CAAC;EAC1BW,KAAK,CAACZ,IAAI,CAACc,SAAS,GAAGhB,YAAY,CAACC,0BAA0B,CAACC,IAAI,EAAEa,MAAM,CAACb,IAAI,EAAEY,KAAK,CAACH,OAAO,IAAII,MAAM,CAACJ,OAAO,EAAEG,KAAK,CAACZ,IAAI,CAACc,SAAS,CAAC;EACxI,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellActions/useTableCellActionsStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellActions/useTableCellActionsStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 'use no memo';\n\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"],"names":["makeStyles","mergeClasses","tableCellActionsClassNames","root","useStyles","backgroundColor","position","right","top","transform","opacity","marginLeft","visible","useTableCellActionsStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,6BAAoE;IAC/EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,iBAAiB;QACjBC,UAAU;QACVC,OAAO;QACPC,KAAK;QACLC,WAAW;QACXC,SAAS;QACTC,YAAY;IACd;IAEAC,SAAS;QACPF,SAAS;IACX;AACF;AAEA;;CAEC,GACD,OAAO,MAAMG,qCAAqC,CAACC;IACjD;IAEA,MAAMC,SAASX;IACfU,MAAMX,IAAI,CAACa,SAAS,GAAGf,aACrBC,2BAA2BC,IAAI,EAC/BY,OAAOZ,IAAI,EACXW,MAAMF,OAAO,IAAIG,OAAOH,OAAO,EAC/BE,MAAMX,IAAI,CAACa,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellLayout/TableCellLayout.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellLayout/TableCellLayout.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTableCellLayout_unstable } from './useTableCellLayout';\nimport { renderTableCellLayout_unstable } from './renderTableCellLayout';\nimport { useTableCellLayoutStyles_unstable } from './useTableCellLayoutStyles.styles';\nimport { useTableCellLayoutContextValues_unstable } from './useTableCellLayoutContextValues';\nimport type { TableCellLayoutProps } from './TableCellLayout.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useTableCellLayoutStyles_unstable')(state);\n\n return renderTableCellLayout_unstable(state, useTableCellLayoutContextValues_unstable(state));\n});\n\nTableCellLayout.displayName = 'TableCellLayout';\n"],"names":["React","useTableCellLayout_unstable","renderTableCellLayout_unstable","useTableCellLayoutStyles_unstable","useTableCellLayoutContextValues_unstable","useCustomStyleHook_unstable","TableCellLayout","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,oCAAoC;AACtF,SAASC,wCAAwC,QAAQ,oCAAoC;AAG7F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,gCAA6DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQT,4BAA4BO,OAAOC;IAEjDN,kCAAkCO;IAElCL,4BAA4B,qCAAqCK;IAEjE,OAAOR,+BAA+BQ,OAAON,yCAAyCM;AACxF,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellLayout/renderTableCellLayout.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<TableCellLayoutSlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n\n {state.content && (\n <state.content>\n {state.main && <state.main>{state.root.children}</state.main>}\n {state.description && <state.description />}\n </state.content>\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderTableCellLayout_unstable","state","contextValues","root","media","value","avatar","content","main","children","description"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellLayout/renderTableCellLayout.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } 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): JSXElement => {\n assertSlots<TableCellLayoutSlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n\n {state.content && (\n <state.content>\n {state.main && <state.main>{state.root.children}</state.main>}\n {state.description && <state.description />}\n </state.content>\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderTableCellLayout_unstable","state","contextValues","root","media","value","avatar","content","main","children","description"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,qBAAqB,QAAQ,yBAAyB;AAG/D;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC;IAEAJ,YAAkCG;IAElC,qBACE,MAACA,MAAME,IAAI;;YACRF,MAAMG,KAAK,kBACV,KAACL;gBAAsBM,OAAOH,cAAcI,MAAM;0BAChD,cAAA,KAACL,MAAMG,KAAK;;YAIfH,MAAMM,OAAO,kBACZ,MAACN,MAAMM,OAAO;;oBACXN,MAAMO,IAAI,kBAAI,KAACP,MAAMO,IAAI;kCAAEP,MAAME,IAAI,CAACM,QAAQ;;oBAC9CR,MAAMS,WAAW,kBAAI,KAACT,MAAMS,WAAW;;;;;AAKlD,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellLayout/useTableCellLayout.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellLayout/useTableCellLayout.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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: slot.always(\n getIntrinsicElementProps(\n 'div',\n {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n },\n // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n ['content'],\n ),\n { elementType: 'div' },\n ),\n appearance: props.appearance,\n truncate: props.truncate,\n main: slot.optional(props.main, { renderByDefault: true, elementType: 'span' }),\n media: slot.optional(props.media, { elementType: 'span' }),\n description: slot.optional(props.description, { elementType: 'span' }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.description || !!props.children,\n elementType: 'div',\n }),\n avatarSize: tableAvatarSizeMap[size],\n size,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","tableAvatarSizeMap","medium","small","useTableCellLayout_unstable","props","ref","size","components","root","main","description","content","media","always","elementType","appearance","truncate","optional","renderByDefault","children","avatarSize"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,MAAMC,qBAAqB;IACzBC,QAAQ;IACRC,OAAO;IACP,eAAe;AACjB;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGP;IAEjB,OAAO;QACLQ,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,aAAa;YACbC,SAAS;YACTC,OAAO;QACT;QACAJ,MAAMV,KAAKe,MAAM,CACfhB,yBACE,OACA;YACE,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FQ,KAAKA;YACL,GAAGD,KAAK;QACV,GACA,qFAAqF;QACrF;YAAC;SAAU,GAEb;YAAEU,aAAa;QAAM;QAEvBC,YAAYX,MAAMW,UAAU;QAC5BC,UAAUZ,MAAMY,QAAQ;QACxBP,MAAMX,KAAKmB,QAAQ,CAACb,MAAMK,IAAI,EAAE;YAAES,iBAAiB;YAAMJ,aAAa;QAAO;QAC7EF,OAAOd,KAAKmB,QAAQ,CAACb,MAAMQ,KAAK,EAAE;YAAEE,aAAa;QAAO;QACxDJ,aAAaZ,KAAKmB,QAAQ,CAACb,MAAMM,WAAW,EAAE;YAAEI,aAAa;QAAO;QACpEH,SAASb,KAAKmB,QAAQ,CAACb,MAAMO,OAAO,EAAE;YACpCO,iBAAiB,CAAC,CAACd,MAAMM,WAAW,IAAI,CAAC,CAACN,MAAMe,QAAQ;YACxDL,aAAa;QACf;QACAM,YAAYpB,kBAAkB,CAACM,KAAK;QACpCA;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellLayout/useTableCellLayoutContextValues.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellLayout/useTableCellLayoutContextValues.ts"],"sourcesContent":["'use client';\n\nimport * 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"],"names":["React","useTableCellLayoutContextValues_unstable","state","avatarSize","avatar","useMemo","size"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,yCAAyCC,KAA2B;IAClF,MAAM,EAAEC,UAAU,EAAE,GAAGD;IAEvB,MAAME,SAASJ,MAAMK,OAAO,CAC1B,IAAO,CAAA;YACLC,MAAMH;QACR,CAAA,GACA;QAACA;KAAW;IAGd,OAAO;QACLC;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","tableCellLayoutClassNames","root","media","main","description","content","useStyles","mc9l5x","Bt984gj","i8kkvl","Belr9w4","rmohyg","xawz","Bh6795r","Bnnss6s","fkmc3a","rootTruncate","B68tc82","Beiy3e4","contentTruncate","mediaExtraSmall","Be2twd7","mediaSmallAndMedium","mediaPrimary","mainPrimary","Bhrd7zp","mainTruncate","Huce71","ygn44y","sj55zd","Bahqtrf","Bg96gwp","d","p","useTableCellLayoutStyles_unstable","state","styles","truncate","className","primary","appearance","mediaSizedStyles","small","medium","size"],"sources":["useTableCellLayoutStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","tableCellLayoutClassNames","root","media","main","description","content","useStyles","mc9l5x","Bt984gj","i8kkvl","Belr9w4","rmohyg","xawz","Bh6795r","Bnnss6s","fkmc3a","rootTruncate","B68tc82","Beiy3e4","contentTruncate","mediaExtraSmall","Be2twd7","mediaSmallAndMedium","mediaPrimary","mainPrimary","Bhrd7zp","mainTruncate","Huce71","ygn44y","sj55zd","Bahqtrf","Bg96gwp","d","p","useTableCellLayoutStyles_unstable","state","styles","truncate","className","primary","appearance","mediaSizedStyles","small","medium","size"],"sources":["useTableCellLayoutStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { typographyStyles } from '@fluentui/react-theme';\nexport const tableCellLayoutClassNames = {\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 * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n gap: tokens.spacingHorizontalS,\n flex: '1 1 0px'\n },\n rootTruncate: {\n overflowX: 'hidden'\n },\n content: {\n display: 'flex',\n flexDirection: 'column'\n },\n contentTruncate: {\n overflowX: 'hidden'\n },\n media: {\n display: 'flex',\n alignItems: 'center'\n },\n mediaExtraSmall: {\n fontSize: '16px'\n },\n mediaSmallAndMedium: {\n fontSize: '20px'\n },\n mediaPrimary: {\n fontSize: '24px'\n },\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold\n },\n mainTruncate: {\n overflowX: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n },\n description: {\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1\n }\n});\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */ export const useTableCellLayoutStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const { truncate } = state;\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, truncate && styles.rootTruncate, state.root.className);\n const primary = state.appearance === 'primary';\n if (state.media) {\n const mediaSizedStyles = {\n small: styles.mediaSmallAndMedium,\n medium: styles.mediaSmallAndMedium,\n 'extra-small': styles.mediaExtraSmall\n };\n state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, mediaSizedStyles[state.size], primary && styles.mediaPrimary, state.media.className);\n }\n if (state.main) {\n state.main.className = mergeClasses(tableCellLayoutClassNames.main, truncate && styles.mainTruncate, primary && styles.mainPrimary, state.main.className);\n }\n if (state.description) {\n state.description.className = mergeClasses(tableCellLayoutClassNames.description, styles.description, state.description.className);\n }\n if (state.content) {\n state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, truncate && styles.contentTruncate, state.content.className);\n }\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,OAAO,MAAMC,yBAAyB,GAAG;EACrCC,IAAI,EAAE,qBAAqB;EAC3BC,KAAK,EAAE,4BAA4B;EACnCC,IAAI,EAAE,2BAA2B;EACjCC,WAAW,EAAE,kCAAkC;EAC/CC,OAAO,EAAE;AACb,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGV,QAAA;EAAAK,IAAA;IAAAM,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,IAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,YAAA;IAAAC,OAAA;EAAA;EAAAZ,OAAA;IAAAE,MAAA;IAAAW,OAAA;EAAA;EAAAC,eAAA;IAAAF,OAAA;EAAA;EAAAf,KAAA;IAAAK,MAAA;IAAAC,OAAA;EAAA;EAAAY,eAAA;IAAAC,OAAA;EAAA;EAAAC,mBAAA;IAAAD,OAAA;EAAA;EAAAE,YAAA;IAAAF,OAAA;EAAA;EAAAG,WAAA;IAAAC,OAAA;EAAA;EAAAC,YAAA;IAAAT,OAAA;IAAAU,MAAA;IAAAC,MAAA;EAAA;EAAAxB,WAAA;IAAAyB,MAAA;IAAAC,OAAA;IAAAT,OAAA;IAAAI,OAAA;IAAAM,OAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CA0CrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,iCAAiC,GAAIC,KAAK,IAAG;EAC1D,aAAa;;EACb,MAAMC,MAAM,GAAG9B,SAAS,CAAC,CAAC;EAC1B,MAAM;IAAE+B;EAAS,CAAC,GAAGF,KAAK;EAC1BA,KAAK,CAAClC,IAAI,CAACqC,SAAS,GAAGzC,YAAY,CAACG,yBAAyB,CAACC,IAAI,EAAEmC,MAAM,CAACnC,IAAI,EAAEoC,QAAQ,IAAID,MAAM,CAACpB,YAAY,EAAEmB,KAAK,CAAClC,IAAI,CAACqC,SAAS,CAAC;EACvI,MAAMC,OAAO,GAAGJ,KAAK,CAACK,UAAU,KAAK,SAAS;EAC9C,IAAIL,KAAK,CAACjC,KAAK,EAAE;IACb,MAAMuC,gBAAgB,GAAG;MACrBC,KAAK,EAAEN,MAAM,CAACd,mBAAmB;MACjCqB,MAAM,EAAEP,MAAM,CAACd,mBAAmB;MAClC,aAAa,EAAEc,MAAM,CAAChB;IAC1B,CAAC;IACDe,KAAK,CAACjC,KAAK,CAACoC,SAAS,GAAGzC,YAAY,CAACG,yBAAyB,CAACE,KAAK,EAAEkC,MAAM,CAAClC,KAAK,EAAEuC,gBAAgB,CAACN,KAAK,CAACS,IAAI,CAAC,EAAEL,OAAO,IAAIH,MAAM,CAACb,YAAY,EAAEY,KAAK,CAACjC,KAAK,CAACoC,SAAS,CAAC;EAC5K;EACA,IAAIH,KAAK,CAAChC,IAAI,EAAE;IACZgC,KAAK,CAAChC,IAAI,CAACmC,SAAS,GAAGzC,YAAY,CAACG,yBAAyB,CAACG,IAAI,EAAEkC,QAAQ,IAAID,MAAM,CAACV,YAAY,EAAEa,OAAO,IAAIH,MAAM,CAACZ,WAAW,EAAEW,KAAK,CAAChC,IAAI,CAACmC,SAAS,CAAC;EAC7J;EACA,IAAIH,KAAK,CAAC/B,WAAW,EAAE;IACnB+B,KAAK,CAAC/B,WAAW,CAACkC,SAAS,GAAGzC,YAAY,CAACG,yBAAyB,CAACI,WAAW,EAAEgC,MAAM,CAAChC,WAAW,EAAE+B,KAAK,CAAC/B,WAAW,CAACkC,SAAS,CAAC;EACtI;EACA,IAAIH,KAAK,CAAC9B,OAAO,EAAE;IACf8B,KAAK,CAAC9B,OAAO,CAACiC,SAAS,GAAGzC,YAAY,CAACG,yBAAyB,CAACK,OAAO,EAAE+B,MAAM,CAAC/B,OAAO,EAAEgC,QAAQ,IAAID,MAAM,CAACjB,eAAe,EAAEgB,KAAK,CAAC9B,OAAO,CAACiC,SAAS,CAAC;EAC1J;EACA,OAAOH,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableCellLayout/useTableCellLayoutStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableCellLayout/useTableCellLayoutStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } 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 gap: tokens.spacingHorizontalS,\n 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 'use no memo';\n\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"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","tableCellLayoutClassNames","root","media","main","description","content","useStyles","display","alignItems","gap","spacingHorizontalS","flex","rootTruncate","overflowX","flexDirection","contentTruncate","mediaExtraSmall","fontSize","mediaSmallAndMedium","mediaPrimary","mainPrimary","fontWeight","fontWeightSemibold","mainTruncate","whiteSpace","textOverflow","color","colorNeutralForeground2","caption1","useTableCellLayoutStyles_unstable","state","styles","truncate","className","primary","appearance","mediaSizedStyles","small","medium","size"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAG/C,SAASC,gBAAgB,QAAQ,wBAAwB;AAEzD,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,OAAO;IACPC,MAAM;IACNC,aAAa;IACbC,SAAS;AACX,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYV,WAAW;IAC3BK,MAAM;QACJM,SAAS;QACTC,YAAY;QACZC,KAAKX,OAAOY,kBAAkB;QAC9BC,MAAM;IACR;IAEAC,cAAc;QACZC,WAAW;IACb;IAEAR,SAAS;QACPE,SAAS;QACTO,eAAe;IACjB;IAEAC,iBAAiB;QACfF,WAAW;IACb;IAEAX,OAAO;QACLK,SAAS;QACTC,YAAY;IACd;IAEAQ,iBAAiB;QACfC,UAAU;IACZ;IAEAC,qBAAqB;QACnBD,UAAU;IACZ;IAEAE,cAAc;QACZF,UAAU;IACZ;IAEAG,aAAa;QACXC,YAAYvB,OAAOwB,kBAAkB;IACvC;IAEAC,cAAc;QACZV,WAAW;QACXW,YAAY;QACZC,cAAc;IAChB;IAEArB,aAAa;QACXsB,OAAO5B,OAAO6B,uBAAuB;QACrC,GAAG5B,iBAAiB6B,QAAQ;IAC9B;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD;IAEA,MAAMC,SAASzB;IACf,MAAM,EAAE0B,QAAQ,EAAE,GAAGF;IAErBA,MAAM7B,IAAI,CAACgC,SAAS,GAAGpC,aACrBG,0BAA0BC,IAAI,EAC9B8B,OAAO9B,IAAI,EACX+B,YAAYD,OAAOnB,YAAY,EAC/BkB,MAAM7B,IAAI,CAACgC,SAAS;IAEtB,MAAMC,UAAUJ,MAAMK,UAAU,KAAK;IAErC,IAAIL,MAAM5B,KAAK,EAAE;QACf,MAAMkC,mBAAmB;YACvBC,OAAON,OAAOb,mBAAmB;YACjCoB,QAAQP,OAAOb,mBAAmB;YAClC,eAAea,OAAOf,eAAe;QACvC;QAEAc,MAAM5B,KAAK,CAAC+B,SAAS,GAAGpC,aACtBG,0BAA0BE,KAAK,EAC/B6B,OAAO7B,KAAK,EACZkC,gBAAgB,CAACN,MAAMS,IAAI,CAAC,EAC5BL,WAAWH,OAAOZ,YAAY,EAC9BW,MAAM5B,KAAK,CAAC+B,SAAS;IAEzB;IAEA,IAAIH,MAAM3B,IAAI,EAAE;QACd2B,MAAM3B,IAAI,CAAC8B,SAAS,GAAGpC,aACrBG,0BAA0BG,IAAI,EAC9B6B,YAAYD,OAAOR,YAAY,EAC/BW,WAAWH,OAAOX,WAAW,EAC7BU,MAAM3B,IAAI,CAAC8B,SAAS;IAExB;IAEA,IAAIH,MAAM1B,WAAW,EAAE;QACrB0B,MAAM1B,WAAW,CAAC6B,SAAS,GAAGpC,aAC5BG,0BAA0BI,WAAW,EACrC2B,OAAO3B,WAAW,EAClB0B,MAAM1B,WAAW,CAAC6B,SAAS;IAE/B;IAEA,IAAIH,MAAMzB,OAAO,EAAE;QACjByB,MAAMzB,OAAO,CAAC4B,SAAS,GAAGpC,aACxBG,0BAA0BK,OAAO,EACjC0B,OAAO1B,OAAO,EACd2B,YAAYD,OAAOhB,eAAe,EAClCe,MAAMzB,OAAO,CAAC4B,SAAS;IAE3B;IAEA,OAAOH;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableHeader/TableHeader.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableHeader/TableHeader.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles.styles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useTableHeaderStyles_unstable')(state);\n\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"],"names":["React","useTableHeader_unstable","renderTableHeader_unstable","useTableHeaderStyles_unstable","useCustomStyleHook_unstable","TableHeader","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableHeader/renderTableHeader.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n assertSlots<TableHeaderSlots>(state);\n\n return (\n <TableHeaderContextProvider value=\"\">\n <state.root />\n </TableHeaderContextProvider>\n );\n};\n"],"names":["assertSlots","TableHeaderContextProvider","renderTableHeader_unstable","state","value","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/TableHeader/renderTableHeader.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState): JSXElement => {\n assertSlots<TableHeaderSlots>(state);\n\n return (\n <TableHeaderContextProvider value=\"\">\n <state.root />\n </TableHeaderContextProvider>\n );\n};\n"],"names":["assertSlots","TableHeaderContextProvider","renderTableHeader_unstable","state","value","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,0BAA0B,QAAQ,oCAAoC;AAG/E;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCH,YAA8BG;IAE9B,qBACE,KAACF;QAA2BG,OAAM;kBAChC,cAAA,KAACD,MAAME,IAAI;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableHeader/useTableHeader.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableHeader/useTableHeader.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","useTableHeader_unstable","props","ref","noNativeElements","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,gBAAgB,EAAE,GAAGJ;QAEPE;IAAtB,MAAMG,gBAAgBH,CAAAA,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAC7D,OAAO;QACLG,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMT,KAAKU,MAAM,CACfX,yBAAyBO,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FF,KAAKA;YACLO,MAAML,kBAAkB,QAAQ,aAAaM;YAC7C,GAAGT,KAAK;QACV,IACA;YAAEU,aAAaP;QAAc;QAE/BD;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mergeClasses","__styles","tableHeaderClassName","tableHeaderClassNames","root","useFlexLayoutStyles","mc9l5x","d","useTableLayoutStyles","useTableHeaderStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"sources":["useTableHeaderStyles.styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["mergeClasses","__styles","tableHeaderClassName","tableHeaderClassNames","root","useFlexLayoutStyles","mc9l5x","d","useTableLayoutStyles","useTableHeaderStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"sources":["useTableHeaderStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses, makeStyles } from '@griffel/react';\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames = {\n root: 'fui-TableHeader'\n};\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block'\n }\n});\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group'\n }\n});\n/**\n * Apply styling to the TableHeader slots based on the state\n */ export const useTableHeaderStyles_unstable = (state)=>{\n 'use no memo';\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableHeaderClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,YAAY,EAAAC,QAAA,QAAoB,gBAAgB;AACzD,OAAO,MAAMC,oBAAoB,GAAG,iBAAiB;AACrD,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,mBAAmB,gBAAGJ,QAAA;EAAAG,IAAA;IAAAE,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAI3B,CAAC;AACF,MAAMC,oBAAoB,gBAAGP,QAAA;EAAAG,IAAA;IAAAE,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAI5B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAME,6BAA6B,GAAIC,KAAK,IAAG;EACtD,aAAa;;EACb,MAAMC,YAAY,GAAG;IACjBC,KAAK,EAAEJ,oBAAoB,CAAC,CAAC;IAC7BK,IAAI,EAAER,mBAAmB,CAAC;EAC9B,CAAC;EACDK,KAAK,CAACN,IAAI,CAACU,SAAS,GAAGd,YAAY,CAACE,oBAAoB,EAAEQ,KAAK,CAACK,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACT,IAAI,GAAGO,YAAY,CAACC,KAAK,CAACR,IAAI,EAAEM,KAAK,CAACN,IAAI,CAACU,SAAS,CAAC;EAC1J,OAAOJ,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableHeader/useTableHeaderStyles.styles.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableHeader/useTableHeaderStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n 'use no memo';\n\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["mergeClasses","makeStyles","tableHeaderClassName","tableHeaderClassNames","root","useFlexLayoutStyles","display","useTableLayoutStyles","useTableHeaderStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"mappings":"AAAA;AAEA,SAASA,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,uBAAuB,kBAAkB;AACtD,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;AACR,EAAE;AAEF,MAAMC,sBAAsBJ,WAAW;IACrCG,MAAM;QACJE,SAAS;IACX;AACF;AAEA,MAAMC,uBAAuBN,WAAW;IACtCG,MAAM;QACJE,SAAS;IACX;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,gCAAgC,CAACC;IAC5C;IAEA,MAAMC,eAAe;QACnBC,OAAOJ;QACPK,MAAMP;IACR;IACAI,MAAML,IAAI,CAACS,SAAS,GAAGb,aACrBE,sBACAO,MAAMK,gBAAgB,GAAGJ,aAAaE,IAAI,CAACR,IAAI,GAAGM,aAAaC,KAAK,CAACP,IAAI,EACzEK,MAAML,IAAI,CAACS,SAAS;IAGtB,OAAOJ;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableHeaderCell/TableHeaderCell.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableHeaderCell/TableHeaderCell.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTableHeaderCell_unstable } from './useTableHeaderCell';\nimport { renderTableHeaderCell_unstable } from './renderTableHeaderCell';\nimport { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles.styles';\nimport type { TableHeaderCellProps } from './TableHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableHeaderCell component\n */\nexport const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useTableHeaderCell_unstable(props, ref);\n\n useTableHeaderCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableHeaderCellStyles_unstable')(state);\n\n return renderTableHeaderCell_unstable(state);\n});\n\nTableHeaderCell.displayName = 'TableHeaderCell';\n"],"names":["React","useTableHeaderCell_unstable","renderTableHeaderCell_unstable","useTableHeaderCellStyles_unstable","useCustomStyleHook_unstable","TableHeaderCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,oCAAoC;AAGtF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDL,kCAAkCM;IAElCL,4BAA4B,qCAAqCK;IAEjE,OAAOP,+BAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableHeaderCellState, TableHeaderCellSlots } from './TableHeaderCell.types';\n\n/**\n * Render the final JSX of TableHeaderCell\n */\nexport const renderTableHeaderCell_unstable = (state: TableHeaderCellState) => {\n assertSlots<TableHeaderCellSlots>(state);\n\n return (\n <state.root>\n <state.button>\n {state.root.children}\n {state.sortIcon && <state.sortIcon />}\n </state.button>\n {state.aside && <state.aside />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTableHeaderCell_unstable","state","root","button","children","sortIcon","aside"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TableHeaderCellState, TableHeaderCellSlots } from './TableHeaderCell.types';\n\n/**\n * Render the final JSX of TableHeaderCell\n */\nexport const renderTableHeaderCell_unstable = (state: TableHeaderCellState): JSXElement => {\n assertSlots<TableHeaderCellSlots>(state);\n\n return (\n <state.root>\n <state.button>\n {state.root.children}\n {state.sortIcon && <state.sortIcon />}\n </state.button>\n {state.aside && <state.aside />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTableHeaderCell_unstable","state","root","button","children","sortIcon","aside"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBACE,MAACA,MAAMC,IAAI;;0BACT,MAACD,MAAME,MAAM;;oBACVF,MAAMC,IAAI,CAACE,QAAQ;oBACnBH,MAAMI,QAAQ,kBAAI,KAACJ,MAAMI,QAAQ;;;YAEnCJ,MAAMK,KAAK,kBAAI,KAACL,MAAMK,KAAK;;;AAGlC,EAAE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';
|
|
3
4
|
import { useFocusWithin } from '@fluentui/react-tabster';
|
|
@@ -25,16 +26,14 @@ const sortIcons = {
|
|
|
25
26
|
const { sortable = contextSortable } = props;
|
|
26
27
|
var _props_as;
|
|
27
28
|
const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'th';
|
|
29
|
+
// The sort button is rendered as a div when not sortable, and as an ARIA button when sortable.
|
|
28
30
|
const buttonSlot = slot.always(props.button, {
|
|
29
31
|
elementType: 'div',
|
|
30
32
|
defaultProps: {
|
|
31
|
-
as: 'div'
|
|
32
|
-
...!sortable && {
|
|
33
|
-
role: 'presentation',
|
|
34
|
-
tabIndex: undefined
|
|
35
|
-
}
|
|
33
|
+
as: 'div'
|
|
36
34
|
}
|
|
37
35
|
});
|
|
36
|
+
const ariaButtonProps = useARIAButtonProps(buttonSlot.as, buttonSlot);
|
|
38
37
|
var _props_sortDirection;
|
|
39
38
|
return {
|
|
40
39
|
components: {
|
|
@@ -64,7 +63,7 @@ const sortIcons = {
|
|
|
64
63
|
},
|
|
65
64
|
elementType: 'span'
|
|
66
65
|
}),
|
|
67
|
-
button:
|
|
66
|
+
button: sortable ? ariaButtonProps : buttonSlot,
|
|
68
67
|
sortable,
|
|
69
68
|
noNativeElements
|
|
70
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TableHeaderCell/useTableHeaderCell.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/TableHeaderCell/useTableHeaderCell.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { ARIAButtonSlotProps, useARIAButtonProps } from '@fluentui/react-aria';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular fontSize={12} />,\n descending: <ArrowDownRegular fontSize={12} />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n\n // The sort button is rendered as a div when not sortable, and as an ARIA button when sortable.\n const buttonSlot = slot.always<ARIAButtonSlotProps>(props.button, {\n elementType: 'div',\n defaultProps: {\n as: 'div',\n },\n });\n const ariaButtonProps = useARIAButtonProps(buttonSlot.as, buttonSlot);\n\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n } as const),\n { elementType: rootComponent },\n ),\n aside: slot.optional(props.aside, { elementType: 'span' }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n elementType: 'span',\n }),\n button: sortable ? ariaButtonProps : buttonSlot,\n sortable,\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useARIAButtonProps","useTableContext","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","contextSortable","rootComponent","as","buttonSlot","always","button","elementType","defaultProps","ariaButtonProps","components","root","sortIcon","aside","role","undefined","sortDirection","optional","renderByDefault","children"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,wBAAwB;AACzE,SAA8BC,kBAAkB,QAAQ,uBAAuB;AAE/E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,MAAMC,YAAY;IAChBC,yBAAW,oBAACL;QAAeM,UAAU;;IACrCC,0BAAY,oBAACN;QAAiBK,UAAU;;AAC1C;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAME,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,gBAAgB,EAAEC,UAAUC,eAAe,EAAE,GAAGV;IACxD,MAAM,EAAES,WAAWC,eAAe,EAAE,GAAGJ;QAEjBA;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,cAARN,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,+FAA+F;IAC/F,MAAMK,aAAalB,KAAKmB,MAAM,CAAsBR,MAAMS,MAAM,EAAE;QAChEC,aAAa;QACbC,cAAc;YACZL,IAAI;QACN;IACF;IACA,MAAMM,kBAAkBnB,mBAAmBc,WAAWD,EAAE,EAAEC;QAgB5BP;IAd9B,OAAO;QACLa,YAAY;YACVC,MAAMT;YACNI,QAAQ;YACRM,UAAU;YACVC,OAAO;QACT;QACAF,MAAMzB,KAAKmB,MAAM,CACfrB,yBAAyBkB,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKb,cAAca,KAAKX;YACxB2B,MAAMZ,kBAAkB,QAAQ,iBAAiBa;YACjD,aAAaf,WAAWH,CAAAA,uBAAAA,MAAMmB,aAAa,cAAnBnB,kCAAAA,uBAAuB,SAASkB;YACxD,GAAGlB,KAAK;QACV,IACA;YAAEU,aAAaL;QAAc;QAE/BW,OAAO3B,KAAK+B,QAAQ,CAACpB,MAAMgB,KAAK,EAAE;YAAEN,aAAa;QAAO;QACxDK,UAAU1B,KAAK+B,QAAQ,CAACpB,MAAMe,QAAQ,EAAE;YACtCM,iBAAiB,CAAC,CAACrB,MAAMmB,aAAa;YACtCR,cAAc;gBAAEW,UAAUtB,MAAMmB,aAAa,GAAGxB,SAAS,CAACK,MAAMmB,aAAa,CAAC,GAAGD;YAAU;YAC3FR,aAAa;QACf;QACAD,QAAQN,WAAWS,kBAAkBL;QACrCJ;QACAD;IACF;AACF,EAAE"}
|