@fluentui/react-table 0.0.0-nightly-20221007-1237.1
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 +354 -0
- package/CHANGELOG.md +104 -0
- package/LICENSE +15 -0
- package/README.md +5 -0
- package/Spec.md +63 -0
- package/dist/index.d.ts +647 -0
- package/lib/Table.js +2 -0
- package/lib/Table.js.map +1 -0
- package/lib/TableBody.js +2 -0
- package/lib/TableBody.js.map +1 -0
- package/lib/TableCell.js +2 -0
- package/lib/TableCell.js.map +1 -0
- package/lib/TableCellActions.js +2 -0
- package/lib/TableCellActions.js.map +1 -0
- package/lib/TableCellLayout.js +2 -0
- package/lib/TableCellLayout.js.map +1 -0
- package/lib/TableCellPrimaryLayout.js +2 -0
- package/lib/TableCellPrimaryLayout.js.map +1 -0
- package/lib/TableHeader.js +2 -0
- package/lib/TableHeader.js.map +1 -0
- package/lib/TableHeaderCell.js +2 -0
- package/lib/TableHeaderCell.js.map +1 -0
- package/lib/TableRow.js +2 -0
- package/lib/TableRow.js.map +1 -0
- package/lib/TableSelectionCell.js +2 -0
- package/lib/TableSelectionCell.js.map +1 -0
- package/lib/components/Table/Table.js +16 -0
- package/lib/components/Table/Table.js.map +1 -0
- package/lib/components/Table/Table.types.js +2 -0
- package/lib/components/Table/Table.types.js.map +1 -0
- package/lib/components/Table/index.js +6 -0
- package/lib/components/Table/index.js.map +1 -0
- package/lib/components/Table/renderTable.js +18 -0
- package/lib/components/Table/renderTable.js.map +1 -0
- package/lib/components/Table/useTable.js +30 -0
- package/lib/components/Table/useTable.js.map +1 -0
- package/lib/components/Table/useTableContextValues.js +17 -0
- package/lib/components/Table/useTableContextValues.js.map +1 -0
- package/lib/components/Table/useTableStyles.js +53 -0
- package/lib/components/Table/useTableStyles.js.map +1 -0
- package/lib/components/TableBody/TableBody.js +15 -0
- package/lib/components/TableBody/TableBody.js.map +1 -0
- package/lib/components/TableBody/TableBody.types.js +2 -0
- package/lib/components/TableBody/TableBody.types.js.map +1 -0
- package/lib/components/TableBody/index.js +6 -0
- package/lib/components/TableBody/index.js.map +1 -0
- package/lib/components/TableBody/renderTableBody.js +16 -0
- package/lib/components/TableBody/renderTableBody.js.map +1 -0
- package/lib/components/TableBody/useTableBody.js +32 -0
- package/lib/components/TableBody/useTableBody.js.map +1 -0
- package/lib/components/TableBody/useTableBodyStyles.js +35 -0
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -0
- package/lib/components/TableCell/TableCell.js +15 -0
- package/lib/components/TableCell/TableCell.js.map +1 -0
- package/lib/components/TableCell/TableCell.types.js +2 -0
- package/lib/components/TableCell/TableCell.types.js.map +1 -0
- package/lib/components/TableCell/index.js +6 -0
- package/lib/components/TableCell/index.js.map +1 -0
- package/lib/components/TableCell/renderTableCell.js +15 -0
- package/lib/components/TableCell/renderTableCell.js.map +1 -0
- package/lib/components/TableCell/useTableCell.js +32 -0
- package/lib/components/TableCell/useTableCell.js.map +1 -0
- package/lib/components/TableCell/useTableCellStyles.js +59 -0
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -0
- package/lib/components/TableCellActions/TableCellActions.js +15 -0
- package/lib/components/TableCellActions/TableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/TableCellActions.types.js +2 -0
- package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -0
- package/lib/components/TableCellActions/index.js +6 -0
- package/lib/components/TableCellActions/index.js.map +1 -0
- package/lib/components/TableCellActions/renderTableCellActions.js +16 -0
- package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/useTableCellActions.js +27 -0
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js +40 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.js +16 -0
- package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.types.js +2 -0
- package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
- package/lib/components/TableCellLayout/index.js +6 -0
- package/lib/components/TableCellLayout/index.js.map +1 -0
- package/lib/components/TableCellLayout/renderTableCellLayout.js +22 -0
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js +46 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
- package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +74 -0
- package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
- package/lib/components/TableHeader/TableHeader.js +15 -0
- package/lib/components/TableHeader/TableHeader.js.map +1 -0
- package/lib/components/TableHeader/TableHeader.types.js +2 -0
- package/lib/components/TableHeader/TableHeader.types.js.map +1 -0
- package/lib/components/TableHeader/index.js +6 -0
- package/lib/components/TableHeader/index.js.map +1 -0
- package/lib/components/TableHeader/renderTableHeader.js +15 -0
- package/lib/components/TableHeader/renderTableHeader.js.map +1 -0
- package/lib/components/TableHeader/useTableHeader.js +39 -0
- package/lib/components/TableHeader/useTableHeader.js.map +1 -0
- package/lib/components/TableHeader/useTableHeaderStyles.js +41 -0
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.js +15 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js +2 -0
- package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
- package/lib/components/TableHeaderCell/index.js +6 -0
- package/lib/components/TableHeaderCell/index.js.map +1 -0
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js +17 -0
- package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +62 -0
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +106 -0
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
- package/lib/components/TableRow/TableRow.js +15 -0
- package/lib/components/TableRow/TableRow.js.map +1 -0
- package/lib/components/TableRow/TableRow.types.js +2 -0
- package/lib/components/TableRow/TableRow.types.js.map +1 -0
- package/lib/components/TableRow/index.js +6 -0
- package/lib/components/TableRow/index.js.map +1 -0
- package/lib/components/TableRow/renderTableRow.js +16 -0
- package/lib/components/TableRow/renderTableRow.js.map +1 -0
- package/lib/components/TableRow/useTableRow.js +34 -0
- package/lib/components/TableRow/useTableRow.js.map +1 -0
- package/lib/components/TableRow/useTableRowStyles.js +88 -0
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.js +15 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js +2 -0
- package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
- package/lib/components/TableSelectionCell/index.js +6 -0
- package/lib/components/TableSelectionCell/index.js.map +1 -0
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js +17 -0
- package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js +47 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +81 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib/contexts/tableContext.js +14 -0
- package/lib/contexts/tableContext.js.map +1 -0
- package/lib/hooks/index.js +5 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/selectionManager.js +89 -0
- package/lib/hooks/selectionManager.js.map +1 -0
- package/lib/hooks/types.js +2 -0
- package/lib/hooks/types.js.map +1 -0
- package/lib/hooks/useSelection.js +74 -0
- package/lib/hooks/useSelection.js.map +1 -0
- package/lib/hooks/useSort.js +94 -0
- package/lib/hooks/useSort.js.map +1 -0
- package/lib/hooks/useTable.js +32 -0
- package/lib/hooks/useTable.js.map +1 -0
- package/lib/index.js +12 -0
- package/lib/index.js.map +1 -0
- package/lib/navigationModes/cell.js +250 -0
- package/lib/navigationModes/cell.js.map +1 -0
- package/lib/navigationModes/composite.js +208 -0
- package/lib/navigationModes/composite.js.map +1 -0
- package/lib/navigationModes/index.js +3 -0
- package/lib/navigationModes/index.js.map +1 -0
- package/lib/navigationModes/useNavigationMode.js +42 -0
- package/lib/navigationModes/useNavigationMode.js.map +1 -0
- package/lib-commonjs/Table.js +10 -0
- package/lib-commonjs/Table.js.map +1 -0
- package/lib-commonjs/TableBody.js +10 -0
- package/lib-commonjs/TableBody.js.map +1 -0
- package/lib-commonjs/TableCell.js +10 -0
- package/lib-commonjs/TableCell.js.map +1 -0
- package/lib-commonjs/TableCellActions.js +10 -0
- package/lib-commonjs/TableCellActions.js.map +1 -0
- package/lib-commonjs/TableCellLayout.js +10 -0
- package/lib-commonjs/TableCellLayout.js.map +1 -0
- package/lib-commonjs/TableCellPrimaryLayout.js +10 -0
- package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -0
- package/lib-commonjs/TableHeader.js +10 -0
- package/lib-commonjs/TableHeader.js.map +1 -0
- package/lib-commonjs/TableHeaderCell.js +10 -0
- package/lib-commonjs/TableHeaderCell.js.map +1 -0
- package/lib-commonjs/TableRow.js +10 -0
- package/lib-commonjs/TableRow.js.map +1 -0
- package/lib-commonjs/TableSelectionCell.js +10 -0
- package/lib-commonjs/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/Table/Table.js +28 -0
- package/lib-commonjs/components/Table/Table.js.map +1 -0
- package/lib-commonjs/components/Table/Table.types.js +6 -0
- package/lib-commonjs/components/Table/Table.types.js.map +1 -0
- package/lib-commonjs/components/Table/index.js +18 -0
- package/lib-commonjs/components/Table/index.js.map +1 -0
- package/lib-commonjs/components/Table/renderTable.js +30 -0
- package/lib-commonjs/components/Table/renderTable.js.map +1 -0
- package/lib-commonjs/components/Table/useTable.js +40 -0
- package/lib-commonjs/components/Table/useTable.js.map +1 -0
- package/lib-commonjs/components/Table/useTableContextValues.js +27 -0
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -0
- package/lib-commonjs/components/Table/useTableStyles.js +64 -0
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -0
- package/lib-commonjs/components/TableBody/TableBody.js +26 -0
- package/lib-commonjs/components/TableBody/TableBody.js.map +1 -0
- package/lib-commonjs/components/TableBody/TableBody.types.js +6 -0
- package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -0
- package/lib-commonjs/components/TableBody/index.js +18 -0
- package/lib-commonjs/components/TableBody/index.js.map +1 -0
- package/lib-commonjs/components/TableBody/renderTableBody.js +27 -0
- package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -0
- package/lib-commonjs/components/TableBody/useTableBody.js +43 -0
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -0
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +44 -0
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -0
- package/lib-commonjs/components/TableCell/TableCell.js +26 -0
- package/lib-commonjs/components/TableCell/TableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/TableCell.types.js +6 -0
- package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -0
- package/lib-commonjs/components/TableCell/index.js +18 -0
- package/lib-commonjs/components/TableCell/index.js.map +1 -0
- package/lib-commonjs/components/TableCell/renderTableCell.js +26 -0
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/useTableCell.js +43 -0
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +70 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.js +26 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +6 -0
- package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/index.js +18 -0
- package/lib-commonjs/components/TableCellActions/index.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +27 -0
- package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +38 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +51 -0
- package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +28 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +6 -0
- package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/index.js +18 -0
- package/lib-commonjs/components/TableCellLayout/index.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +34 -0
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +57 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -0
- 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 +85 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
- package/lib-commonjs/components/TableHeader/TableHeader.js +26 -0
- package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -0
- package/lib-commonjs/components/TableHeader/TableHeader.types.js +6 -0
- package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -0
- package/lib-commonjs/components/TableHeader/index.js +18 -0
- package/lib-commonjs/components/TableHeader/index.js.map +1 -0
- package/lib-commonjs/components/TableHeader/renderTableHeader.js +26 -0
- package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeader.js +51 -0
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +51 -0
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +26 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +6 -0
- package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/index.js +18 -0
- package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +28 -0
- package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +76 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +117 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
- package/lib-commonjs/components/TableRow/TableRow.js +26 -0
- package/lib-commonjs/components/TableRow/TableRow.js.map +1 -0
- package/lib-commonjs/components/TableRow/TableRow.types.js +6 -0
- package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -0
- package/lib-commonjs/components/TableRow/index.js +18 -0
- package/lib-commonjs/components/TableRow/index.js.map +1 -0
- package/lib-commonjs/components/TableRow/renderTableRow.js +27 -0
- package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -0
- package/lib-commonjs/components/TableRow/useTableRow.js +45 -0
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +100 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +26 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +6 -0
- package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/index.js +18 -0
- package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +28 -0
- package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +62 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +91 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +25 -0
- package/lib-commonjs/contexts/tableContext.js.map +1 -0
- package/lib-commonjs/hooks/index.js +16 -0
- package/lib-commonjs/hooks/index.js.map +1 -0
- package/lib-commonjs/hooks/selectionManager.js +98 -0
- package/lib-commonjs/hooks/selectionManager.js.map +1 -0
- package/lib-commonjs/hooks/types.js +6 -0
- package/lib-commonjs/hooks/types.js.map +1 -0
- package/lib-commonjs/hooks/useSelection.js +89 -0
- package/lib-commonjs/hooks/useSelection.js.map +1 -0
- package/lib-commonjs/hooks/useSort.js +107 -0
- package/lib-commonjs/hooks/useSort.js.map +1 -0
- package/lib-commonjs/hooks/useTable.js +42 -0
- package/lib-commonjs/hooks/useTable.js.map +1 -0
- package/lib-commonjs/index.js +377 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/navigationModes/cell.js +259 -0
- package/lib-commonjs/navigationModes/cell.js.map +1 -0
- package/lib-commonjs/navigationModes/composite.js +217 -0
- package/lib-commonjs/navigationModes/composite.js.map +1 -0
- package/lib-commonjs/navigationModes/index.js +16 -0
- package/lib-commonjs/navigationModes/index.js.map +1 -0
- package/lib-commonjs/navigationModes/useNavigationMode.js +55 -0
- package/lib-commonjs/navigationModes/useNavigationMode.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableHeader.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/TableHeader/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeaderCell.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableHeaderCell.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableHeaderCell/index';\n"]}
|
package/lib/TableRow.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableRow.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './components/TableRow/index';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSelectionCell.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-table/src/TableSelectionCell.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC","sourcesContent":["export * from './components/TableSelectionCell/index';\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTable_unstable } from './useTable';
|
|
3
|
+
import { renderTable_unstable } from './renderTable';
|
|
4
|
+
import { useTableStyles_unstable } from './useTableStyles';
|
|
5
|
+
import { useTableContextValues_unstable } from './useTableContextValues';
|
|
6
|
+
/**
|
|
7
|
+
* Table component - TODO: add more docs
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const Table = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
11
|
+
const state = useTable_unstable(props, ref);
|
|
12
|
+
useTableStyles_unstable(state);
|
|
13
|
+
return renderTable_unstable(state, useTableContextValues_unstable(state));
|
|
14
|
+
});
|
|
15
|
+
Table.displayName = 'Table';
|
|
16
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,YAAlC;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AAGA,SAAS,8BAAT,QAA+C,yBAA/C;AAEA;;AAEG;;AACH,OAAO,MAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpF,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;EAEA,uBAAuB,CAAC,KAAD,CAAvB;EACA,OAAO,oBAAoB,CAAC,KAAD,EAAQ,8BAA8B,CAAC,KAAD,CAAtC,CAA3B;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,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":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/Table.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableSlots = {\n root: Slot<'table', 'div'>;\n};\n\nexport type TableContextValue = {\n /**\n * Affects the sizes of all table subcomponents\n * @default medium\n */\n size: 'small' | 'smaller' | 'medium';\n\n /**\n * Render all table elements as divs intead of semantic table elements\n * Using divs no longer uses `display: table` layout but `display: flex`\n */\n noNativeElements: boolean;\n\n /**\n * Whether the table is sortable\n */\n sortable: boolean;\n};\n\nexport type SortDirection = 'ascending' | 'descending';\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles';\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
+
import { TableContextProvider } from '../../contexts/tableContext';
|
|
4
|
+
/**
|
|
5
|
+
* Render the final JSX of Table
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const renderTable_unstable = (state, contextValues) => {
|
|
9
|
+
const {
|
|
10
|
+
slots,
|
|
11
|
+
slotProps
|
|
12
|
+
} = getSlots(state);
|
|
13
|
+
return /*#__PURE__*/React.createElement(TableContextProvider, {
|
|
14
|
+
value: contextValues.table
|
|
15
|
+
}, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=renderTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/renderTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,oBAAT,QAAqC,6BAArC;AAEA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAoB,aAApB,KAAyD;EAC3F,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAa,KAAb,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,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","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":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
2
|
+
/**
|
|
3
|
+
* Create the state required to render Table.
|
|
4
|
+
*
|
|
5
|
+
* The returned state can be modified with hooks such as useTableStyles_unstable,
|
|
6
|
+
* before being passed to renderTable_unstable.
|
|
7
|
+
*
|
|
8
|
+
* @param props - props from this instance of Table
|
|
9
|
+
* @param ref - reference to root HTMLElement of Table
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export const useTable_unstable = (props, ref) => {
|
|
13
|
+
var _a, _b, _c, _d;
|
|
14
|
+
|
|
15
|
+
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : props.noNativeElements) ? 'div' : 'table';
|
|
16
|
+
return {
|
|
17
|
+
components: {
|
|
18
|
+
root: rootComponent
|
|
19
|
+
},
|
|
20
|
+
root: getNativeElementProps(rootComponent, {
|
|
21
|
+
ref,
|
|
22
|
+
role: rootComponent === 'div' ? 'table' : undefined,
|
|
23
|
+
...props
|
|
24
|
+
}),
|
|
25
|
+
size: (_b = props.size) !== null && _b !== void 0 ? _b : 'medium',
|
|
26
|
+
noNativeElements: (_c = props.noNativeElements) !== null && _c !== void 0 ? _c : false,
|
|
27
|
+
sortable: (_d = props.sortable) !== null && _d !== void 0 ? _d : false
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/useTable.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,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,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,OAA1B,GAAoC,SAFD;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;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","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":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export function useTableContextValues_unstable(state) {
|
|
3
|
+
const {
|
|
4
|
+
size,
|
|
5
|
+
noNativeElements,
|
|
6
|
+
sortable
|
|
7
|
+
} = state;
|
|
8
|
+
const tableContext = React.useMemo(() => ({
|
|
9
|
+
noNativeElements,
|
|
10
|
+
size,
|
|
11
|
+
sortable
|
|
12
|
+
}), [noNativeElements, size, sortable]);
|
|
13
|
+
return {
|
|
14
|
+
table: tableContext
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=useTableContextValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/useTableContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,8BAAV,CAAyC,KAAzC,EAA0D;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","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":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
export const tableClassName = 'fui-Table';
|
|
4
|
+
export const tableClassNames = {
|
|
5
|
+
root: 'fui-Table'
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const useTableLayoutStyles = /*#__PURE__*/__styles({
|
|
9
|
+
"root": {
|
|
10
|
+
"mc9l5x": "f1w4nmp0",
|
|
11
|
+
"ha4doy": "fmrv4ls",
|
|
12
|
+
"a9b677": "fly5x3f",
|
|
13
|
+
"B73mfa3": "f14m3nip"
|
|
14
|
+
}
|
|
15
|
+
}, {
|
|
16
|
+
"d": [".f1w4nmp0{display:table;}", ".fmrv4ls{vertical-align:middle;}", ".fly5x3f{width:100%;}", ".f14m3nip{table-layout:fixed;}"]
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const useFlexLayoutStyles = /*#__PURE__*/__styles({
|
|
20
|
+
"root": {
|
|
21
|
+
"mc9l5x": "ftgm304"
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
"d": [".ftgm304{display:block;}"]
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* Styles for the root slot
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
32
|
+
"root": {
|
|
33
|
+
"po53p8": "fgkb47j",
|
|
34
|
+
"De3pzq": "fxugw4r"
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
"d": [".fgkb47j{border-collapse:collapse;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}"]
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Apply styling to the Table slots based on the state
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
export const useTableStyles_unstable = state => {
|
|
45
|
+
const styles = useStyles();
|
|
46
|
+
const layoutStyles = {
|
|
47
|
+
table: useTableLayoutStyles(),
|
|
48
|
+
flex: useFlexLayoutStyles()
|
|
49
|
+
};
|
|
50
|
+
state.root.className = mergeClasses(tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
51
|
+
return state;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=useTableStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/useTableStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,cAAc,GAAG,WAAvB;AACP,OAAO,MAAM,eAAe,GAA+B;EACzD,IAAI,EAAE;AADmD,CAApD;;AAIP,MAAM,oBAAoB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AASA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAMA;;AAEG;;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAOA;;AAEG;;;AACH,OAAO,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,YAAY,CACjC,cADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAHpC,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;EAOA,OAAO,KAAP;AACD,CAdM","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":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTableBody_unstable } from './useTableBody';
|
|
3
|
+
import { renderTableBody_unstable } from './renderTableBody';
|
|
4
|
+
import { useTableBodyStyles_unstable } from './useTableBodyStyles';
|
|
5
|
+
/**
|
|
6
|
+
* TableBody component - TODO: add more docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const TableBody = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useTableBody_unstable(props, ref);
|
|
11
|
+
useTableBodyStyles_unstable(state);
|
|
12
|
+
return renderTableBody_unstable(state);
|
|
13
|
+
});
|
|
14
|
+
TableBody.displayName = 'TableBody';
|
|
15
|
+
//# sourceMappingURL=TableBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableBody/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,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":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableBody.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableBody/TableBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableBody/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles';\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of TableBody
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const renderTableBody_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state); // TODO Add additional slots in the appropriate place
|
|
12
|
+
|
|
13
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=renderTableBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableBody/renderTableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC,CADgE,CAGhE;;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM","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":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
2
|
+
import { useTableContext } from '../../contexts/tableContext';
|
|
3
|
+
/**
|
|
4
|
+
* Create the state required to render TableBody.
|
|
5
|
+
*
|
|
6
|
+
* The returned state can be modified with hooks such as useTableBodyStyles_unstable,
|
|
7
|
+
* before being passed to renderTableBody_unstable.
|
|
8
|
+
*
|
|
9
|
+
* @param props - props from this instance of TableBody
|
|
10
|
+
* @param ref - reference to root HTMLElement of TableBody
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const useTableBody_unstable = (props, ref) => {
|
|
14
|
+
var _a;
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
noNativeElements
|
|
18
|
+
} = useTableContext();
|
|
19
|
+
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'tbody';
|
|
20
|
+
return {
|
|
21
|
+
components: {
|
|
22
|
+
root: rootComponent
|
|
23
|
+
},
|
|
24
|
+
root: getNativeElementProps(rootComponent, {
|
|
25
|
+
ref,
|
|
26
|
+
role: rootComponent === 'div' ? 'rowgroup' : undefined,
|
|
27
|
+
...props
|
|
28
|
+
}),
|
|
29
|
+
noNativeElements
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=useTableBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableBody/useTableBody.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;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,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;IASL;EATK,CAAP;AAWD,CAfM","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":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { mergeClasses, __styles } from '@griffel/react';
|
|
2
|
+
|
|
3
|
+
const useTableLayoutStyles = /*#__PURE__*/__styles({
|
|
4
|
+
"root": {
|
|
5
|
+
"mc9l5x": "f1tp1avn"
|
|
6
|
+
}
|
|
7
|
+
}, {
|
|
8
|
+
"d": [".f1tp1avn{display:table-row-group;}"]
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const useFlexLayoutStyles = /*#__PURE__*/__styles({
|
|
12
|
+
"root": {
|
|
13
|
+
"mc9l5x": "ftgm304"
|
|
14
|
+
}
|
|
15
|
+
}, {
|
|
16
|
+
"d": [".ftgm304{display:block;}"]
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const tableBodyClassName = 'fui-TableBody';
|
|
20
|
+
export const tableBodyClassNames = {
|
|
21
|
+
root: 'fui-TableBody'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Apply styling to the TableBody slots based on the state
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
export const useTableBodyStyles_unstable = state => {
|
|
28
|
+
const layoutStyles = {
|
|
29
|
+
table: useTableLayoutStyles(),
|
|
30
|
+
flex: useFlexLayoutStyles()
|
|
31
|
+
};
|
|
32
|
+
state.root.className = mergeClasses(tableBodyClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
33
|
+
return state;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useTableBodyStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;;AAIA,MAAM,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAMA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;;AAMA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AACP,OAAO,MAAM,mBAAmB,GAAmC;EACjE,IAAI,EAAE;AAD2D,CAA5D;AAIP;;AAEG;;AACH,OAAO,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,YAAY,CACjC,kBADiC,EAEjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAFpC,EAGjC,KAAK,CAAC,IAAN,CAAW,SAHsB,CAAnC;EAMA,OAAO,KAAP;AACD,CAZM","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":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTableCell_unstable } from './useTableCell';
|
|
3
|
+
import { renderTableCell_unstable } from './renderTableCell';
|
|
4
|
+
import { useTableCellStyles_unstable } from './useTableCellStyles';
|
|
5
|
+
/**
|
|
6
|
+
* TableCell component - TODO: add more docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const TableCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useTableCell_unstable(props, ref);
|
|
11
|
+
useTableCellStyles_unstable(state);
|
|
12
|
+
return renderTableCell_unstable(state);
|
|
13
|
+
});
|
|
14
|
+
TableCell.displayName = 'TableCell';
|
|
15
|
+
//# sourceMappingURL=TableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,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":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/TableCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements'>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of TableCell
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const renderTableCell_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state);
|
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=renderTableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/renderTableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC;EAEA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM","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":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
2
|
+
import { useTableContext } from '../../contexts/tableContext';
|
|
3
|
+
/**
|
|
4
|
+
* Create the state required to render TableCell.
|
|
5
|
+
*
|
|
6
|
+
* The returned state can be modified with hooks such as useTableCellStyles_unstable,
|
|
7
|
+
* before being passed to renderTableCell_unstable.
|
|
8
|
+
*
|
|
9
|
+
* @param props - props from this instance of TableCell
|
|
10
|
+
* @param ref - reference to root HTMLElement of TableCell
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const useTableCell_unstable = (props, ref) => {
|
|
14
|
+
var _a;
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
noNativeElements
|
|
18
|
+
} = useTableContext();
|
|
19
|
+
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'td';
|
|
20
|
+
return {
|
|
21
|
+
components: {
|
|
22
|
+
root: rootComponent
|
|
23
|
+
},
|
|
24
|
+
root: getNativeElementProps(rootComponent, {
|
|
25
|
+
ref,
|
|
26
|
+
role: rootComponent === 'div' ? 'cell' : undefined,
|
|
27
|
+
...props
|
|
28
|
+
}),
|
|
29
|
+
noNativeElements
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=useTableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/useTableCell.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EAEA,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,IAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,MAA1B,GAAmC,SAFA;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;IASL;EATK,CAAP;AAWD,CAhBM","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":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
export const tableCellClassName = 'fui-TableCell';
|
|
4
|
+
export const tableCellClassNames = {
|
|
5
|
+
root: tableCellClassName
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const useTableLayoutStyles = /*#__PURE__*/__styles({
|
|
9
|
+
"root": {
|
|
10
|
+
"mc9l5x": "f15pt5es",
|
|
11
|
+
"ha4doy": "fmrv4ls"
|
|
12
|
+
}
|
|
13
|
+
}, {
|
|
14
|
+
"d": [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}"]
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const useFlexLayoutStyles = /*#__PURE__*/__styles({
|
|
18
|
+
"root": {
|
|
19
|
+
"mc9l5x": "f22iagw",
|
|
20
|
+
"Bf4jedk": "f10tiqix",
|
|
21
|
+
"Bt984gj": "f122n59",
|
|
22
|
+
"Bh6795r": "fqerorx",
|
|
23
|
+
"Bnnss6s": "f1neuvcm",
|
|
24
|
+
"xawz": "fkjuxzh"
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
"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;}"]
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Styles for the root slot
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
35
|
+
"root": {
|
|
36
|
+
"qhf8xq": "f10pi13n",
|
|
37
|
+
"z8tnut": "f1nbblvp",
|
|
38
|
+
"z189sj": ["f1vdfbxk", "f1f5gg8d"],
|
|
39
|
+
"Byoj8tv": "f1ov4xf1",
|
|
40
|
+
"uwmqm3": ["f1f5gg8d", "f1vdfbxk"]
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
"d": [".f10pi13n{position:relative;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}"]
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Apply styling to the TableCell slots based on the state
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export const useTableCellStyles_unstable = state => {
|
|
51
|
+
const styles = useStyles();
|
|
52
|
+
const layoutStyles = {
|
|
53
|
+
table: useTableLayoutStyles(),
|
|
54
|
+
flex: useFlexLayoutStyles()
|
|
55
|
+
};
|
|
56
|
+
state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
|
|
57
|
+
return state;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=useTableCellStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCell/useTableCellStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AACP,OAAO,MAAM,mBAAmB,GAAmC;EACjE,IAAI,EAAE;AAD2D,CAA5D;;AAIP,MAAM,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAOA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AASA;;AAEG;;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAOA;;AAEG;;;AACH,OAAO,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,YAAY,CACjC,mBAAmB,CAAC,IADa,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAHpC,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;EAMA,OAAO,KAAP;AACD,CAbM","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":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTableCellActions_unstable } from './useTableCellActions';
|
|
3
|
+
import { renderTableCellActions_unstable } from './renderTableCellActions';
|
|
4
|
+
import { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles';
|
|
5
|
+
/**
|
|
6
|
+
* TableCellActions component - TODO: add more docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const TableCellActions = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useTableCellActions_unstable(props, ref);
|
|
11
|
+
useTableCellActionsStyles_unstable(state);
|
|
12
|
+
return renderTableCellActions_unstable(state);
|
|
13
|
+
});
|
|
14
|
+
TableCellActions.displayName = 'TableCellActions';
|
|
15
|
+
//# sourceMappingURL=TableCellActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/TableCellActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AACA,SAAS,+BAAT,QAAgD,0BAAhD;AACA,SAAS,kCAAT,QAAmD,6BAAnD;AAIA;;AAEG;;AACH,OAAO,MAAM,gBAAgB,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1G,MAAM,KAAK,GAAG,4BAA4B,CAAC,KAAD,EAAQ,GAAR,CAA1C;EAEA,kCAAkC,CAAC,KAAD,CAAlC;EACA,OAAO,+BAA+B,CAAC,KAAD,CAAtC;AACD,CAL2E,CAArE;AAOP,gBAAgB,CAAC,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":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellActions.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/TableCellActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellActionsSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * TableCellActions Props\n */\nexport type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {\n /**\n * When true, the actions are always visible regardless of row hover.\n * Can be useful keeping the actions visible when a popout surface is opened.\n */\n visible?: boolean;\n};\n\n/**\n * State used in rendering TableCellActions\n */\nexport type TableCellActionsState = ComponentState<TableCellActionsSlots> &\n Pick<Required<TableCellActionsProps>, 'visible'>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './TableCellActions';\nexport * from './TableCellActions.types';\nexport * from './renderTableCellActions';\nexport * from './useTableCellActions';\nexport * from './useTableCellActionsStyles';\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of TableCellActions
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const renderTableCellActions_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state); // TODO Add additional slots in the appropriate place
|
|
12
|
+
|
|
13
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=renderTableCellActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellActions/renderTableCellActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,+BAA+B,GAAI,KAAD,IAAiC;EAC9E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAwB,KAAxB,CAArC,CAD8E,CAG9E;;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM","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":""}
|