@fluentui/react-table 9.15.9 → 9.15.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -2
- package/lib/DataGrid.js.map +1 -1
- package/lib/DataGridBody.js.map +1 -1
- package/lib/DataGridCell.js.map +1 -1
- package/lib/DataGridHeader.js.map +1 -1
- package/lib/DataGridHeaderCell.js.map +1 -1
- package/lib/DataGridRow.js.map +1 -1
- package/lib/DataGridSelectionCell.js.map +1 -1
- package/lib/Table.js.map +1 -1
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js.map +1 -1
- package/lib/TableCellActions.js.map +1 -1
- package/lib/TableCellLayout.js.map +1 -1
- package/lib/TableCellPrimaryLayout.js.map +1 -1
- package/lib/TableHeader.js.map +1 -1
- package/lib/TableHeaderCell.js.map +1 -1
- package/lib/TableResizeHandle.js.map +1 -1
- package/lib/TableRow.js.map +1 -1
- package/lib/TableSelectionCell.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib/components/DataGrid/index.js.map +1 -1
- package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib/components/DataGridBody/index.js.map +1 -1
- package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/DataGridCell.types.js +3 -1
- package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -1
- package/lib/components/DataGridCell/index.js.map +1 -1
- package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/DataGridHeader.types.js +3 -1
- package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
- package/lib/components/DataGridHeader/index.js.map +1 -1
- package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +3 -1
- package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib/components/DataGridHeaderCell/index.js.map +1 -1
- package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib/components/DataGridRow/index.js.map +1 -1
- package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +3 -1
- package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
- package/lib/components/DataGridSelectionCell/index.js.map +1 -1
- package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.types.js +3 -1
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Table/renderTable.js.map +1 -1
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/TableBody/TableBody.js.map +1 -1
- package/lib/components/TableBody/TableBody.types.js +3 -1
- package/lib/components/TableBody/TableBody.types.js.map +1 -1
- package/lib/components/TableBody/index.js.map +1 -1
- package/lib/components/TableBody/renderTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableCell/TableCell.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js +3 -1
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/index.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.types.js +3 -1
- package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
- package/lib/components/TableCellActions/index.js.map +1 -1
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.types.js +3 -1
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib/components/TableCellLayout/index.js.map +1 -1
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.types.js +3 -1
- package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib/components/TableHeader/index.js.map +1 -1
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js +3 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib/components/TableHeaderCell/index.js.map +1 -1
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.types.js +3 -1
- package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
- package/lib/components/TableResizeHandle/index.js.map +1 -1
- package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib/components/TableRow/TableRow.js.map +1 -1
- package/lib/components/TableRow/TableRow.types.js +3 -1
- package/lib/components/TableRow/TableRow.types.js.map +1 -1
- package/lib/components/TableRow/index.js.map +1 -1
- package/lib/components/TableRow/renderTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js +3 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib/components/TableSelectionCell/index.js.map +1 -1
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/contexts/columnIdContext.js.map +1 -1
- package/lib/contexts/dataGridContext.js.map +1 -1
- package/lib/contexts/rowIdContext.js.map +1 -1
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/contexts/tableHeaderContext.js.map +1 -1
- package/lib/hooks/createColumn.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/types.js.map +1 -1
- package/lib/hooks/useKeyboardResizing.js.map +1 -1
- package/lib/hooks/useMeasureElement.js.map +1 -1
- package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib/hooks/useTableColumnSizing.js.map +1 -1
- package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
- package/lib/hooks/useTableFeatures.js.map +1 -1
- package/lib/hooks/useTableSelection.js.map +1 -1
- package/lib/hooks/useTableSort.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/columnResizeUtils.js.map +1 -1
- package/lib/utils/isColumnSortable.js.map +1 -1
- package/lib-commonjs/DataGrid.js.map +1 -1
- package/lib-commonjs/DataGridBody.js.map +1 -1
- package/lib-commonjs/DataGridCell.js.map +1 -1
- package/lib-commonjs/DataGridHeader.js.map +1 -1
- package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/DataGridRow.js.map +1 -1
- package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/Table.js.map +1 -1
- package/lib-commonjs/TableBody.js.map +1 -1
- package/lib-commonjs/TableCell.js.map +1 -1
- package/lib-commonjs/TableCellActions.js.map +1 -1
- package/lib-commonjs/TableCellLayout.js.map +1 -1
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
- package/lib-commonjs/TableHeader.js.map +1 -1
- package/lib-commonjs/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/TableResizeHandle.js.map +1 -1
- package/lib-commonjs/TableRow.js.map +1 -1
- package/lib-commonjs/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
- package/lib-commonjs/components/DataGrid/index.js.map +1 -1
- package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
- package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
- package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +3 -1
- package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
- package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +3 -1
- package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
- package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +3 -1
- package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
- package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
- package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +3 -1
- package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
- package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Table/Table.js.map +1 -1
- package/lib-commonjs/components/Table/Table.types.js +3 -1
- package/lib-commonjs/components/Table/Table.types.js.map +1 -1
- package/lib-commonjs/components/Table/index.js.map +1 -1
- package/lib-commonjs/components/Table/renderTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.types.js +3 -1
- package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
- package/lib-commonjs/components/TableBody/index.js.map +1 -1
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.types.js +3 -1
- package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
- package/lib-commonjs/components/TableCell/index.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +3 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +3 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.types.js +3 -1
- package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
- package/lib-commonjs/components/TableHeader/index.js.map +1 -1
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +3 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js +3 -1
- package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.types.js +3 -1
- package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
- package/lib-commonjs/components/TableRow/index.js.map +1 -1
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +3 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/columnIdContext.js +3 -3
- package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
- package/lib-commonjs/contexts/dataGridContext.js +3 -3
- package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
- package/lib-commonjs/contexts/rowIdContext.js +3 -3
- package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
- package/lib-commonjs/contexts/tableContext.js +3 -3
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
- package/lib-commonjs/hooks/createColumn.js.map +1 -1
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/types.js.map +1 -1
- package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureElement.js +3 -3
- package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
- package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
- package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
- package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
- package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
- package/lib-commonjs/hooks/useTableSort.js.map +1 -1
- package/lib-commonjs/index.js +213 -213
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/columnResizeUtils.js +7 -7
- package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
- package/lib-commonjs/utils/isColumnSortable.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["DataGridHeaderCell.types.ts"],"sourcesContent":["import {\n TableHeaderCellProps,\n TableHeaderCellSlots,\n TableHeaderCellState,\n} from '../TableHeaderCell/TableHeaderCell.types';\n\nexport type DataGridHeaderCellSlots = TableHeaderCellSlots;\n\n/**\n * DataGridHeaderCell Props\n */\nexport type DataGridHeaderCellProps = Omit<TableHeaderCellProps, 'sortable'>;\n\n/**\n * State used in rendering DataGridHeaderCell\n */\nexport type DataGridHeaderCellState = TableHeaderCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridHeaderCell';\nexport * from './DataGridHeaderCell.types';\nexport * from './renderDataGridHeaderCell';\nexport * from './useDataGridHeaderCell';\nexport * from './useDataGridHeaderCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridHeaderCell.
|
|
1
|
+
{"version":3,"sources":["renderDataGridHeaderCell.tsx"],"sourcesContent":["import type { DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';\n\n/**\n * Render the final JSX of DataGridHeaderCell\n */\nexport const renderDataGridHeaderCell_unstable = (state: DataGridHeaderCellState) => {\n return renderTableHeaderCell_unstable(state);\n};\n"],"names":["renderDataGridHeaderCell_unstable","state","renderTableHeaderCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;uCALkC;AAKxC,MAAMA,oCAAoC,CAACC;IAChD,OAAOC,IAAAA,qDAAAA,EAA+BD;AACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridHeaderCell.
|
|
1
|
+
{"version":3,"sources":["useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { isColumnSortable } from '../../utils/isColumnSortable';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable: gridSortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n\n const sortable = useDataGridContext_unstable(ctx => {\n const columnSortable = !!ctx.columns.find(c => c.columnId === columnId && isColumnSortable(c));\n if (!gridSortable) {\n // if the grid is not sortable - disable sorting on all columns\n return false;\n }\n\n return columnSortable;\n });\n\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableHeaderCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableHeaderCellProps;\n });\n\n // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n {\n sortable,\n sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridHeaderCell_unstable","props","ref","columnId","useColumnIdContext","sortable","gridSortable","useTableContext","toggleColumnSort","useDataGridContext_unstable","ctx","sort","columnSortable","columns","find","c","isColumnSortable","sortDirection","getSortDirection","undefined","resizableColumns","getTableHeaderCellProps","columnSizing_unstable","onClick","useEventCallback","e","useTableHeaderCell_unstable","as","tabIndex"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBaA;;;eAAAA;;;;iEAlBU;gCACU;oCAEW;iCACA;iCACT;8BACH;kCACC;AAW1B,MAAMA,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,mCAAAA;IACjB,MAAM,EAAEC,UAAUC,YAAY,EAAE,GAAGC,IAAAA,6BAAAA;IACnC,MAAMC,mBAAmBC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,IAAI,CAACH,gBAAgB;IAErF,MAAMH,WAAWI,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC3C,MAAME,iBAAiB,CAAC,CAACF,IAAIG,OAAO,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEZ,QAAQ,KAAKA,YAAYa,IAAAA,kCAAAA,EAAiBD;QAC3F,IAAI,CAACT,cAAc;YACjB,+DAA+D;YAC/D,OAAO;QACT;QAEA,OAAOM;IACT;IAEA,MAAMK,gBAAgBR,IAAAA,4CAAAA,EAA4BC,CAAAA,MAChDL,WAAWK,IAAIC,IAAI,CAACO,gBAAgB,CAACf,YAAYgB;IAEnD,MAAMC,mBAAmBX,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIU,gBAAgB;IAChF,MAAMC,0BAA0BZ,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1D,OAAOA,IAAIY,qBAAqB,CAACD,uBAAuB;IAC1D;IAEA,kFAAkF;IAClF,MAAME,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAIhCxB;QAHA,IAAII,UAAU;YACZG,iBAAiBiB,GAAGtB;QACtB;QACAF,CAAAA,iBAAAA,MAAMsB,OAAO,AAAPA,MAAO,QAAbtB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBwB;IAClB;IAEA,OAAOC,IAAAA,+CAAAA,EACL;QACErB;QACAY;QACAU,IAAI;QACJC,UAAUvB,WAAWc,YAAY;QACjC,GAAIC,mBAAmBC,wBAAwBlB,YAAY,CAAC,CAAC;QAC7D,GAAGF,KAAK;QACRsB;IACF,GACArB;AAEJ"}
|
package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridHeaderCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles.styles';\nexport const dataGridHeaderCellClassNames = {\n
|
|
1
|
+
{"version":3,"sources":["useDataGridHeaderCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles.styles';\nexport const dataGridHeaderCellClassNames = {\n root: 'fui-DataGridHeaderCell',\n button: 'fui-DataGridHeaderCell__button',\n sortIcon: 'fui-DataGridHeaderCell__sortIcon',\n aside: 'fui-DataGridHeaderCell__aside'\n};\n/**\n * Apply styling to the DataGridHeaderCell slots based on the state\n */ export const useDataGridHeaderCellStyles_unstable = (state)=>{\n 'use no memo';\n useTableHeaderCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);\n if (state.button) {\n state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);\n }\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);\n }\n if (state.aside) {\n state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);\n }\n return state;\n};\n"],"names":["dataGridHeaderCellClassNames","useDataGridHeaderCellStyles_unstable","root","button","sortIcon","aside","state","useTableHeaderCellStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,4BAA4B;eAA5BA;;IAQIC,oCAAoC;eAApCA;;;uBAVY;gDACqB;AAC3C,MAAMD,+BAA+B;IACxCE,MAAM;IACNC,QAAQ;IACRC,UAAU;IACVC,OAAO;AACX;AAGW,MAAMJ,uCAAwCK,CAAAA;IACrD;IACAC,IAAAA,iEAAiC,EAACD;IAClCA,MAAMJ,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BE,IAAI,EAAEI,MAAMJ,IAAI,CAACM,SAAS;IAC3F,IAAIF,MAAMH,MAAM,EAAE;QACdG,MAAMH,MAAM,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BG,MAAM,EAAEG,MAAMH,MAAM,CAACK,SAAS;IACrG;IACA,IAAIF,MAAMF,QAAQ,EAAE;QAChBE,MAAMF,QAAQ,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BI,QAAQ,EAAEE,MAAMF,QAAQ,CAACI,SAAS;IAC3G;IACA,IAAIF,MAAMD,KAAK,EAAE;QACbC,MAAMD,KAAK,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BK,KAAK,EAAEC,MAAMD,KAAK,CAACG,SAAS;IAClG;IACA,OAAOF;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridRow.
|
|
1
|
+
{"version":3,"sources":["DataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridRow_unstable } from './useDataGridRow';\nimport { renderDataGridRow_unstable } from './renderDataGridRow';\nimport { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';\nimport type { DataGridRowProps } from './DataGridRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridRow component\n */\nexport const DataGridRow: ForwardRefComponent<DataGridRowProps> &\n (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridRow_unstable(props, ref);\n\n useDataGridRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);\n\n return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"],"names":["DataGridRow","React","forwardRef","props","ref","state","useDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","renderDataGridRow_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCACiB;mCACG;4CACG;qCAGF;AAKrC,MAAMA,cAAAA,WAAAA,GACgDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACpF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AACpC;AAEAL,YAAYU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridRow.types.
|
|
1
|
+
{"version":3,"sources":["DataGridRow.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TableColumnDefinition } from '../../hooks';\nimport { DataGridContextValue } from '../DataGrid/DataGrid.types';\nimport type { TableRowProps, TableRowSlots, TableRowState } from '../TableRow/TableRow.types';\nimport type { TableSelectionCell } from '../TableSelectionCell/TableSelectionCell';\n\nexport type DataGridRowSlots = TableRowSlots & {\n /**\n * When selection is enabled on the @see DataGrid, all rows\n * will render the selection cell.\n */\n selectionCell?: Slot<typeof TableSelectionCell>;\n};\n\nexport type CellRenderFunction<TItem = unknown> = (\n column: TableColumnDefinition<TItem>,\n dataGridContextValue: DataGridContextValue,\n) => React.ReactNode;\n\n/**\n * DataGridRow Props\n */\nexport type DataGridRowProps<TItem = unknown> = Omit<TableRowProps, 'children'> &\n Omit<ComponentProps<DataGridRowSlots>, 'children'> & {\n children: CellRenderFunction<TItem>;\n };\n\n/**\n * State used in rendering DataGridRow\n */\nexport type DataGridRowState = TableRowState &\n ComponentState<DataGridRowSlots> & {\n renderCell: CellRenderFunction;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n columnDefs: TableColumnDefinition<any>[];\n dataGridContextValue: DataGridContextValue;\n };\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridRow';\nexport * from './DataGridRow.types';\nexport * from './renderDataGridRow';\nexport * from './useDataGridRow';\nexport * from './useDataGridRowStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridRow.
|
|
1
|
+
{"version":3,"sources":["renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n assertSlots<DataGridRowSlots>(state);\n\n return (\n <state.root>\n {state.selectionCell && <state.selectionCell />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["renderDataGridRow_unstable","state","assertSlots","_jsxs","root","selectionCell","_jsx","columnDefs","map","columnDef","ColumnIdContextProvider","value","columnId","renderCell","dataGridContextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;iCAEY;AAKjC,MAAMA,6BAA6B,CAACC;IACzCC,IAAAA,2BAAAA,EAA8BD;IAE9B,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,aAAa,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,aAAa,EAAA,CAAA;YAC3CJ,MAAMM,UAAU,CAACC,GAAG,CAACC,CAAAA,YAAAA,WAAAA,GACpBH,IAAAA,eAAA,EAACI,wCAAAA,EAAAA;oBAAwBC,OAAOF,UAAUG,QAAQ;8BAC/CX,MAAMY,UAAU,CAACJ,WAAWR,MAAMa,oBAAoB;mBADAL,UAAUG,QAAQ;;;AAMnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridRow.
|
|
1
|
+
{"version":3,"sources":["useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { dataGridContextDefaultValue, useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { DataGridSelectionCell } from '../DataGridSelectionCell/DataGridSelectionCell';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render DataGridRow.\n *\n * The returned state can be modified with hooks such as useDataGridRowStyles_unstable,\n * before being passed to renderDataGridRow_unstable.\n *\n * @param props - props from this instance of DataGridRow\n * @param ref - reference to root HTMLElement of DataGridRow\n */\nexport const useDataGridRow_unstable = (props: DataGridRowProps, ref: React.Ref<HTMLElement>): DataGridRowState => {\n const rowId = useTableRowIdContext();\n const isHeader = useIsInTableHeader();\n const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);\n const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);\n const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));\n const focusMode = useDataGridContext_unstable(ctx => ctx.focusMode);\n const compositeRowTabsterAttribute = useDataGridContext_unstable(ctx => ctx.compositeRowTabsterAttribute);\n\n const tabbable = focusMode === 'row_unstable' || focusMode === 'composite';\n const appearance = useDataGridContext_unstable(ctx => {\n if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {\n return ctx.selectionAppearance;\n }\n\n return 'none';\n });\n const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader) {\n toggleRow(e, rowId);\n }\n\n props.onClick?.(e);\n });\n\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target as HTMLElement)) {\n // stop scrolling\n e.preventDefault();\n toggleRow(e, rowId);\n }\n\n props.onKeyDown?.(e);\n });\n\n const baseState = useTableRow_unstable(\n {\n appearance,\n 'aria-selected': selectable ? selected : undefined,\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n ...(focusMode === 'composite' && !isHeader && compositeRowTabsterAttribute),\n ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: slot.optional(props.selectionCell, {\n renderByDefault: selectable,\n elementType: DataGridSelectionCell,\n }),\n renderCell: props.children,\n columnDefs,\n // This context value should not be used internally\n // It's intended to help power user render functions\n dataGridContextValue: useStableDataGridContextValue(),\n };\n};\n\nfunction useStableDataGridContextValue() {\n const ref = React.useRef(dataGridContextDefaultValue);\n\n // Heads up!\n // We will not re-render when the context value changes, but we will have the latest value of the context when we do\n // render for other reasons.\n //\n // This relies on a context selector that always returns the same value:\n // - we will not re-render when the context value changes\n // - we will store the context value in a ref\n useDataGridContext_unstable(ctx => {\n ref.current = ctx;\n return null;\n });\n\n return ref.current!;\n}\n"],"names":["useDataGridRow_unstable","props","ref","rowId","useTableRowIdContext","isHeader","useIsInTableHeader","columnDefs","useDataGridContext_unstable","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","focusMode","compositeRowTabsterAttribute","tabbable","appearance","selectionAppearance","toggleRow","onClick","useEventCallback","e","onKeyDown","key","Space","isInteractiveHTMLElement","target","preventDefault","baseState","useTableRow_unstable","undefined","tabIndex","children","as","components","selectionCell","DataGridSelectionCell","slot","optional","renderByDefault","elementType","renderCell","dataGridContextValue","useStableDataGridContextValue","React","useRef","dataGridContextDefaultValue","current"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmBaA;;;eAAAA;;;;iEAnBU;gCAC0C;8BAC3C;6BAEe;iCACoC;uCACnC;8BACD;oCACF;AAW5B,MAAMA,0BAA0B,CAACC,OAAyBC;IAC/D,MAAMC,QAAQC,IAAAA,kCAAAA;IACd,MAAMC,WAAWC,IAAAA,sCAAAA;IACjB,MAAMC,aAAaC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,OAAO;IACjE,MAAMC,aAAaH,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIG,cAAc;IACxE,MAAMC,WAAWL,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIK,SAAS,CAACC,aAAa,CAACZ;IAChF,MAAMa,YAAYR,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIO,SAAS;IAClE,MAAMC,+BAA+BT,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIQ,4BAA4B;IAExG,MAAMC,WAAWF,cAAc,kBAAkBA,cAAc;IAC/D,MAAMG,aAAaX,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC7C,IAAI,CAACJ,YAAYM,cAAcF,IAAIK,SAAS,CAACC,aAAa,CAACZ,QAAQ;YACjE,OAAOM,IAAIW,mBAAmB;QAChC;QAEA,OAAO;IACT;IACA,MAAMC,YAAYb,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIK,SAAS,CAACO,SAAS;IAE5E,MAAMC,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAKhCvB;QAJA,IAAIU,cAAc,CAACN,UAAU;YAC3BgB,UAAUG,GAAGrB;QACf;QAEAF,CAAAA,iBAAAA,MAAMqB,OAAO,AAAPA,MAAO,QAAbrB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBuB;IAClB;IAEA,MAAMC,YAAYF,IAAAA,gCAAAA,EAAiB,CAACC;YAOlCvB;QANA,IAAIU,cAAc,CAACN,YAAYmB,EAAEE,GAAG,KAAKC,mBAAAA,IAAS,CAACC,IAAAA,wCAAAA,EAAyBJ,EAAEK,MAAM,GAAkB;YACpG,iBAAiB;YACjBL,EAAEM,cAAc;YAChBT,UAAUG,GAAGrB;QACf;QAEAF,CAAAA,mBAAAA,MAAMwB,SAAS,AAATA,MAAS,QAAfxB,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAAA,IAAAA,CAAAA,OAAkBuB;IACpB;IAEA,MAAMO,YAAYC,IAAAA,iCAAAA,EAChB;QACEb;QACA,iBAAiBR,aAAaE,WAAWoB;QACzCC,UAAUhB,YAAY,CAACb,WAAW,IAAI4B;QACtC,GAAIjB,cAAc,eAAe,CAACX,YAAYY,4BAA4B;QAC1E,GAAGhB,KAAK;QACRqB;QACAG;QACAU,UAAU;QACVC,IAAI;IACN,GACAlC;IAGF,OAAO;QACL,GAAG6B,SAAS;QACZM,YAAY;YACV,GAAGN,UAAUM,UAAU;YACvBC,eAAeC,4CAAAA;QACjB;QACAD,eAAeE,oBAAAA,CAAKC,QAAQ,CAACxC,MAAMqC,aAAa,EAAE;YAChDI,iBAAiB/B;YACjBgC,aAAaJ,4CAAAA;QACf;QACAK,YAAY3C,MAAMkC,QAAQ;QAC1B5B;QACA,mDAAmD;QACnD,oDAAoD;QACpDsC,sBAAsBC;IACxB;AACF;AAEA,SAASA;IACP,MAAM5C,MAAM6C,OAAMC,MAAM,CAACC,4CAAAA;IAEzB,YAAY;IACZ,oHAAoH;IACpH,4BAA4B;IAC5B,EAAE;IACF,wEAAwE;IACxE,yDAAyD;IACzD,6CAA6C;IAC7CzC,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1BP,IAAIgD,OAAO,GAAGzC;QACd,OAAO;IACT;IAEA,OAAOP,IAAIgD,OAAO;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridRowStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableRowStyles_unstable } from '../TableRow/useTableRowStyles.styles';\nexport const dataGridRowClassNames = {\n
|
|
1
|
+
{"version":3,"sources":["useDataGridRowStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableRowStyles_unstable } from '../TableRow/useTableRowStyles.styles';\nexport const dataGridRowClassNames = {\n root: 'fui-DataGridRow',\n selectionCell: 'fui-DataGridRow__selectionCell'\n};\n/**\n * Apply styling to the DataGridRow slots based on the state\n */ export const useDataGridRowStyles_unstable = (state)=>{\n 'use no memo';\n useTableRowStyles_unstable(state);\n state.root.className = mergeClasses(dataGridRowClassNames.root, state.root.className);\n if (state.selectionCell) {\n state.selectionCell.className = mergeClasses(dataGridRowClassNames.selectionCell, state.selectionCell.className);\n }\n return state;\n};\n"],"names":["dataGridRowClassNames","useDataGridRowStyles_unstable","root","selectionCell","state","useTableRowStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,qBAAqB;eAArBA;;IAMIC,6BAA6B;eAA7BA;;;uBARY;yCACc;AACpC,MAAMD,wBAAwB;IACjCE,MAAM;IACNC,eAAe;AACnB;AAGW,MAAMF,gCAAiCG,CAAAA;IAC9C;IACAC,IAAAA,mDAA0B,EAACD;IAC3BA,MAAMF,IAAI,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACP,sBAAsBE,IAAI,EAAEE,MAAMF,IAAI,CAACI,SAAS;IACpF,IAAIF,MAAMD,aAAa,EAAE;QACrBC,MAAMD,aAAa,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACP,sBAAsBG,aAAa,EAAEC,MAAMD,aAAa,CAACG,SAAS;IACnH;IACA,OAAOF;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DataGridSelectionCell.
|
|
1
|
+
{"version":3,"sources":["DataGridSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';\nimport { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';\nimport { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionCellStyles.styles';\nimport type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridSelectionCell component\n */\nexport const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridSelectionCell_unstable(props, ref);\n\n useDataGridSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);\n\n return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"],"names":["DataGridSelectionCell","React","forwardRef","props","ref","state","useDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridSelectionCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;0CAC2B;6CACG;sDACG;qCAGZ;AAKrC,MAAMA,wBAAAA,WAAAA,GAAyEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7G,MAAMC,QAAQC,IAAAA,2DAAAA,EAAkCH,OAAOC;IAEvDG,IAAAA,6EAAAA,EAAwCF;IAExCG,IAAAA,gDAAAA,EAA4B,2CAA2CH;IAEvE,OAAOI,IAAAA,iEAAAA,EAAqCJ;AAC9C;AAEAL,sBAAsBU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["DataGridSelectionCell.types.ts"],"sourcesContent":["import {\n TableSelectionCellProps,\n TableSelectionCellSlots,\n TableSelectionCellState,\n} from '../TableSelectionCell/TableSelectionCell.types';\n\nexport type DataGridSelectionCellSlots = TableSelectionCellSlots;\n\n/**\n * DataGridSelectionCell Props\n */\nexport type DataGridSelectionCellProps = TableSelectionCellProps;\n\n/**\n * State used in rendering DataGridSelectionCell\n */\nexport type DataGridSelectionCellState = TableSelectionCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridSelectionCell';\nexport * from './DataGridSelectionCell.types';\nexport * from './renderDataGridSelectionCell';\nexport * from './useDataGridSelectionCell';\nexport * from './useDataGridSelectionCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderDataGridSelectionCell.
|
|
1
|
+
{"version":3,"sources":["renderDataGridSelectionCell.tsx"],"sourcesContent":["import type { DataGridSelectionCellState } from './DataGridSelectionCell.types';\nimport { renderTableSelectionCell_unstable } from '../TableSelectionCell/renderTableSelectionCell';\n\n/**\n * Render the final JSX of DataGridSelectionCell\n */\nexport const renderDataGridSelectionCell_unstable = (state: DataGridSelectionCellState) => {\n return renderTableSelectionCell_unstable(state);\n};\n"],"names":["renderDataGridSelectionCell_unstable","state","renderTableSelectionCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;0CALqC;AAK3C,MAAMA,uCAAuC,CAACC;IACnD,OAAOC,IAAAA,2DAAAA,EAAkCD;AAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridSelectionCell.
|
|
1
|
+
{"version":3,"sources":["useDataGridSelectionCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\nimport { useTableSelectionCell_unstable } from '../TableSelectionCell/useTableSelectionCell';\nimport type { DataGridSelectionCellProps, DataGridSelectionCellState } from './DataGridSelectionCell.types';\n\n/**\n * Create the state required to render DataGridSelectionCell.\n *\n * The returned state can be modified with hooks such as useDataGridSelectionCellStyles_unstable,\n * before being passed to renderDataGridSelectionCell_unstable.\n *\n * @param props - props from this instance of DataGridSelectionCell\n * @param ref - reference to root HTMLElement of DataGridSelectionCell\n */\nexport const useDataGridSelectionCell_unstable = (\n props: DataGridSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridSelectionCellState => {\n const isHeader = useIsInTableHeader();\n const rowId = useTableRowIdContext();\n const subtle = useDataGridContext_unstable(ctx => ctx.subtleSelection);\n const checked = useDataGridContext_unstable(ctx => {\n if (isHeader && ctx.selection.selectionMode === 'multiselect') {\n return ctx.selection.allRowsSelected ? true : ctx.selection.someRowsSelected ? 'mixed' : false;\n }\n\n return ctx.selection.isRowSelected(rowId);\n });\n\n const toggleAllRows = useDataGridContext_unstable(ctx => ctx.selection.toggleAllRows);\n const type = useDataGridContext_unstable(ctx =>\n ctx.selection.selectionMode === 'multiselect' ? 'checkbox' : 'radio',\n );\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableCellElement>) => {\n if (isHeader) {\n toggleAllRows(e);\n }\n\n props.onClick?.(e);\n });\n\n return useTableSelectionCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n checked,\n type,\n invisible: isHeader && type === 'radio',\n 'aria-checked': isHeader && type !== 'radio' ? checked : undefined,\n 'aria-selected': isHeader || checked === 'mixed' ? undefined : checked,\n subtle,\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridSelectionCell_unstable","props","ref","isHeader","useIsInTableHeader","rowId","useTableRowIdContext","subtle","useDataGridContext_unstable","ctx","subtleSelection","checked","selection","selectionMode","allRowsSelected","someRowsSelected","isRowSelected","toggleAllRows","type","onClick","useEventCallback","e","useTableSelectionCell_unstable","as","role","invisible","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;;iEAjBU;gCACU;iCACW;8BACP;oCACF;uCACY;AAYxC,MAAMA,oCAAoC,CAC/CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,sCAAAA;IACjB,MAAMC,QAAQC,IAAAA,kCAAAA;IACd,MAAMC,SAASC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,eAAe;IACrE,MAAMC,UAAUH,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1C,IAAIN,YAAYM,IAAIG,SAAS,CAACC,aAAa,KAAK,eAAe;YAC7D,OAAOJ,IAAIG,SAAS,CAACE,eAAe,GAAG,OAAOL,IAAIG,SAAS,CAACG,gBAAgB,GAAG,UAAU;QAC3F;QAEA,OAAON,IAAIG,SAAS,CAACI,aAAa,CAACX;IACrC;IAEA,MAAMY,gBAAgBT,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIG,SAAS,CAACK,aAAa;IACpF,MAAMC,OAAOV,IAAAA,4CAAAA,EAA4BC,CAAAA,MACvCA,IAAIG,SAAS,CAACC,aAAa,KAAK,gBAAgB,aAAa;IAG/D,MAAMM,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAKhCpB;QAJA,IAAIE,UAAU;YACZc,cAAcI;QAChB;QAEApB,CAAAA,iBAAAA,MAAMkB,OAAO,AAAPA,MAAO,QAAblB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBoB;IAClB;IAEA,OAAOC,IAAAA,qDAAAA,EACL;QACEC,IAAI;QACJC,MAAM;QACNb;QACAO;QACAO,WAAWtB,YAAYe,SAAS;QAChC,gBAAgBf,YAAYe,SAAS,UAAUP,UAAUe;QACzD,iBAAiBvB,YAAYQ,YAAY,UAAUe,YAAYf;QAC/DJ;QACA,GAAGN,KAAK;QACRkB;IACF,GACAjB;AAEJ"}
|
package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDataGridSelectionCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableSelectionCellStyles_unstable } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nexport const dataGridSelectionCellClassNames = {\n
|
|
1
|
+
{"version":3,"sources":["useDataGridSelectionCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableSelectionCellStyles_unstable } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nexport const dataGridSelectionCellClassNames = {\n root: 'fui-DataGridSelectionCell',\n checkboxIndicator: 'fui-DataGridSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-DataGridSelectionCell__radioIndicator'\n};\n/**\n * Apply styling to the DataGridSelectionCell slots based on the state\n */ export const useDataGridSelectionCellStyles_unstable = (state)=>{\n 'use no memo';\n useTableSelectionCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridSelectionCellClassNames.root, state.root.className);\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(dataGridSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);\n }\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(dataGridSelectionCellClassNames.radioIndicator, state.radioIndicator.className);\n }\n return state;\n};\n"],"names":["dataGridSelectionCellClassNames","useDataGridSelectionCellStyles_unstable","root","checkboxIndicator","radioIndicator","state","useTableSelectionCellStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,+BAA+B;eAA/BA;;IAOIC,uCAAuC;eAAvCA;;;uBATY;mDACwB;AAC9C,MAAMD,kCAAkC;IAC3CE,MAAM;IACNC,mBAAmB;IACnBC,gBAAgB;AACpB;AAGW,MAAMH,0CAA2CI,CAAAA;IACxD;IACAC,IAAAA,uEAAoC,EAACD;IACrCA,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACR,gCAAgCE,IAAI,EAAEG,MAAMH,IAAI,CAACK,SAAS;IAC9F,IAAIF,MAAMF,iBAAiB,EAAE;QACzBE,MAAMF,iBAAiB,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACR,gCAAgCG,iBAAiB,EAAEE,MAAMF,iBAAiB,CAACI,SAAS;IACzI;IACA,IAAIF,MAAMD,cAAc,EAAE;QACtBC,MAAMD,cAAc,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACR,gCAAgCI,cAAc,EAAEC,MAAMD,cAAc,CAACG,SAAS;IAChI;IACA,OAAOF;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Table.
|
|
1
|
+
{"version":3,"sources":["Table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTable_unstable } from './useTable';\nimport { renderTable_unstable } from './renderTable';\nimport { useTableStyles_unstable } from './useTableStyles.styles';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Table component\n */\nexport const Table: ForwardRefComponent<TableProps> = React.forwardRef((props, ref) => {\n const state = useTable_unstable(props, ref);\n\n useTableStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableStyles_unstable')(state);\n\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"names":["Table","React","forwardRef","props","ref","state","useTable_unstable","useTableStyles_unstable","useCustomStyleHook_unstable","renderTable_unstable","useTableContextValues_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;0BACW;6BACG;sCACG;uCAGO;qCACH;AAKrC,MAAMA,QAAAA,WAAAA,GAAyCC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQC,IAAAA,2BAAAA,EAAkBH,OAAOC;IAEvCG,IAAAA,6CAAAA,EAAwBF;IAExBG,IAAAA,gDAAAA,EAA4B,2BAA2BH;IAEvD,OAAOI,IAAAA,iCAAAA,EAAqBJ,OAAOK,IAAAA,qDAAAA,EAA+BL;AACpE;AAEAL,MAAMW,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["Table.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableSlots = {\n root: Slot<'table', 'div'>;\n};\n\nexport type TableContextValue = {\n /**\n * Affects the sizes of all table subcomponents\n * @default medium\n */\n size: 'extra-small' | 'small' | 'medium';\n\n /**\n * Render all table elements as divs instead of semantic table elements\n * Using divs no longer uses `display: table` layout but `display: flex`\n * @default false\n */\n noNativeElements: boolean;\n\n /**\n * Whether the table is sortable\n * @default false\n */\n sortable: boolean;\n};\n\nexport type SortDirection = 'ascending' | 'descending';\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"],"names":[],"rangeMappings":";;","mappings":"AAsCA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderTable.
|
|
1
|
+
{"version":3,"sources":["renderTable.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableState, TableSlots, TableContextValues } from './Table.types';\nimport { TableContextProvider } from '../../contexts/tableContext';\n\n/**\n * Render the final JSX of Table\n */\nexport const renderTable_unstable = (state: TableState, contextValues: TableContextValues) => {\n assertSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <state.root />\n </TableContextProvider>\n );\n};\n"],"names":["renderTable_unstable","state","contextValues","assertSlots","_jsx","TableContextProvider","value","table","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;8BAES;AAK9B,MAAMA,uBAAuB,CAACC,OAAmBC;IACtDC,IAAAA,2BAAAA,EAAwBF;IAExB,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,kCAAAA,EAAAA;QAAqBC,OAAOJ,cAAcK,KAAK;kBAC9C,WAAA,GAAAH,IAAAA,eAAA,EAACH,MAAMO,IAAI,EAAA,CAAA;;AAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTable.
|
|
1
|
+
{"version":3,"sources":["useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableProps, TableState } from './Table.types';\n\n/**\n * Create the state required to render Table.\n *\n * The returned state can be modified with hooks such as useTableStyles_unstable,\n * before being passed to renderTable_unstable.\n *\n * @param props - props from this instance of Table\n * @param ref - reference to root HTMLElement of Table\n */\nexport const useTable_unstable = (props: TableProps, ref: React.Ref<HTMLElement>): TableState => {\n const rootComponent = props.as ?? props.noNativeElements ? 'div' : 'table';\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' ? 'table' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"names":["useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType","size","sortable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,oBAAoB,CAACC,OAAmBC;QAC7BD;IAAtB,MAAME,gBAAgBF,CAAAA,CAAAA,YAAAA,MAAMG,EAAE,AAAFA,MAAE,QAARH,cAAAA,KAAAA,IAAAA,YAAYA,MAAMI,gBAAgB,AAAhBA,IAAmB,QAAQ;QAiB3DJ,aACYA,yBACRA;IAjBZ,OAAO;QACLK,YAAY;YACVC,MAAMJ;QACR;QACAI,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBP,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FD,KAAKA;YACLS,MAAMR,kBAAkB,QAAQ,UAAUS;YAC1C,GAAGX,KAAK;QACV,IACA;YAAEY,aAAaV;QAAc;QAE/BW,MAAMb,CAAAA,cAAAA,MAAMa,IAAI,AAAJA,MAAI,QAAVb,gBAAAA,KAAAA,IAAAA,cAAc;QACpBI,kBAAkBJ,CAAAA,0BAAAA,MAAMI,gBAAgB,AAAhBA,MAAgB,QAAtBJ,4BAAAA,KAAAA,IAAAA,0BAA0B;QAC5Cc,UAAUd,CAAAA,kBAAAA,MAAMc,QAAQ,AAARA,MAAQ,QAAdd,oBAAAA,KAAAA,IAAAA,kBAAkB;IAC9B;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableContextValues.
|
|
1
|
+
{"version":3,"sources":["useTableContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n const tableContext = React.useMemo(\n () => ({\n noNativeElements,\n size,\n sortable,\n }),\n [noNativeElements, size, sortable],\n );\n\n return {\n table: tableContext,\n };\n}\n"],"names":["useTableContextValues_unstable","state","size","noNativeElements","sortable","tableContext","React","useMemo","table"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;AAGhB,SAASA,+BAA+BC,KAAiB;IAC9D,MAAM,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,EAAE,GAAGH;IAE7C,MAAMI,eAAeC,OAAMC,OAAO,CAChC,IAAO,CAAA;YACLJ;YACAD;YACAE;QACF,CAAA,GACA;QAACD;QAAkBD;QAAME;KAAS;IAGpC,OAAO;QACLI,OAAOH;IACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableStyles.styles.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useTableStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const tableClassName = 'fui-Table';\nexport const tableClassNames = {\n root: 'fui-Table'\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table',\n verticalAlign: 'middle',\n width: '100%',\n tableLayout: 'fixed'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n borderCollapse: 'collapse',\n backgroundColor: tokens.colorSubtleBackground\n }\n});\n/**\n * Apply styling to the Table slots based on the state\n */ export const useTableStyles_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(tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);\n return state;\n};\n"],"names":["tableClassName","tableClassNames","useTableStyles_unstable","root","useTableLayoutStyles","__styles","mc9l5x","ha4doy","a9b677","B73mfa3","d","useFlexLayoutStyles","useStyles","po53p8","De3pzq","state","styles","layoutStyles","table","flex","className","mergeClasses","noNativeElements"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,cAAc;eAAdA;;IACAC,eAAe;eAAfA;;IA0BIC,uBAAuB;eAAvBA;;;uBA7BwB;AAElC,MAAMF,iBAAiB;AACvB,MAAMC,kBAAkB;IAC3BE,MAAM;AACV;AACA,MAAMC,uBAAoB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAQ7B,MAAMC,sBAAmB,WAAA,GAAGN,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;IAAA;AAAA,GAAA;IAAAI,GAAA;QAAA;KAAA;AAAA;AAK5B;;CAEA,GAAI,MAAME,YAAS,WAAA,GAAGP,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAU,QAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAJ,GAAA;QAAA;QAAA;KAAA;AAAA;AAQX,MAAMR,0BAA2Ba,CAAAA;IACxC;IACA,MAAMC,SAASJ;IACf,MAAMK,eAAe;QACjBC,OAAOd;QACPe,MAAMR;IACV;IACAI,MAAMZ,IAAI,CAACiB,SAAS,GAAGC,IAAAA,mBAAY,EAACrB,gBAAgBgB,OAAOb,IAAI,EAAEY,MAAMO,gBAAgB,GAAGL,aAAaE,IAAI,CAAChB,IAAI,GAAGc,aAAaC,KAAK,CAACf,IAAI,EAAEY,MAAMZ,IAAI,CAACiB,SAAS;IAChK,OAAOL;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableBody.
|
|
1
|
+
{"version":3,"sources":["TableBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles.styles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableBody component\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableBodyStyles_unstable')(state);\n\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"names":["TableBody","React","forwardRef","props","ref","state","useTableBody_unstable","useTableBodyStyles_unstable","useCustomStyleHook_unstable","renderTableBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;iCACG;0CACG;qCAGA;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAE5BG,IAAAA,gDAAAA,EAA4B,+BAA+BH;IAE3D,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["TableBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderTableBody.
|
|
1
|
+
{"version":3,"sources":["renderTableBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableBodyState, TableBodySlots } from './TableBody.types';\n\n/**\n * Render the final JSX of TableBody\n */\nexport const renderTableBody_unstable = (state: TableBodyState) => {\n assertSlots<TableBodySlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderTableBody_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;gCAC4B;AAMrB,MAAMA,2BAA2B,CAACC;IACvCC,IAAAA,2BAAAA,EAA4BD;IAE5B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableBody.
|
|
1
|
+
{"version":3,"sources":["useTableBody.ts"],"sourcesContent":["import * 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":["useTableBody_unstable","props","ref","noNativeElements","useTableContext","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACwB;8BAEf;AAWzB,MAAMA,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,IAAAA,6BAAAA;QACPH;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,AAAFA,MAAE,QAARL,cAAAA,KAAAA,IAAAA,YAAYE,gBAAAA,IAAmB,QAAQ;IAE7D,OAAO;QACLI,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBN,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKA;YACLU,MAAMP,kBAAkB,QAAQ,aAAaQ;YAC7C,GAAGZ,KAAK;QACV,IACA;YAAEa,aAAaT;QAAc;QAE/BF;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableBodyStyles.styles.js"],"sourcesContent":["import { mergeClasses,
|
|
1
|
+
{"version":3,"sources":["useTableBodyStyles.styles.js"],"sourcesContent":["import { 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"],"names":["tableBodyClassName","tableBodyClassNames","useTableBodyStyles_unstable","useTableLayoutStyles","__styles","root","mc9l5x","d","useFlexLayoutStyles","state","layoutStyles","table","flex","className","mergeClasses","noNativeElements"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAWaA,kBAAkB;eAAlBA;;IACAC,mBAAmB;eAAnBA;;IAKIC,2BAA2B;eAA3BA;;;uBAjBwB;AACzC,MAAMC,uBAAoB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,MAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAK7B,MAAMC,sBAAmB,WAAA,GAAGJ,IAAAA,eAAA,EAAA;IAAAC,MAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAKrB,MAAMP,qBAAqB;AAC3B,MAAMC,sBAAsB;IAC/BI,MAAM;AACV;AAGW,MAAMH,8BAA+BO,CAAAA;IAC5C;IACA,MAAMC,eAAe;QACjBC,OAAOR;QACPS,MAAMJ;IACV;IACAC,MAAMJ,IAAI,CAACQ,SAAS,GAAGC,IAAAA,mBAAY,EAACd,oBAAoBS,MAAMM,gBAAgB,GAAGL,aAAaE,IAAI,CAACP,IAAI,GAAGK,aAAaC,KAAK,CAACN,IAAI,EAAEI,MAAMJ,IAAI,CAACQ,SAAS;IACvJ,OAAOJ;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableCell.
|
|
1
|
+
{"version":3,"sources":["TableCell.tsx"],"sourcesContent":["import * 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":["TableCell","React","forwardRef","props","ref","state","useTableCell_unstable","useTableCellStyles_unstable","useCustomStyleHook_unstable","renderTableCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;iCACG;0CACG;qCAGA;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAE5BG,IAAAA,gDAAAA,EAA4B,+BAA+BH;IAE3D,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["TableCell.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderTableCell.
|
|
1
|
+
{"version":3,"sources":["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":["renderTableCell_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;gCAC4B;AAMrB,MAAMA,2BAA2B,CAACC;IACvCC,IAAAA,2BAAAA,EAA4BD;IAE5B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCell.
|
|
1
|
+
{"version":3,"sources":["useTableCell.ts"],"sourcesContent":["import * 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":["useTableCell_unstable","props","ref","noNativeElements","size","useTableContext","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACwB;8BAEf;AAWzB,MAAMA,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGC,IAAAA,6BAAAA;QAEbJ;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,AAAFA,MAAE,QAARN,cAAAA,KAAAA,IAAAA,YAAYE,gBAAAA,IAAmB,QAAQ;IAE7D,OAAO;QACLK,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBN,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKA;YACLW,MAAMP,kBAAkB,QAAQ,SAASQ;YACzC,GAAGb,KAAK;QACV,IACA;YAAEc,aAAaT;QAAc;QAE/BH;QACAC;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCellStyles.styles.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useTableCellStyles.styles.js"],"sourcesContent":["import { 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"],"names":["tableCellClassName","tableCellClassNames","useTableCellStyles_unstable","root","useTableLayoutStyles","__styles","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","state","styles","layoutStyles","table","flex","className","mergeClasses","noNativeElements","size"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,kBAAkB;eAAlBA;;IACAC,mBAAmB;eAAnBA;;IAmDIC,2BAA2B;eAA3BA;;;uBAvDwB;AAGlC,MAAMF,qBAAqB;AAC3B,MAAMC,sBAAsB;IAC/BE,MAAMH;AACV;AACA,MAAMI,uBAAoB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAC,QAAA;IAAA;IAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,OAAA;QAAAD,SAAA;IAAA;IAAA,eAAA;QAAAA,SAAA;IAAA;AAAA,GAAA;IAAAE,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAe7B,MAAMC,sBAAmB,WAAA,GAAGP,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAO,SAAA;QAAAC,SAAA;QAAAC,MAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;IAAAV,QAAA;QAAAW,QAAA;IAAA;IAAAT,OAAA;QAAAS,QAAA;IAAA;IAAA,eAAA;QAAAA,QAAA;IAAA;AAAA,GAAA;IAAAR,GAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAS,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAiB5B;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGhB,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAmB,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAzB,GAAA;QAAA;QAAA;YAAA;YAAA;gBAAAS,GAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA,CAAA;YAAA;SAAA;KAAA;AAAA;AAcX,MAAMlB,8BAA+BmC,CAAAA;IAC5C;IACA,MAAMC,SAASjB;IACf,MAAMkB,eAAe;QACjBC,OAAOpC;QACPqC,MAAM7B;IACV;IACAyB,MAAMlC,IAAI,CAACuC,SAAS,GAAGC,IAAAA,mBAAY,EAAC1C,oBAAoBE,IAAI,EAAEmC,OAAOnC,IAAI,EAAEkC,MAAMO,gBAAgB,GAAGL,aAAaE,IAAI,CAACtC,IAAI,GAAGoC,aAAaC,KAAK,CAACrC,IAAI,EAAEkC,MAAMO,gBAAgB,GAAGL,aAAaE,IAAI,CAACJ,MAAMQ,IAAI,CAAC,GAAGN,aAAaC,KAAK,CAACH,MAAMQ,IAAI,CAAC,EAAER,MAAMlC,IAAI,CAACuC,SAAS;IACnQ,OAAOL;AACX"}
|