@fluentui/react-table 9.0.0-alpha.2 → 9.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +87 -1
- package/CHANGELOG.md +28 -2
- package/dist/index.d.ts +36 -14
- 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/TableRow.js.map +1 -1
- package/lib/TableSelectionCell.js.map +1 -1
- package/lib/components/Table/Table.js.map +1 -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/Table/useTableStyles.js +26 -5
- package/lib/components/Table/useTableStyles.js.map +1 -1
- package/lib/components/TableBody/TableBody.js.map +1 -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 +2 -1
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.js +14 -3
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib/components/TableCell/TableCell.js.map +1 -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 +2 -1
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.js +29 -4
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -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 +4 -1
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActionsStyles.js +6 -5
- package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
- package/lib/components/TableCellLayout/TableCellLayout.js +2 -1
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -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 +6 -3
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js +11 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib/components/TableHeader/TableHeader.js.map +1 -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 +2 -1
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.js +20 -3
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -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 +2 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +29 -4
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib/components/TableRow/TableRow.js.map +1 -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 +2 -1
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.js +47 -8
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -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 +6 -1
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +31 -5
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/selectionManager.js.map +1 -1
- package/lib/hooks/types.js.map +1 -1
- package/lib/hooks/useSelection.js.map +1 -1
- package/lib/hooks/useSort.js.map +1 -1
- package/lib/hooks/useTable.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/navigationModes/cell.js.map +1 -1
- package/lib/navigationModes/composite.js.map +1 -1
- package/lib/navigationModes/index.js.map +1 -1
- package/lib/navigationModes/useNavigationMode.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/TableRow.js.map +1 -1
- package/lib-commonjs/TableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/Table/Table.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.js +26 -5
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
- package/lib-commonjs/components/TableBody/TableBody.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 +2 -1
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +14 -3
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib-commonjs/components/TableCell/TableCell.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 +2 -1
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +29 -4
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/TableCellActions.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 +4 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +6 -6
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +3 -1
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +7 -3
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +13 -2
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +23 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeader/TableHeader.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 +2 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +20 -3
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.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 +2 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +29 -4
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableRow/TableRow.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 +2 -1
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +47 -8
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.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 +7 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +31 -5
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/hooks/index.js.map +1 -1
- package/lib-commonjs/hooks/selectionManager.js.map +1 -1
- package/lib-commonjs/hooks/useSelection.js.map +1 -1
- package/lib-commonjs/hooks/useSort.js.map +1 -1
- package/lib-commonjs/hooks/useTable.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/navigationModes/cell.js.map +1 -1
- package/lib-commonjs/navigationModes/composite.js.map +1 -1
- package/lib-commonjs/navigationModes/index.js.map +1 -1
- package/lib-commonjs/navigationModes/useNavigationMode.js.map +1 -1
- package/package.json +8 -8
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,SAAS,QAAT,QAAyB,SAAzB;AAWA,SACE,SADF,EAEE,mBAFF,EAGE,kBAHF,EAIE,2BAJF,EAKE,qBALF,EAME,wBANF,QAOO,aAPP;AAUA,SACE,QADF,EAEE,kBAFF,EAGE,iBAHF,EAIE,0BAJF,EAKE,oBALF,EAME,uBANF,QAOO,YAPP;AAUA,SACE,SADF,EAEE,kBAFF,EAGE,mBAHF,EAIE,2BAJF,EAKE,qBALF,EAME,wBANF,QAOO,aAPP;AAUA,SACE,KADF,EAEE,cAFF,EAGE,eAHF,EAIE,uBAJF,EAKE,iBALF,EAME,oBANF,QAOO,SAPP;AAUA,SACE,WADF,EAEE,qBAFF,EAGE,oBAHF,EAIE,6BAJF,EAKE,uBALF,EAME,0BANF,QAOO,eAPP;AAUA,SACE,eADF,EAEE,wBAFF,EAGE,yBAHF,EAIE,iCAJF,EAKE,2BALF,EAME,8BANF,QAOO,mBAPP;AAUA,SAAS,oBAAT,EAA+B,eAA/B,QAAsD,yBAAtD;AACA,SACE,kBADF,EAEE,oCAFF,EAGE,8BAHF,EAIE,iCAJF,EAKE,4BALF,QAMO,sBANP;AASA,SACE,gBADF,EAEE,0BAFF,EAGE,kCAHF,EAIE,4BAJF,EAKE,+BALF,QAMO,oBANP;AASA,SACE,eADF,EAEE,yBAFF,EAGE,iCAHF,EAIE,2BAJF,EAKE,8BALF,QAMO,mBANP","sourcesContent":["export { useTable } from './hooks';\nexport type {\n UseTableOptions,\n TableSelectionState,\n TableSortState,\n ColumnDefinition,\n RowState,\n RowId,\n ColumnId,\n} from './hooks';\n\nexport {\n TableCell,\n tableCellClassNames,\n tableCellClassName,\n useTableCellStyles_unstable,\n useTableCell_unstable,\n renderTableCell_unstable,\n} from './TableCell';\nexport type { TableCellProps, TableCellState, TableCellSlots } from './TableCell';\n\nexport {\n TableRow,\n tableRowClassNames,\n tableRowClassName,\n useTableRowStyles_unstable,\n useTableRow_unstable,\n renderTableRow_unstable,\n} from './TableRow';\nexport type { TableRowProps, TableRowState, TableRowSlots } from './TableRow';\n\nexport {\n TableBody,\n tableBodyClassName,\n tableBodyClassNames,\n useTableBodyStyles_unstable,\n useTableBody_unstable,\n renderTableBody_unstable,\n} from './TableBody';\nexport type { TableBodyProps, TableBodyState, TableBodySlots } from './TableBody';\n\nexport {\n Table,\n tableClassName,\n tableClassNames,\n useTableStyles_unstable,\n useTable_unstable,\n renderTable_unstable,\n} from './Table';\nexport type { TableProps, TableSlots, TableState, TableContextValue, TableContextValues, SortDirection } from './Table';\n\nexport {\n TableHeader,\n tableHeaderClassNames,\n tableHeaderClassName,\n useTableHeaderStyles_unstable,\n useTableHeader_unstable,\n renderTableHeader_unstable,\n} from './TableHeader';\nexport type { TableHeaderProps, TableHeaderSlots, TableHeaderState } from './TableHeader';\n\nexport {\n TableHeaderCell,\n tableHeaderCellClassName,\n tableHeaderCellClassNames,\n useTableHeaderCellStyles_unstable,\n useTableHeaderCell_unstable,\n renderTableHeaderCell_unstable,\n} from './TableHeaderCell';\nexport type { TableHeaderCellProps, TableHeaderCellSlots, TableHeaderCellState } from './TableHeaderCell';\n\nexport { TableContextProvider, useTableContext } from './contexts/tableContext';\nexport {\n TableSelectionCell,\n useTableSelectionCellStyles_unstable,\n useTableSelectionCell_unstable,\n renderTableSelectionCell_unstable,\n tableSelectionCellClassNames,\n} from './TableSelectionCell';\n\nexport type { TableSelectionCellProps, TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell';\nexport {\n TableCellActions,\n tableCellActionsClassNames,\n useTableCellActionsStyles_unstable,\n useTableCellActions_unstable,\n renderTableCellActions_unstable,\n} from './TableCellActions';\n\nexport type { TableCellActionsProps, TableCellActionsSlots, TableCellActionsState } from './TableCellActions';\nexport {\n TableCellLayout,\n tableCellLayoutClassNames,\n useTableCellLayoutStyles_unstable,\n useTableCellLayout_unstable,\n renderTableCellLayout_unstable,\n} from './TableCellLayout';\nexport type { TableCellLayoutProps, TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/index.ts"],"names":[],"mappings":"AAAA,SAAS,QAAT,QAAyB,SAAzB;AAWA,SACE,SADF,EAEE,mBAFF,EAGE,kBAHF,EAIE,2BAJF,EAKE,qBALF,EAME,wBANF,QAOO,aAPP;AAUA,SACE,QADF,EAEE,kBAFF,EAGE,iBAHF,EAIE,0BAJF,EAKE,oBALF,EAME,uBANF,QAOO,YAPP;AAUA,SACE,SADF,EAEE,kBAFF,EAGE,mBAHF,EAIE,2BAJF,EAKE,qBALF,EAME,wBANF,QAOO,aAPP;AAUA,SACE,KADF,EAEE,cAFF,EAGE,eAHF,EAIE,uBAJF,EAKE,iBALF,EAME,oBANF,QAOO,SAPP;AAUA,SACE,WADF,EAEE,qBAFF,EAGE,oBAHF,EAIE,6BAJF,EAKE,uBALF,EAME,0BANF,QAOO,eAPP;AAUA,SACE,eADF,EAEE,wBAFF,EAGE,yBAHF,EAIE,iCAJF,EAKE,2BALF,EAME,8BANF,QAOO,mBAPP;AAUA,SAAS,oBAAT,EAA+B,eAA/B,QAAsD,yBAAtD;AACA,SACE,kBADF,EAEE,oCAFF,EAGE,8BAHF,EAIE,iCAJF,EAKE,4BALF,QAMO,sBANP;AASA,SACE,gBADF,EAEE,0BAFF,EAGE,kCAHF,EAIE,4BAJF,EAKE,+BALF,QAMO,oBANP;AASA,SACE,eADF,EAEE,yBAFF,EAGE,iCAHF,EAIE,2BAJF,EAKE,8BALF,QAMO,mBANP","sourcesContent":["export { useTable } from './hooks';\nexport type {\n UseTableOptions,\n TableSelectionState,\n TableSortState,\n ColumnDefinition,\n RowState,\n RowId,\n ColumnId,\n} from './hooks';\n\nexport {\n TableCell,\n tableCellClassNames,\n tableCellClassName,\n useTableCellStyles_unstable,\n useTableCell_unstable,\n renderTableCell_unstable,\n} from './TableCell';\nexport type { TableCellProps, TableCellState, TableCellSlots } from './TableCell';\n\nexport {\n TableRow,\n tableRowClassNames,\n tableRowClassName,\n useTableRowStyles_unstable,\n useTableRow_unstable,\n renderTableRow_unstable,\n} from './TableRow';\nexport type { TableRowProps, TableRowState, TableRowSlots } from './TableRow';\n\nexport {\n TableBody,\n tableBodyClassName,\n tableBodyClassNames,\n useTableBodyStyles_unstable,\n useTableBody_unstable,\n renderTableBody_unstable,\n} from './TableBody';\nexport type { TableBodyProps, TableBodyState, TableBodySlots } from './TableBody';\n\nexport {\n Table,\n tableClassName,\n tableClassNames,\n useTableStyles_unstable,\n useTable_unstable,\n renderTable_unstable,\n} from './Table';\nexport type { TableProps, TableSlots, TableState, TableContextValue, TableContextValues, SortDirection } from './Table';\n\nexport {\n TableHeader,\n tableHeaderClassNames,\n tableHeaderClassName,\n useTableHeaderStyles_unstable,\n useTableHeader_unstable,\n renderTableHeader_unstable,\n} from './TableHeader';\nexport type { TableHeaderProps, TableHeaderSlots, TableHeaderState } from './TableHeader';\n\nexport {\n TableHeaderCell,\n tableHeaderCellClassName,\n tableHeaderCellClassNames,\n useTableHeaderCellStyles_unstable,\n useTableHeaderCell_unstable,\n renderTableHeaderCell_unstable,\n} from './TableHeaderCell';\nexport type { TableHeaderCellProps, TableHeaderCellSlots, TableHeaderCellState } from './TableHeaderCell';\n\nexport { TableContextProvider, useTableContext } from './contexts/tableContext';\nexport {\n TableSelectionCell,\n useTableSelectionCellStyles_unstable,\n useTableSelectionCell_unstable,\n renderTableSelectionCell_unstable,\n tableSelectionCellClassNames,\n} from './TableSelectionCell';\n\nexport type { TableSelectionCellProps, TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell';\nexport {\n TableCellActions,\n tableCellActionsClassNames,\n useTableCellActionsStyles_unstable,\n useTableCellActions_unstable,\n renderTableCellActions_unstable,\n} from './TableCellActions';\n\nexport type { TableCellActionsProps, TableCellActionsSlots, TableCellActionsState } from './TableCellActions';\nexport {\n TableCellLayout,\n tableCellLayoutClassNames,\n useTableCellLayoutStyles_unstable,\n useTableCellLayout_unstable,\n renderTableCellLayout_unstable,\n} from './TableCellLayout';\nexport type { TableCellLayoutProps, TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["navigationModes/cell.ts"],"names":[],"mappings":"AAAA,OAAM,SAAU,mBAAV,CAA8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AAwE;IACtE,OAAO,IAAP;EACD;;EAED,OAAO,KAAP;AACD;;AAED,SAAS,eAAT,CAAyB,IAAzB,EAA0C;EACxC,IAAI,GAAG,GAAG,IAAV;;EACA,OAAO,GAAG,CAAC,aAAJ,IAAqB,CAAC,KAAK,CAAC,GAAD,CAAlC,EAAyC;IACvC,GAAG,GAAG,GAAG,CAAC,aAAV;EACD;;EAED,OAAO,GAAG,CAAC,gBAAJ,CAAqB,sCAArB,EAA6D,MAA7D,GAAsE,CAA7E;AACD","sourcesContent":["export function applyCellNavigation(element: HTMLElement) {\n const container = element;\n let column = 0;\n let mode: 'row' | 'column' | undefined = undefined;\n let movingOut = false;\n\n const pre = document.createElement('div');\n const post = document.createElement('div');\n\n if (!pre || !post) {\n return;\n }\n\n pre.tabIndex = 0;\n post.tabIndex = 0;\n\n pre.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = container;\n const candidate = treeWalker.nextNode();\n if (isHTMLElement(candidate)) {\n column = 0;\n candidate.focus();\n }\n }\n });\n\n post.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = post;\n const candidate = treeWalker.previousNode();\n if (isHTMLElement(candidate)) {\n column = findColumnCount(candidate);\n candidate.focus();\n }\n }\n });\n\n container.before(pre);\n container.after(post);\n\n const acceptNode = (node: Node) => {\n if (!isHTMLElement(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (mode === 'column') {\n return acceptCell(node);\n }\n\n if (mode === 'row') {\n return acceptRow(node);\n }\n\n if (node.tabIndex >= 0) {\n return NodeFilter.FILTER_ACCEPT;\n }\n\n return NodeFilter.FILTER_SKIP;\n };\n\n const acceptCell = (node: HTMLElement) => {\n if (isRow(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (node.tabIndex < 0) {\n return NodeFilter.FILTER_SKIP;\n }\n\n return NodeFilter.FILTER_ACCEPT;\n };\n\n const acceptRow = (node: HTMLElement) => {\n if (isRow(node)) {\n return NodeFilter.FILTER_ACCEPT;\n }\n\n return NodeFilter.FILTER_SKIP;\n };\n\n const treeWalker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode });\n\n const up = (current: HTMLElement) => {\n mode = 'row';\n treeWalker.currentNode = current;\n treeWalker.previousNode(); // current row\n const row = treeWalker.previousNode();\n if (!row) {\n return null;\n }\n\n mode = 'column';\n treeWalker.currentNode = row;\n let curCol = 0;\n let node: Node | null = null;\n while (curCol <= column) {\n node = treeWalker.nextNode();\n curCol++;\n }\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const down = (current: HTMLElement) => {\n mode = 'row';\n treeWalker.currentNode = current;\n const row = treeWalker.nextNode();\n if (!row) {\n return null;\n }\n\n mode = 'column';\n treeWalker.currentNode = row;\n let curCol = 0;\n let node: Node | null = null;\n while (curCol <= column) {\n node = treeWalker.nextNode();\n curCol++;\n }\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const left = (current: HTMLElement) => {\n treeWalker.currentNode = current;\n mode = 'column';\n const node = treeWalker.previousNode();\n\n if (isHTMLElement(node)) {\n column--;\n return node;\n }\n return null;\n };\n\n const right = (current: HTMLElement) => {\n mode = 'column';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n column++;\n return node;\n }\n return null;\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const target = e.target;\n if (!target || !isHTMLElement(target)) {\n return;\n }\n\n let next: HTMLElement | null = null;\n\n switch (e.key) {\n case 'ArrowDown':\n next = down(target);\n break;\n case 'ArrowUp':\n next = up(target);\n break;\n case 'ArrowLeft':\n next = left(target);\n break;\n case 'ArrowRight':\n next = right(target);\n break;\n case 'Tab':\n movingOut = true;\n if (e.shiftKey) {\n pre.focus();\n } else {\n post.focus();\n }\n\n break;\n default:\n return;\n }\n\n if (next) {\n e.preventDefault();\n next.focus();\n }\n };\n\n const onFocusOut = () => {\n mode = undefined;\n };\n\n container.addEventListener('keydown', onKeyDown);\n container.addEventListener('focusout', onFocusOut);\n return () => {\n container.removeEventListener('focusout', onFocusOut);\n container.removeEventListener('keydown', onKeyDown);\n };\n}\n\nfunction isHTMLElement(node: unknown): node is HTMLElement {\n return node instanceof HTMLElement;\n}\n\nfunction isRow(element: HTMLElement) {\n if (element.getAttribute('role') === 'row' || element.tagName === 'TR') {\n return true;\n }\n\n return false;\n}\n\nfunction findColumnCount(node: HTMLElement) {\n let cur = node;\n while (cur.parentElement && !isRow(cur)) {\n cur = cur.parentElement;\n }\n\n return cur.querySelectorAll('[role=\"cell\"], [role=\"gridcell\"], td').length - 1;\n}\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/navigationModes/cell.ts"],"names":[],"mappings":"AAAA,OAAM,SAAU,mBAAV,CAA8B,OAA9B,EAAkD;EACtD,MAAM,SAAS,GAAG,OAAlB;EACA,IAAI,MAAM,GAAG,CAAb;EACA,IAAI,IAAI,GAAiC,SAAzC;EACA,IAAI,SAAS,GAAG,KAAhB;EAEA,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAT,CAAuB,KAAvB,CAAZ;EACA,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAT,CAAuB,KAAvB,CAAb;;EAEA,IAAI,CAAC,GAAD,IAAQ,CAAC,IAAb,EAAmB;IACjB;EACD;;EAED,GAAG,CAAC,QAAJ,GAAe,CAAf;EACA,IAAI,CAAC,QAAL,GAAgB,CAAhB;EAEA,GAAG,CAAC,gBAAJ,CAAqB,OAArB,EAA8B,MAAK;IACjC,IAAI,SAAJ,EAAe;MACb,SAAS,GAAG,KAAZ;MACA;IACD,CAHD,MAGO;MACL,UAAU,CAAC,WAAX,GAAyB,SAAzB;MACA,MAAM,SAAS,GAAG,UAAU,CAAC,QAAX,EAAlB;;MACA,IAAI,aAAa,CAAC,SAAD,CAAjB,EAA8B;QAC5B,MAAM,GAAG,CAAT;QACA,SAAS,CAAC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,CAtCD;;EAwCA,MAAM,UAAU,GAAG,MAAK;IACtB,IAAI,GAAG,SAAP;EACD,CAFD;;EAIA,SAAS,CAAC,gBAAV,CAA2B,SAA3B,EAAsC,SAAtC;EACA,SAAS,CAAC,gBAAV,CAA2B,UAA3B,EAAuC,UAAvC;EACA,OAAO,MAAK;IACV,SAAS,CAAC,mBAAV,CAA8B,UAA9B,EAA0C,UAA1C;IACA,SAAS,CAAC,mBAAV,CAA8B,SAA9B,EAAyC,SAAzC;EACD,CAHD;AAID;;AAED,SAAS,aAAT,CAAuB,IAAvB,EAAoC;EAClC,OAAO,IAAI,YAAY,WAAvB;AACD;;AAED,SAAS,KAAT,CAAe,OAAf,EAAmC;EACjC,IAAI,OAAO,CAAC,YAAR,CAAqB,MAArB,MAAiC,KAAjC,IAA0C,OAAO,CAAC,OAAR,KAAoB,IAAlE,EAAwE;IACtE,OAAO,IAAP;EACD;;EAED,OAAO,KAAP;AACD;;AAED,SAAS,eAAT,CAAyB,IAAzB,EAA0C;EACxC,IAAI,GAAG,GAAG,IAAV;;EACA,OAAO,GAAG,CAAC,aAAJ,IAAqB,CAAC,KAAK,CAAC,GAAD,CAAlC,EAAyC;IACvC,GAAG,GAAG,GAAG,CAAC,aAAV;EACD;;EAED,OAAO,GAAG,CAAC,gBAAJ,CAAqB,sCAArB,EAA6D,MAA7D,GAAsE,CAA7E;AACD","sourcesContent":["export function applyCellNavigation(element: HTMLElement) {\n const container = element;\n let column = 0;\n let mode: 'row' | 'column' | undefined = undefined;\n let movingOut = false;\n\n const pre = document.createElement('div');\n const post = document.createElement('div');\n\n if (!pre || !post) {\n return;\n }\n\n pre.tabIndex = 0;\n post.tabIndex = 0;\n\n pre.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = container;\n const candidate = treeWalker.nextNode();\n if (isHTMLElement(candidate)) {\n column = 0;\n candidate.focus();\n }\n }\n });\n\n post.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = post;\n const candidate = treeWalker.previousNode();\n if (isHTMLElement(candidate)) {\n column = findColumnCount(candidate);\n candidate.focus();\n }\n }\n });\n\n container.before(pre);\n container.after(post);\n\n const acceptNode = (node: Node) => {\n if (!isHTMLElement(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (mode === 'column') {\n return acceptCell(node);\n }\n\n if (mode === 'row') {\n return acceptRow(node);\n }\n\n if (node.tabIndex >= 0) {\n return NodeFilter.FILTER_ACCEPT;\n }\n\n return NodeFilter.FILTER_SKIP;\n };\n\n const acceptCell = (node: HTMLElement) => {\n if (isRow(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (node.tabIndex < 0) {\n return NodeFilter.FILTER_SKIP;\n }\n\n return NodeFilter.FILTER_ACCEPT;\n };\n\n const acceptRow = (node: HTMLElement) => {\n if (isRow(node)) {\n return NodeFilter.FILTER_ACCEPT;\n }\n\n return NodeFilter.FILTER_SKIP;\n };\n\n const treeWalker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode });\n\n const up = (current: HTMLElement) => {\n mode = 'row';\n treeWalker.currentNode = current;\n treeWalker.previousNode(); // current row\n const row = treeWalker.previousNode();\n if (!row) {\n return null;\n }\n\n mode = 'column';\n treeWalker.currentNode = row;\n let curCol = 0;\n let node: Node | null = null;\n while (curCol <= column) {\n node = treeWalker.nextNode();\n curCol++;\n }\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const down = (current: HTMLElement) => {\n mode = 'row';\n treeWalker.currentNode = current;\n const row = treeWalker.nextNode();\n if (!row) {\n return null;\n }\n\n mode = 'column';\n treeWalker.currentNode = row;\n let curCol = 0;\n let node: Node | null = null;\n while (curCol <= column) {\n node = treeWalker.nextNode();\n curCol++;\n }\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const left = (current: HTMLElement) => {\n treeWalker.currentNode = current;\n mode = 'column';\n const node = treeWalker.previousNode();\n\n if (isHTMLElement(node)) {\n column--;\n return node;\n }\n return null;\n };\n\n const right = (current: HTMLElement) => {\n mode = 'column';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n column++;\n return node;\n }\n return null;\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const target = e.target;\n if (!target || !isHTMLElement(target)) {\n return;\n }\n\n let next: HTMLElement | null = null;\n\n switch (e.key) {\n case 'ArrowDown':\n next = down(target);\n break;\n case 'ArrowUp':\n next = up(target);\n break;\n case 'ArrowLeft':\n next = left(target);\n break;\n case 'ArrowRight':\n next = right(target);\n break;\n case 'Tab':\n movingOut = true;\n if (e.shiftKey) {\n pre.focus();\n } else {\n post.focus();\n }\n\n break;\n default:\n return;\n }\n\n if (next) {\n e.preventDefault();\n next.focus();\n }\n };\n\n const onFocusOut = () => {\n mode = undefined;\n };\n\n container.addEventListener('keydown', onKeyDown);\n container.addEventListener('focusout', onFocusOut);\n return () => {\n container.removeEventListener('focusout', onFocusOut);\n container.removeEventListener('keydown', onKeyDown);\n };\n}\n\nfunction isHTMLElement(node: unknown): node is HTMLElement {\n return node instanceof HTMLElement;\n}\n\nfunction isRow(element: HTMLElement) {\n if (element.getAttribute('role') === 'row' || element.tagName === 'TR') {\n return true;\n }\n\n return false;\n}\n\nfunction findColumnCount(node: HTMLElement) {\n let cur = node;\n while (cur.parentElement && !isRow(cur)) {\n cur = cur.parentElement;\n }\n\n return cur.querySelectorAll('[role=\"cell\"], [role=\"gridcell\"], td').length - 1;\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["navigationModes/composite.ts"],"names":[],"mappings":"AAAA,OAAM,SAAU,wBAAV,CAAmC,OAAnC,EAAuD;EAC3D,MAAM,SAAS,GAAG,OAAlB;EACA,IAAI,IAAI,GAAqB,KAA7B;EACA,IAAI,SAAS,GAAG,KAAhB;EAEA,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAT,CAA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F,CAtCD;;EAwCA,SAAS,CAAC,gBAAV,CAA2B,SAA3B,EAAsC,SAAtC;EACA,OAAO,MAAM,SAAS,CAAC,mBAAV,CAA8B,SAA9B,EAAyC,SAAzC,CAAb;AACD;;AAED,SAAS,aAAT,CAAuB,IAAvB,EAAoC;EAClC,OAAO,IAAI,YAAY,WAAvB;AACD;;AAED,SAAS,KAAT,CAAe,OAAf,EAAmC;EACjC,IAAI,OAAO,CAAC,YAAR,CAAqB,MAArB,MAAiC,KAAjC,IAA0C,OAAO,CAAC,OAAR,KAAoB,IAAlE,EAAwE;IACtE,OAAO,IAAP;EACD;;EAED,OAAO,KAAP;AACD;;AAED,SAAS,MAAT,CAAgB,OAAhB,EAAoC;EAClC,IACE,OAAO,CAAC,YAAR,CAAqB,MAArB,MAAiC,MAAjC,IACA,OAAO,CAAC,YAAR,CAAqB,MAArB,MAAiC,UADjC,IAEA,OAAO,CAAC,OAAR,KAAoB,IAHtB,EAIE;IACA,OAAO,IAAP;EACD;;EAED,OAAO,KAAP;AACD","sourcesContent":["export function applyCompositeNavigation(element: HTMLElement) {\n const container = element;\n let mode: 'row' | 'column' = 'row';\n let movingOut = false;\n\n const pre = document.createElement('div');\n const post = document.createElement('div');\n\n if (!pre || !post) {\n return;\n }\n\n pre.tabIndex = 0;\n post.tabIndex = 0;\n\n pre.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = container;\n mode = 'row';\n const candidate = treeWalker.nextNode();\n if (isHTMLElement(candidate)) {\n candidate.focus();\n }\n }\n });\n\n post.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = post;\n mode = 'row';\n const candidate = treeWalker.previousNode();\n if (isHTMLElement(candidate)) {\n candidate.focus();\n }\n }\n });\n\n container.before(pre);\n container.after(post);\n\n const acceptNode = (node: Node) => {\n if (!isHTMLElement(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (!isCell(node) && !isRow(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (mode === 'column' && isRow(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (mode === 'row' && isCell(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (node.tabIndex < 0) {\n return NodeFilter.FILTER_SKIP;\n }\n\n return NodeFilter.FILTER_ACCEPT;\n };\n\n const treeWalker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode });\n\n const up = (current: HTMLElement) => {\n const prevMode = mode;\n mode = 'row';\n treeWalker.currentNode = current;\n\n if (prevMode === 'column') {\n treeWalker.previousNode();\n }\n\n const node = treeWalker.previousNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const down = (current: HTMLElement) => {\n mode = 'row';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const left = (current: HTMLElement) => {\n treeWalker.currentNode = current;\n const prevMode = mode;\n mode = 'column';\n let node: Node | null = null;\n\n if (prevMode === 'row') {\n let tmp: Node | null = null;\n while ((tmp = treeWalker.nextNode())) {\n node = tmp;\n }\n } else {\n node = treeWalker.previousNode();\n }\n\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const right = (current: HTMLElement) => {\n mode = 'column';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const target = e.target;\n if (!target || !isHTMLElement(target)) {\n return;\n }\n\n let next: HTMLElement | null = null;\n\n switch (e.key) {\n case 'ArrowDown':\n next = down(target);\n break;\n case 'ArrowUp':\n next = up(target);\n break;\n case 'ArrowLeft':\n next = left(target);\n break;\n case 'ArrowRight':\n next = right(target);\n break;\n case 'Tab':\n movingOut = true;\n if (e.shiftKey) {\n pre.focus();\n } else {\n post.focus();\n }\n\n break;\n default:\n break;\n }\n\n if (next) {\n e.preventDefault();\n next.focus();\n }\n };\n\n container.addEventListener('keydown', onKeyDown);\n return () => container.removeEventListener('keydown', onKeyDown);\n}\n\nfunction isHTMLElement(node: unknown): node is HTMLElement {\n return node instanceof HTMLElement;\n}\n\nfunction isRow(element: HTMLElement) {\n if (element.getAttribute('role') === 'row' || element.tagName === 'TR') {\n return true;\n }\n\n return false;\n}\n\nfunction isCell(element: HTMLElement) {\n if (\n element.getAttribute('role') === 'cell' ||\n element.getAttribute('role') === 'gridcell' ||\n element.tagName === 'TD'\n ) {\n return true;\n }\n\n return false;\n}\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/navigationModes/composite.ts"],"names":[],"mappings":"AAAA,OAAM,SAAU,wBAAV,CAAmC,OAAnC,EAAuD;EAC3D,MAAM,SAAS,GAAG,OAAlB;EACA,IAAI,IAAI,GAAqB,KAA7B;EACA,IAAI,SAAS,GAAG,KAAhB;EAEA,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAT,CAAuB,KAAvB,CAAZ;EACA,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAT,CAAuB,KAAvB,CAAb;;EAEA,IAAI,CAAC,GAAD,IAAQ,CAAC,IAAb,EAAmB;IACjB;EACD;;EAED,GAAG,CAAC,QAAJ,GAAe,CAAf;EACA,IAAI,CAAC,QAAL,GAAgB,CAAhB;EAEA,GAAG,CAAC,gBAAJ,CAAqB,OAArB,EAA8B,MAAK;IACjC,IAAI,SAAJ,EAAe;MACb,SAAS,GAAG,KAAZ;MACA;IACD,CAHD,MAGO;MACL,UAAU,CAAC,WAAX,GAAyB,SAAzB;MACA,IAAI,GAAG,KAAP;MACA,MAAM,SAAS,GAAG,UAAU,CAAC,QAAX,EAAlB;;MACA,IAAI,aAAa,CAAC,SAAD,CAAjB,EAA8B;QAC5B,SAAS,CAAC,KAAV;MACD;IACF;EACF,CAZD;EAcA,IAAI,CAAC,gBAAL,CAAsB,OAAtB,EAA+B,MAAK;IAClC,IAAI,SAAJ,EA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D;;EAED,OAAO,KAAP;AACD","sourcesContent":["export function applyCompositeNavigation(element: HTMLElement) {\n const container = element;\n let mode: 'row' | 'column' = 'row';\n let movingOut = false;\n\n const pre = document.createElement('div');\n const post = document.createElement('div');\n\n if (!pre || !post) {\n return;\n }\n\n pre.tabIndex = 0;\n post.tabIndex = 0;\n\n pre.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = container;\n mode = 'row';\n const candidate = treeWalker.nextNode();\n if (isHTMLElement(candidate)) {\n candidate.focus();\n }\n }\n });\n\n post.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = post;\n mode = 'row';\n const candidate = treeWalker.previousNode();\n if (isHTMLElement(candidate)) {\n candidate.focus();\n }\n }\n });\n\n container.before(pre);\n container.after(post);\n\n const acceptNode = (node: Node) => {\n if (!isHTMLElement(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (!isCell(node) && !isRow(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (mode === 'column' && isRow(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (mode === 'row' && isCell(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (node.tabIndex < 0) {\n return NodeFilter.FILTER_SKIP;\n }\n\n return NodeFilter.FILTER_ACCEPT;\n };\n\n const treeWalker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode });\n\n const up = (current: HTMLElement) => {\n const prevMode = mode;\n mode = 'row';\n treeWalker.currentNode = current;\n\n if (prevMode === 'column') {\n treeWalker.previousNode();\n }\n\n const node = treeWalker.previousNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const down = (current: HTMLElement) => {\n mode = 'row';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const left = (current: HTMLElement) => {\n treeWalker.currentNode = current;\n const prevMode = mode;\n mode = 'column';\n let node: Node | null = null;\n\n if (prevMode === 'row') {\n let tmp: Node | null = null;\n while ((tmp = treeWalker.nextNode())) {\n node = tmp;\n }\n } else {\n node = treeWalker.previousNode();\n }\n\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const right = (current: HTMLElement) => {\n mode = 'column';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const target = e.target;\n if (!target || !isHTMLElement(target)) {\n return;\n }\n\n let next: HTMLElement | null = null;\n\n switch (e.key) {\n case 'ArrowDown':\n next = down(target);\n break;\n case 'ArrowUp':\n next = up(target);\n break;\n case 'ArrowLeft':\n next = left(target);\n break;\n case 'ArrowRight':\n next = right(target);\n break;\n case 'Tab':\n movingOut = true;\n if (e.shiftKey) {\n pre.focus();\n } else {\n post.focus();\n }\n\n break;\n default:\n break;\n }\n\n if (next) {\n e.preventDefault();\n next.focus();\n }\n };\n\n container.addEventListener('keydown', onKeyDown);\n return () => container.removeEventListener('keydown', onKeyDown);\n}\n\nfunction isHTMLElement(node: unknown): node is HTMLElement {\n return node instanceof HTMLElement;\n}\n\nfunction isRow(element: HTMLElement) {\n if (element.getAttribute('role') === 'row' || element.tagName === 'TR') {\n return true;\n }\n\n return false;\n}\n\nfunction isCell(element: HTMLElement) {\n if (\n element.getAttribute('role') === 'cell' ||\n element.getAttribute('role') === 'gridcell' ||\n element.tagName === 'TD'\n ) {\n return true;\n }\n\n return false;\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["navigationModes/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["// eslint-disable-next-line deprecation/deprecation\nexport { useNavigationMode } from './useNavigationMode';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/navigationModes/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["// eslint-disable-next-line deprecation/deprecation\nexport { useNavigationMode } from './useNavigationMode';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["navigationModes/useNavigationMode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,wBAAT,QAAyC,aAAzC;AACA,SAAS,mBAAT,QAAoC,QAApC;AAIA;;;;;;AAMG;;AACH,OAAM,SAAU,iBAAV,CAA0D,IAA1D,EAA8E;EAClF,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;IAAE,IAAI,EAAE;EAAR,CAAD,CAAjD;EACA,MAAM,GAAG,GAAG,KAAK,CAAC,MAAN,CAAuB,IAAvB,CAAZ;EAEA,KAAK,CAAC,SAAN,CAAgB,MAAK;IACnB,IAAI,CAAC,GAAG,CAAC,OAAT,EAAkB;MAChB;IACD;;IAED,QAAQ,IAAR;MACE,KAAK,MAAL;QACE,mBAAmB,CAAC,GAAG,CAAC,OAAL,CAAnB;QACA;;MACF,KAAK,WAAL;QACE,wBAAwB,CAAC,GAAG,CAAC,OAAL,CAAxB;QACA;;MACF,KAAK,KAAL;QACE,IAAI,iBAAiB,CAAC,cAAD,CAArB,EAAuC;UACrC,GAAG,CAAC,OAAJ,CAAY,YAAZ,CAAyB,cAAzB,EAAyC,iBAAiB,CAAC,cAAD,CAA1D;QACD;;QACD;IAXJ;EAaD,CAlBD,EAkBG,CAAC,iBAAD,EAAoB,IAApB,CAlBH;EAoBA,OAAO,GAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { applyCompositeNavigation } from './composite';\nimport { applyCellNavigation } from './cell';\n\nexport type NavigationMode = 'row' | 'cell' | 'composite';\n\n/**\n * THIS HOOK WILL NOT EXIST IN STABLE RELEASE\n * Just a quick workaround before tabster fully supports these navigation modes with grid mode\n * https://github.com/microsoft/fluentui/issues/24382\n * @internal\n * @deprecated\n */\nexport function useNavigationMode<TElement extends HTMLElement>(mode: NavigationMode) {\n const rowNavigationAttr = useArrowNavigationGroup({ axis: 'vertical' });\n const ref = React.useRef<TElement>(null);\n\n React.useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n switch (mode) {\n case 'cell':\n applyCellNavigation(ref.current);\n break;\n case 'composite':\n applyCompositeNavigation(ref.current);\n break;\n case 'row':\n if (rowNavigationAttr['data-tabster']) {\n ref.current.setAttribute('data-tabster', rowNavigationAttr['data-tabster']);\n }\n break;\n }\n }, [rowNavigationAttr, mode]);\n\n return ref;\n}\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/navigationModes/useNavigationMode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,wBAAT,QAAyC,aAAzC;AACA,SAAS,mBAAT,QAAoC,QAApC;AAIA;;;;;;AAMG;;AACH,OAAM,SAAU,iBAAV,CAA0D,IAA1D,EAA8E;EAClF,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;IAAE,IAAI,EAAE;EAAR,CAAD,CAAjD;EACA,MAAM,GAAG,GAAG,KAAK,CAAC,MAAN,CAAuB,IAAvB,CAAZ;EAEA,KAAK,CAAC,SAAN,CAAgB,MAAK;IACnB,IAAI,CAAC,GAAG,CAAC,OAAT,EAAkB;MAChB;IACD;;IAED,QAAQ,IAAR;MACE,KAAK,MAAL;QACE,mBAAmB,CAAC,GAAG,CAAC,OAAL,CAAnB;QACA;;MACF,KAAK,WAAL;QACE,wBAAwB,CAAC,GAAG,CAAC,OAAL,CAAxB;QACA;;MACF,KAAK,KAAL;QACE,IAAI,iBAAiB,CAAC,cAAD,CAArB,EAAuC;UACrC,GAAG,CAAC,OAAJ,CAAY,YAAZ,CAAyB,cAAzB,EAAyC,iBAAiB,CAAC,cAAD,CAA1D;QACD;;QACD;IAXJ;EAaD,CAlBD,EAkBG,CAAC,iBAAD,EAAoB,IAApB,CAlBH;EAoBA,OAAO,GAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { applyCompositeNavigation } from './composite';\nimport { applyCellNavigation } from './cell';\n\nexport type NavigationMode = 'row' | 'cell' | 'composite';\n\n/**\n * THIS HOOK WILL NOT EXIST IN STABLE RELEASE\n * Just a quick workaround before tabster fully supports these navigation modes with grid mode\n * https://github.com/microsoft/fluentui/issues/24382\n * @internal\n * @deprecated\n */\nexport function useNavigationMode<TElement extends HTMLElement>(mode: NavigationMode) {\n const rowNavigationAttr = useArrowNavigationGroup({ axis: 'vertical' });\n const ref = React.useRef<TElement>(null);\n\n React.useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n switch (mode) {\n case 'cell':\n applyCellNavigation(ref.current);\n break;\n case 'composite':\n applyCompositeNavigation(ref.current);\n break;\n case 'row':\n if (rowNavigationAttr['data-tabster']) {\n ref.current.setAttribute('data-tabster', rowNavigationAttr['data-tabster']);\n }\n break;\n }\n }, [rowNavigationAttr, mode]);\n\n return ref;\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Table.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Table/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/Table.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Table/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableBody.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableBody/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableBody.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableBody/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCell/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCell/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableCellActions.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellActions/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableCellActions.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellActions/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableCellLayout.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellLayout/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableCellLayout.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellLayout/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableCellPrimaryLayout.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellLayout/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableCellPrimaryLayout.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellLayout/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableHeader.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableHeader/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableHeader.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableHeader/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableHeaderCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableHeaderCell/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableHeaderCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableHeaderCell/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableRow.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableRow/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableRow.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableRow/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TableSelectionCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableSelectionCell/index';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/TableSelectionCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableSelectionCell/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Table/Table.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AAGA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpF,MAAM,KAAK,GAAG,UAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;EAEA,gBAAA,CAAA,uBAAA,CAAwB,KAAxB;EACA,OAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,EAA4B,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAA5B,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useTable_unstable } from './useTable';\nimport { renderTable_unstable } from './renderTable';\nimport { useTableStyles_unstable } from './useTableStyles';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\n\n/**\n * Table component - TODO: add more docs\n */\nexport const Table: ForwardRefComponent<TableProps> = React.forwardRef((props, ref) => {\n const state = useTable_unstable(props, ref);\n\n useTableStyles_unstable(state);\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/Table/Table.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AAGA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpF,MAAM,KAAK,GAAG,UAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;EAEA,gBAAA,CAAA,uBAAA,CAAwB,KAAxB;EACA,OAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,EAA4B,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAA5B,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useTable_unstable } from './useTable';\nimport { renderTable_unstable } from './renderTable';\nimport { useTableStyles_unstable } from './useTableStyles';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\n\n/**\n * Table component - TODO: add more docs\n */\nexport const Table: ForwardRefComponent<TableProps> = React.forwardRef((props, ref) => {\n const state = useTable_unstable(props, ref);\n\n useTableStyles_unstable(state);\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Table/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/Table/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Table/renderTable.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;AAEG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAoB,aAApB,KAAyD;EAC3F,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,oBAAD,EAAqB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAArB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <slots.root {...slotProps.root} />\n </TableContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/Table/renderTable.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;AAEG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAoB,aAApB,KAAyD;EAC3F,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,oBAAD,EAAqB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAArB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <slots.root {...slotProps.root} />\n </TableContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Table/useTable.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;;;EAC9F,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,KAAK,CAAC,gBAAlB,IAAqC,KAArC,GAA6C,OAAnE;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,OAA1B,GAAoC,SAFD;MAGzC,GAAG;IAHsC,CAArC,CAJD;IASL,IAAI,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,IAAN,MAAU,IAAV,IAAU,EAAA,KAAA,KAAA,CAAV,GAAU,EAAV,GAAc,QATf;IAUL,gBAAgB,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,gBAAN,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,KAVvC;IAWL,QAAQ,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,QAAN,MAAc,IAAd,IAAc,EAAA,KAAA,KAAA,CAAd,GAAc,EAAd,GAAkB;EAXvB,CAAP;AAaD,CAhBM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } 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: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/Table/useTable.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;;;EAC9F,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,KAAK,CAAC,gBAAlB,IAAqC,KAArC,GAA6C,OAAnE;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,OAA1B,GAAoC,SAFD;MAGzC,GAAG;IAHsC,CAArC,CAJD;IASL,IAAI,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,IAAN,MAAU,IAAV,IAAU,EAAA,KAAA,KAAA,CAAV,GAAU,EAAV,GAAc,QATf;IAUL,gBAAgB,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,gBAAN,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,KAVvC;IAWL,QAAQ,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,QAAN,MAAc,IAAd,IAAc,EAAA,KAAA,KAAA,CAAd,GAAc,EAAd,GAAkB;EAXvB,CAAP;AAaD,CAhBM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } 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: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Table/useTableContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,8BAAhB,CAA+C,KAA/C,EAAgE;EAC9D,MAAM;IAAE,IAAF;IAAQ,gBAAR;IAA0B;EAA1B,IAAuC,KAA7C;EAEA,MAAM,YAAY,GAAG,KAAK,CAAC,OAAN,CACnB,OAAO;IACL,gBADK;IAEL,IAFK;IAGL;EAHK,CAAP,CADmB,EAMnB,CAAC,gBAAD,EAAmB,IAAnB,EAAyB,QAAzB,CANmB,CAArB;EASA,OAAO;IACL,KAAK,EAAE;EADF,CAAP;AAGD;;AAfD,OAAA,CAAA,8BAAA,GAAA,8BAAA","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"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/Table/useTableContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,8BAAhB,CAA+C,KAA/C,EAAgE;EAC9D,MAAM;IAAE,IAAF;IAAQ,gBAAR;IAA0B;EAA1B,IAAuC,KAA7C;EAEA,MAAM,YAAY,GAAG,KAAK,CAAC,OAAN,CACnB,OAAO;IACL,gBADK;IAEL,IAFK;IAGL;EAHK,CAAP,CADmB,EAMnB,CAAC,gBAAD,EAAmB,IAAnB,EAAyB,QAAzB,CANmB,CAArB;EASA,OAAO;IACL,KAAK,EAAE;EADF,CAAP;AAGD;;AAfD,OAAA,CAAA,8BAAA,GAAA,8BAAA","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"],"sourceRoot":"../src/"}
|
|
@@ -13,20 +13,37 @@ exports.tableClassName = 'fui-Table';
|
|
|
13
13
|
exports.tableClassNames = {
|
|
14
14
|
root: 'fui-Table'
|
|
15
15
|
};
|
|
16
|
+
|
|
17
|
+
const useTableLayoutStyles = /*#__PURE__*/react_1.__styles({
|
|
18
|
+
"root": {
|
|
19
|
+
"mc9l5x": "f1w4nmp0",
|
|
20
|
+
"ha4doy": "fmrv4ls",
|
|
21
|
+
"a9b677": "fly5x3f",
|
|
22
|
+
"B73mfa3": "f14m3nip"
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
"d": [".f1w4nmp0{display:table;}", ".fmrv4ls{vertical-align:middle;}", ".fly5x3f{width:100%;}", ".f14m3nip{table-layout:fixed;}"]
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const useFlexLayoutStyles = /*#__PURE__*/react_1.__styles({
|
|
29
|
+
"root": {
|
|
30
|
+
"mc9l5x": "ftgm304"
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
"d": [".ftgm304{display:block;}"]
|
|
34
|
+
});
|
|
16
35
|
/**
|
|
17
36
|
* Styles for the root slot
|
|
18
37
|
*/
|
|
19
38
|
|
|
39
|
+
|
|
20
40
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
21
41
|
"root": {
|
|
22
|
-
"ha4doy": "fmrv4ls",
|
|
23
42
|
"po53p8": "fgkb47j",
|
|
24
|
-
"a9b677": "fly5x3f",
|
|
25
|
-
"mc9l5x": "f1w4nmp0",
|
|
26
43
|
"De3pzq": "fxugw4r"
|
|
27
44
|
}
|
|
28
45
|
}, {
|
|
29
|
-
"d": [".
|
|
46
|
+
"d": [".fgkb47j{border-collapse:collapse;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}"]
|
|
30
47
|
});
|
|
31
48
|
/**
|
|
32
49
|
* Apply styling to the Table slots based on the state
|
|
@@ -35,7 +52,11 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
35
52
|
|
|
36
53
|
const useTableStyles_unstable = state => {
|
|
37
54
|
const styles = useStyles();
|
|
38
|
-
|
|
55
|
+
const layoutStyles = {
|
|
56
|
+
table: useTableLayoutStyles(),
|
|
57
|
+
flex: useFlexLayoutStyles()
|
|
58
|
+
};
|
|
59
|
+
state.root.className = react_1.mergeClasses(exports.tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
39
60
|
return state;
|
|
40
61
|
};
|
|
41
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Table/useTableStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,GAAiB,WAAjB;AACA,OAAA,CAAA,eAAA,GAA8C;EACzD,IAAI,EAAE;AADmD,CAA9C
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/Table/useTableStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,GAAiB,WAAjB;AACA,OAAA,CAAA,eAAA,GAA8C;EACzD,IAAI,EAAE;AADmD,CAA9C;;AAIb,MAAM,oBAAoB,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AASA,MAAM,mBAAmB,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAMA;;AAEG;;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAOA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAkC;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,cADqB,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAHhD,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAOA,OAAO,KAAP;AACD,CAdM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableSlots, TableState } from './Table.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableClassName = 'fui-Table';\nexport const tableClassNames: SlotClassNames<TableSlots> = {\n root: 'fui-Table',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table',\n verticalAlign: 'middle',\n width: '100%',\n tableLayout: 'fixed',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n borderCollapse: 'collapse',\n backgroundColor: tokens.colorNeutralBackground1,\n },\n});\n\n/**\n * Apply styling to the Table slots based on the state\n */\nexport const useTableStyles_unstable = (state: TableState): TableState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableClassName,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableBody/TableBody.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,SAAA,gBAAiD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,cAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,GAA7B,CAAd;EAEA,oBAAA,CAAA,2BAAA,CAA4B,KAA5B;EACA,OAAO,iBAAA,CAAA,wBAAA,CAAyB,KAAzB,CAAP;AACD,CAL6D,CAAjD;AAOb,OAAA,CAAA,SAAA,CAAU,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableBody component - TODO: add more docs\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/TableBody.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,SAAA,gBAAiD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,cAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,GAA7B,CAAd;EAEA,oBAAA,CAAA,2BAAA,CAA4B,KAA5B;EACA,OAAO,iBAAA,CAAA,wBAAA,CAAyB,KAAzB,CAAP;AACD,CAL6D,CAAjD;AAOb,OAAA,CAAA,SAAA,CAAU,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableBody component - TODO: add more docs\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableBody/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableBody/renderTableBody.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAyB,KAAzB,CAA7B,CADgE,CAGhE;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<TableBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/renderTableBody.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAyB,KAAzB,CAA7B,CADgE,CAGhE;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<TableBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableBody/useTableBody.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,cAAA,CAAA,eAAA,EAA7B;EACA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,GAAG;IAHsC,CAArC;
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/useTableBody.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,cAAA,CAAA,eAAA,EAA7B;EACA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,GAAG;IAHsC,CAArC,CAJD;IASL;EATK,CAAP;AAWD,CAfM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } 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: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n noNativeElements,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -7,7 +7,7 @@ exports.useTableBodyStyles_unstable = exports.tableBodyClassNames = exports.tabl
|
|
|
7
7
|
|
|
8
8
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const useTableLayoutStyles = /*#__PURE__*/react_1.__styles({
|
|
11
11
|
"root": {
|
|
12
12
|
"mc9l5x": "f1tp1avn"
|
|
13
13
|
}
|
|
@@ -15,6 +15,14 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
15
15
|
"d": [".f1tp1avn{display:table-row-group;}"]
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
+
const useFlexLayoutStyles = /*#__PURE__*/react_1.__styles({
|
|
19
|
+
"root": {
|
|
20
|
+
"mc9l5x": "ftgm304"
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
"d": [".ftgm304{display:block;}"]
|
|
24
|
+
});
|
|
25
|
+
|
|
18
26
|
exports.tableBodyClassName = 'fui-TableBody';
|
|
19
27
|
exports.tableBodyClassNames = {
|
|
20
28
|
root: 'fui-TableBody'
|
|
@@ -24,8 +32,11 @@ exports.tableBodyClassNames = {
|
|
|
24
32
|
*/
|
|
25
33
|
|
|
26
34
|
const useTableBodyStyles_unstable = state => {
|
|
27
|
-
const
|
|
28
|
-
|
|
35
|
+
const layoutStyles = {
|
|
36
|
+
table: useTableLayoutStyles(),
|
|
37
|
+
flex: useFlexLayoutStyles()
|
|
38
|
+
};
|
|
39
|
+
state.root.className = react_1.mergeClasses(exports.tableBodyClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
29
40
|
return state;
|
|
30
41
|
};
|
|
31
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIA,MAAM,
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIA,MAAM,oBAAoB,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAMA,MAAM,mBAAmB,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;;AAMa,OAAA,CAAA,kBAAA,GAAqB,eAArB;AACA,OAAA,CAAA,mBAAA,GAAsD;EACjE,IAAI,EAAE;AAD2D,CAAtD;AAIb;;AAEG;;AACI,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,kBADqB,EAErB,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAFhD,EAGrB,KAAK,CAAC,IAAN,CAAW,SAHU,CAAvB;EAMA,OAAO,KAAP;AACD,CAZM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nexport const tableBodyClassName = 'fui-TableBody';\nexport const tableBodyClassNames: SlotClassNames<TableBodySlots> = {\n root: 'fui-TableBody',\n};\n\n/**\n * Apply styling to the TableBody slots based on the state\n */\nexport const useTableBodyStyles_unstable = (state: TableBodyState): TableBodyState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableBodyClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCell/TableCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,SAAA,gBAAiD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,cAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,GAA7B,CAAd;EAEA,oBAAA,CAAA,2BAAA,CAA4B,KAA5B;EACA,OAAO,iBAAA,CAAA,wBAAA,CAAyB,KAAzB,CAAP;AACD,CAL6D,CAAjD;AAOb,OAAA,CAAA,SAAA,CAAU,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCell component - TODO: add more docs\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableCell/TableCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,SAAA,gBAAiD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,cAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,GAA7B,CAAd;EAEA,oBAAA,CAAA,2BAAA,CAA4B,KAA5B;EACA,OAAO,iBAAA,CAAA,wBAAA,CAAyB,KAAzB,CAAP;AACD,CAL6D,CAAjD;AAOb,OAAA,CAAA,SAAA,CAAU,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCell component - TODO: add more docs\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCell/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableCell/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCell/renderTableCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAyB,KAAzB,CAA7B;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n const { slots, slotProps } = getSlots<TableCellSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableCell/renderTableCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAyB,KAAzB,CAA7B;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n const { slots, slotProps } = getSlots<TableCellSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCell/useTableCell.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBA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,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,MAA1B,GAAmC,SAFA;MAGzC,GAAG;IAHsC,CAArC,CAJD;IASL;EATK,CAAP;AAWD,CAhBM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellProps, TableCellState } from './TableCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableCell.\n *\n * The returned state can be modified with hooks such as useTableCellStyles_unstable,\n * before being passed to renderTableCell_unstable.\n *\n * @param props - props from this instance of TableCell\n * @param ref - reference to root HTMLElement of TableCell\n */\nexport const useTableCell_unstable = (props: TableCellProps, ref: React.Ref<HTMLElement>): TableCellState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n noNativeElements,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -13,22 +13,43 @@ exports.tableCellClassName = 'fui-TableCell';
|
|
|
13
13
|
exports.tableCellClassNames = {
|
|
14
14
|
root: exports.tableCellClassName
|
|
15
15
|
};
|
|
16
|
+
|
|
17
|
+
const useTableLayoutStyles = /*#__PURE__*/react_1.__styles({
|
|
18
|
+
"root": {
|
|
19
|
+
"mc9l5x": "f15pt5es",
|
|
20
|
+
"ha4doy": "fmrv4ls"
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
"d": [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}"]
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const useFlexLayoutStyles = /*#__PURE__*/react_1.__styles({
|
|
27
|
+
"root": {
|
|
28
|
+
"mc9l5x": "f22iagw",
|
|
29
|
+
"Bf4jedk": "f10tiqix",
|
|
30
|
+
"Bt984gj": "f122n59",
|
|
31
|
+
"Bh6795r": "fqerorx",
|
|
32
|
+
"Bnnss6s": "f1neuvcm",
|
|
33
|
+
"xawz": "fkjuxzh"
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10tiqix{min-width:0px;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}"]
|
|
37
|
+
});
|
|
16
38
|
/**
|
|
17
39
|
* Styles for the root slot
|
|
18
40
|
*/
|
|
19
41
|
|
|
42
|
+
|
|
20
43
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
21
44
|
"root": {
|
|
22
45
|
"qhf8xq": "f10pi13n",
|
|
23
|
-
"ha4doy": "fmrv4ls",
|
|
24
|
-
"mc9l5x": "f15pt5es",
|
|
25
46
|
"z8tnut": "f1nbblvp",
|
|
26
47
|
"z189sj": ["f1vdfbxk", "f1f5gg8d"],
|
|
27
48
|
"Byoj8tv": "f1ov4xf1",
|
|
28
49
|
"uwmqm3": ["f1f5gg8d", "f1vdfbxk"]
|
|
29
50
|
}
|
|
30
51
|
}, {
|
|
31
|
-
"d": [".f10pi13n{position:relative;}", ".
|
|
52
|
+
"d": [".f10pi13n{position:relative;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}"]
|
|
32
53
|
});
|
|
33
54
|
/**
|
|
34
55
|
* Apply styling to the TableCell slots based on the state
|
|
@@ -37,7 +58,11 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
37
58
|
|
|
38
59
|
const useTableCellStyles_unstable = state => {
|
|
39
60
|
const styles = useStyles();
|
|
40
|
-
|
|
61
|
+
const layoutStyles = {
|
|
62
|
+
table: useTableLayoutStyles(),
|
|
63
|
+
flex: useFlexLayoutStyles()
|
|
64
|
+
};
|
|
65
|
+
state.root.className = react_1.mergeClasses(exports.tableCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
41
66
|
return state;
|
|
42
67
|
};
|
|
43
68
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCell/useTableCellStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,kBAAA,GAAqB,eAArB;AACA,OAAA,CAAA,mBAAA,GAAsD;EACjE,IAAI,EAAE,OAAA,CAAA;AAD2D,CAAtD;
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableCell/useTableCellStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,kBAAA,GAAqB,eAArB;AACA,OAAA,CAAA,mBAAA,GAAsD;EACjE,IAAI,EAAE,OAAA,CAAA;AAD2D,CAAtD;;AAIb,MAAM,oBAAoB,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAOA,MAAM,mBAAmB,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AASA;;AAEG;;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAOA;;AAEG;;;AACI,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,mBAAA,CAAoB,IADC,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAHhD,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;EAMA,OAAO,KAAP;AACD,CAbM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellSlots, TableCellState } from './TableCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellClassName = 'fui-TableCell';\nexport const tableCellClassNames: SlotClassNames<TableCellSlots> = {\n root: tableCellClassName,\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n minWidth: '0px',\n alignItems: 'center',\n ...shorthands.flex(1, 1, '0px'),\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n },\n});\n\n/**\n * Apply styling to the TableCell slots based on the state\n */\nexport const useTableCellStyles_unstable = (state: TableCellState): TableCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableCellClassNames.root,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCellActions/TableCellActions.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,gBAAA,gBAA+D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1G,MAAM,KAAK,GAAG,qBAAA,CAAA,4BAAA,CAA6B,KAA7B,EAAoC,GAApC,CAAd;EAEA,2BAAA,CAAA,kCAAA,CAAmC,KAAnC;EACA,OAAO,wBAAA,CAAA,+BAAA,CAAgC,KAAhC,CAAP;AACD,CAL2E,CAA/D;AAOb,OAAA,CAAA,gBAAA,CAAiB,WAAjB,GAA+B,kBAA/B","sourcesContent":["import * as React from 'react';\nimport { useTableCellActions_unstable } from './useTableCellActions';\nimport { renderTableCellActions_unstable } from './renderTableCellActions';\nimport { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles';\nimport type { TableCellActionsProps } from './TableCellActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellActions component - TODO: add more docs\n */\nexport const TableCellActions: ForwardRefComponent<TableCellActionsProps> = React.forwardRef((props, ref) => {\n const state = useTableCellActions_unstable(props, ref);\n\n useTableCellActionsStyles_unstable(state);\n return renderTableCellActions_unstable(state);\n});\n\nTableCellActions.displayName = 'TableCellActions';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableCellActions/TableCellActions.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,gBAAA,gBAA+D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1G,MAAM,KAAK,GAAG,qBAAA,CAAA,4BAAA,CAA6B,KAA7B,EAAoC,GAApC,CAAd;EAEA,2BAAA,CAAA,kCAAA,CAAmC,KAAnC;EACA,OAAO,wBAAA,CAAA,+BAAA,CAAgC,KAAhC,CAAP;AACD,CAL2E,CAA/D;AAOb,OAAA,CAAA,gBAAA,CAAiB,WAAjB,GAA+B,kBAA/B","sourcesContent":["import * as React from 'react';\nimport { useTableCellActions_unstable } from './useTableCellActions';\nimport { renderTableCellActions_unstable } from './renderTableCellActions';\nimport { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles';\nimport type { TableCellActionsProps } from './TableCellActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellActions component - TODO: add more docs\n */\nexport const TableCellActions: ForwardRefComponent<TableCellActionsProps> = React.forwardRef((props, ref) => {\n const state = useTableCellActions_unstable(props, ref);\n\n useTableCellActionsStyles_unstable(state);\n return renderTableCellActions_unstable(state);\n});\n\nTableCellActions.displayName = 'TableCellActions';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCellActions/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableCellActions';\nexport * from './TableCellActions.types';\nexport * from './renderTableCellActions';\nexport * from './useTableCellActions';\nexport * from './useTableCellActionsStyles';\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableCellActions/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableCellActions';\nexport * from './TableCellActions.types';\nexport * from './renderTableCellActions';\nexport * from './useTableCellActions';\nexport * from './useTableCellActionsStyles';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCellActions/renderTableCellActions.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,+BAA+B,GAAI,KAAD,IAAiC;EAC9E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAgC,KAAhC,CAA7B,CAD8E,CAG9E;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n const { slots, slotProps } = getSlots<TableCellActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["packages/react-components/react-table/src/components/TableCellActions/renderTableCellActions.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,+BAA+B,GAAI,KAAD,IAAiC;EAC9E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAgC,KAAhC,CAA7B,CAD8E,CAG9E;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n const { slots, slotProps } = getSlots<TableCellActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -20,6 +20,8 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
const useTableCellActions_unstable = (props, ref) => {
|
|
23
|
+
var _a;
|
|
24
|
+
|
|
23
25
|
return {
|
|
24
26
|
components: {
|
|
25
27
|
root: 'div'
|
|
@@ -27,7 +29,8 @@ const useTableCellActions_unstable = (props, ref) => {
|
|
|
27
29
|
root: react_utilities_1.getNativeElementProps('div', {
|
|
28
30
|
ref: react_utilities_1.useMergedRefs(ref, react_tabster_1.useFocusWithin()),
|
|
29
31
|
...props
|
|
30
|
-
})
|
|
32
|
+
}),
|
|
33
|
+
visible: (_a = props.visible) !== null && _a !== void 0 ? _a : false
|
|
31
34
|
};
|
|
32
35
|
};
|
|
33
36
|
|