@fluentui/react-table 9.0.0-alpha.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 +80 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE +15 -0
- package/README.md +5 -0
- package/Spec.md +63 -0
- package/dist/index.d.ts +321 -0
- package/dist/tsdoc-metadata.json +11 -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/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/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 +15 -0
- package/lib/components/Table/useTableContextValues.js.map +1 -0
- package/lib/components/Table/useTableStyles.js +27 -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 +29 -0
- package/lib/components/TableBody/useTableBody.js.map +1 -0
- package/lib/components/TableBody/useTableBodyStyles.js +14 -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 +17 -0
- package/lib/components/TableCell/renderTableCell.js.map +1 -0
- package/lib/components/TableCell/useTableCell.js +31 -0
- package/lib/components/TableCell/useTableCell.js.map +1 -0
- package/lib/components/TableCell/useTableCellStyles.js +48 -0
- package/lib/components/TableCell/useTableCellStyles.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 +36 -0
- package/lib/components/TableHeader/useTableHeader.js.map +1 -0
- package/lib/components/TableHeader/useTableHeaderStyles.js +14 -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 +59 -0
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +80 -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 +31 -0
- package/lib/components/TableRow/useTableRow.js.map +1 -0
- package/lib/components/TableRow/useTableRowStyles.js +47 -0
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -0
- package/lib/contexts/tableContext.js +10 -0
- package/lib/contexts/tableContext.js.map +1 -0
- package/lib/index.js +8 -0
- package/lib/index.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/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/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 +24 -0
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -0
- package/lib-commonjs/components/Table/useTableStyles.js +37 -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 +40 -0
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -0
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +24 -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 +28 -0
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/useTableCell.js +42 -0
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +59 -0
- package/lib-commonjs/components/TableCell/useTableCellStyles.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 +48 -0
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -0
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +24 -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 +73 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +91 -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 +42 -0
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +58 -0
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +21 -0
- package/lib-commonjs/contexts/tableContext.js.map +1 -0
- package/lib-commonjs/index.js +256 -0
- package/lib-commonjs/index.js.map +1 -0
- package/package.json +56 -0
|
@@ -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":["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":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Table/useTableContextValues.ts"],"names":[],"mappings":"AAEA,OAAM,SAAU,8BAAV,CAAyC,KAAzC,EAA0D;EAC9D,MAAM;IAAE,IAAF;IAAQ,gBAAR;IAA0B;EAA1B,IAAuC,KAA7C;EAEA,OAAO;IACL,KAAK,EAAE;MACL,gBADK;MAEL,IAFK;MAGL;IAHK;EADF,CAAP;AAOD","sourcesContent":["import { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n return {\n table: {\n noNativeElements,\n size,\n sortable,\n },\n };\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const tableClassName = 'fui-Table';
|
|
3
|
+
export const tableClassNames = {
|
|
4
|
+
root: 'fui-Table'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Styles for the root slot
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
11
|
+
"root": {
|
|
12
|
+
"a9b677": "fly5x3f"
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
"d": [".fly5x3f{width:100%;}"]
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Apply styling to the Table slots based on the state
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export const useTableStyles_unstable = state => {
|
|
23
|
+
const styles = useStyles();
|
|
24
|
+
state.root.className = mergeClasses(tableClassName, styles.root, state.root.className);
|
|
25
|
+
return state;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=useTableStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Table/useTableStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AAIA,OAAO,MAAM,cAAc,GAAG,WAAvB;AACP,OAAO,MAAM,eAAe,GAA+B;EACzD,IAAI,EAAE;AADmD,CAApD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAMA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAkC;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,cAAD,EAAiB,MAAM,CAAC,IAAxB,EAA8B,KAAK,CAAC,IAAN,CAAW,SAAzC,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\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\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n width: '100%',\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 state.root.className = mergeClasses(tableClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -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":["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":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableBody.types.js","sourceRoot":"../src/","sources":["components/TableBody/TableBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\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>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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":["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":"../src/"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 noNativeElements = useTableContext(ctx => ctx.noNativeElements);
|
|
17
|
+
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'tbody';
|
|
18
|
+
return {
|
|
19
|
+
components: {
|
|
20
|
+
root: rootComponent
|
|
21
|
+
},
|
|
22
|
+
root: getNativeElementProps(rootComponent, {
|
|
23
|
+
ref,
|
|
24
|
+
role: rootComponent === 'div' ? 'rowgroup' : undefined,
|
|
25
|
+
...props
|
|
26
|
+
})
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=useTableBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["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,gBAAgB,GAAG,eAAe,CAAC,GAAG,IAAI,GAAG,CAAC,gBAAZ,CAAxC;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;EAJtB,CAAP;AAUD,CAdM","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(ctx => ctx.noNativeElements);\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 };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { mergeClasses } from '@griffel/react';
|
|
2
|
+
export const tableBodyClassName = 'fui-TableBody';
|
|
3
|
+
export const tableBodyClassNames = {
|
|
4
|
+
root: 'fui-TableBody'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Apply styling to the TableBody slots based on the state
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const useTableBodyStyles_unstable = state => {
|
|
11
|
+
state.root.className = mergeClasses(tableBodyClassName, state.root.className);
|
|
12
|
+
return state;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useTableBodyStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,gBAA7B;AAIA,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,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAD,EAAqB,KAAK,CAAC,IAAN,CAAW,SAAhC,CAAnC;EAEA,OAAO,KAAP;AACD,CAJM","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\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 state.root.className = mergeClasses(tableBodyClassName, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -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":["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":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.types.js","sourceRoot":"../src/","sources":["components/TableCell/TableCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n\n media?: Slot<'span'>;\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>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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,17 @@
|
|
|
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); // TODO Add additional slots in the appropriate place
|
|
12
|
+
|
|
13
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
14
|
+
}, slots.media && /*#__PURE__*/React.createElement(slots.media, { ...slotProps.media
|
|
15
|
+
}), " ", slotProps.root.children);
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=renderTableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["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,CADgE,CAGhE;;EACA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADlB,E,GAAA,EACyD,SAAS,CAAC,IAAV,CAAe,QADxE,CADF;AAKD,CATM","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 // TODO Add additional slots in the appropriate place\n return (\n <slots.root {...slotProps.root}>\n {slots.media && <slots.media {...slotProps.media} />} {slotProps.root.children}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getNativeElementProps, resolveShorthand } 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 noNativeElements = useTableContext(ctx => ctx.noNativeElements);
|
|
17
|
+
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'td';
|
|
18
|
+
return {
|
|
19
|
+
components: {
|
|
20
|
+
root: rootComponent,
|
|
21
|
+
media: 'span'
|
|
22
|
+
},
|
|
23
|
+
media: resolveShorthand(props.media),
|
|
24
|
+
root: getNativeElementProps(rootComponent, {
|
|
25
|
+
ref,
|
|
26
|
+
role: rootComponent === 'div' ? 'cell' : undefined,
|
|
27
|
+
...props
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useTableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableCell/useTableCell.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM,gBAAgB,GAAG,eAAe,CAAC,GAAG,IAAI,GAAG,CAAC,gBAAZ,CAAxC;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,aADI;MAEV,KAAK,EAAE;IAFG,CADP;IAKL,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAP,CALlB;IAML,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,MAA1B,GAAmC,SAFA;MAGzC,GAAG;IAHsC,CAAhB;EANtB,CAAP;AAYD,CAjBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } 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(ctx => ctx.noNativeElements);\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n media: 'span',\n },\n media: resolveShorthand(props.media),\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
media: 'fui-TableCell__media'
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Styles for the root slot
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
13
|
+
"root": {
|
|
14
|
+
"z8tnut": "f1nbblvp",
|
|
15
|
+
"z189sj": ["f1vdfbxk", "f1f5gg8d"],
|
|
16
|
+
"Byoj8tv": "f1ov4xf1",
|
|
17
|
+
"uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
|
|
18
|
+
"mc9l5x": "f22iagw",
|
|
19
|
+
"Bt984gj": "f122n59",
|
|
20
|
+
"i8kkvl": "fsnqrgy",
|
|
21
|
+
"Belr9w4": "fylz90v",
|
|
22
|
+
"Bh6795r": "fqerorx",
|
|
23
|
+
"Bnnss6s": "f1neuvcm",
|
|
24
|
+
"xawz": "fkjuxzh"
|
|
25
|
+
},
|
|
26
|
+
"media": {
|
|
27
|
+
"mc9l5x": "f22iagw",
|
|
28
|
+
"Bt984gj": "f122n59"
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
"d": [".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".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;}"]
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Apply styling to the TableCell slots based on the state
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
export const useTableCellStyles_unstable = state => {
|
|
39
|
+
const styles = useStyles();
|
|
40
|
+
state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.root.className);
|
|
41
|
+
|
|
42
|
+
if (state.media) {
|
|
43
|
+
state.media.className = mergeClasses(tableCellClassNames.media, styles.media);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return state;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=useTableCellStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["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,kBAD2D;EAEjE,KAAK,EAAE;AAF0D,CAA5D;AAKP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAeA;;AAEG;;;AACH,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAmB,CAAC,IAArB,EAA2B,MAAM,CAAC,IAAlC,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAnC;;EACA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAAC,mBAAmB,CAAC,KAArB,EAA4B,MAAM,CAAC,KAAnC,CAApC;EACD;;EAED,OAAO,KAAP;AACD,CARM","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 media: 'fui-TableCell__media',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\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 state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.root.className);\n if (state.media) {\n state.media.className = mergeClasses(tableCellClassNames.media, styles.media);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTableHeader_unstable } from './useTableHeader';
|
|
3
|
+
import { renderTableHeader_unstable } from './renderTableHeader';
|
|
4
|
+
import { useTableHeaderStyles_unstable } from './useTableHeaderStyles';
|
|
5
|
+
/**
|
|
6
|
+
* TableHeader component - TODO: add more docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const TableHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useTableHeader_unstable(props, ref);
|
|
11
|
+
useTableHeaderStyles_unstable(state);
|
|
12
|
+
return renderTableHeader_unstable(state);
|
|
13
|
+
});
|
|
14
|
+
TableHeader.displayName = 'TableHeader';
|
|
15
|
+
//# sourceMappingURL=TableHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableHeader/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChG,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;EAEA,6BAA6B,CAAC,KAAD,CAA7B;EACA,OAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component - TODO: add more docs\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.types.js","sourceRoot":"../src/","sources":["components/TableHeader/TableHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableHeaderSlots = {\n root: Slot<'thead', 'div'>;\n};\n\n/**\n * TableHeader Props\n */\nexport type TableHeaderProps = ComponentProps<TableHeaderSlots> & {};\n\n/**\n * State used in rendering TableHeader\n */\nexport type TableHeaderState = ComponentState<TableHeaderSlots>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './TableHeader';\nexport * from './TableHeader.types';\nexport * from './renderTableHeader';\nexport * from './useTableHeader';\nexport * from './useTableHeaderStyles';\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 TableHeader
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const renderTableHeader_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state);
|
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=renderTableHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableHeader/renderTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAmB,KAAnB,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 { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n const { slots, slotProps } = getSlots<TableHeaderSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
2
|
+
import { useArrowNavigationGroup } from '@fluentui/react-tabster';
|
|
3
|
+
import { useTableContext } from '../../contexts/tableContext';
|
|
4
|
+
/**
|
|
5
|
+
* Create the state required to render TableHeader.
|
|
6
|
+
*
|
|
7
|
+
* The returned state can be modified with hooks such as useTableHeaderStyles_unstable,
|
|
8
|
+
* before being passed to renderTableHeader_unstable.
|
|
9
|
+
*
|
|
10
|
+
* @param props - props from this instance of TableHeader
|
|
11
|
+
* @param ref - reference to root HTMLElement of TableHeader
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export const useTableHeader_unstable = (props, ref) => {
|
|
15
|
+
var _a;
|
|
16
|
+
|
|
17
|
+
const noNativeElements = useTableContext(ctx => ctx.noNativeElements);
|
|
18
|
+
const sortable = useTableContext(ctx => ctx.sortable);
|
|
19
|
+
const keyboardNavAttr = useArrowNavigationGroup({
|
|
20
|
+
axis: 'horizontal',
|
|
21
|
+
circular: true
|
|
22
|
+
});
|
|
23
|
+
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'thead';
|
|
24
|
+
return {
|
|
25
|
+
components: {
|
|
26
|
+
root: rootComponent
|
|
27
|
+
},
|
|
28
|
+
root: getNativeElementProps(rootComponent, {
|
|
29
|
+
ref,
|
|
30
|
+
role: rootComponent === 'div' ? 'rowgroup' : undefined,
|
|
31
|
+
...(sortable && keyboardNavAttr),
|
|
32
|
+
...props
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=useTableHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableHeader/useTableHeader.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;EAChH,MAAM,gBAAgB,GAAG,eAAe,CAAC,GAAG,IAAI,GAAG,CAAC,gBAAZ,CAAxC;EACA,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,IAAI,GAAG,CAAC,QAAZ,CAAhC;EACA,MAAM,eAAe,GAAG,uBAAuB,CAAC;IAAE,IAAI,EAAE,YAAR;IAAsB,QAAQ,EAAE;EAAhC,CAAD,CAA/C;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,OAA7D;EACA,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,IAAI,QAAQ,IAAI,eAAhB,CAHyC;MAIzC,GAAG;IAJsC,CAAhB;EAJtB,CAAP;AAWD,CAjBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const noNativeElements = useTableContext(ctx => ctx.noNativeElements);\n const sortable = useTableContext(ctx => ctx.sortable);\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'horizontal', circular: true });\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...(sortable && keyboardNavAttr),\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { mergeClasses } from '@griffel/react';
|
|
2
|
+
export const tableHeaderClassName = 'fui-TableHeader';
|
|
3
|
+
export const tableHeaderClassNames = {
|
|
4
|
+
root: 'fui-TableHeader'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Apply styling to the TableHeader slots based on the state
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const useTableHeaderStyles_unstable = state => {
|
|
11
|
+
state.root.className = mergeClasses(tableHeaderClassName, state.root.className);
|
|
12
|
+
return state;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useTableHeaderStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,gBAA7B;AAIA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;AACP,OAAO,MAAM,qBAAqB,GAAqC;EACrE,IAAI,EAAE;AAD+D,CAAhE;AAIP;;AAEG;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,KAAK,CAAC,IAAN,CAAW,SAAlC,CAAnC;EAEA,OAAO,KAAP;AACD,CAJM","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n state.root.className = mergeClasses(tableHeaderClassName, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useTableHeaderCell_unstable } from './useTableHeaderCell';
|
|
3
|
+
import { renderTableHeaderCell_unstable } from './renderTableHeaderCell';
|
|
4
|
+
import { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';
|
|
5
|
+
/**
|
|
6
|
+
* TableHeaderCell component - TODO: add more docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const TableHeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useTableHeaderCell_unstable(props, ref);
|
|
11
|
+
useTableHeaderCellStyles_unstable(state);
|
|
12
|
+
return renderTableHeaderCell_unstable(state);
|
|
13
|
+
});
|
|
14
|
+
TableHeaderCell.displayName = 'TableHeaderCell';
|
|
15
|
+
//# sourceMappingURL=TableHeaderCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableHeaderCell/TableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,iCAAT,QAAkD,4BAAlD;AAIA;;AAEG;;AACH,OAAO,MAAM,eAAe,gBAA8C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,2BAA2B,CAAC,KAAD,EAAQ,GAAR,CAAzC;EAEA,iCAAiC,CAAC,KAAD,CAAjC;EACA,OAAO,8BAA8B,CAAC,KAAD,CAArC;AACD,CALyE,CAAnE;AAOP,eAAe,CAAC,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useTableHeaderCell_unstable } from './useTableHeaderCell';\nimport { renderTableHeaderCell_unstable } from './renderTableHeaderCell';\nimport { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';\nimport type { TableHeaderCellProps } from './TableHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeaderCell component - TODO: add more docs\n */\nexport const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useTableHeaderCell_unstable(props, ref);\n\n useTableHeaderCellStyles_unstable(state);\n return renderTableHeaderCell_unstable(state);\n});\n\nTableHeaderCell.displayName = 'TableHeaderCell';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeaderCell.types.js","sourceRoot":"../src/","sources":["components/TableHeaderCell/TableHeaderCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { SortDirection } from '../Table/Table.types';\n\nexport type TableHeaderCellSlots = {\n root: Slot<'th', 'div'>;\n\n sortIcon: Slot<'span'>;\n\n /**\n * Button handles correct narration and interactions for sorting;\n */\n button: NonNullable<Slot<ARIAButtonSlotProps>>;\n};\n\n/**\n * TableHeaderCell Props\n */\nexport type TableHeaderCellProps = ComponentProps<Partial<TableHeaderCellSlots>> & {\n sortDirection?: SortDirection;\n};\n\n/**\n * State used in rendering TableHeaderCell\n */\nexport type TableHeaderCellState = ComponentState<TableHeaderCellSlots> & { sortable: boolean };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableHeaderCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './TableHeaderCell';\nexport * from './TableHeaderCell.types';\nexport * from './renderTableHeaderCell';\nexport * from './useTableHeaderCell';\nexport * from './useTableHeaderCellStyles';\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of TableHeaderCell
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const renderTableHeaderCell_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state);
|
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
13
|
+
}, /*#__PURE__*/React.createElement(slots.button, { ...slotProps.button
|
|
14
|
+
}, slotProps.root.children, slots.sortIcon && /*#__PURE__*/React.createElement(slots.sortIcon, { ...slotProps.sortIcon
|
|
15
|
+
})));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=renderTableHeaderCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableHeaderCell/renderTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAuB,KAAvB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;EAAf,CAAf,CAFrB,CADF,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableHeaderCellState, TableHeaderCellSlots } from './TableHeaderCell.types';\n\n/**\n * Render the final JSX of TableHeaderCell\n */\nexport const renderTableHeaderCell_unstable = (state: TableHeaderCellState) => {\n const { slots, slotProps } = getSlots<TableHeaderCellSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.button {...slotProps.button}>\n {slotProps.root.children}\n {slots.sortIcon && <slots.sortIcon {...slotProps.sortIcon} />}\n </slots.button>\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|