@fluentui/react-table 9.0.0-alpha.1 → 9.0.0-alpha.2
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 +135 -4
- package/CHANGELOG.md +31 -5
- package/dist/index.d.ts +312 -21
- 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/TableSelectionCell.js +2 -0
- package/lib/TableSelectionCell.js.map +1 -0
- package/lib/components/Table/Table.types.js.map +1 -1
- package/lib/components/Table/useTableContextValues.js +7 -5
- package/lib/components/Table/useTableContextValues.js.map +1 -1
- package/lib/components/Table/useTableStyles.js +7 -2
- package/lib/components/Table/useTableStyles.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +3 -1
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableBody/useTableBodyStyles.js +12 -2
- package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib/components/TableCell/TableCell.types.js.map +1 -1
- package/lib/components/TableCell/renderTableCell.js +2 -4
- package/lib/components/TableCell/renderTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +5 -5
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.js +6 -20
- package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
- 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 +24 -0
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js +39 -0
- package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
- package/lib/components/TableCellLayout/TableCellLayout.js +15 -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 +19 -0
- package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib/components/TableCellLayout/useTableCellLayout.js +36 -0
- package/lib/components/TableCellLayout/useTableCellLayout.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/useTableHeader.js +4 -2
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeader/useTableHeaderStyles.js +12 -2
- package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +4 -2
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -9
- package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +4 -2
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.js +9 -7
- package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
- 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 +42 -0
- package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +55 -0
- package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib/contexts/tableContext.js +7 -3
- package/lib/contexts/tableContext.js.map +1 -1
- package/lib/hooks/index.js +3 -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 +47 -0
- package/lib/hooks/useSelection.js.map +1 -0
- package/lib/hooks/useSort.js +72 -0
- package/lib/hooks/useSort.js.map +1 -0
- package/lib/hooks/useTable.js +87 -0
- package/lib/hooks/useTable.js.map +1 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- 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/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/TableSelectionCell.js +10 -0
- package/lib-commonjs/TableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/Table/useTableContextValues.js +8 -5
- package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
- package/lib-commonjs/components/Table/useTableStyles.js +8 -2
- package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +3 -1
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js +10 -1
- package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
- package/lib-commonjs/components/TableCell/renderTableCell.js +2 -4
- package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +4 -4
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.js +6 -20
- package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
- 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 +35 -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 +26 -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 +30 -0
- package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +46 -0
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.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/useTableHeader.js +4 -2
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +11 -1
- package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +4 -2
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -9
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +4 -2
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.js +10 -7
- package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
- 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 +56 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +65 -0
- package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
- package/lib-commonjs/contexts/tableContext.js +7 -3
- package/lib-commonjs/contexts/tableContext.js.map +1 -1
- package/lib-commonjs/hooks/index.js +12 -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 +59 -0
- package/lib-commonjs/hooks/useSelection.js.map +1 -0
- package/lib-commonjs/hooks/useSort.js +82 -0
- package/lib-commonjs/hooks/useSort.js.map +1 -0
- package/lib-commonjs/hooks/useTable.js +99 -0
- package/lib-commonjs/hooks/useTable.js.map +1 -0
- package/lib-commonjs/index.js +110 -1
- package/lib-commonjs/index.js.map +1 -1
- 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 +9 -9
- package/dist/tsdoc-metadata.json +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.types.js","sourceRoot":"../src/","sources":["components/Table/Table.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\
|
|
1
|
+
{"version":3,"file":"Table.types.js","sourceRoot":"../src/","sources":["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 size: 'small' | 'smaller' | 'medium';\n\n noNativeElements: boolean;\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"]}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
export function useTableContextValues_unstable(state) {
|
|
2
3
|
const {
|
|
3
4
|
size,
|
|
4
5
|
noNativeElements,
|
|
5
6
|
sortable
|
|
6
7
|
} = state;
|
|
8
|
+
const tableContext = React.useMemo(() => ({
|
|
9
|
+
noNativeElements,
|
|
10
|
+
size,
|
|
11
|
+
sortable
|
|
12
|
+
}), [noNativeElements, size, sortable]);
|
|
7
13
|
return {
|
|
8
|
-
table:
|
|
9
|
-
noNativeElements,
|
|
10
|
-
size,
|
|
11
|
-
sortable
|
|
12
|
-
}
|
|
14
|
+
table: tableContext
|
|
13
15
|
};
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=useTableContextValues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Table/useTableContextValues.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["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":"../src/"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
2
3
|
export const tableClassName = 'fui-Table';
|
|
3
4
|
export const tableClassNames = {
|
|
4
5
|
root: 'fui-Table'
|
|
@@ -9,10 +10,14 @@ export const tableClassNames = {
|
|
|
9
10
|
|
|
10
11
|
const useStyles = /*#__PURE__*/__styles({
|
|
11
12
|
"root": {
|
|
12
|
-
"
|
|
13
|
+
"ha4doy": "fmrv4ls",
|
|
14
|
+
"po53p8": "fgkb47j",
|
|
15
|
+
"a9b677": "fly5x3f",
|
|
16
|
+
"mc9l5x": "f1w4nmp0",
|
|
17
|
+
"De3pzq": "fxugw4r"
|
|
13
18
|
}
|
|
14
19
|
}, {
|
|
15
|
-
"d": [".fly5x3f{width:100%;}"]
|
|
20
|
+
"d": [".fmrv4ls{vertical-align:middle;}", ".fgkb47j{border-collapse:collapse;}", ".fly5x3f{width:100%;}", ".f1w4nmp0{display:table;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}"]
|
|
16
21
|
});
|
|
17
22
|
/**
|
|
18
23
|
* Apply styling to the Table slots based on the state
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"sources":["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;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAUA;;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 { 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\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n verticalAlign: 'middle',\n borderCollapse: 'collapse',\n width: '100%',\n display: 'table',\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 state.root.className = mergeClasses(tableClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -13,7 +13,9 @@ import { useTableContext } from '../../contexts/tableContext';
|
|
|
13
13
|
export const useTableBody_unstable = (props, ref) => {
|
|
14
14
|
var _a;
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const {
|
|
17
|
+
noNativeElements
|
|
18
|
+
} = useTableContext();
|
|
17
19
|
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'tbody';
|
|
18
20
|
return {
|
|
19
21
|
components: {
|
|
@@ -1 +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,
|
|
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;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;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();\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/"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { mergeClasses } from '@griffel/react';
|
|
1
|
+
import { mergeClasses, __styles } from '@griffel/react';
|
|
2
|
+
|
|
3
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
4
|
+
"root": {
|
|
5
|
+
"mc9l5x": "f1tp1avn"
|
|
6
|
+
}
|
|
7
|
+
}, {
|
|
8
|
+
"d": [".f1tp1avn{display:table-row-group;}"]
|
|
9
|
+
});
|
|
10
|
+
|
|
2
11
|
export const tableBodyClassName = 'fui-TableBody';
|
|
3
12
|
export const tableBodyClassNames = {
|
|
4
13
|
root: 'fui-TableBody'
|
|
@@ -8,7 +17,8 @@ export const tableBodyClassNames = {
|
|
|
8
17
|
*/
|
|
9
18
|
|
|
10
19
|
export const useTableBodyStyles_unstable = state => {
|
|
11
|
-
|
|
20
|
+
const styles = useStyles();
|
|
21
|
+
state.root.className = mergeClasses(tableBodyClassName, styles.root, state.root.className);
|
|
12
22
|
return state;
|
|
13
23
|
};
|
|
14
24
|
//# sourceMappingURL=useTableBodyStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,
|
|
1
|
+
{"version":3,"sources":["components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;;AAIA,MAAM,SAAS,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;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,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAD,EAAqB,MAAM,CAAC,IAA5B,EAAkC,KAAK,CAAC,IAAN,CAAW,SAA7C,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst useStyles = makeStyles({\n root: {\n display: 'table-row-group',\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 styles = useStyles();\n state.root.className = mergeClasses(tableBodyClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +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
|
|
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\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"]}
|
|
@@ -8,10 +8,8 @@ export const renderTableCell_unstable = state => {
|
|
|
8
8
|
const {
|
|
9
9
|
slots,
|
|
10
10
|
slotProps
|
|
11
|
-
} = getSlots(state);
|
|
12
|
-
|
|
11
|
+
} = getSlots(state);
|
|
13
12
|
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
14
|
-
}
|
|
15
|
-
}), " ", slotProps.root.children);
|
|
13
|
+
});
|
|
16
14
|
};
|
|
17
15
|
//# sourceMappingURL=renderTableCell.js.map
|
|
@@ -1 +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,
|
|
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;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":"../src/"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNativeElementProps
|
|
1
|
+
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
2
2
|
import { useTableContext } from '../../contexts/tableContext';
|
|
3
3
|
/**
|
|
4
4
|
* Create the state required to render TableCell.
|
|
@@ -13,14 +13,14 @@ import { useTableContext } from '../../contexts/tableContext';
|
|
|
13
13
|
export const useTableCell_unstable = (props, ref) => {
|
|
14
14
|
var _a;
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const {
|
|
17
|
+
noNativeElements
|
|
18
|
+
} = useTableContext();
|
|
17
19
|
const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'td';
|
|
18
20
|
return {
|
|
19
21
|
components: {
|
|
20
|
-
root: rootComponent
|
|
21
|
-
media: 'span'
|
|
22
|
+
root: rootComponent
|
|
22
23
|
},
|
|
23
|
-
media: resolveShorthand(props.media),
|
|
24
24
|
root: getNativeElementProps(rootComponent, {
|
|
25
25
|
ref,
|
|
26
26
|
role: rootComponent === 'div' ? 'cell' : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TableCell/useTableCell.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,
|
|
1
|
+
{"version":3,"sources":["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;EAJtB,CAAP;AAUD,CAfM","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 };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -2,8 +2,7 @@ import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
|
2
2
|
import { tokens } from '@fluentui/react-theme';
|
|
3
3
|
export const tableCellClassName = 'fui-TableCell';
|
|
4
4
|
export const tableCellClassNames = {
|
|
5
|
-
root: tableCellClassName
|
|
6
|
-
media: 'fui-TableCell__media'
|
|
5
|
+
root: tableCellClassName
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
9
8
|
* Styles for the root slot
|
|
@@ -11,24 +10,16 @@ export const tableCellClassNames = {
|
|
|
11
10
|
|
|
12
11
|
const useStyles = /*#__PURE__*/__styles({
|
|
13
12
|
"root": {
|
|
13
|
+
"qhf8xq": "f10pi13n",
|
|
14
|
+
"ha4doy": "fmrv4ls",
|
|
15
|
+
"mc9l5x": "f15pt5es",
|
|
14
16
|
"z8tnut": "f1nbblvp",
|
|
15
17
|
"z189sj": ["f1vdfbxk", "f1f5gg8d"],
|
|
16
18
|
"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"
|
|
19
|
+
"uwmqm3": ["f1f5gg8d", "f1vdfbxk"]
|
|
29
20
|
}
|
|
30
21
|
}, {
|
|
31
|
-
"d": [".
|
|
22
|
+
"d": [".f10pi13n{position:relative;}", ".fmrv4ls{vertical-align:middle;}", ".f15pt5es{display:table-cell;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}"]
|
|
32
23
|
});
|
|
33
24
|
/**
|
|
34
25
|
* Apply styling to the TableCell slots based on the state
|
|
@@ -38,11 +29,6 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
38
29
|
export const useTableCellStyles_unstable = state => {
|
|
39
30
|
const styles = useStyles();
|
|
40
31
|
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
32
|
return state;
|
|
47
33
|
};
|
|
48
34
|
//# sourceMappingURL=useTableCellStyles.js.map
|
|
@@ -1 +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
|
|
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;AAD2D,CAA5D;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AASA;;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,OAAO,KAAP;AACD,CAJM","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\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n verticalAlign: 'middle',\n display: 'table-cell',\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 state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -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":["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":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellActions.types.js","sourceRoot":"../src/","sources":["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/**\n * State used in rendering TableCellActions\n */\nexport type TableCellActionsState = ComponentState<TableCellActionsSlots>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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":["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":"../src/"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';
|
|
2
|
+
import { useFocusWithin } from '@fluentui/react-tabster';
|
|
3
|
+
/**
|
|
4
|
+
* Create the state required to render TableCellActions.
|
|
5
|
+
*
|
|
6
|
+
* The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
|
|
7
|
+
* before being passed to renderTableCellActions_unstable.
|
|
8
|
+
*
|
|
9
|
+
* @param props - props from this instance of TableCellActions
|
|
10
|
+
* @param ref - reference to root HTMLElement of TableCellActions
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const useTableCellActions_unstable = (props, ref) => {
|
|
14
|
+
return {
|
|
15
|
+
components: {
|
|
16
|
+
root: 'div'
|
|
17
|
+
},
|
|
18
|
+
root: getNativeElementProps('div', {
|
|
19
|
+
ref: useMergedRefs(ref, useFocusWithin()),
|
|
20
|
+
...props
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=useTableCellActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableCellActions/useTableCellActions.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,4BAA4B,GAAG,CAC1C,KAD0C,EAE1C,GAF0C,KAGjB;EACzB,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,cAAc,EAApB,CADe;MAEjC,GAAG;IAF8B,CAAR;EAJtB,CAAP;AASD,CAbM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableCellActionsProps, TableCellActionsState } from './TableCellActions.types';\n\n/**\n * Create the state required to render TableCellActions.\n *\n * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,\n * before being passed to renderTableCellActions_unstable.\n *\n * @param props - props from this instance of TableCellActions\n * @param ref - reference to root HTMLElement of TableCellActions\n */\nexport const useTableCellActions_unstable = (\n props: TableCellActionsProps,\n ref: React.Ref<HTMLElement>,\n): TableCellActionsState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, useFocusWithin()),\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
4
|
+
export const tableCellActionsClassNames = {
|
|
5
|
+
root: 'fui-TableCellActions'
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Styles for the root slot
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
12
|
+
"root": {
|
|
13
|
+
"qhf8xq": "f1euv43f",
|
|
14
|
+
"j35jbq": ["f10k790i", "f1xynx9j"],
|
|
15
|
+
"Bhzewxz": "f1i1t8d1",
|
|
16
|
+
"Bz10aip": "f188r07x",
|
|
17
|
+
"abs64n": "fk73vx1",
|
|
18
|
+
"Frg6f3": ["fcgxt0o", "f1ujusj6"],
|
|
19
|
+
"De3pzq": "f5gciec",
|
|
20
|
+
"Brovlpu": "ftqa4ok",
|
|
21
|
+
"B486eqv": "f2hkw1w",
|
|
22
|
+
"Bs2wo6l": "f1g03rbe"
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
"d": [".f1euv43f{position:absolute;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f1i1t8d1{top:50%;}", ".f188r07x{-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}", ".fk73vx1{opacity:0;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f5gciec{background-color:var(--colorNeutralBackground1Hover);}", ".f1g03rbe.fui-focus-within:focus-within{opacity:1;}"],
|
|
26
|
+
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
|
27
|
+
"i": [".f2hkw1w:focus-visible{outline-style:none;}"]
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Apply styling to the TableCellActions slots based on the state
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export const useTableCellActionsStyles_unstable = state => {
|
|
35
|
+
const styles = useStyles();
|
|
36
|
+
state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.root.className);
|
|
37
|
+
return state;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=useTableCellActionsStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableCellActions/useTableCellActionsStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,SAAS,+BAAT,QAAgD,yBAAhD;AAEA,OAAO,MAAM,0BAA0B,GAA0C;EAC/E,IAAI,EAAE;AADyE,CAA1E;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAAlB;AAmBA;;AAEG;;;AACH,OAAO,MAAM,kCAAkC,GAAI,KAAD,IAAwD;EACxG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,0BAA0B,CAAC,IAA5B,EAAkC,MAAM,CAAC,IAAzC,EAA+C,KAAK,CAAC,IAAN,CAAW,SAA1D,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellActionsSlots, TableCellActionsState } from './TableCellActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n\nexport const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots> = {\n root: 'fui-TableCellActions',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n right: '0px',\n top: '50%',\n transform: 'translateY(-50%)',\n opacity: 0,\n marginLeft: 'auto',\n backgroundColor: tokens.colorNeutralBackground1Hover,\n\n ...createCustomFocusIndicatorStyle(\n {\n opacity: 1,\n },\n { selector: 'focus-within' },\n ),\n },\n});\n\n/**\n * Apply styling to the TableCellActions slots based on the state\n */\nexport const useTableCellActionsStyles_unstable = (state: TableCellActionsState): TableCellActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellActionsClassNames.root, 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 { useTableCellLayout_unstable } from './useTableCellLayout';
|
|
3
|
+
import { renderTableCellLayout_unstable } from './renderTableCellLayout';
|
|
4
|
+
import { useTableCellLayoutStyles_unstable } from './useTableCellLayoutStyles';
|
|
5
|
+
/**
|
|
6
|
+
* TableCellLayout component - TODO: add more docs
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const TableCellLayout = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
|
+
const state = useTableCellLayout_unstable(props, ref);
|
|
11
|
+
useTableCellLayoutStyles_unstable(state);
|
|
12
|
+
return renderTableCellLayout_unstable(state);
|
|
13
|
+
});
|
|
14
|
+
TableCellLayout.displayName = 'TableCellLayout';
|
|
15
|
+
//# sourceMappingURL=TableCellLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableCellLayout/TableCellLayout.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 { useTableCellLayout_unstable } from './useTableCellLayout';\nimport { renderTableCellLayout_unstable } from './renderTableCellLayout';\nimport { useTableCellLayoutStyles_unstable } from './useTableCellLayoutStyles';\nimport type { TableCellLayoutProps } from './TableCellLayout.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellLayout component - TODO: add more docs\n */\nexport const TableCellLayout: ForwardRefComponent<TableCellLayoutProps> = React.forwardRef((props, ref) => {\n const state = useTableCellLayout_unstable(props, ref);\n\n useTableCellLayoutStyles_unstable(state);\n return renderTableCellLayout_unstable(state);\n});\n\nTableCellLayout.displayName = 'TableCellLayout';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCellLayout.types.js","sourceRoot":"../src/","sources":["components/TableCellLayout/TableCellLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellLayoutSlots = {\n root: Slot<'div'>;\n\n /**\n * Slot for an icon or other visual element\n */\n media: Slot<'span'>;\n\n /**\n * Main text for the table cell. Children of the root slot are automatically rendered here\n */\n main: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n description: Slot<'span'>;\n\n /**\n * A layout wrapper for the main and description slots\n */\n wrapper: Slot<'div'>;\n};\n\n/**\n * TableCellLayout Props\n */\nexport type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {\n appearance?: 'primary';\n};\n\n/**\n * State used in rendering TableCellLayout\n */\nexport type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableCellLayout/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 './TableCellLayout';\nexport * from './TableCellLayout.types';\nexport * from './renderTableCellLayout';\nexport * from './useTableCellLayout';\nexport * from './useTableCellLayoutStyles';\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of TableCellLayout
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const renderTableCellLayout_unstable = state => {
|
|
8
|
+
const {
|
|
9
|
+
slots,
|
|
10
|
+
slotProps
|
|
11
|
+
} = getSlots(state);
|
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
|
13
|
+
}, slots.media && /*#__PURE__*/React.createElement(slots.media, { ...slotProps.media
|
|
14
|
+
}), slots.wrapper && /*#__PURE__*/React.createElement(slots.wrapper, { ...slotProps.wrapper
|
|
15
|
+
}, slots.main && /*#__PURE__*/React.createElement(slots.main, { ...slotProps.main
|
|
16
|
+
}, slotProps.root.children), slots.description && /*#__PURE__*/React.createElement(slots.description, { ...slotProps.description
|
|
17
|
+
})));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=renderTableCellLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableCellLayout/renderTableCellLayout.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,EACG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADlB,EAEG,KAAK,CAAC,OAAN,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,EACG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EAAiC,SAAS,CAAC,IAAV,CAAe,QAAhD,CADjB,EAEG,KAAK,CAAC,WAAN,iBAAqB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAlB,CAFxB,CAHJ,CADF;AAWD,CAdM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellLayoutState, TableCellLayoutSlots } from './TableCellLayout.types';\n\n/**\n * Render the final JSX of TableCellLayout\n */\nexport const renderTableCellLayout_unstable = (state: TableCellLayoutState) => {\n const { slots, slotProps } = getSlots<TableCellLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.media && <slots.media {...slotProps.media} />}\n {slots.wrapper && (\n <slots.wrapper {...slotProps.wrapper}>\n {slots.main && <slots.main {...slotProps.main}>{slotProps.root.children}</slots.main>}\n {slots.description && <slots.description {...slotProps.description} />}\n </slots.wrapper>\n )}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
|
|
2
|
+
/**
|
|
3
|
+
* Create the state required to render TableCellLayout.
|
|
4
|
+
*
|
|
5
|
+
* The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
|
|
6
|
+
* before being passed to renderTableCellLayout_unstable.
|
|
7
|
+
*
|
|
8
|
+
* @param props - props from this instance of TableCellLayout
|
|
9
|
+
* @param ref - reference to root HTMLElement of TableCellLayout
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export const useTableCellLayout_unstable = (props, ref) => {
|
|
13
|
+
return {
|
|
14
|
+
components: {
|
|
15
|
+
root: 'div',
|
|
16
|
+
main: 'span',
|
|
17
|
+
description: 'span',
|
|
18
|
+
wrapper: 'div',
|
|
19
|
+
media: 'span'
|
|
20
|
+
},
|
|
21
|
+
root: getNativeElementProps('div', {
|
|
22
|
+
ref,
|
|
23
|
+
...props
|
|
24
|
+
}),
|
|
25
|
+
appearance: props.appearance,
|
|
26
|
+
main: resolveShorthand(props.main, {
|
|
27
|
+
required: true
|
|
28
|
+
}),
|
|
29
|
+
media: resolveShorthand(props.media),
|
|
30
|
+
description: resolveShorthand(props.description),
|
|
31
|
+
wrapper: resolveShorthand(props.wrapper, {
|
|
32
|
+
required: !!props.description || !!props.children
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=useTableCellLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/TableCellLayout/useTableCellLayout.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;EACxB,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,IAAI,EAAE,MAFI;MAGV,WAAW,EAAE,MAHH;MAIV,OAAO,EAAE,KAJC;MAKV,KAAK,EAAE;IALG,CADP;IAQL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MAAE,GAAF;MAAO,GAAG;IAAV,CAAR,CARtB;IASL,UAAU,EAAE,KAAK,CAAC,UATb;IAUL,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP,EAAa;MAAE,QAAQ,EAAE;IAAZ,CAAb,CAVjB;IAWL,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAP,CAXlB;IAYL,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,WAAP,CAZxB;IAaL,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,WAAR,IAAuB,CAAC,CAAC,KAAK,CAAC;IAA3C,CAAhB;EAbpB,CAAP;AAeD,CAnBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n wrapper: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n wrapper: resolveShorthand(props.wrapper, { required: !!props.description || !!props.children }),\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
|
3
|
+
export const tableCellLayoutClassNames = {
|
|
4
|
+
root: 'fui-TableCellLayout',
|
|
5
|
+
media: 'fui-TableCellLayout__media',
|
|
6
|
+
main: 'fui-TableCellLayout__main',
|
|
7
|
+
description: 'fui-TableCellLayout__description',
|
|
8
|
+
wrapper: 'fui-TableCellLayout__wrapper'
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Styles for the root slot
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
15
|
+
"root": {
|
|
16
|
+
"mc9l5x": "f22iagw",
|
|
17
|
+
"Bt984gj": "f122n59",
|
|
18
|
+
"i8kkvl": "fsnqrgy",
|
|
19
|
+
"Belr9w4": "fylz90v",
|
|
20
|
+
"Bh6795r": "fqerorx",
|
|
21
|
+
"Bnnss6s": "f1neuvcm",
|
|
22
|
+
"xawz": "fkjuxzh"
|
|
23
|
+
},
|
|
24
|
+
"wrapper": {
|
|
25
|
+
"mc9l5x": "f22iagw",
|
|
26
|
+
"Beiy3e4": "f1vx9l62"
|
|
27
|
+
},
|
|
28
|
+
"media": {
|
|
29
|
+
"mc9l5x": "f22iagw",
|
|
30
|
+
"Bt984gj": "f122n59"
|
|
31
|
+
},
|
|
32
|
+
"mediaPrimary": {
|
|
33
|
+
"B5pe6w7": "fqgjdyf",
|
|
34
|
+
"p4uzdd": "fppfxz8"
|
|
35
|
+
},
|
|
36
|
+
"mainPrimary": {
|
|
37
|
+
"Bhrd7zp": "fl43uef"
|
|
38
|
+
},
|
|
39
|
+
"description": {
|
|
40
|
+
"Be2twd7": "fkhj508",
|
|
41
|
+
"sj55zd": "fkfq4zb"
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
"d": [".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;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fqgjdyf svg{width:28px;}", ".fppfxz8 svg{height:28px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}"]
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Apply styling to the TableCellLayout slots based on the state
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
export const useTableCellLayoutStyles_unstable = state => {
|
|
52
|
+
const styles = useStyles();
|
|
53
|
+
state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);
|
|
54
|
+
const primary = state.appearance === 'primary';
|
|
55
|
+
|
|
56
|
+
if (state.media) {
|
|
57
|
+
state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, primary && styles.mediaPrimary, state.media.className);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (state.main) {
|
|
61
|
+
state.main.className = mergeClasses(tableCellLayoutClassNames.main, primary && styles.mainPrimary, state.main.className);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (state.description) {
|
|
65
|
+
state.description.className = mergeClasses(tableCellLayoutClassNames.description, styles.description, state.description.className);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (state.wrapper) {
|
|
69
|
+
state.wrapper.className = mergeClasses(tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return state;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=useTableCellLayoutStyles.js.map
|