@fluentui/react-table 9.17.7 → 9.18.0

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/lib/components/DataGrid/useDataGridStyles.styles.raw.js +13 -0
  3. package/lib/components/DataGrid/useDataGridStyles.styles.raw.js.map +1 -0
  4. package/lib/components/DataGridBody/useDataGridBodyStyles.styles.raw.js +13 -0
  5. package/lib/components/DataGridBody/useDataGridBodyStyles.styles.raw.js.map +1 -0
  6. package/lib/components/DataGridCell/useDataGridCellStyles.styles.raw.js +13 -0
  7. package/lib/components/DataGridCell/useDataGridCellStyles.styles.raw.js.map +1 -0
  8. package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js +13 -0
  9. package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js.map +1 -0
  10. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js +25 -0
  11. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js.map +1 -0
  12. package/lib/components/DataGridRow/useDataGridRowStyles.styles.raw.js +55 -0
  13. package/lib/components/DataGridRow/useDataGridRowStyles.styles.raw.js.map +1 -0
  14. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js +21 -0
  15. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js.map +1 -0
  16. package/lib/components/Table/useTableStyles.styles.raw.js +39 -0
  17. package/lib/components/Table/useTableStyles.styles.raw.js.map +1 -0
  18. package/lib/components/TableBody/useTableBodyStyles.styles.raw.js +26 -0
  19. package/lib/components/TableBody/useTableBodyStyles.styles.raw.js.map +1 -0
  20. package/lib/components/TableCell/useTableCellStyles.styles.raw.js +65 -0
  21. package/lib/components/TableCell/useTableCellStyles.styles.raw.js.map +1 -0
  22. package/lib/components/TableCellActions/useTableCellActionsStyles.styles.raw.js +28 -0
  23. package/lib/components/TableCellActions/useTableCellActionsStyles.styles.raw.js.map +1 -0
  24. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js +82 -0
  25. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js.map +1 -0
  26. package/lib/components/TableHeader/useTableHeaderStyles.styles.raw.js +26 -0
  27. package/lib/components/TableHeader/useTableHeaderStyles.styles.raw.js.map +1 -0
  28. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js +101 -0
  29. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js.map +1 -0
  30. package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js +49 -0
  31. package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js.map +1 -0
  32. package/lib/components/TableRow/useTableRowStyles.styles.raw.js +137 -0
  33. package/lib/components/TableRow/useTableRowStyles.styles.raw.js.map +1 -0
  34. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js +74 -0
  35. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js.map +1 -0
  36. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.raw.js +29 -0
  37. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.raw.js.map +1 -0
  38. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.raw.js +29 -0
  39. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.raw.js.map +1 -0
  40. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.raw.js +29 -0
  41. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.raw.js.map +1 -0
  42. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js +29 -0
  43. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.raw.js.map +1 -0
  44. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js +41 -0
  45. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.raw.js.map +1 -0
  46. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.raw.js +71 -0
  47. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.raw.js.map +1 -0
  48. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js +37 -0
  49. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.raw.js.map +1 -0
  50. package/lib-commonjs/components/Table/useTableStyles.styles.raw.js +58 -0
  51. package/lib-commonjs/components/Table/useTableStyles.styles.raw.js.map +1 -0
  52. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.raw.js +45 -0
  53. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.raw.js.map +1 -0
  54. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.raw.js +84 -0
  55. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.raw.js.map +1 -0
  56. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.raw.js +44 -0
  57. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.raw.js.map +1 -0
  58. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js +97 -0
  59. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.raw.js.map +1 -0
  60. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.raw.js +45 -0
  61. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.raw.js.map +1 -0
  62. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js +120 -0
  63. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.raw.js.map +1 -0
  64. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js +65 -0
  65. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.raw.js.map +1 -0
  66. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.raw.js +156 -0
  67. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.raw.js.map +1 -0
  68. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js +93 -0
  69. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.raw.js.map +1 -0
  70. package/package.json +6 -6
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ tableHeaderCellClassName: function() {
13
+ return tableHeaderCellClassName;
14
+ },
15
+ tableHeaderCellClassNames: function() {
16
+ return tableHeaderCellClassNames;
17
+ },
18
+ useTableHeaderCellStyles_unstable: function() {
19
+ return useTableHeaderCellStyles_unstable;
20
+ }
21
+ });
22
+ const _react = require("@griffel/react");
23
+ const _reacttheme = require("@fluentui/react-theme");
24
+ const _reacttabster = require("@fluentui/react-tabster");
25
+ const tableHeaderCellClassName = 'fui-TableHeaderCell';
26
+ const tableHeaderCellClassNames = {
27
+ root: 'fui-TableHeaderCell',
28
+ button: 'fui-TableHeaderCell__button',
29
+ sortIcon: 'fui-TableHeaderCell__sortIcon',
30
+ aside: 'fui-TableHeaderCell__aside'
31
+ };
32
+ const useTableLayoutStyles = (0, _react.makeStyles)({
33
+ root: {
34
+ display: 'table-cell',
35
+ verticalAlign: 'middle'
36
+ }
37
+ });
38
+ const useFlexLayoutStyles = (0, _react.makeStyles)({
39
+ root: {
40
+ display: 'flex',
41
+ flex: '1 1 0px',
42
+ minWidth: '0px'
43
+ }
44
+ });
45
+ /**
46
+ * Styles for the root slot
47
+ */ const useStyles = (0, _react.makeStyles)({
48
+ root: {
49
+ fontWeight: _reacttheme.tokens.fontWeightRegular,
50
+ padding: `0px ${_reacttheme.tokens.spacingHorizontalS}`,
51
+ ...(0, _reacttabster.createCustomFocusIndicatorStyle)({
52
+ outline: `2px solid ${_reacttheme.tokens.colorStrokeFocus2}`,
53
+ borderRadius: _reacttheme.tokens.borderRadiusMedium
54
+ }, {
55
+ selector: 'focus-within'
56
+ }),
57
+ position: 'relative'
58
+ },
59
+ rootInteractive: {
60
+ ':hover': {
61
+ color: _reacttheme.tokens.colorNeutralForeground1Hover,
62
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundHover
63
+ },
64
+ ':active': {
65
+ color: _reacttheme.tokens.colorNeutralForeground1Pressed,
66
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundPressed
67
+ }
68
+ },
69
+ resetButton: {
70
+ resize: 'horizontal',
71
+ boxSizing: 'content-box',
72
+ backgroundColor: 'inherit',
73
+ color: 'inherit',
74
+ fontFamily: 'inherit',
75
+ fontSize: 'inherit',
76
+ lineHeight: 'normal',
77
+ overflow: 'visible',
78
+ padding: '0',
79
+ border: 'none',
80
+ textAlign: 'unset'
81
+ },
82
+ button: {
83
+ position: 'relative',
84
+ width: '100%',
85
+ display: 'flex',
86
+ flexGrow: 1,
87
+ height: '100%',
88
+ alignItems: 'center',
89
+ gap: _reacttheme.tokens.spacingHorizontalXS,
90
+ minHeight: '32px',
91
+ flex: '1 1 0px',
92
+ outlineStyle: 'none'
93
+ },
94
+ sortable: {
95
+ cursor: 'pointer'
96
+ },
97
+ sortIcon: {
98
+ display: 'flex',
99
+ alignItems: 'center',
100
+ paddingTop: _reacttheme.tokens.spacingVerticalXXS
101
+ },
102
+ resizeHandle: {}
103
+ });
104
+ const useTableHeaderCellStyles_unstable = (state)=>{
105
+ 'use no memo';
106
+ const styles = useStyles();
107
+ const layoutStyles = {
108
+ table: useTableLayoutStyles(),
109
+ flex: useFlexLayoutStyles()
110
+ };
111
+ state.root.className = (0, _react.mergeClasses)(tableHeaderCellClassNames.root, styles.root, state.sortable && styles.rootInteractive, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
112
+ state.button.className = (0, _react.mergeClasses)(tableHeaderCellClassNames.button, styles.resetButton, styles.button, state.sortable && styles.sortable, state.button.className);
113
+ if (state.sortIcon) {
114
+ state.sortIcon.className = (0, _react.mergeClasses)(tableHeaderCellClassNames.sortIcon, styles.sortIcon, state.sortIcon.className);
115
+ }
116
+ if (state.aside) {
117
+ state.aside.className = (0, _react.mergeClasses)(tableHeaderCellClassNames.aside, styles.resizeHandle, state.aside.className);
118
+ }
119
+ return state;
120
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TableHeaderCell/useTableHeaderCellStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { TableHeaderCellSlots, TableHeaderCellState } from './TableHeaderCell.types';\n\nexport const tableHeaderCellClassName = 'fui-TableHeaderCell';\nexport const tableHeaderCellClassNames: SlotClassNames<TableHeaderCellSlots> = {\n root: 'fui-TableHeaderCell',\n button: 'fui-TableHeaderCell__button',\n sortIcon: 'fui-TableHeaderCell__sortIcon',\n aside: 'fui-TableHeaderCell__aside',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n flex: '1 1 0px',\n minWidth: '0px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n fontWeight: tokens.fontWeightRegular,\n padding: `0px ${tokens.spacingHorizontalS}`,\n ...createCustomFocusIndicatorStyle(\n { outline: `2px solid ${tokens.colorStrokeFocus2}`, borderRadius: tokens.borderRadiusMedium },\n { selector: 'focus-within' },\n ),\n position: 'relative',\n },\n\n rootInteractive: {\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n color: tokens.colorNeutralForeground1Pressed,\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n\n resetButton: {\n resize: 'horizontal',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'normal',\n overflow: 'visible',\n padding: '0',\n border: 'none',\n textAlign: 'unset',\n },\n\n button: {\n position: 'relative',\n width: '100%',\n display: 'flex',\n flexGrow: 1,\n height: '100%',\n alignItems: 'center',\n gap: tokens.spacingHorizontalXS,\n minHeight: '32px',\n flex: '1 1 0px',\n outlineStyle: 'none',\n },\n\n sortable: {\n cursor: 'pointer',\n },\n\n sortIcon: {\n display: 'flex',\n alignItems: 'center',\n paddingTop: tokens.spacingVerticalXXS,\n },\n\n resizeHandle: {},\n});\n\n/**\n * Apply styling to the TableHeaderCell slots based on the state\n */\nexport const useTableHeaderCellStyles_unstable = (state: TableHeaderCellState): TableHeaderCellState => {\n 'use no memo';\n\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderCellClassNames.root,\n styles.root,\n state.sortable && styles.rootInteractive,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n state.button.className = mergeClasses(\n tableHeaderCellClassNames.button,\n styles.resetButton,\n styles.button,\n state.sortable && styles.sortable,\n state.button.className,\n );\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(\n tableHeaderCellClassNames.sortIcon,\n styles.sortIcon,\n state.sortIcon.className,\n );\n }\n\n if (state.aside) {\n state.aside.className = mergeClasses(tableHeaderCellClassNames.aside, styles.resizeHandle, state.aside.className);\n }\n\n return state;\n};\n"],"names":["tableHeaderCellClassName","tableHeaderCellClassNames","useTableHeaderCellStyles_unstable","root","button","sortIcon","aside","useTableLayoutStyles","makeStyles","display","verticalAlign","useFlexLayoutStyles","flex","minWidth","useStyles","fontWeight","tokens","fontWeightRegular","padding","spacingHorizontalS","createCustomFocusIndicatorStyle","outline","colorStrokeFocus2","borderRadius","borderRadiusMedium","selector","position","rootInteractive","color","colorNeutralForeground1Hover","backgroundColor","colorSubtleBackgroundHover","colorNeutralForeground1Pressed","colorSubtleBackgroundPressed","resetButton","resize","boxSizing","fontFamily","fontSize","lineHeight","overflow","border","textAlign","width","flexGrow","height","alignItems","gap","spacingHorizontalXS","minHeight","outlineStyle","sortable","cursor","paddingTop","spacingVerticalXXS","resizeHandle","state","styles","layoutStyles","table","className","mergeClasses","noNativeElements"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,wBAAAA;eAAAA;;IACAC,yBAAAA;eAAAA;;IA0FAC,iCAAAA;eAAAA;;;uBAjG4B;4BAClB;8BAEyB;AAGzC,MAAMF,2BAA2B;AACjC,MAAMC,4BAAkE;IAC7EE,MAAM;IACNC,QAAQ;IACRC,UAAU;IACVC,OAAO;AACT;AAEA,MAAMC,uBAAuBC,IAAAA,iBAAAA,EAAW;IACtCL,MAAM;QACJM,SAAS;QACTC,eAAe;IACjB;AACF;AAEA,MAAMC,sBAAsBH,IAAAA,iBAAAA,EAAW;IACrCL,MAAM;QACJM,SAAS;QACTG,MAAM;QACNC,UAAU;IACZ;AACF;AAEA;;CAEC,GACD,MAAMC,YAAYN,IAAAA,iBAAAA,EAAW;IAC3BL,MAAM;QACJY,YAAYC,kBAAAA,CAAOC,iBAAiB;QACpCC,SAAS,CAAC,IAAI,EAAEF,kBAAAA,CAAOG,kBAAkB,CAAC,CAAC;QAC3C,GAAGC,IAAAA,6CAAAA,EACD;YAAEC,SAAS,CAAC,UAAU,EAAEL,kBAAAA,CAAOM,iBAAiB,CAAC,CAAC;YAAEC,cAAcP,kBAAAA,CAAOQ,kBAAkB;QAAC,GAC5F;YAAEC,UAAU;QAAe,EAC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MAAM,EACboD,MAAML,QAAQ,IAAIM,OAAON,QAAQ,EACjCK,MAAMpD,MAAM,CAACwD,SAAS;IAGxB,IAAIJ,MAAMnD,QAAQ,EAAE;QAClBmD,MAAMnD,QAAQ,CAACuD,SAAS,GAAGC,IAAAA,mBAAAA,EACzB5D,0BAA0BI,QAAQ,EAClCoD,OAAOpD,QAAQ,EACfmD,MAAMnD,QAAQ,CAACuD,SAAS;IAE5B;IAEA,IAAIJ,MAAMlD,KAAK,EAAE;QACfkD,MAAMlD,KAAK,CAACsD,SAAS,GAAGC,IAAAA,mBAAAA,EAAa5D,0BAA0BK,KAAK,EAAEmD,OAAOF,YAAY,EAAEC,MAAMlD,KAAK,CAACsD,SAAS;IAClH;IAEA,OAAOJ;AACT"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ tableResizeHandleClassNames: function() {
13
+ return tableResizeHandleClassNames;
14
+ },
15
+ useTableResizeHandleStyles_unstable: function() {
16
+ return useTableResizeHandleStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const tableResizeHandleClassNames = {
22
+ root: 'fui-TableResizeHandle'
23
+ };
24
+ /**
25
+ * Styles for the root slot
26
+ */ const useStyles = (0, _react.makeStyles)({
27
+ root: {
28
+ position: 'absolute',
29
+ right: 0,
30
+ top: 0,
31
+ bottom: 0,
32
+ width: '16px',
33
+ margin: '0 -8px',
34
+ cursor: 'col-resize',
35
+ opacity: 0,
36
+ transitionProperty: 'opacity',
37
+ transitionDuration: '.2s',
38
+ zIndex: 1,
39
+ // If mouse users focus on the resize handle through a context menu, we want the handle
40
+ // to be visible because the mouse might not be hovering over the handle
41
+ ':focus': {
42
+ opacity: 1,
43
+ outlineStyle: 'none'
44
+ },
45
+ ':hover': {
46
+ opacity: 1
47
+ },
48
+ '::after': {
49
+ content: '" "',
50
+ display: 'block',
51
+ width: '1px',
52
+ position: 'absolute',
53
+ left: '50%',
54
+ top: 0,
55
+ bottom: 0,
56
+ backgroundColor: _reacttheme.tokens.colorNeutralStroke1
57
+ }
58
+ }
59
+ });
60
+ const useTableResizeHandleStyles_unstable = (state)=>{
61
+ 'use no memo';
62
+ const styles = useStyles();
63
+ state.root.className = (0, _react.mergeClasses)(tableResizeHandleClassNames.root, styles.root, state.root.className);
64
+ return state;
65
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TableResizeHandle/useTableResizeHandleStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TableResizeHandleSlots, TableResizeHandleState } from './TableResizeHandle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const tableResizeHandleClassNames: SlotClassNames<TableResizeHandleSlots> = {\n root: 'fui-TableResizeHandle',\n // TODO: add class names for all slots on TableResizeHandleSlots.\n // Should be of the form `<slotName>: 'fui-TableResizeHandle__<slotName>`\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n right: 0,\n top: 0,\n bottom: 0,\n width: '16px',\n margin: '0 -8px',\n cursor: 'col-resize',\n opacity: 0,\n transitionProperty: 'opacity',\n transitionDuration: '.2s',\n zIndex: 1,\n\n // If mouse users focus on the resize handle through a context menu, we want the handle\n // to be visible because the mouse might not be hovering over the handle\n ':focus': {\n opacity: 1,\n outlineStyle: 'none',\n },\n\n ':hover': {\n opacity: 1,\n },\n\n '::after': {\n content: '\" \"',\n display: 'block',\n width: '1px',\n position: 'absolute',\n left: '50%',\n top: 0,\n bottom: 0,\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n});\n\n/**\n * Apply styling to the TableResizeHandle slots based on the state\n */\nexport const useTableResizeHandleStyles_unstable = (state: TableResizeHandleState): TableResizeHandleState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(tableResizeHandleClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"names":["tableResizeHandleClassNames","useTableResizeHandleStyles_unstable","root","useStyles","makeStyles","position","right","top","bottom","width","margin","cursor","opacity","transitionProperty","transitionDuration","zIndex","outlineStyle","content","display","left","backgroundColor","tokens","colorNeutralStroke1","state","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,2BAAAA;eAAAA;;IAkDAC,mCAAAA;eAAAA;;;uBAvD4B;4BAGlB;AAEhB,MAAMD,8BAAsE;IACjFE,MAAM;AAGR;AAEA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,iBAAAA,EAAW;IAC3BF,MAAM;QACJG,UAAU;QACVC,OAAO;QACPC,KAAK;QACLC,QAAQ;QACRC,OAAO;QACPC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,oBAAoB;QACpBC,oBAAoB;QACpBC,QAAQ;QAER,uFAAuF;QACvF,wEAAwE;QACxE,UAAU;YACRH,SAAS;YACTI,cAAc;QAChB;QAEA,UAAU;YACRJ,SAAS;QACX;QAEA,WAAW;YACTK,SAAS;YACTC,SAAS;YACTT,OAAO;YACPJ,UAAU;YACVc,MAAM;YACNZ,KAAK;YACLC,QAAQ;YACRY,iBAAiBC,kBAAAA,CAAOC,mBAAmB;QAC7C;IACF;AACF;AAKO,MAAMrB,sCAAsC,CAACsB;IAClD;IAEA,MAAMC,SAASrB;IACfoB,MAAMrB,IAAI,CAACuB,SAAS,GAAGC,IAAAA,mBAAAA,EAAa1B,4BAA4BE,IAAI,EAAEsB,OAAOtB,IAAI,EAAEqB,MAAMrB,IAAI,CAACuB,SAAS;IACvG,OAAOF;AACT"}
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ tableRowClassName: function() {
13
+ return tableRowClassName;
14
+ },
15
+ tableRowClassNames: function() {
16
+ return tableRowClassNames;
17
+ },
18
+ useTableRowStyles_unstable: function() {
19
+ return useTableRowStyles_unstable;
20
+ }
21
+ });
22
+ const _react = require("@griffel/react");
23
+ const _reacttheme = require("@fluentui/react-theme");
24
+ const _useTableCellActionsStylesstyles = require("../TableCellActions/useTableCellActionsStyles.styles");
25
+ const _useTableSelectionCellStylesstyles = require("../TableSelectionCell/useTableSelectionCellStyles.styles");
26
+ const _reacttabster = require("@fluentui/react-tabster");
27
+ const tableRowClassName = 'fui-TableRow';
28
+ const tableRowClassNames = {
29
+ root: tableRowClassName
30
+ };
31
+ const useTableLayoutStyles = (0, _react.makeStyles)({
32
+ root: {
33
+ display: 'table-row'
34
+ }
35
+ });
36
+ const useFlexLayoutStyles = (0, _react.makeStyles)({
37
+ root: {
38
+ display: 'flex',
39
+ alignItems: 'center'
40
+ }
41
+ });
42
+ /**
43
+ * Styles for the root slot
44
+ */ const useStyles = (0, _react.makeStyles)({
45
+ root: {
46
+ color: _reacttheme.tokens.colorNeutralForeground1,
47
+ boxSizing: 'border-box',
48
+ ...(0, _reacttabster.createCustomFocusIndicatorStyle)({
49
+ [`& .${_useTableSelectionCellStylesstyles.tableSelectionCellClassNames.root}`]: {
50
+ opacity: 1
51
+ },
52
+ [`& .${_useTableCellActionsStylesstyles.tableCellActionsClassNames.root}`]: {
53
+ opacity: 1
54
+ }
55
+ }, {
56
+ selector: 'focus-within'
57
+ }),
58
+ ...(0, _reacttabster.createCustomFocusIndicatorStyle)({
59
+ outline: `2px solid ${_reacttheme.tokens.colorStrokeFocus2}`,
60
+ borderRadius: _reacttheme.tokens.borderRadiusMedium
61
+ }, {
62
+ selector: 'focus'
63
+ })
64
+ },
65
+ rootInteractive: {
66
+ ...(0, _reacttabster.createCustomFocusIndicatorStyle)({
67
+ [`& .${_useTableCellActionsStylesstyles.tableCellActionsClassNames.root}`]: {
68
+ opacity: 1
69
+ }
70
+ }, {
71
+ selector: 'focus-within'
72
+ }),
73
+ ':active': {
74
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundPressed,
75
+ color: _reacttheme.tokens.colorNeutralForeground1Pressed,
76
+ [`& .${_useTableCellActionsStylesstyles.tableCellActionsClassNames.root}`]: {
77
+ opacity: 1
78
+ },
79
+ [`& .${_useTableSelectionCellStylesstyles.tableSelectionCellClassNames.root}`]: {
80
+ opacity: 1
81
+ }
82
+ },
83
+ ':hover': {
84
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundHover,
85
+ color: _reacttheme.tokens.colorNeutralForeground1Hover,
86
+ [`& .${_useTableCellActionsStylesstyles.tableCellActionsClassNames.root}`]: {
87
+ opacity: 1
88
+ },
89
+ [`& .${_useTableSelectionCellStylesstyles.tableSelectionCellClassNames.root}`]: {
90
+ opacity: 1
91
+ }
92
+ },
93
+ // High contrast styles
94
+ '@media (forced-colors: active)': {
95
+ ':hover': {
96
+ color: 'Highlight',
97
+ ..._react.shorthands.borderColor('Highlight')
98
+ }
99
+ }
100
+ },
101
+ medium: {
102
+ borderBottom: `${_reacttheme.tokens.strokeWidthThin} solid ${_reacttheme.tokens.colorNeutralStroke2}`
103
+ },
104
+ small: {
105
+ borderBottom: `${_reacttheme.tokens.strokeWidthThin} solid ${_reacttheme.tokens.colorNeutralStroke2}`
106
+ },
107
+ 'extra-small': {
108
+ fontSize: _reacttheme.tokens.fontSizeBase200
109
+ },
110
+ brand: {
111
+ backgroundColor: _reacttheme.tokens.colorBrandBackground2,
112
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorTransparentStrokeInteractive),
113
+ ':active': {
114
+ backgroundColor: _reacttheme.tokens.colorBrandBackground2,
115
+ color: _reacttheme.tokens.colorNeutralForeground1
116
+ },
117
+ '@media(forced-colors: active)': {
118
+ border: '2px solid transparent',
119
+ borderRadius: _reacttheme.tokens.borderRadiusMedium,
120
+ boxSizing: 'border-box',
121
+ ':focus-visible': {
122
+ outlineOffset: '-4px'
123
+ }
124
+ }
125
+ },
126
+ neutral: {
127
+ '@media(forced-colors: active)': {
128
+ border: '2px solid transparent',
129
+ borderRadius: _reacttheme.tokens.borderRadiusMedium,
130
+ boxSizing: 'border-box',
131
+ ':focus-visible': {
132
+ outlineOffset: '-4px'
133
+ }
134
+ },
135
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundSelected,
136
+ color: _reacttheme.tokens.colorNeutralForeground1Hover,
137
+ ':hover': {
138
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundSelected
139
+ },
140
+ ':active': {
141
+ backgroundColor: _reacttheme.tokens.colorSubtleBackgroundSelected
142
+ },
143
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStrokeOnBrand)
144
+ },
145
+ none: {}
146
+ });
147
+ const useTableRowStyles_unstable = (state)=>{
148
+ 'use no memo';
149
+ const styles = useStyles();
150
+ const layoutStyles = {
151
+ table: useTableLayoutStyles(),
152
+ flex: useFlexLayoutStyles()
153
+ };
154
+ state.root.className = (0, _react.mergeClasses)(tableRowClassNames.root, styles.root, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.root.className);
155
+ return state;
156
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TableRow/useTableRowStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableRowSlots, TableRowState } from './TableRow.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles.styles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames: SlotClassNames<TableRowSlots> = {\n root: tableRowClassName,\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n boxSizing: 'border-box',\n ...createCustomFocusIndicatorStyle(\n {\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n },\n { selector: 'focus-within' },\n ),\n ...createCustomFocusIndicatorStyle(\n { outline: `2px solid ${tokens.colorStrokeFocus2}`, borderRadius: tokens.borderRadiusMedium },\n { selector: 'focus' },\n ),\n },\n\n rootInteractive: {\n ...createCustomFocusIndicatorStyle(\n {\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n },\n { selector: 'focus-within' },\n ),\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n },\n },\n },\n\n medium: { borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}` },\n\n small: { borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}` },\n\n 'extra-small': {\n fontSize: tokens.fontSizeBase200,\n },\n\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n ':active': {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorNeutralForeground1,\n },\n\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n },\n\n neutral: {\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground1Hover,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand),\n },\n\n none: {},\n});\n\n/**\n * Apply styling to the TableRow slots based on the state\n */\nexport const useTableRowStyles_unstable = (state: TableRowState): TableRowState => {\n 'use no memo';\n\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableRowClassNames.root,\n styles.root,\n !state.isHeaderRow && styles.rootInteractive,\n styles[state.size],\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n styles[state.appearance],\n state.root.className,\n );\n\n return state;\n};\n"],"names":["tableRowClassName","tableRowClassNames","useTableRowStyles_unstable","root","useTableLayoutStyles","makeStyles","display","useFlexLayoutStyles","alignItems","useStyles","color","tokens","colorNeutralForeground1","boxSizing","createCustomFocusIndicatorStyle","tableSelectionCellClassNames","opacity","tableCellActionsClassNames","selector","outline","colorStrokeFocus2","borderRadius","borderRadiusMedium","rootInteractive","backgroundColor","colorSubtleBackgroundPressed","colorNeutralForeground1Pressed","colorSubtleBackgroundHover","colorNeutralForeground1Hover","shorthands","borderColor","medium","borderBottom","strokeWidthThin","colorNeutralStroke2","small","fontSize","fontSizeBase200","brand","colorBrandBackground2","colorTransparentStrokeInteractive","border","outlineOffset","neutral","colorSubtleBackgroundSelected","colorNeutralStrokeOnBrand","none","state","styles","layoutStyles","table","flex","className","mergeClasses","isHeaderRow","size","noNativeElements","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,iBAAAA;eAAAA;;IACAC,kBAAAA;eAAAA;;IAoIAC,0BAAAA;eAAAA;;;uBA7IwC;4BAC9B;iDAGoB;mDACE;8BACG;AAEzC,MAAMF,oBAAoB;AAC1B,MAAMC,qBAAoD;IAC/DE,MAAMH;AACR;AAEA,MAAMI,uBAAuBC,IAAAA,iBAAAA,EAAW;IACtCF,MAAM;QACJG,SAAS;IACX;AACF;AAEA,MAAMC,sBAAsBF,IAAAA,iBAAAA,EAAW;IACrCF,MAAM;QACJG,SAAS;QACTE,YAAY;IACd;AACF;AAEA;;CAEC,GACD,MAAMC,YAAYJ,IAAAA,iBAAAA,EAAW;IAC3BF,MAAM;QACJO,OAAOC,kBAAAA,CAAOC,uBAAuB;QACrCC,WAAW;QACX,GAAGC,IAAAA,6CAAAA,EACD;YACE,CAAC,CAAC,GAAG,EAAEC,+DAAAA,CAA6BZ,IAAI,CAAC,CAAC,CAAC,EAAE;gBAC3Ca,SAAS;YACX;YACA,CAAC,CAAC,GAAG,EAAEC,2DAAAA,CAA2Bd,IAAI,CAAC,CAAC,CAAC,EAAE;gBACzCa,SAAS;YACX;QACF,GACA;YAAEE,UAAU;QAAe,EAC5B;QACD,GAAGJ,IAA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,CAAC,EAClBR,MAAMS,gBAAgB,GAAGP,aAAaE,IAAI,CAAChD,IAAI,GAAG8C,aAAaC,KAAK,CAAC/C,IAAI,EACzE6C,MAAM,CAACD,MAAMU,UAAU,CAAC,EACxBV,MAAM5C,IAAI,CAACiD,SAAS;IAGtB,OAAOL;AACT"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ CELL_WIDTH: function() {
13
+ return CELL_WIDTH;
14
+ },
15
+ tableSelectionCellClassNames: function() {
16
+ return tableSelectionCellClassNames;
17
+ },
18
+ useTableSelectionCellStyles_unstable: function() {
19
+ return useTableSelectionCellStyles_unstable;
20
+ }
21
+ });
22
+ const _react = require("@griffel/react");
23
+ const _reacttabster = require("@fluentui/react-tabster");
24
+ const _reacttheme = require("@fluentui/react-theme");
25
+ const CELL_WIDTH = 44;
26
+ const tableSelectionCellClassNames = {
27
+ root: 'fui-TableSelectionCell',
28
+ checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',
29
+ radioIndicator: 'fui-TableSelectionCell__radioIndicator'
30
+ };
31
+ const useTableLayoutStyles = (0, _react.makeStyles)({
32
+ root: {
33
+ display: 'table-cell',
34
+ width: `${CELL_WIDTH}px`
35
+ }
36
+ });
37
+ const useFlexLayoutStyles = (0, _react.makeStyles)({
38
+ root: {
39
+ display: 'flex',
40
+ flex: '1 1 0px',
41
+ minWidth: `${CELL_WIDTH}px`,
42
+ maxWidth: `${CELL_WIDTH}px`,
43
+ justifyContent: 'center'
44
+ }
45
+ });
46
+ /**
47
+ * Styles for the root slot
48
+ */ const useStyles = (0, _react.makeStyles)({
49
+ root: {
50
+ textAlign: 'center',
51
+ whiteSpace: 'nowrap',
52
+ padding: '0',
53
+ ...(0, _reacttabster.createCustomFocusIndicatorStyle)({
54
+ outline: `2px solid ${_reacttheme.tokens.colorStrokeFocus2}`,
55
+ borderRadius: _reacttheme.tokens.borderRadiusMedium
56
+ }, {
57
+ selector: 'focus'
58
+ })
59
+ },
60
+ radioIndicator: {
61
+ display: 'flex',
62
+ flexGrow: 1,
63
+ alignItems: 'center',
64
+ justifyContent: 'center'
65
+ },
66
+ subtle: {
67
+ opacity: 0,
68
+ ...(0, _reacttabster.createCustomFocusIndicatorStyle)({
69
+ opacity: 1
70
+ }, {
71
+ selector: 'focus-within'
72
+ })
73
+ },
74
+ hidden: {
75
+ opacity: 0
76
+ }
77
+ });
78
+ const useTableSelectionCellStyles_unstable = (state)=>{
79
+ 'use no memo';
80
+ const styles = useStyles();
81
+ const layoutStyles = {
82
+ table: useTableLayoutStyles(),
83
+ flex: useFlexLayoutStyles()
84
+ };
85
+ state.root.className = (0, _react.mergeClasses)(tableSelectionCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.subtle && state.checked === false && styles.subtle, state.hidden && styles.hidden, state.root.className);
86
+ if (state.checkboxIndicator) {
87
+ state.checkboxIndicator.className = (0, _react.mergeClasses)(tableSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);
88
+ }
89
+ if (state.radioIndicator) {
90
+ state.radioIndicator.className = (0, _react.mergeClasses)(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);
91
+ }
92
+ return state;
93
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TableSelectionCell/useTableSelectionCellStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TableSelectionCellSlots, TableSelectionCellState } from './TableSelectionCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const CELL_WIDTH = 44;\n\nexport const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots> = {\n root: 'fui-TableSelectionCell',\n checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-TableSelectionCell__radioIndicator',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n width: `${CELL_WIDTH}px`,\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n flex: '1 1 0px',\n minWidth: `${CELL_WIDTH}px`,\n maxWidth: `${CELL_WIDTH}px`,\n justifyContent: 'center',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n textAlign: 'center',\n whiteSpace: 'nowrap',\n padding: '0',\n ...createCustomFocusIndicatorStyle(\n { outline: `2px solid ${tokens.colorStrokeFocus2}`, borderRadius: tokens.borderRadiusMedium },\n { selector: 'focus' },\n ),\n },\n\n radioIndicator: {\n display: 'flex',\n flexGrow: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n\n subtle: {\n opacity: 0,\n ...createCustomFocusIndicatorStyle(\n {\n opacity: 1,\n },\n { selector: 'focus-within' },\n ),\n },\n\n hidden: {\n opacity: 0,\n },\n});\n\n/**\n * Apply styling to the TableSelectionCell slots based on the state\n */\nexport const useTableSelectionCellStyles_unstable = (state: TableSelectionCellState): TableSelectionCellState => {\n 'use no memo';\n\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableSelectionCellClassNames.root,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.subtle && state.checked === false && styles.subtle,\n state.hidden && styles.hidden,\n state.root.className,\n );\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(\n tableSelectionCellClassNames.checkboxIndicator,\n state.checkboxIndicator.className,\n );\n }\n\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(\n tableSelectionCellClassNames.radioIndicator,\n styles.radioIndicator,\n state.radioIndicator.className,\n );\n }\n\n return state;\n};\n"],"names":["CELL_WIDTH","tableSelectionCellClassNames","useTableSelectionCellStyles_unstable","root","checkboxIndicator","radioIndicator","useTableLayoutStyles","makeStyles","display","width","useFlexLayoutStyles","flex","minWidth","maxWidth","justifyContent","useStyles","textAlign","whiteSpace","padding","createCustomFocusIndicatorStyle","outline","tokens","colorStrokeFocus2","borderRadius","borderRadiusMedium","selector","flexGrow","alignItems","subtle","opacity","hidden","state","styles","layoutStyles","table","className","mergeClasses","noNativeElements","checked"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,UAAAA;eAAAA;;IAEAC,4BAAAA;eAAAA;;IA8DAC,oCAAAA;eAAAA;;;uBAtE4B;8BAGO;4BACzB;AAEhB,MAAMF,aAAa;AAEnB,MAAMC,+BAAwE;IACnFE,MAAM;IACNC,mBAAmB;IACnBC,gBAAgB;AAClB;AAEA,MAAMC,uBAAuBC,IAAAA,iBAAAA,EAAW;IACtCJ,MAAM;QACJK,SAAS;QACTC,OAAO,CAAC,EAAET,WAAW,EAAE,CAAC;IAC1B;AACF;AAEA,MAAMU,sBAAsBH,IAAAA,iBAAAA,EAAW;IACrCJ,MAAM;QACJK,SAAS;QACTG,MAAM;QACNC,UAAU,CAAC,EAAEZ,WAAW,EAAE,CAAC;QAC3Ba,UAAU,CAAC,EAAEb,WAAW,EAAE,CAAC;QAC3Bc,gBAAgB;IAClB;AACF;AAEA;;CAEC,GACD,MAAMC,YAAYR,IAAAA,iBAAAA,EAAW;IAC3BJ,MAAM;QACJa,WAAW;QACXC,YAAY;QACZC,SAAS;QACT,GAAGC,IAAAA,6CAAAA,EACD;YAAEC,SAAS,CAAC,UAAU,EAAEC,kBAAAA,CAAOC,iBAAiB,CAAC,CAAC;YAAEC,cAAcF,kBAAAA,CAAOG,kBAAkB;QAAC,GAC5F;YAAEC,UAAU;QAAQ,EACrB;IACH;IAEApB,gBAAgB;QACdG,SAAS;QACTkB,UAAU;QACVC,YAAY;QACZb,gBAAgB;IAClB;IAEAc,QAAQ;QACNC,SAAS;QACT,GAAGV,IAAAA,6CAAAA,EACD;YACEU,SAAS;QACX,GACA;YAAEJ,UAAU;QAAe,EAC5B;IACH;IAEAK,QAAQ;QACND,SAAS;IACX;AACF;AAKO,MAAM3B,uCAAuC,CAAC6B;IACnD;IAEA,MAAMC,SAASjB;IACf,MAAMkB,eAAe;QACnBC,OAAO5B;QACPK,MAAMD;IACR;IACAqB,MAAM5B,IAAI,CAACgC,SAAS,GAAGC,IAAAA,mBAAAA,EACrBnC,6BAA6BE,IAAI,EACjC6B,OAAO7B,IAAI,EACX4B,MAAMM,gBAAgB,GAAGJ,aAAatB,IAAI,CAACR,IAAI,GAAG8B,aAAaC,KAAK,CAAC/B,IAAI,EACzE4B,MAAMH,MAAM,IAAIG,MAAMO,OAAO,KAAK,SAASN,OAAOJ,MAAM,EACxDG,MAAMD,MAAM,IAAIE,OAAOF,MAAM,EAC7BC,MAAM5B,IAAI,CAACgC,SAAS;IAEtB,IAAIJ,MAAM3B,iBAAiB,EAAE;QAC3B2B,MAAM3B,iBAAiB,CAAC+B,SAAS,GAAGC,IAAAA,mBAAAA,EAClCnC,6BAA6BG,iBAAiB,EAC9C2B,MAAM3B,iBAAiB,CAAC+B,SAAS;IAErC;IAEA,IAAIJ,MAAM1B,cAAc,EAAE;QACxB0B,MAAM1B,cAAc,CAAC8B,SAAS,GAAGC,IAAAA,mBAAAA,EAC/BnC,6BAA6BI,cAAc,EAC3C2B,OAAO3B,cAAc,EACrB0B,MAAM1B,cAAc,CAAC8B,SAAS;IAElC;IAEA,OAAOJ;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-table",
3
- "version": "9.17.7",
3
+ "version": "9.18.0",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@fluentui/keyboard-keys": "^9.0.8",
24
- "@fluentui/react-aria": "^9.15.3",
25
- "@fluentui/react-avatar": "^9.8.7",
26
- "@fluentui/react-checkbox": "^9.4.7",
24
+ "@fluentui/react-aria": "^9.15.4",
25
+ "@fluentui/react-avatar": "^9.9.0",
26
+ "@fluentui/react-checkbox": "^9.5.0",
27
27
  "@fluentui/react-context-selector": "^9.2.2",
28
28
  "@fluentui/react-icons": "^2.0.245",
29
- "@fluentui/react-radio": "^9.4.7",
29
+ "@fluentui/react-radio": "^9.5.0",
30
30
  "@fluentui/react-shared-contexts": "^9.24.0",
31
- "@fluentui/react-tabster": "^9.25.3",
31
+ "@fluentui/react-tabster": "^9.26.0",
32
32
  "@fluentui/react-theme": "^9.1.24",
33
33
  "@fluentui/react-utilities": "^9.22.0",
34
34
  "@fluentui/react-jsx-runtime": "^9.1.2",