Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
export { DataGrid, dataGridClassNames, renderDataGrid_unstable, useDataGridContextValues_unstable, useDataGridStyles_unstable, useDataGrid_unstable } from './components/DataGrid/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DataGrid.ts"],"sourcesContent":["export type {\n DataGridContextValue,\n DataGridContextValues,\n DataGridFocusMode,\n DataGridProps,\n DataGridSlots,\n DataGridState,\n} from './components/DataGrid/index';\nexport {\n DataGrid,\n dataGridClassNames,\n renderDataGrid_unstable,\n useDataGridContextValues_unstable,\n useDataGridStyles_unstable,\n useDataGrid_unstable,\n} from './components/DataGrid/index';\n"],"names":["DataGrid","dataGridClassNames","renderDataGrid_unstable","useDataGridContextValues_unstable","useDataGridStyles_unstable","useDataGrid_unstable"],"rangeMappings":"","mappings":"AAQA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,iCAAiC,EACjCC,0BAA0B,EAC1BC,oBAAoB,QACf,8BAA8B"}
+1
View File
@@ -0,0 +1 @@
export { DataGridBody, dataGridBodyClassNames, renderDataGridBody_unstable, useDataGridBodyStyles_unstable, useDataGridBody_unstable } from './components/DataGridBody/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DataGridBody.ts"],"sourcesContent":["export type {\n DataGridBodyProps,\n DataGridBodySlots,\n DataGridBodyState,\n RowRenderFunction,\n} from './components/DataGridBody/index';\nexport {\n DataGridBody,\n dataGridBodyClassNames,\n renderDataGridBody_unstable,\n useDataGridBodyStyles_unstable,\n useDataGridBody_unstable,\n} from './components/DataGridBody/index';\n"],"names":["DataGridBody","dataGridBodyClassNames","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useDataGridBody_unstable"],"rangeMappings":"","mappings":"AAMA,SACEA,YAAY,EACZC,sBAAsB,EACtBC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,wBAAwB,QACnB,kCAAkC"}
+1
View File
@@ -0,0 +1 @@
export { DataGridCell, dataGridCellClassNames, renderDataGridCell_unstable, useDataGridCellStyles_unstable, useDataGridCell_unstable } from './components/DataGridCell/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DataGridCell.ts"],"sourcesContent":["export type {\n DataGridCellFocusMode,\n DataGridCellProps,\n DataGridCellSlots,\n DataGridCellState,\n} from './components/DataGridCell/index';\nexport {\n DataGridCell,\n dataGridCellClassNames,\n renderDataGridCell_unstable,\n useDataGridCellStyles_unstable,\n useDataGridCell_unstable,\n} from './components/DataGridCell/index';\n"],"names":["DataGridCell","dataGridCellClassNames","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useDataGridCell_unstable"],"rangeMappings":"","mappings":"AAMA,SACEA,YAAY,EACZC,sBAAsB,EACtBC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,wBAAwB,QACnB,kCAAkC"}
+1
View File
@@ -0,0 +1 @@
export { DataGridHeader, dataGridHeaderClassNames, renderDataGridHeader_unstable, useDataGridHeaderStyles_unstable, useDataGridHeader_unstable } from './components/DataGridHeader/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DataGridHeader.ts"],"sourcesContent":["export type { DataGridHeaderProps, DataGridHeaderSlots, DataGridHeaderState } from './components/DataGridHeader/index';\nexport {\n DataGridHeader,\n dataGridHeaderClassNames,\n renderDataGridHeader_unstable,\n useDataGridHeaderStyles_unstable,\n useDataGridHeader_unstable,\n} from './components/DataGridHeader/index';\n"],"names":["DataGridHeader","dataGridHeaderClassNames","renderDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useDataGridHeader_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,cAAc,EACdC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,oCAAoC"}
+1
View File
@@ -0,0 +1 @@
export { DataGridHeaderCell, dataGridHeaderCellClassNames, renderDataGridHeaderCell_unstable, useDataGridHeaderCellStyles_unstable, useDataGridHeaderCell_unstable } from './components/DataGridHeaderCell/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DataGridHeaderCell.ts"],"sourcesContent":["export type {\n DataGridHeaderCellProps,\n DataGridHeaderCellSlots,\n DataGridHeaderCellState,\n} from './components/DataGridHeaderCell/index';\nexport {\n DataGridHeaderCell,\n dataGridHeaderCellClassNames,\n renderDataGridHeaderCell_unstable,\n useDataGridHeaderCellStyles_unstable,\n useDataGridHeaderCell_unstable,\n} from './components/DataGridHeaderCell/index';\n"],"names":["DataGridHeaderCell","dataGridHeaderCellClassNames","renderDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useDataGridHeaderCell_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,kBAAkB,EAClBC,4BAA4B,EAC5BC,iCAAiC,EACjCC,oCAAoC,EACpCC,8BAA8B,QACzB,wCAAwC"}
+1
View File
@@ -0,0 +1 @@
export { DataGridRow, dataGridRowClassNames, renderDataGridRow_unstable, useDataGridRowStyles_unstable, useDataGridRow_unstable } from './components/DataGridRow/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DataGridRow.ts"],"sourcesContent":["export type {\n CellRenderFunction,\n DataGridRowProps,\n DataGridRowSlots,\n DataGridRowState,\n} from './components/DataGridRow/index';\nexport {\n DataGridRow,\n dataGridRowClassNames,\n renderDataGridRow_unstable,\n useDataGridRowStyles_unstable,\n useDataGridRow_unstable,\n} from './components/DataGridRow/index';\n"],"names":["DataGridRow","dataGridRowClassNames","renderDataGridRow_unstable","useDataGridRowStyles_unstable","useDataGridRow_unstable"],"rangeMappings":"","mappings":"AAMA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,iCAAiC"}
+1
View File
@@ -0,0 +1 @@
export { DataGridSelectionCell, dataGridSelectionCellClassNames, renderDataGridSelectionCell_unstable, useDataGridSelectionCellStyles_unstable, useDataGridSelectionCell_unstable } from './components/DataGridSelectionCell/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/DataGridSelectionCell.ts"],"sourcesContent":["export type {\n DataGridSelectionCellProps,\n DataGridSelectionCellSlots,\n DataGridSelectionCellState,\n} from './components/DataGridSelectionCell/index';\nexport {\n DataGridSelectionCell,\n dataGridSelectionCellClassNames,\n renderDataGridSelectionCell_unstable,\n useDataGridSelectionCellStyles_unstable,\n useDataGridSelectionCell_unstable,\n} from './components/DataGridSelectionCell/index';\n"],"names":["DataGridSelectionCell","dataGridSelectionCellClassNames","renderDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useDataGridSelectionCell_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,qBAAqB,EACrBC,+BAA+B,EAC/BC,oCAAoC,EACpCC,uCAAuC,EACvCC,iCAAiC,QAC5B,2CAA2C"}
+1
View File
@@ -0,0 +1 @@
export { Table, renderTable_unstable, tableClassName, tableClassNames, useTableStyles_unstable, useTable_unstable } from './components/Table/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/Table.ts"],"sourcesContent":["export type {\n SortDirection,\n TableContextValue,\n TableContextValues,\n TableProps,\n TableSlots,\n TableState,\n} from './components/Table/index';\nexport {\n Table,\n renderTable_unstable,\n tableClassName,\n tableClassNames,\n useTableStyles_unstable,\n useTable_unstable,\n} from './components/Table/index';\n"],"names":["Table","renderTable_unstable","tableClassName","tableClassNames","useTableStyles_unstable","useTable_unstable"],"rangeMappings":"","mappings":"AAQA,SACEA,KAAK,EACLC,oBAAoB,EACpBC,cAAc,EACdC,eAAe,EACfC,uBAAuB,EACvBC,iBAAiB,QACZ,2BAA2B"}
+1
View File
@@ -0,0 +1 @@
export { TableBody, renderTableBody_unstable, tableBodyClassName, tableBodyClassNames, useTableBodyStyles_unstable, useTableBody_unstable } from './components/TableBody/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableBody.ts"],"sourcesContent":["export type { TableBodyProps, TableBodySlots, TableBodyState } from './components/TableBody/index';\nexport {\n TableBody,\n renderTableBody_unstable,\n tableBodyClassName,\n tableBodyClassNames,\n useTableBodyStyles_unstable,\n useTableBody_unstable,\n} from './components/TableBody/index';\n"],"names":["TableBody","renderTableBody_unstable","tableBodyClassName","tableBodyClassNames","useTableBodyStyles_unstable","useTableBody_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,SAAS,EACTC,wBAAwB,EACxBC,kBAAkB,EAClBC,mBAAmB,EACnBC,2BAA2B,EAC3BC,qBAAqB,QAChB,+BAA+B"}
+1
View File
@@ -0,0 +1 @@
export { TableCell, renderTableCell_unstable, tableCellClassName, tableCellClassNames, useTableCellStyles_unstable, useTableCell_unstable } from './components/TableCell/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableCell.ts"],"sourcesContent":["export type { TableCellProps, TableCellSlots, TableCellState } from './components/TableCell/index';\nexport {\n TableCell,\n renderTableCell_unstable,\n tableCellClassName,\n tableCellClassNames,\n useTableCellStyles_unstable,\n useTableCell_unstable,\n} from './components/TableCell/index';\n"],"names":["TableCell","renderTableCell_unstable","tableCellClassName","tableCellClassNames","useTableCellStyles_unstable","useTableCell_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,SAAS,EACTC,wBAAwB,EACxBC,kBAAkB,EAClBC,mBAAmB,EACnBC,2BAA2B,EAC3BC,qBAAqB,QAChB,+BAA+B"}
+1
View File
@@ -0,0 +1 @@
export { TableCellActions, renderTableCellActions_unstable, tableCellActionsClassNames, useTableCellActionsStyles_unstable, useTableCellActions_unstable } from './components/TableCellActions/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableCellActions.ts"],"sourcesContent":["export type {\n TableCellActionsProps,\n TableCellActionsSlots,\n TableCellActionsState,\n} from './components/TableCellActions/index';\nexport {\n TableCellActions,\n renderTableCellActions_unstable,\n tableCellActionsClassNames,\n useTableCellActionsStyles_unstable,\n useTableCellActions_unstable,\n} from './components/TableCellActions/index';\n"],"names":["TableCellActions","renderTableCellActions_unstable","tableCellActionsClassNames","useTableCellActionsStyles_unstable","useTableCellActions_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,gBAAgB,EAChBC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,EAClCC,4BAA4B,QACvB,sCAAsC"}
+1
View File
@@ -0,0 +1 @@
export { TableCellLayout, renderTableCellLayout_unstable, tableCellLayoutClassNames, useTableCellLayoutStyles_unstable, useTableCellLayout_unstable } from './components/TableCellLayout/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableCellLayout.ts"],"sourcesContent":["export type {\n TableCellLayoutContextValues,\n TableCellLayoutProps,\n TableCellLayoutSlots,\n TableCellLayoutState,\n} from './components/TableCellLayout/index';\nexport {\n TableCellLayout,\n renderTableCellLayout_unstable,\n tableCellLayoutClassNames,\n useTableCellLayoutStyles_unstable,\n useTableCellLayout_unstable,\n} from './components/TableCellLayout/index';\n"],"names":["TableCellLayout","renderTableCellLayout_unstable","tableCellLayoutClassNames","useTableCellLayoutStyles_unstable","useTableCellLayout_unstable"],"rangeMappings":"","mappings":"AAMA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,qCAAqC"}
+1
View File
@@ -0,0 +1 @@
export { TableCellLayout, renderTableCellLayout_unstable, tableCellLayoutClassNames, useTableCellLayoutStyles_unstable, useTableCellLayout_unstable } from './components/TableCellLayout/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableCellPrimaryLayout.ts"],"sourcesContent":["export type {\n TableCellLayoutContextValues,\n TableCellLayoutProps,\n TableCellLayoutSlots,\n TableCellLayoutState,\n} from './components/TableCellLayout/index';\nexport {\n TableCellLayout,\n renderTableCellLayout_unstable,\n tableCellLayoutClassNames,\n useTableCellLayoutStyles_unstable,\n useTableCellLayout_unstable,\n} from './components/TableCellLayout/index';\n"],"names":["TableCellLayout","renderTableCellLayout_unstable","tableCellLayoutClassNames","useTableCellLayoutStyles_unstable","useTableCellLayout_unstable"],"rangeMappings":"","mappings":"AAMA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,qCAAqC"}
+1
View File
@@ -0,0 +1 @@
export { TableHeader, renderTableHeader_unstable, tableHeaderClassName, tableHeaderClassNames, useTableHeaderStyles_unstable, useTableHeader_unstable } from './components/TableHeader/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableHeader.ts"],"sourcesContent":["export type { TableHeaderProps, TableHeaderSlots, TableHeaderState } from './components/TableHeader/index';\nexport {\n TableHeader,\n renderTableHeader_unstable,\n tableHeaderClassName,\n tableHeaderClassNames,\n useTableHeaderStyles_unstable,\n useTableHeader_unstable,\n} from './components/TableHeader/index';\n"],"names":["TableHeader","renderTableHeader_unstable","tableHeaderClassName","tableHeaderClassNames","useTableHeaderStyles_unstable","useTableHeader_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,WAAW,EACXC,0BAA0B,EAC1BC,oBAAoB,EACpBC,qBAAqB,EACrBC,6BAA6B,EAC7BC,uBAAuB,QAClB,iCAAiC"}
+1
View File
@@ -0,0 +1 @@
export { TableHeaderCell, renderTableHeaderCell_unstable, tableHeaderCellClassName, tableHeaderCellClassNames, useTableHeaderCellStyles_unstable, useTableHeaderCell_unstable } from './components/TableHeaderCell/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableHeaderCell.ts"],"sourcesContent":["export type {\n TableHeaderCellProps,\n TableHeaderCellSlots,\n TableHeaderCellState,\n} from './components/TableHeaderCell/index';\nexport {\n TableHeaderCell,\n renderTableHeaderCell_unstable,\n tableHeaderCellClassName,\n tableHeaderCellClassNames,\n useTableHeaderCellStyles_unstable,\n useTableHeaderCell_unstable,\n} from './components/TableHeaderCell/index';\n"],"names":["TableHeaderCell","renderTableHeaderCell_unstable","tableHeaderCellClassName","tableHeaderCellClassNames","useTableHeaderCellStyles_unstable","useTableHeaderCell_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,wBAAwB,EACxBC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,qCAAqC"}
+1
View File
@@ -0,0 +1 @@
export { TableResizeHandle, renderTableResizeHandle_unstable, tableResizeHandleClassNames, useTableResizeHandleStyles_unstable, useTableResizeHandle_unstable } from './components/TableResizeHandle/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableResizeHandle.ts"],"sourcesContent":["export type {\n TableResizeHandleProps,\n TableResizeHandleSlots,\n TableResizeHandleState,\n} from './components/TableResizeHandle/index';\nexport {\n TableResizeHandle,\n renderTableResizeHandle_unstable,\n tableResizeHandleClassNames,\n useTableResizeHandleStyles_unstable,\n useTableResizeHandle_unstable,\n} from './components/TableResizeHandle/index';\n"],"names":["TableResizeHandle","renderTableResizeHandle_unstable","tableResizeHandleClassNames","useTableResizeHandleStyles_unstable","useTableResizeHandle_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,iBAAiB,EACjBC,gCAAgC,EAChCC,2BAA2B,EAC3BC,mCAAmC,EACnCC,6BAA6B,QACxB,uCAAuC"}
+1
View File
@@ -0,0 +1 @@
export { TableRow, renderTableRow_unstable, tableRowClassName, tableRowClassNames, useTableRowStyles_unstable, useTableRow_unstable } from './components/TableRow/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableRow.ts"],"sourcesContent":["export type { TableRowProps, TableRowSlots, TableRowState } from './components/TableRow/index';\nexport {\n TableRow,\n renderTableRow_unstable,\n tableRowClassName,\n tableRowClassNames,\n useTableRowStyles_unstable,\n useTableRow_unstable,\n} from './components/TableRow/index';\n"],"names":["TableRow","renderTableRow_unstable","tableRowClassName","tableRowClassNames","useTableRowStyles_unstable","useTableRow_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,QAAQ,EACRC,uBAAuB,EACvBC,iBAAiB,EACjBC,kBAAkB,EAClBC,0BAA0B,EAC1BC,oBAAoB,QACf,8BAA8B"}
+1
View File
@@ -0,0 +1 @@
export { CELL_WIDTH, TableSelectionCell, renderTableSelectionCell_unstable, tableSelectionCellClassNames, useTableSelectionCellStyles_unstable, useTableSelectionCell_unstable } from './components/TableSelectionCell/index';
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../src/TableSelectionCell.ts"],"sourcesContent":["export type {\n TableSelectionCellProps,\n TableSelectionCellSlots,\n TableSelectionCellState,\n} from './components/TableSelectionCell/index';\nexport {\n CELL_WIDTH,\n TableSelectionCell,\n renderTableSelectionCell_unstable,\n tableSelectionCellClassNames,\n useTableSelectionCellStyles_unstable,\n useTableSelectionCell_unstable,\n} from './components/TableSelectionCell/index';\n"],"names":["CELL_WIDTH","TableSelectionCell","renderTableSelectionCell_unstable","tableSelectionCellClassNames","useTableSelectionCellStyles_unstable","useTableSelectionCell_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,UAAU,EACVC,kBAAkB,EAClBC,iCAAiC,EACjCC,4BAA4B,EAC5BC,oCAAoC,EACpCC,8BAA8B,QACzB,wCAAwC"}
+15
View File
@@ -0,0 +1,15 @@
import * as React from 'react';
import { useDataGrid_unstable } from './useDataGrid';
import { renderDataGrid_unstable } from './renderDataGrid';
import { useDataGridStyles_unstable } from './useDataGridStyles.styles';
import { useDataGridContextValues_unstable } from './useDataGridContextValues';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* DataGrid component
*/ export const DataGrid = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useDataGrid_unstable(props, ref);
useDataGridStyles_unstable(state);
useCustomStyleHook_unstable('useDataGridStyles_unstable')(state);
return renderDataGrid_unstable(state, useDataGridContextValues_unstable(state));
});
DataGrid.displayName = 'DataGrid';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/DataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGrid_unstable } from './useDataGrid';\nimport { renderDataGrid_unstable } from './renderDataGrid';\nimport { useDataGridStyles_unstable } from './useDataGridStyles.styles';\nimport type { DataGridProps } from './DataGrid.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDataGridContextValues_unstable } from './useDataGridContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGrid component\n */\nexport const DataGrid: ForwardRefComponent<DataGridProps> = React.forwardRef((props, ref) => {\n const state = useDataGrid_unstable(props, ref);\n\n useDataGridStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridStyles_unstable')(state);\n\n return renderDataGrid_unstable(state, useDataGridContextValues_unstable(state));\n});\n\nDataGrid.displayName = 'DataGrid';\n"],"names":["React","useDataGrid_unstable","renderDataGrid_unstable","useDataGridStyles_unstable","useDataGridContextValues_unstable","useCustomStyleHook_unstable","DataGrid","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQT,qBAAqBO,OAAOC;IAE1CN,2BAA2BO;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ,OAAON,kCAAkCM;AAC1E,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -0,0 +1 @@
import * as React from 'react';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/DataGrid.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { SelectionHookParams, SelectionMode } from '@fluentui/react-utilities';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport type { TableContextValues, TableProps, TableSlots, TableState } from '../Table/Table.types';\nimport type {\n SortState,\n TableFeaturesState,\n UseTableSortOptions,\n OnSelectionChangeData,\n TableColumnSizingOptions,\n TableColumnId,\n} from '../../hooks';\nimport { TableRowProps } from '../TableRow/TableRow.types';\n\nexport type DataGridSlots = TableSlots;\n\nexport type DataGridFocusMode = 'none' | 'cell' | 'row_unstable' | 'composite';\n\nexport type DataGridContextValues = TableContextValues & {\n dataGrid: DataGridContextValue;\n};\n\n// Use any here since we can't know the user types\n// The user is responsible for narrowing the type downstream\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DataGridContextValue = TableFeaturesState<any> & {\n /**\n * How focus navigation will work in the datagrid\n * @default cell\n */\n focusMode: DataGridFocusMode;\n\n /**\n * Lets child components know if rows selection is enabled\n * @see selectionMode prop enables row selection on the component\n */\n selectableRows: boolean;\n\n /**\n * Enables subtle selection style\n * @default false\n */\n subtleSelection: boolean;\n\n /**\n * Row appearance when selected\n * @default brand\n */\n selectionAppearance: TableRowProps['appearance'];\n\n /**\n * Enables column resizing\n */\n resizableColumns?: boolean;\n\n compositeRowTabsterAttribute: TabsterDOMAttribute;\n};\n\n/**\n * DataGrid Props\n */\nexport type DataGridProps = TableProps &\n Pick<DataGridContextValue, 'items' | 'columns' | 'getRowId'> &\n Pick<Partial<DataGridContextValue>, 'focusMode' | 'subtleSelection' | 'selectionAppearance' | 'resizableColumns'> &\n Pick<UseTableSortOptions, 'sortState' | 'defaultSortState'> &\n Pick<SelectionHookParams, 'defaultSelectedItems' | 'selectedItems'> & {\n /* eslint-disable @nx/workspace-consistent-callback-type -- can't change type of existing callback */\n onSortChange?: (e: React.MouseEvent, sortState: SortState) => void;\n onSelectionChange?: (e: React.MouseEvent | React.KeyboardEvent, data: OnSelectionChangeData) => void;\n /* eslint-enable @nx/workspace-consistent-callback-type */\n\n /**\n * Enables row selection and sets the selection mode\n * @default false\n */\n selectionMode?: SelectionMode;\n /**\n * Options for column resizing, specific for each column\n */\n columnSizingOptions?: TableColumnSizingOptions;\n /**\n * A callback triggered when a column is resized.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onColumnResize?: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n /**\n * For column resizing. Allows for a container size to be adjusted by a number of pixels, to make\n * sure the columns don't overflow the table.\n * By default, this value is calculated internally based on other props, but can be overriden.\n */\n containerWidthOffset?: number;\n\n /**\n * Custom options for column resizing.\n */\n resizableColumnsOptions?: {\n /**\n * If true, columns will be auto-fitted to the container width.\n * @default true\n * */\n autoFitColumns?: boolean;\n };\n };\n\n/**\n * State used in rendering DataGrid\n */\nexport type DataGridState = TableState & { tableState: TableFeaturesState<unknown> } & Pick<\n DataGridContextValue,\n | 'focusMode'\n | 'selectableRows'\n | 'subtleSelection'\n | 'selectionAppearance'\n | 'getRowId'\n | 'resizableColumns'\n | 'compositeRowTabsterAttribute'\n >;\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
+5
View File
@@ -0,0 +1,5 @@
export { DataGrid } from './DataGrid';
export { renderDataGrid_unstable } from './renderDataGrid';
export { useDataGrid_unstable } from './useDataGrid';
export { dataGridClassNames, useDataGridStyles_unstable } from './useDataGridStyles.styles';
export { useDataGridContextValues_unstable } from './useDataGridContextValues';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/index.ts"],"sourcesContent":["export { DataGrid } from './DataGrid';\nexport type {\n DataGridContextValue,\n DataGridContextValues,\n DataGridFocusMode,\n DataGridProps,\n DataGridSlots,\n DataGridState,\n} from './DataGrid.types';\nexport { renderDataGrid_unstable } from './renderDataGrid';\nexport { useDataGrid_unstable } from './useDataGrid';\nexport { dataGridClassNames, useDataGridStyles_unstable } from './useDataGridStyles.styles';\nexport { useDataGridContextValues_unstable } from './useDataGridContextValues';\n"],"names":["DataGrid","renderDataGrid_unstable","useDataGrid_unstable","dataGridClassNames","useDataGridStyles_unstable","useDataGridContextValues_unstable"],"rangeMappings":";;;;","mappings":"AAAA,SAASA,QAAQ,QAAQ,aAAa;AAStC,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,6BAA6B;AAC5F,SAASC,iCAAiC,QAAQ,6BAA6B"}
@@ -0,0 +1,10 @@
import * as React from 'react';
import { renderTable_unstable } from '../Table/renderTable';
import { DataGridContextProvider } from '../../contexts/dataGridContext';
/**
* Render the final JSX of DataGrid
*/ export const renderDataGrid_unstable = (state, contextValues)=>{
return /*#__PURE__*/ React.createElement(DataGridContextProvider, {
value: contextValues.dataGrid
}, renderTable_unstable(state, contextValues));
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/renderDataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridContextValues, DataGridState } from './DataGrid.types';\nimport { renderTable_unstable } from '../Table/renderTable';\nimport { DataGridContextProvider } from '../../contexts/dataGridContext';\n\n/**\n * Render the final JSX of DataGrid\n */\nexport const renderDataGrid_unstable = (state: DataGridState, contextValues: DataGridContextValues) => {\n return (\n <DataGridContextProvider value={contextValues.dataGrid}>\n {renderTable_unstable(state, contextValues)}\n </DataGridContextProvider>\n );\n};\n"],"names":["React","renderTable_unstable","DataGridContextProvider","renderDataGrid_unstable","state","contextValues","value","dataGrid"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,oBAAoB,QAAQ,uBAAuB;AAC5D,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC;IAC5D,qBACE,oBAACH;QAAwBI,OAAOD,cAAcE,QAAQ;OACnDN,qBAAqBG,OAAOC;AAGnC,EAAE"}
@@ -0,0 +1,97 @@
import * as React from 'react';
import { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';
import { useTable_unstable } from '../Table/useTable';
import { useEventCallback, useMergedRefs } from '@fluentui/react-utilities';
import { End, Home } from '@fluentui/keyboard-keys';
import { useTableFeatures, useTableSort, useTableSelection, useTableColumnSizing_unstable, useTableCompositeNavigation } from '../../hooks';
import { CELL_WIDTH } from '../TableSelectionCell';
/**
* Create the state required to render DataGrid.
*
* The returned state can be modified with hooks such as useDataGridStyles_unstable,
* before being passed to renderDataGrid_unstable.
*
* @param props - props from this instance of DataGrid
* @param ref - reference to root HTMLElement of DataGrid
*/ export const useDataGrid_unstable = (props, ref)=>{
const { items, columns, focusMode = 'cell', selectionMode, onSortChange, onSelectionChange, defaultSortState, sortState, selectedItems, defaultSelectedItems, subtleSelection = false, selectionAppearance = 'brand', getRowId, resizableColumns, columnSizingOptions, onColumnResize, containerWidthOffset, resizableColumnsOptions = {} } = props;
const widthOffset = containerWidthOffset !== null && containerWidthOffset !== void 0 ? containerWidthOffset : selectionMode ? -CELL_WIDTH : 0;
const gridTabsterAttribute = useArrowNavigationGroup({
axis: 'grid'
});
const { onTableKeyDown: onCompositeKeyDown, tableTabsterAttribute: compositeTabsterAttribute, tableRowTabsterAttribute: compositeRowTabsterAttribute } = useTableCompositeNavigation();
var _resizableColumnsOptions_autoFitColumns;
const tableState = useTableFeatures({
items,
columns,
getRowId
}, [
useTableSort({
defaultSortState,
sortState,
onSortChange
}),
useTableSelection({
defaultSelectedItems,
selectedItems,
onSelectionChange,
selectionMode: selectionMode !== null && selectionMode !== void 0 ? selectionMode : 'multiselect'
}),
useTableColumnSizing_unstable({
onColumnResize,
columnSizingOptions,
// The selection cell is not part of the columns, therefore its width needs to be subtracted
// from the container to make sure the columns don't overflow the table.
containerWidthOffset: widthOffset,
// Disables automatic resizing of columns when the container overflows.
// This allows the sum of the columns to be larger than the container.
autoFitColumns: (_resizableColumnsOptions_autoFitColumns = resizableColumnsOptions.autoFitColumns) !== null && _resizableColumnsOptions_autoFitColumns !== void 0 ? _resizableColumnsOptions_autoFitColumns : true
})
]);
const innerRef = React.useRef(null);
const { findFirstFocusable, findLastFocusable } = useFocusFinders();
const onKeyDown = useEventCallback((e)=>{
var _props_onKeyDown;
(_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
focusMode === 'composite' && onCompositeKeyDown(e);
// handle ctrl+home and ctrl+end
if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {
return;
}
if (e.key === Home) {
const firstRow = innerRef.current.querySelector('[role="row"]');
if (firstRow) {
var _findFirstFocusable;
(_findFirstFocusable = findFirstFocusable(firstRow)) === null || _findFirstFocusable === void 0 ? void 0 : _findFirstFocusable.focus();
}
}
if (e.key === End) {
const rows = innerRef.current.querySelectorAll('[role="row"]');
if (rows.length) {
var _findLastFocusable;
const lastRow = rows.item(rows.length - 1);
(_findLastFocusable = findLastFocusable(lastRow)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();
}
}
});
const baseTableState = useTable_unstable({
role: 'grid',
as: 'div',
noNativeElements: true,
...focusMode === 'cell' && gridTabsterAttribute,
...focusMode === 'composite' && compositeTabsterAttribute,
...props,
onKeyDown,
...resizableColumns ? tableState.columnSizing_unstable.getTableProps(props) : {}
}, useMergedRefs(ref, tableState.tableRef, innerRef));
return {
...baseTableState,
focusMode,
tableState,
selectableRows: !!selectionMode,
subtleSelection,
selectionAppearance,
resizableColumns,
compositeRowTabsterAttribute
};
};
File diff suppressed because one or more lines are too long
@@ -0,0 +1,17 @@
import { useTableContextValues_unstable } from '../Table/useTableContextValues';
export function useDataGridContextValues_unstable(state) {
const tableContextValues = useTableContextValues_unstable(state);
const { tableState, focusMode, selectableRows, subtleSelection, selectionAppearance, resizableColumns, compositeRowTabsterAttribute } = state;
return {
...tableContextValues,
dataGrid: {
...tableState,
focusMode,
selectableRows,
subtleSelection,
selectionAppearance,
resizableColumns,
compositeRowTabsterAttribute
}
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/useDataGridContextValues.ts"],"sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n const {\n tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n } = state;\n return {\n ...tableContextValues,\n dataGrid: {\n ...tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n },\n };\n}\n"],"names":["useTableContextValues_unstable","useDataGridContextValues_unstable","state","tableContextValues","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns","compositeRowTabsterAttribute","dataGrid"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,8BAA8B,QAAQ,iCAAiC;AAGhF,OAAO,SAASC,kCAAkCC,KAAoB;IACpE,MAAMC,qBAAqBH,+BAA+BE;IAC1D,MAAM,EACJE,UAAU,EACVC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,mBAAmB,EACnBC,gBAAgB,EAChBC,4BAA4B,EAC7B,GAAGR;IACJ,OAAO;QACL,GAAGC,kBAAkB;QACrBQ,UAAU;YACR,GAAGP,UAAU;YACbC;YACAC;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF"}
@@ -0,0 +1,15 @@
import { mergeClasses } from '@griffel/react';
import { useTableStyles_unstable } from '../Table/useTableStyles.styles';
export const dataGridClassNames = {
root: 'fui-DataGrid'
};
/**
* Apply styling to the DataGrid slots based on the state
*/
export const useDataGridStyles_unstable = state => {
'use no memo';
useTableStyles_unstable(state);
state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"names":["mergeClasses","useTableStyles_unstable","dataGridClassNames","root","useDataGridStyles_unstable","state","className"],"sources":["useDataGridStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableStyles_unstable } from '../Table/useTableStyles.styles';\nexport const dataGridClassNames = {\n root: 'fui-DataGrid'\n};\n/**\n * Apply styling to the DataGrid slots based on the state\n */ export const useDataGridStyles_unstable = (state)=>{\n 'use no memo';\n useTableStyles_unstable(state);\n state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,uBAAuB,QAAQ,gCAAgC;AACxE,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,0BAA0B,GAAIC,KAAK,IAAG;EACnD,aAAa;;EACbJ,uBAAuB,CAACI,KAAK,CAAC;EAC9BA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,kBAAkB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAClF,OAAOD,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
import * as React from 'react';
import { useDataGridBody_unstable } from './useDataGridBody';
import { renderDataGridBody_unstable } from './renderDataGridBody';
import { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* DataGridBody component
*/ export const DataGridBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useDataGridBody_unstable(props, ref);
useDataGridBodyStyles_unstable(state);
useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);
return renderDataGridBody_unstable(state);
});
DataGridBody.displayName = 'DataGridBody';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"names":["React","useDataGridBody_unstable","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","DataGridBody","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BACiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAyG;AAEzGJ,aAAaK,WAAW,GAAG"}
@@ -0,0 +1 @@
import * as React from 'react';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/DataGridBody.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowData } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\nexport type RowRenderFunction<TItem = unknown> = (row: TableRowData<TItem>, ...rest: unknown[]) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps<TItem = unknown> = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction<TItem>;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState & {\n rows: TableRowData<unknown>[];\n\n renderRow: RowRenderFunction;\n};\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -0,0 +1,4 @@
export { DataGridBody } from './DataGridBody';
export { renderDataGridBody_unstable } from './renderDataGridBody';
export { useDataGridBody_unstable } from './useDataGridBody';
export { dataGridBodyClassNames, useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/index.ts"],"sourcesContent":["export { DataGridBody } from './DataGridBody';\nexport type { DataGridBodyProps, DataGridBodySlots, DataGridBodyState, RowRenderFunction } from './DataGridBody.types';\nexport { renderDataGridBody_unstable } from './renderDataGridBody';\nexport { useDataGridBody_unstable } from './useDataGridBody';\nexport { dataGridBodyClassNames, useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\n"],"names":["DataGridBody","renderDataGridBody_unstable","useDataGridBody_unstable","dataGridBodyClassNames","useDataGridBodyStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAE9C,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,sBAAsB,EAAEC,8BAA8B,QAAQ,iCAAiC"}
@@ -0,0 +1,14 @@
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
import { assertSlots } from '@fluentui/react-utilities';
import { TableRowIdContextProvider } from '../../contexts/rowIdContext';
/**
* Render the final JSX of DataGridBody
*/ export const renderDataGridBody_unstable = (state)=>{
assertSlots(state);
return /*#__PURE__*/ _jsx(state.root, {
children: state.rows.map((row)=>/*#__PURE__*/ _jsx(TableRowIdContextProvider, {
value: row.rowId,
children: state.renderRow(row)
}, row.rowId))
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n assertSlots<DataGridBodySlots>(state);\n\n return (\n <state.root>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["assertSlots","TableRowIdContextProvider","renderDataGridBody_unstable","state","root","rows","map","row","value","rowId","renderRow"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CH,YAA+BG;IAE/B,qBACE,KAACA,MAAMC,IAAI;kBACRD,MAAME,IAAI,CAACC,GAAG,CAACC,CAAAA,oBACd,KAACN;gBAA0CO,OAAOD,IAAIE,KAAK;0BACxDN,MAAMO,SAAS,CAACH;eADaA,IAAIE,KAAK;;AAMjD,EAAE"}
@@ -0,0 +1,28 @@
import * as React from 'react';
import { useTableBody_unstable } from '../TableBody/useTableBody';
import { useDataGridContext_unstable } from '../../contexts/dataGridContext';
import { useTableContext } from '../../contexts/tableContext';
/**
* Create the state required to render DataGridBody.
*
* The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,
* before being passed to renderDataGridBody_unstable.
*
* @param props - props from this instance of DataGridBody
* @param ref - reference to root HTMLElement of DataGridBody
*/ export const useDataGridBody_unstable = (props, ref)=>{
const { sortable } = useTableContext();
const getRows = useDataGridContext_unstable((ctx)=>ctx.getRows);
const sort = useDataGridContext_unstable((ctx)=>ctx.sort.sort);
const rows = sortable ? sort(getRows()) : getRows();
const baseState = useTableBody_unstable({
...props,
children: null,
as: 'div'
}, ref);
return {
...baseState,
rows,
renderRow: props.children
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"names":["React","useTableBody_unstable","useDataGridContext_unstable","useTableContext","useDataGridBody_unstable","props","ref","sortable","getRows","ctx","sort","rows","baseState","children","as","renderRow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,QAAQ,EAAE,GAAGJ;IACrB,MAAMK,UAAUN,4BAA4BO,CAAAA,MAAOA,IAAID,OAAO;IAC9D,MAAME,OAAOR,4BAA4BO,CAAAA,MAAOA,IAAIC,IAAI,CAACA,IAAI;IAC7D,MAAMC,OAAOJ,WAAWG,KAAKF,aAAaA;IAE1C,MAAMI,YAAYX,sBAAsB;QAAE,GAAGI,KAAK;QAAEQ,UAAU;QAAMC,IAAI;IAAM,GAAGR;IACjF,OAAO;QACL,GAAGM,SAAS;QACZD;QACAI,WAAWV,MAAMQ,QAAQ;IAC3B;AACF,EAAE"}
@@ -0,0 +1,15 @@
import { mergeClasses } from '@griffel/react';
import { useTableBodyStyles_unstable } from '../TableBody/useTableBodyStyles.styles';
export const dataGridBodyClassNames = {
root: 'fui-DataGridBody'
};
/**
* Apply styling to the DataGridBody slots based on the state
*/
export const useDataGridBodyStyles_unstable = state => {
'use no memo';
useTableBodyStyles_unstable(state);
state.root.className = mergeClasses(dataGridBodyClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"names":["mergeClasses","useTableBodyStyles_unstable","dataGridBodyClassNames","root","useDataGridBodyStyles_unstable","state","className"],"sources":["useDataGridBodyStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableBodyStyles_unstable } from '../TableBody/useTableBodyStyles.styles';\nexport const dataGridBodyClassNames = {\n root: 'fui-DataGridBody'\n};\n/**\n * Apply styling to the DataGridBody slots based on the state\n */ export const useDataGridBodyStyles_unstable = (state)=>{\n 'use no memo';\n useTableBodyStyles_unstable(state);\n state.root.className = mergeClasses(dataGridBodyClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,aAAa;;EACbJ,2BAA2B,CAACI,KAAK,CAAC;EAClCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EACtF,OAAOD,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
import * as React from 'react';
import { useDataGridCell_unstable } from './useDataGridCell';
import { renderDataGridCell_unstable } from './renderDataGridCell';
import { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* DataGridCell component
*/ export const DataGridCell = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useDataGridCell_unstable(props, ref);
useDataGridCellStyles_unstable(state);
useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);
return renderDataGridCell_unstable(state);
});
DataGridCell.displayName = 'DataGridCell';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"names":["React","useDataGridCell_unstable","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","DataGridCell","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
@@ -0,0 +1,3 @@
/**
* State used in rendering DataGridCell
*/ export { };
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/DataGridCell.types.ts"],"sourcesContent":["import { TableCellProps, TableCellSlots, TableCellState } from '../TableCell/TableCell.types';\n\nexport type DataGridCellSlots = TableCellSlots;\n\n/**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n */\nexport type DataGridCellFocusMode = 'group' | 'none' | 'cell';\n\n/**\n * DataGridCell Props\n */\nexport type DataGridCellProps = TableCellProps & {\n /**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n * @default cell\n */\n focusMode?: DataGridCellFocusMode;\n};\n\n/**\n * State used in rendering DataGridCell\n */\nexport type DataGridCellState = TableCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AA0BA;;CAEC,GACD,WAA+C"}
@@ -0,0 +1,4 @@
export { DataGridCell } from './DataGridCell';
export { renderDataGridCell_unstable } from './renderDataGridCell';
export { useDataGridCell_unstable } from './useDataGridCell';
export { dataGridCellClassNames, useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/index.ts"],"sourcesContent":["export { DataGridCell } from './DataGridCell';\nexport type {\n DataGridCellFocusMode,\n DataGridCellProps,\n DataGridCellSlots,\n DataGridCellState,\n} from './DataGridCell.types';\nexport { renderDataGridCell_unstable } from './renderDataGridCell';\nexport { useDataGridCell_unstable } from './useDataGridCell';\nexport { dataGridCellClassNames, useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\n"],"names":["DataGridCell","renderDataGridCell_unstable","useDataGridCell_unstable","dataGridCellClassNames","useDataGridCellStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAO9C,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,sBAAsB,EAAEC,8BAA8B,QAAQ,iCAAiC"}
@@ -0,0 +1,6 @@
import { renderTableCell_unstable } from '../TableCell/renderTableCell';
/**
* Render the final JSX of DataGridCell
*/ export const renderDataGridCell_unstable = (state)=>{
return renderTableCell_unstable(state);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"names":["renderTableCell_unstable","renderDataGridCell_unstable","state"],"rangeMappings":";;;;;","mappings":"AACA,SAASA,wBAAwB,QAAQ,+BAA+B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1C,OAAOF,yBAAyBE;AAClC,EAAE"}
@@ -0,0 +1,33 @@
import * as React from 'react';
import { useFocusableGroup } from '@fluentui/react-tabster';
import { useTableCell_unstable } from '../TableCell/useTableCell';
import { useDataGridContext_unstable } from '../../contexts/dataGridContext';
import { useColumnIdContext } from '../../contexts/columnIdContext';
/**
* Create the state required to render DataGridCell.
*
* The returned state can be modified with hooks such as useDataGridCellStyles_unstable,
* before being passed to renderDataGridCell_unstable.
*
* @param props - props from this instance of DataGridCell
* @param ref - reference to root HTMLElement of DataGridCell
*/ export const useDataGridCell_unstable = (props, ref)=>{
const { focusMode = 'cell' } = props;
const columnId = useColumnIdContext();
const tabbable = useDataGridContext_unstable((ctx)=>(ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none');
const resizableColumns = useDataGridContext_unstable((ctx)=>ctx.resizableColumns);
const getTableCellProps = useDataGridContext_unstable((ctx)=>{
return ctx.columnSizing_unstable.getTableCellProps;
});
const focusableGroupAttr = useFocusableGroup({
tabBehavior: 'limited-trap-focus'
});
return useTableCell_unstable({
as: 'div',
role: 'gridcell',
...focusMode === 'group' && focusableGroupAttr,
tabIndex: tabbable ? 0 : undefined,
...resizableColumns ? getTableCellProps(columnId) : {},
...props
}, ref);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const { focusMode = 'cell' } = props;\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(\n ctx => (ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none',\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableCellProps;\n });\n const focusableGroupAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n ...(focusMode === 'group' && focusableGroupAttr),\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"names":["React","useFocusableGroup","useTableCell_unstable","useDataGridContext_unstable","useColumnIdContext","useDataGridCell_unstable","props","ref","focusMode","columnId","tabbable","ctx","resizableColumns","getTableCellProps","columnSizing_unstable","focusableGroupAttr","tabBehavior","as","role","tabIndex","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,0BAA0B;AAE5D,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,YAAY,MAAM,EAAE,GAAGF;IAC/B,MAAMG,WAAWL;IACjB,MAAMM,WAAWP,4BACfQ,CAAAA,MAAO,AAACA,CAAAA,IAAIH,SAAS,KAAK,UAAUG,IAAIH,SAAS,KAAK,WAAU,KAAMA,cAAc;IAEtF,MAAMI,mBAAmBT,4BAA4BQ,CAAAA,MAAOA,IAAIC,gBAAgB;IAChF,MAAMC,oBAAoBV,4BAA4BQ,CAAAA;QACpD,OAAOA,IAAIG,qBAAqB,CAACD,iBAAiB;IACpD;IACA,MAAME,qBAAqBd,kBAAkB;QAAEe,aAAa;IAAqB;IACjF,OAAOd,sBACL;QACEe,IAAI;QACJC,MAAM;QACN,GAAIV,cAAc,WAAWO,kBAAkB;QAC/CI,UAAUT,WAAW,IAAIU;QACzB,GAAIR,mBAAmBC,kBAAkBJ,YAAY,CAAC,CAAC;QACvD,GAAGH,KAAK;IACV,GACAC;AAEJ,EAAE"}
@@ -0,0 +1,15 @@
import { mergeClasses } from '@griffel/react';
import { useTableCellStyles_unstable } from '../TableCell/useTableCellStyles.styles';
export const dataGridCellClassNames = {
root: 'fui-DataGridCell'
};
/**
* Apply styling to the DataGridCell slots based on the state
*/
export const useDataGridCellStyles_unstable = state => {
'use no memo';
useTableCellStyles_unstable(state);
state.root.className = mergeClasses(dataGridCellClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"names":["mergeClasses","useTableCellStyles_unstable","dataGridCellClassNames","root","useDataGridCellStyles_unstable","state","className"],"sources":["useDataGridCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableCellStyles_unstable } from '../TableCell/useTableCellStyles.styles';\nexport const dataGridCellClassNames = {\n root: 'fui-DataGridCell'\n};\n/**\n * Apply styling to the DataGridCell slots based on the state\n */ export const useDataGridCellStyles_unstable = (state)=>{\n 'use no memo';\n useTableCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridCellClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvD,aAAa;;EACbJ,2BAA2B,CAACI,KAAK,CAAC;EAClCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EACtF,OAAOD,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
import * as React from 'react';
import { useDataGridHeader_unstable } from './useDataGridHeader';
import { renderDataGridHeader_unstable } from './renderDataGridHeader';
import { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* DataGridHeader component
*/ export const DataGridHeader = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useDataGridHeader_unstable(props, ref);
useDataGridHeaderStyles_unstable(state);
useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);
return renderDataGridHeader_unstable(state);
});
DataGridHeader.displayName = 'DataGridHeader';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/DataGridHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeader_unstable } from './useDataGridHeader';\nimport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nimport { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\nimport type { DataGridHeaderProps } from './DataGridHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeader component\n */\nexport const DataGridHeader: ForwardRefComponent<DataGridHeaderProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeader_unstable(props, ref);\n\n useDataGridHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);\n\n return renderDataGridHeader_unstable(state);\n});\n\nDataGridHeader.displayName = 'DataGridHeader';\n"],"names":["React","useDataGridHeader_unstable","renderDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHook_unstable","DataGridHeader","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AAGpF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAEhDL,iCAAiCM;IAEjCL,4BAA4B,oCAAoCK;IAEhE,OAAOP,8BAA8BO;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
@@ -0,0 +1,3 @@
/**
* State used in rendering DataGridHeader
*/ export { };
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/DataGridHeader.types.ts"],"sourcesContent":["import { TableHeaderProps, TableHeaderSlots, TableHeaderState } from '../TableHeader/TableHeader.types';\n\nexport type DataGridHeaderSlots = TableHeaderSlots;\n\n/**\n * DataGridHeader Props\n */\nexport type DataGridHeaderProps = TableHeaderProps;\n\n/**\n * State used in rendering DataGridHeader\n */\nexport type DataGridHeaderState = TableHeaderState;\n"],"names":[],"rangeMappings":";;","mappings":"AASA;;CAEC,GACD,WAAmD"}
@@ -0,0 +1,4 @@
export { DataGridHeader } from './DataGridHeader';
export { renderDataGridHeader_unstable } from './renderDataGridHeader';
export { useDataGridHeader_unstable } from './useDataGridHeader';
export { dataGridHeaderClassNames, useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/index.ts"],"sourcesContent":["export { DataGridHeader } from './DataGridHeader';\nexport type { DataGridHeaderProps, DataGridHeaderSlots, DataGridHeaderState } from './DataGridHeader.types';\nexport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nexport { useDataGridHeader_unstable } from './useDataGridHeader';\nexport { dataGridHeaderClassNames, useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\n"],"names":["DataGridHeader","renderDataGridHeader_unstable","useDataGridHeader_unstable","dataGridHeaderClassNames","useDataGridHeaderStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAmB;AAElD,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,mCAAmC"}
@@ -0,0 +1,6 @@
import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';
/**
* Render the final JSX of DataGridHeader
*/ export const renderDataGridHeader_unstable = (state)=>{
return renderTableHeader_unstable(state);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/renderDataGridHeader.tsx"],"sourcesContent":["import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';\nimport type { DataGridHeaderState } from './DataGridHeader.types';\n\n/**\n * Render the final JSX of DataGridHeader\n */\nexport const renderDataGridHeader_unstable = (state: DataGridHeaderState) => {\n return renderTableHeader_unstable(state);\n};\n"],"names":["renderTableHeader_unstable","renderDataGridHeader_unstable","state"],"rangeMappings":";;;;;","mappings":"AAAA,SAASA,0BAA0B,QAAQ,mCAAmC;AAG9E;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5C,OAAOF,2BAA2BE;AACpC,EAAE"}
@@ -0,0 +1,16 @@
import * as React from 'react';
import { useTableHeader_unstable } from '../TableHeader/useTableHeader';
/**
* Create the state required to render DataGridHeader.
*
* The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,
* before being passed to renderDataGridHeader_unstable.
*
* @param props - props from this instance of DataGridHeader
* @param ref - reference to root HTMLElement of DataGridHeader
*/ export const useDataGridHeader_unstable = (props, ref)=>{
return useTableHeader_unstable({
...props,
as: 'div'
}, ref);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/useDataGridHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader.types';\nimport { useTableHeader_unstable } from '../TableHeader/useTableHeader';\n\n/**\n * Create the state required to render DataGridHeader.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,\n * before being passed to renderDataGridHeader_unstable.\n *\n * @param props - props from this instance of DataGridHeader\n * @param ref - reference to root HTMLElement of DataGridHeader\n */\nexport const useDataGridHeader_unstable = (\n props: DataGridHeaderProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderState => {\n return useTableHeader_unstable({ ...props, as: 'div' }, ref);\n};\n"],"names":["React","useTableHeader_unstable","useDataGridHeader_unstable","props","ref","as"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,QAAQ,gCAAgC;AAExE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,OAAOH,wBAAwB;QAAE,GAAGE,KAAK;QAAEE,IAAI;IAAM,GAAGD;AAC1D,EAAE"}
@@ -0,0 +1,15 @@
import { mergeClasses } from '@griffel/react';
import { useTableHeaderStyles_unstable } from '../TableHeader/useTableHeaderStyles.styles';
export const dataGridHeaderClassNames = {
root: 'fui-DataGridHeader'
};
/**
* Apply styling to the DataGridHeader slots based on the state
*/
export const useDataGridHeaderStyles_unstable = state => {
'use no memo';
useTableHeaderStyles_unstable(state);
state.root.className = mergeClasses(dataGridHeaderClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"names":["mergeClasses","useTableHeaderStyles_unstable","dataGridHeaderClassNames","root","useDataGridHeaderStyles_unstable","state","className"],"sources":["useDataGridHeaderStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableHeaderStyles_unstable } from '../TableHeader/useTableHeaderStyles.styles';\nexport const dataGridHeaderClassNames = {\n root: 'fui-DataGridHeader'\n};\n/**\n * Apply styling to the DataGridHeader slots based on the state\n */ export const useDataGridHeaderStyles_unstable = (state)=>{\n 'use no memo';\n useTableHeaderStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,6BAA6B,QAAQ,4CAA4C;AAC1F,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,gCAAgC,GAAIC,KAAK,IAAG;EACzD,aAAa;;EACbJ,6BAA6B,CAACI,KAAK,CAAC;EACpCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,wBAAwB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EACxF,OAAOD,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
import * as React from 'react';
import { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';
import { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';
import { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* DataGridHeaderCell component
*/ export const DataGridHeaderCell = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useDataGridHeaderCell_unstable(props, ref);
useDataGridHeaderCellStyles_unstable(state);
useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);
return renderDataGridHeaderCell_unstable(state);
});
DataGridHeaderCell.displayName = 'DataGridHeaderCell';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/DataGridHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nimport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nimport { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';\nimport type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeaderCell component\n */\nexport const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeaderCell_unstable(props, ref);\n\n useDataGridHeaderCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);\n\n return renderDataGridHeaderCell_unstable(state);\n});\n\nDataGridHeaderCell.displayName = 'DataGridHeaderCell';\n"],"names":["React","useDataGridHeaderCell_unstable","renderDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHook_unstable","DataGridHeaderCell","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,uCAAuC;AAG5F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mCAAmEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
@@ -0,0 +1,3 @@
/**
* State used in rendering DataGridHeaderCell
*/ export { };
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/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,GACD,WAA2D"}
@@ -0,0 +1,4 @@
export { DataGridHeaderCell } from './DataGridHeaderCell';
export { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';
export { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';
export { dataGridHeaderCellClassNames, useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/index.ts"],"sourcesContent":["export { DataGridHeaderCell } from './DataGridHeaderCell';\nexport type {\n DataGridHeaderCellProps,\n DataGridHeaderCellSlots,\n DataGridHeaderCellState,\n} from './DataGridHeaderCell.types';\nexport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nexport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nexport {\n dataGridHeaderCellClassNames,\n useDataGridHeaderCellStyles_unstable,\n} from './useDataGridHeaderCellStyles.styles';\n"],"names":["DataGridHeaderCell","renderDataGridHeaderCell_unstable","useDataGridHeaderCell_unstable","dataGridHeaderCellClassNames","useDataGridHeaderCellStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,kBAAkB,QAAQ,uBAAuB;AAM1D,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SACEC,4BAA4B,EAC5BC,oCAAoC,QAC/B,uCAAuC"}
@@ -0,0 +1,6 @@
import { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';
/**
* Render the final JSX of DataGridHeaderCell
*/ export const renderDataGridHeaderCell_unstable = (state)=>{
return renderTableHeaderCell_unstable(state);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/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":["renderTableHeaderCell_unstable","renderDataGridHeaderCell_unstable","state"],"rangeMappings":";;;;;","mappings":"AACA,SAASA,8BAA8B,QAAQ,2CAA2C;AAE1F;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,OAAOF,+BAA+BE;AACxC,EAAE"}
@@ -0,0 +1,50 @@
import * as React from 'react';
import { useEventCallback } from '@fluentui/react-utilities';
import { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';
import { useDataGridContext_unstable } from '../../contexts/dataGridContext';
import { useColumnIdContext } from '../../contexts/columnIdContext';
import { useTableContext } from '../../contexts/tableContext';
import { isColumnSortable } from '../../utils/isColumnSortable';
/**
* Create the state required to render DataGridHeaderCell.
*
* The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,
* before being passed to renderDataGridHeaderCell_unstable.
*
* @param props - props from this instance of DataGridHeaderCell
* @param ref - reference to root HTMLElement of DataGridHeaderCell
*/ export const useDataGridHeaderCell_unstable = (props, ref)=>{
const columnId = useColumnIdContext();
const { sortable: gridSortable } = useTableContext();
const toggleColumnSort = useDataGridContext_unstable((ctx)=>ctx.sort.toggleColumnSort);
const sortable = useDataGridContext_unstable((ctx)=>{
const columnSortable = !!ctx.columns.find((c)=>c.columnId === columnId && isColumnSortable(c));
if (!gridSortable) {
// if the grid is not sortable - disable sorting on all columns
return false;
}
return columnSortable;
});
const sortDirection = useDataGridContext_unstable((ctx)=>sortable ? ctx.sort.getSortDirection(columnId) : undefined);
const resizableColumns = useDataGridContext_unstable((ctx)=>ctx.resizableColumns);
const getTableHeaderCellProps = useDataGridContext_unstable((ctx)=>{
return ctx.columnSizing_unstable.getTableHeaderCellProps;
});
// eslint-disable-next-line @typescript-eslint/no-deprecated -- prefer HTMLTableCellElement
const onClick = useEventCallback((e)=>{
var _props_onClick;
if (sortable) {
toggleColumnSort(e, columnId);
}
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
});
return useTableHeaderCell_unstable({
sortable,
sortDirection,
as: 'div',
tabIndex: sortable ? undefined : 0,
...resizableColumns ? getTableHeaderCellProps(columnId) : {},
...props,
onClick
}, ref);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/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 @typescript-eslint/no-deprecated -- 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":["React","useEventCallback","useTableHeaderCell_unstable","useDataGridContext_unstable","useColumnIdContext","useTableContext","isColumnSortable","useDataGridHeaderCell_unstable","props","ref","columnId","sortable","gridSortable","toggleColumnSort","ctx","sort","columnSortable","columns","find","c","sortDirection","getSortDirection","undefined","resizableColumns","getTableHeaderCellProps","columnSizing_unstable","onClick","e","as","tabIndex"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,gBAAgB,QAAQ,+BAA+B;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,WAAWN;IACjB,MAAM,EAAEO,UAAUC,YAAY,EAAE,GAAGP;IACnC,MAAMQ,mBAAmBV,4BAA4BW,CAAAA,MAAOA,IAAIC,IAAI,CAACF,gBAAgB;IAErF,MAAMF,WAAWR,4BAA4BW,CAAAA;QAC3C,MAAME,iBAAiB,CAAC,CAACF,IAAIG,OAAO,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAET,QAAQ,KAAKA,YAAYJ,iBAAiBa;QAC3F,IAAI,CAACP,cAAc;YACjB,+DAA+D;YAC/D,OAAO;QACT;QAEA,OAAOI;IACT;IAEA,MAAMI,gBAAgBjB,4BAA4BW,CAAAA,MAChDH,WAAWG,IAAIC,IAAI,CAACM,gBAAgB,CAACX,YAAYY;IAEnD,MAAMC,mBAAmBpB,4BAA4BW,CAAAA,MAAOA,IAAIS,gBAAgB;IAChF,MAAMC,0BAA0BrB,4BAA4BW,CAAAA;QAC1D,OAAOA,IAAIW,qBAAqB,CAACD,uBAAuB;IAC1D;IAEA,2FAA2F;IAC3F,MAAME,UAAUzB,iBAAiB,CAAC0B;YAIhCnB;QAHA,IAAIG,UAAU;YACZE,iBAAiBc,GAAGjB;QACtB;SACAF,iBAAAA,MAAMkB,OAAO,cAAblB,qCAAAA,oBAAAA,OAAgBmB;IAClB;IAEA,OAAOzB,4BACL;QACES;QACAS;QACAQ,IAAI;QACJC,UAAUlB,WAAWW,YAAY;QACjC,GAAIC,mBAAmBC,wBAAwBd,YAAY,CAAC,CAAC;QAC7D,GAAGF,KAAK;QACRkB;IACF,GACAjB;AAEJ,EAAE"}
@@ -0,0 +1,27 @@
import { mergeClasses } from '@griffel/react';
import { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles.styles';
export const dataGridHeaderCellClassNames = {
root: 'fui-DataGridHeaderCell',
button: 'fui-DataGridHeaderCell__button',
sortIcon: 'fui-DataGridHeaderCell__sortIcon',
aside: 'fui-DataGridHeaderCell__aside'
};
/**
* Apply styling to the DataGridHeaderCell slots based on the state
*/
export const useDataGridHeaderCellStyles_unstable = state => {
'use no memo';
useTableHeaderCellStyles_unstable(state);
state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);
if (state.button) {
state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);
}
if (state.sortIcon) {
state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);
}
if (state.aside) {
state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);
}
return state;
};
@@ -0,0 +1 @@
{"version":3,"names":["mergeClasses","useTableHeaderCellStyles_unstable","dataGridHeaderCellClassNames","root","button","sortIcon","aside","useDataGridHeaderCellStyles_unstable","state","className"],"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"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,iCAAiC,QAAQ,oDAAoD;AACtG,OAAO,MAAMC,4BAA4B,GAAG;EACxCC,IAAI,EAAE,wBAAwB;EAC9BC,MAAM,EAAE,gCAAgC;EACxCC,QAAQ,EAAE,kCAAkC;EAC5CC,KAAK,EAAE;AACX,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,oCAAoC,GAAIC,KAAK,IAAG;EAC7D,aAAa;;EACbP,iCAAiC,CAACO,KAAK,CAAC;EACxCA,KAAK,CAACL,IAAI,CAACM,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACC,IAAI,EAAEK,KAAK,CAACL,IAAI,CAACM,SAAS,CAAC;EAC5F,IAAID,KAAK,CAACJ,MAAM,EAAE;IACdI,KAAK,CAACJ,MAAM,CAACK,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACE,MAAM,EAAEI,KAAK,CAACJ,MAAM,CAACK,SAAS,CAAC;EACtG;EACA,IAAID,KAAK,CAACH,QAAQ,EAAE;IAChBG,KAAK,CAACH,QAAQ,CAACI,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACG,QAAQ,EAAEG,KAAK,CAACH,QAAQ,CAACI,SAAS,CAAC;EAC5G;EACA,IAAID,KAAK,CAACF,KAAK,EAAE;IACbE,KAAK,CAACF,KAAK,CAACG,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACI,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACG,SAAS,CAAC;EACnG;EACA,OAAOD,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
import * as React from 'react';
import { useDataGridRow_unstable } from './useDataGridRow';
import { renderDataGridRow_unstable } from './renderDataGridRow';
import { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* DataGridRow component
*/ export const DataGridRow = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useDataGridRow_unstable(props, ref);
useDataGridRowStyles_unstable(state);
useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);
return renderDataGridRow_unstable(state);
});
DataGridRow.displayName = 'DataGridRow';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridRow/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":["React","useDataGridRow_unstable","renderDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","DataGridRow","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,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,4BACgDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACpF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAuG;AAEvGJ,YAAYK,WAAW,GAAG"}

Some files were not shown because too many files have changed in this diff Show More