@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.
Files changed (195) hide show
  1. package/CHANGELOG.json +135 -4
  2. package/CHANGELOG.md +31 -5
  3. package/dist/index.d.ts +312 -21
  4. package/lib/TableCellActions.js +2 -0
  5. package/lib/TableCellActions.js.map +1 -0
  6. package/lib/TableCellLayout.js +2 -0
  7. package/lib/TableCellLayout.js.map +1 -0
  8. package/lib/TableCellPrimaryLayout.js +2 -0
  9. package/lib/TableCellPrimaryLayout.js.map +1 -0
  10. package/lib/TableSelectionCell.js +2 -0
  11. package/lib/TableSelectionCell.js.map +1 -0
  12. package/lib/components/Table/Table.types.js.map +1 -1
  13. package/lib/components/Table/useTableContextValues.js +7 -5
  14. package/lib/components/Table/useTableContextValues.js.map +1 -1
  15. package/lib/components/Table/useTableStyles.js +7 -2
  16. package/lib/components/Table/useTableStyles.js.map +1 -1
  17. package/lib/components/TableBody/useTableBody.js +3 -1
  18. package/lib/components/TableBody/useTableBody.js.map +1 -1
  19. package/lib/components/TableBody/useTableBodyStyles.js +12 -2
  20. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  21. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  22. package/lib/components/TableCell/renderTableCell.js +2 -4
  23. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  24. package/lib/components/TableCell/useTableCell.js +5 -5
  25. package/lib/components/TableCell/useTableCell.js.map +1 -1
  26. package/lib/components/TableCell/useTableCellStyles.js +6 -20
  27. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  28. package/lib/components/TableCellActions/TableCellActions.js +15 -0
  29. package/lib/components/TableCellActions/TableCellActions.js.map +1 -0
  30. package/lib/components/TableCellActions/TableCellActions.types.js +2 -0
  31. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -0
  32. package/lib/components/TableCellActions/index.js +6 -0
  33. package/lib/components/TableCellActions/index.js.map +1 -0
  34. package/lib/components/TableCellActions/renderTableCellActions.js +16 -0
  35. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -0
  36. package/lib/components/TableCellActions/useTableCellActions.js +24 -0
  37. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -0
  38. package/lib/components/TableCellActions/useTableCellActionsStyles.js +39 -0
  39. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  40. package/lib/components/TableCellLayout/TableCellLayout.js +15 -0
  41. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -0
  42. package/lib/components/TableCellLayout/TableCellLayout.types.js +2 -0
  43. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  44. package/lib/components/TableCellLayout/index.js +6 -0
  45. package/lib/components/TableCellLayout/index.js.map +1 -0
  46. package/lib/components/TableCellLayout/renderTableCellLayout.js +19 -0
  47. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  48. package/lib/components/TableCellLayout/useTableCellLayout.js +36 -0
  49. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  50. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +74 -0
  51. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  52. package/lib/components/TableHeader/useTableHeader.js +4 -2
  53. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  54. package/lib/components/TableHeader/useTableHeaderStyles.js +12 -2
  55. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  56. package/lib/components/TableHeaderCell/useTableHeaderCell.js +4 -2
  57. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  58. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -9
  59. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  60. package/lib/components/TableRow/useTableRow.js +4 -2
  61. package/lib/components/TableRow/useTableRow.js.map +1 -1
  62. package/lib/components/TableRow/useTableRowStyles.js +9 -7
  63. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  64. package/lib/components/TableSelectionCell/TableSelectionCell.js +15 -0
  65. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  66. package/lib/components/TableSelectionCell/TableSelectionCell.types.js +2 -0
  67. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  68. package/lib/components/TableSelectionCell/index.js +6 -0
  69. package/lib/components/TableSelectionCell/index.js.map +1 -0
  70. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +17 -0
  71. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  72. package/lib/components/TableSelectionCell/useTableSelectionCell.js +42 -0
  73. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  74. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +55 -0
  75. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  76. package/lib/contexts/tableContext.js +7 -3
  77. package/lib/contexts/tableContext.js.map +1 -1
  78. package/lib/hooks/index.js +3 -0
  79. package/lib/hooks/index.js.map +1 -0
  80. package/lib/hooks/selectionManager.js +89 -0
  81. package/lib/hooks/selectionManager.js.map +1 -0
  82. package/lib/hooks/types.js +2 -0
  83. package/lib/hooks/types.js.map +1 -0
  84. package/lib/hooks/useSelection.js +47 -0
  85. package/lib/hooks/useSelection.js.map +1 -0
  86. package/lib/hooks/useSort.js +72 -0
  87. package/lib/hooks/useSort.js.map +1 -0
  88. package/lib/hooks/useTable.js +87 -0
  89. package/lib/hooks/useTable.js.map +1 -0
  90. package/lib/index.js +4 -0
  91. package/lib/index.js.map +1 -1
  92. package/lib/navigationModes/cell.js +250 -0
  93. package/lib/navigationModes/cell.js.map +1 -0
  94. package/lib/navigationModes/composite.js +208 -0
  95. package/lib/navigationModes/composite.js.map +1 -0
  96. package/lib/navigationModes/index.js +3 -0
  97. package/lib/navigationModes/index.js.map +1 -0
  98. package/lib/navigationModes/useNavigationMode.js +42 -0
  99. package/lib/navigationModes/useNavigationMode.js.map +1 -0
  100. package/lib-commonjs/TableCellActions.js +10 -0
  101. package/lib-commonjs/TableCellActions.js.map +1 -0
  102. package/lib-commonjs/TableCellLayout.js +10 -0
  103. package/lib-commonjs/TableCellLayout.js.map +1 -0
  104. package/lib-commonjs/TableCellPrimaryLayout.js +10 -0
  105. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -0
  106. package/lib-commonjs/TableSelectionCell.js +10 -0
  107. package/lib-commonjs/TableSelectionCell.js.map +1 -0
  108. package/lib-commonjs/components/Table/useTableContextValues.js +8 -5
  109. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  110. package/lib-commonjs/components/Table/useTableStyles.js +8 -2
  111. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  112. package/lib-commonjs/components/TableBody/useTableBody.js +3 -1
  113. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  114. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +10 -1
  115. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  116. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -4
  117. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  118. package/lib-commonjs/components/TableCell/useTableCell.js +4 -4
  119. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  120. package/lib-commonjs/components/TableCell/useTableCellStyles.js +6 -20
  121. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  122. package/lib-commonjs/components/TableCellActions/TableCellActions.js +26 -0
  123. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -0
  124. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +6 -0
  125. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -0
  126. package/lib-commonjs/components/TableCellActions/index.js +18 -0
  127. package/lib-commonjs/components/TableCellActions/index.js.map +1 -0
  128. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +27 -0
  129. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -0
  130. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +35 -0
  131. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -0
  132. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +51 -0
  133. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  134. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +26 -0
  135. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -0
  136. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +6 -0
  137. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  138. package/lib-commonjs/components/TableCellLayout/index.js +18 -0
  139. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -0
  140. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +30 -0
  141. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  142. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +46 -0
  143. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  144. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +85 -0
  145. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  146. package/lib-commonjs/components/TableHeader/useTableHeader.js +4 -2
  147. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  148. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +11 -1
  149. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  150. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +4 -2
  151. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  152. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -9
  153. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  154. package/lib-commonjs/components/TableRow/useTableRow.js +4 -2
  155. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  156. package/lib-commonjs/components/TableRow/useTableRowStyles.js +10 -7
  157. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  158. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +26 -0
  159. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  160. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +6 -0
  161. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  162. package/lib-commonjs/components/TableSelectionCell/index.js +18 -0
  163. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -0
  164. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +28 -0
  165. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  166. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +56 -0
  167. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  168. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +65 -0
  169. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  170. package/lib-commonjs/contexts/tableContext.js +7 -3
  171. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  172. package/lib-commonjs/hooks/index.js +12 -0
  173. package/lib-commonjs/hooks/index.js.map +1 -0
  174. package/lib-commonjs/hooks/selectionManager.js +98 -0
  175. package/lib-commonjs/hooks/selectionManager.js.map +1 -0
  176. package/lib-commonjs/hooks/types.js +6 -0
  177. package/lib-commonjs/hooks/types.js.map +1 -0
  178. package/lib-commonjs/hooks/useSelection.js +59 -0
  179. package/lib-commonjs/hooks/useSelection.js.map +1 -0
  180. package/lib-commonjs/hooks/useSort.js +82 -0
  181. package/lib-commonjs/hooks/useSort.js.map +1 -0
  182. package/lib-commonjs/hooks/useTable.js +99 -0
  183. package/lib-commonjs/hooks/useTable.js.map +1 -0
  184. package/lib-commonjs/index.js +110 -1
  185. package/lib-commonjs/index.js.map +1 -1
  186. package/lib-commonjs/navigationModes/cell.js +259 -0
  187. package/lib-commonjs/navigationModes/cell.js.map +1 -0
  188. package/lib-commonjs/navigationModes/composite.js +217 -0
  189. package/lib-commonjs/navigationModes/composite.js.map +1 -0
  190. package/lib-commonjs/navigationModes/index.js +16 -0
  191. package/lib-commonjs/navigationModes/index.js.map +1 -0
  192. package/lib-commonjs/navigationModes/useNavigationMode.js +55 -0
  193. package/lib-commonjs/navigationModes/useNavigationMode.js.map +1 -0
  194. package/package.json +9 -9
  195. package/dist/tsdoc-metadata.json +0 -11
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./TableCellActions"), exports);
10
+
11
+ tslib_1.__exportStar(require("./TableCellActions.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderTableCellActions"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useTableCellActions"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useTableCellActionsStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellActions/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableCellActions';\nexport * from './TableCellActions.types';\nexport * from './renderTableCellActions';\nexport * from './useTableCellActions';\nexport * from './useTableCellActionsStyles';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderTableCellActions_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+ /**
12
+ * Render the final JSX of TableCellActions
13
+ */
14
+
15
+
16
+ const renderTableCellActions_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state); // TODO Add additional slots in the appropriate place
21
+
22
+ return React.createElement(slots.root, { ...slotProps.root
23
+ });
24
+ };
25
+
26
+ exports.renderTableCellActions_unstable = renderTableCellActions_unstable;
27
+ //# sourceMappingURL=renderTableCellActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellActions/renderTableCellActions.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,+BAA+B,GAAI,KAAD,IAAiC;EAC9E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAgC,KAAhC,CAA7B,CAD8E,CAG9E;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n const { slots, slotProps } = getSlots<TableCellActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableCellActions_unstable = void 0;
7
+
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+
10
+ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
+ /**
12
+ * Create the state required to render TableCellActions.
13
+ *
14
+ * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
15
+ * before being passed to renderTableCellActions_unstable.
16
+ *
17
+ * @param props - props from this instance of TableCellActions
18
+ * @param ref - reference to root HTMLElement of TableCellActions
19
+ */
20
+
21
+
22
+ const useTableCellActions_unstable = (props, ref) => {
23
+ return {
24
+ components: {
25
+ root: 'div'
26
+ },
27
+ root: react_utilities_1.getNativeElementProps('div', {
28
+ ref: react_utilities_1.useMergedRefs(ref, react_tabster_1.useFocusWithin()),
29
+ ...props
30
+ })
31
+ };
32
+ };
33
+
34
+ exports.useTableCellActions_unstable = useTableCellActions_unstable;
35
+ //# sourceMappingURL=useTableCellActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellActions/useTableCellActions.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,4BAA4B,GAAG,CAC1C,KAD0C,EAE1C,GAF0C,KAGjB;EACzB,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,eAAA,CAAA,cAAA,EAAnB,CAD4B;MAEjC,GAAG;IAF8B,CAA7B;EAJD,CAAP;AASD,CAbM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","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,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableCellActionsStyles_unstable = exports.tableCellActionsClassNames = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+
12
+ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
13
+
14
+ exports.tableCellActionsClassNames = {
15
+ root: 'fui-TableCellActions'
16
+ };
17
+ /**
18
+ * Styles for the root slot
19
+ */
20
+
21
+ const useStyles = /*#__PURE__*/react_1.__styles({
22
+ "root": {
23
+ "qhf8xq": "f1euv43f",
24
+ "j35jbq": ["f10k790i", "f1xynx9j"],
25
+ "Bhzewxz": "f1i1t8d1",
26
+ "Bz10aip": "f188r07x",
27
+ "abs64n": "fk73vx1",
28
+ "Frg6f3": ["fcgxt0o", "f1ujusj6"],
29
+ "De3pzq": "f5gciec",
30
+ "Brovlpu": "ftqa4ok",
31
+ "B486eqv": "f2hkw1w",
32
+ "Bs2wo6l": "f1g03rbe"
33
+ }
34
+ }, {
35
+ "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;}"],
36
+ "f": [".ftqa4ok:focus{outline-style:none;}"],
37
+ "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
38
+ });
39
+ /**
40
+ * Apply styling to the TableCellActions slots based on the state
41
+ */
42
+
43
+
44
+ const useTableCellActionsStyles_unstable = state => {
45
+ const styles = useStyles();
46
+ state.root.className = react_1.mergeClasses(exports.tableCellActionsClassNames.root, styles.root, state.root.className);
47
+ return state;
48
+ };
49
+
50
+ exports.useTableCellActionsStyles_unstable = useTableCellActionsStyles_unstable;
51
+ //# sourceMappingURL=useTableCellActionsStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellActions/useTableCellActionsStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAEa,OAAA,CAAA,0BAAA,GAAoE;EAC/E,IAAI,EAAE;AADyE,CAApE;AAIb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAAlB;AAmBA;;AAEG;;;AACI,MAAM,kCAAkC,GAAI,KAAD,IAAwD;EACxG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,0BAAA,CAA2B,IAAxC,EAA8C,MAAM,CAAC,IAArD,EAA2D,KAAK,CAAC,IAAN,CAAW,SAAtE,CAAvB;EAEA,OAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,kCAAA,GAAkC,kCAAlC","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,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TableCellLayout = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useTableCellLayout_1 = /*#__PURE__*/require("./useTableCellLayout");
11
+
12
+ const renderTableCellLayout_1 = /*#__PURE__*/require("./renderTableCellLayout");
13
+
14
+ const useTableCellLayoutStyles_1 = /*#__PURE__*/require("./useTableCellLayoutStyles");
15
+ /**
16
+ * TableCellLayout component - TODO: add more docs
17
+ */
18
+
19
+
20
+ exports.TableCellLayout = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = useTableCellLayout_1.useTableCellLayout_unstable(props, ref);
22
+ useTableCellLayoutStyles_1.useTableCellLayoutStyles_unstable(state);
23
+ return renderTableCellLayout_1.renderTableCellLayout_unstable(state);
24
+ });
25
+ exports.TableCellLayout.displayName = 'TableCellLayout';
26
+ //# sourceMappingURL=TableCellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellLayout/TableCellLayout.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,eAAA,gBAA6D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,EAAmC,GAAnC,CAAd;EAEA,0BAAA,CAAA,iCAAA,CAAkC,KAAlC;EACA,OAAO,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAAP;AACD,CALyE,CAA7D;AAOb,OAAA,CAAA,eAAA,CAAgB,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,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=TableCellLayout.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./TableCellLayout"), exports);
10
+
11
+ tslib_1.__exportStar(require("./TableCellLayout.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderTableCellLayout"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useTableCellLayout"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useTableCellLayoutStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellLayout/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableCellLayout';\nexport * from './TableCellLayout.types';\nexport * from './renderTableCellLayout';\nexport * from './useTableCellLayout';\nexport * from './useTableCellLayoutStyles';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderTableCellLayout_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+ /**
12
+ * Render the final JSX of TableCellLayout
13
+ */
14
+
15
+
16
+ const renderTableCellLayout_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state);
21
+ return React.createElement(slots.root, { ...slotProps.root
22
+ }, slots.media && React.createElement(slots.media, { ...slotProps.media
23
+ }), slots.wrapper && React.createElement(slots.wrapper, { ...slotProps.wrapper
24
+ }, slots.main && React.createElement(slots.main, { ...slotProps.main
25
+ }, slotProps.root.children), slots.description && React.createElement(slots.description, { ...slotProps.description
26
+ })));
27
+ };
28
+
29
+ exports.renderTableCellLayout_unstable = renderTableCellLayout_unstable;
30
+ //# sourceMappingURL=renderTableCellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellLayout/renderTableCellLayout.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA+B,KAA/B,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,KAAN,IAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADlB,EAEG,KAAK,CAAC,OAAN,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,EACG,KAAK,CAAC,IAAN,IAAc,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,IAAqB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAlB,CAFxB,CAHJ,CADF;AAWD,CAdM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","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,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableCellLayout_unstable = void 0;
7
+
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ /**
10
+ * Create the state required to render TableCellLayout.
11
+ *
12
+ * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
13
+ * before being passed to renderTableCellLayout_unstable.
14
+ *
15
+ * @param props - props from this instance of TableCellLayout
16
+ * @param ref - reference to root HTMLElement of TableCellLayout
17
+ */
18
+
19
+
20
+ const useTableCellLayout_unstable = (props, ref) => {
21
+ return {
22
+ components: {
23
+ root: 'div',
24
+ main: 'span',
25
+ description: 'span',
26
+ wrapper: 'div',
27
+ media: 'span'
28
+ },
29
+ root: react_utilities_1.getNativeElementProps('div', {
30
+ ref,
31
+ ...props
32
+ }),
33
+ appearance: props.appearance,
34
+ main: react_utilities_1.resolveShorthand(props.main, {
35
+ required: true
36
+ }),
37
+ media: react_utilities_1.resolveShorthand(props.media),
38
+ description: react_utilities_1.resolveShorthand(props.description),
39
+ wrapper: react_utilities_1.resolveShorthand(props.wrapper, {
40
+ required: !!props.description || !!props.children
41
+ })
42
+ };
43
+ };
44
+
45
+ exports.useTableCellLayout_unstable = useTableCellLayout_unstable;
46
+ //# sourceMappingURL=useTableCellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellLayout/useTableCellLayout.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,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,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MAAE,GAAF;MAAO,GAAG;IAAV,CAA7B,CARD;IASL,UAAU,EAAE,KAAK,CAAC,UATb;IAUL,IAAI,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,IAAvB,EAA6B;MAAE,QAAQ,EAAE;IAAZ,CAA7B,CAVD;IAWL,KAAK,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,KAAvB,CAXF;IAYL,WAAW,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,WAAvB,CAZR;IAaL,OAAO,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,OAAvB,EAAgC;MAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,WAAR,IAAuB,CAAC,CAAC,KAAK,CAAC;IAA3C,CAAhC;EAbJ,CAAP;AAeD,CAnBM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","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,85 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableCellLayoutStyles_unstable = exports.tableCellLayoutClassNames = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+
12
+ exports.tableCellLayoutClassNames = {
13
+ root: 'fui-TableCellLayout',
14
+ media: 'fui-TableCellLayout__media',
15
+ main: 'fui-TableCellLayout__main',
16
+ description: 'fui-TableCellLayout__description',
17
+ wrapper: 'fui-TableCellLayout__wrapper'
18
+ };
19
+ /**
20
+ * Styles for the root slot
21
+ */
22
+
23
+ const useStyles = /*#__PURE__*/react_1.__styles({
24
+ "root": {
25
+ "mc9l5x": "f22iagw",
26
+ "Bt984gj": "f122n59",
27
+ "i8kkvl": "fsnqrgy",
28
+ "Belr9w4": "fylz90v",
29
+ "Bh6795r": "fqerorx",
30
+ "Bnnss6s": "f1neuvcm",
31
+ "xawz": "fkjuxzh"
32
+ },
33
+ "wrapper": {
34
+ "mc9l5x": "f22iagw",
35
+ "Beiy3e4": "f1vx9l62"
36
+ },
37
+ "media": {
38
+ "mc9l5x": "f22iagw",
39
+ "Bt984gj": "f122n59"
40
+ },
41
+ "mediaPrimary": {
42
+ "B5pe6w7": "fqgjdyf",
43
+ "p4uzdd": "fppfxz8"
44
+ },
45
+ "mainPrimary": {
46
+ "Bhrd7zp": "fl43uef"
47
+ },
48
+ "description": {
49
+ "Be2twd7": "fkhj508",
50
+ "sj55zd": "fkfq4zb"
51
+ }
52
+ }, {
53
+ "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);}"]
54
+ });
55
+ /**
56
+ * Apply styling to the TableCellLayout slots based on the state
57
+ */
58
+
59
+
60
+ const useTableCellLayoutStyles_unstable = state => {
61
+ const styles = useStyles();
62
+ state.root.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.root, styles.root, state.root.className);
63
+ const primary = state.appearance === 'primary';
64
+
65
+ if (state.media) {
66
+ state.media.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.media, styles.media, primary && styles.mediaPrimary, state.media.className);
67
+ }
68
+
69
+ if (state.main) {
70
+ state.main.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.main, primary && styles.mainPrimary, state.main.className);
71
+ }
72
+
73
+ if (state.description) {
74
+ state.description.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.description, styles.description, state.description.className);
75
+ }
76
+
77
+ if (state.wrapper) {
78
+ state.wrapper.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);
79
+ }
80
+
81
+ return state;
82
+ };
83
+
84
+ exports.useTableCellLayoutStyles_unstable = useTableCellLayoutStyles_unstable;
85
+ //# sourceMappingURL=useTableCellLayoutStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/TableCellLayout/useTableCellLayoutStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,yBAAA,GAAkE;EAC7E,IAAI,EAAE,qBADuE;EAE7E,KAAK,EAAE,4BAFsE;EAG7E,IAAI,EAAE,2BAHuE;EAI7E,WAAW,EAAE,kCAJgE;EAK7E,OAAO,EAAE;AALoE,CAAlE;AAQb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAA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,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAA,CAA0B,OAAvC,EAAgD,MAAM,CAAC,OAAvD,EAAgE,KAAK,CAAC,OAAN,CAAc,SAA9E,CAA1B;EACD;;EAED,OAAO,KAAP;AACD,CAnCM;;AAAM,OAAA,CAAA,iCAAA,GAAiC,iCAAjC","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n wrapper: 'fui-TableCellLayout__wrapper',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n wrapper: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaPrimary: {\n '& svg': {\n width: '28px',\n height: '28px',\n },\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n description: {\n fontSize: tokens.fontSizeBase300,\n color: tokens.colorNeutralForeground2,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.wrapper) {\n state.wrapper.className = mergeClasses(tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -24,8 +24,10 @@ const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
24
24
  const useTableHeader_unstable = (props, ref) => {
25
25
  var _a;
26
26
 
27
- const noNativeElements = tableContext_1.useTableContext(ctx => ctx.noNativeElements);
28
- const sortable = tableContext_1.useTableContext(ctx => ctx.sortable);
27
+ const {
28
+ noNativeElements,
29
+ sortable
30
+ } = tableContext_1.useTableContext();
29
31
  const keyboardNavAttr = react_tabster_1.useArrowNavigationGroup({
30
32
  axis: 'horizontal',
31
33
  circular: true
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/useTableHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;EAChH,MAAM,gBAAgB,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,gBAA3B,CAAzB;EACA,MAAM,QAAQ,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,QAA3B,CAAjB;EACA,MAAM,eAAe,GAAG,eAAA,CAAA,uBAAA,CAAwB;IAAE,IAAI,EAAE,YAAR;IAAsB,QAAQ,EAAE;EAAhC,CAAxB,CAAxB;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,IAAI,QAAQ,IAAI,eAAhB,CAHyC;MAIzC,GAAG;IAJsC,CAArC;EAJD,CAAP;AAWD,CAjBM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const noNativeElements = useTableContext(ctx => ctx.noNativeElements);\n const sortable = useTableContext(ctx => ctx.sortable);\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'horizontal', circular: true });\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...(sortable && keyboardNavAttr),\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/TableHeader/useTableHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;EAChH,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAAiC,cAAA,CAAA,eAAA,EAAvC;EACA,MAAM,eAAe,GAAG,eAAA,CAAA,uBAAA,CAAwB;IAAE,IAAI,EAAE,YAAR;IAAsB,QAAQ,EAAE;EAAhC,CAAxB,CAAxB;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,IAAI,QAAQ,IAAI,eAAhB,CAHyC;MAIzC,GAAG;IAJsC,CAArC;EAJD,CAAP;AAWD,CAhBM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements, sortable } = useTableContext();\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'horizontal', circular: true });\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...(sortable && keyboardNavAttr),\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -11,12 +11,22 @@ exports.tableHeaderClassName = 'fui-TableHeader';
11
11
  exports.tableHeaderClassNames = {
12
12
  root: 'fui-TableHeader'
13
13
  };
14
+
15
+ const useStyles = /*#__PURE__*/react_1.__styles({
16
+ "root": {
17
+ "mc9l5x": "f1tp1avn"
18
+ }
19
+ }, {
20
+ "d": [".f1tp1avn{display:table-row-group;}"]
21
+ });
14
22
  /**
15
23
  * Apply styling to the TableHeader slots based on the state
16
24
  */
17
25
 
26
+
18
27
  const useTableHeaderStyles_unstable = state => {
19
- state.root.className = react_1.mergeClasses(exports.tableHeaderClassName, state.root.className);
28
+ const styles = useStyles();
29
+ state.root.className = react_1.mergeClasses(exports.tableHeaderClassName, styles.root, state.root.className);
20
30
  return state;
21
31
  };
22
32
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;AACA,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE;AAD+D,CAA1D;AAIb;;AAEG;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAb,EAAmC,KAAK,CAAC,IAAN,CAAW,SAA9C,CAAvB;EAEA,OAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n state.root.className = mergeClasses(tableHeaderClassName, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;AACA,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE;AAD+D,CAA1D;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAMA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAb,EAAmC,MAAM,CAAC,IAA1C,EAAgD,KAAK,CAAC,IAAN,CAAW,SAA3D,CAAvB;EAEA,OAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableHeaderClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -32,8 +32,10 @@ const sortIcons = {
32
32
  const useTableHeaderCell_unstable = (props, ref) => {
33
33
  var _a;
34
34
 
35
- const noNativeElements = tableContext_1.useTableContext(ctx => ctx.noNativeElements);
36
- const sortable = tableContext_1.useTableContext(ctx => ctx.sortable);
35
+ const {
36
+ noNativeElements,
37
+ sortable
38
+ } = tableContext_1.useTableContext();
37
39
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'th';
38
40
  return {
39
41
  components: {
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeaderCell/useTableHeaderCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AAEA,MAAM,SAAS,GAAG;EAChB,SAAS,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,cAAD,EAAe,IAAf,CADK;EAEhB,UAAU,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,gBAAD,EAAiB,IAAjB;AAFI,CAAlB;AAKA;;;;;;;;AAQG;;AACI,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;;;EACxB,MAAM,gBAAgB,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IA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","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular />,\n descending: <ArrowDownRegular />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const noNativeElements = useTableContext(ctx => ctx.noNativeElements);\n const sortable = useTableContext(ctx => ctx.sortable);\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n return {\n components: {\n root: rootComponent,\n button: 'button',\n sortIcon: 'span',\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': props.sortDirection,\n ...props,\n }),\n sortIcon: resolveShorthand(props.sortIcon, {\n required: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n }),\n button: useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n role: 'presentation',\n tabIndex: -1,\n type: 'button',\n ...(sortable && {\n role: undefined,\n tabIndex: undefined,\n }),\n },\n }),\n sortable,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/TableHeaderCell/useTableHeaderCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,M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AM,EAAE,YAAA,CAAA,sBAAA,CAAuB,KAAK,CAAC,MAA7B,EAAqC;MAC3C,QAAQ,EAAE,IADiC;MAE3C,YAAY,EAAE;QACZ,IAAI,EAAE,cADM;QAEZ,QAAQ,EAAE,CAAC,CAFC;QAGZ,IAAI,EAAE,QAHM;QAIZ,IAAI,QAAQ,IAAI;UACd,IAAI,EAAE,SADQ;UAEd,QAAQ,EAAE;QAFI,CAAhB;MAJY;IAF6B,CAArC,CAhBH;IA4BL;EA5BK,CAAP;AA8BD,CArCM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular />,\n descending: <ArrowDownRegular />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n return {\n components: {\n root: rootComponent,\n button: 'button',\n sortIcon: 'span',\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': props.sortDirection,\n ...props,\n }),\n sortIcon: resolveShorthand(props.sortIcon, {\n required: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n }),\n button: useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n role: 'presentation',\n tabIndex: -1,\n type: 'button',\n ...(sortable && {\n role: undefined,\n tabIndex: undefined,\n }),\n },\n }),\n sortable,\n };\n};\n"],"sourceRoot":"../src/"}
@@ -21,18 +21,15 @@ exports.tableHeaderCellClassNames = {
21
21
 
22
22
  const useStyles = /*#__PURE__*/react_1.__styles({
23
23
  "root": {
24
- "sshi5w": "f5pgtk9",
24
+ "mc9l5x": "f15pt5es",
25
+ "ha4doy": "fmrv4ls",
25
26
  "z8tnut": "f1nbblvp",
26
27
  "z189sj": ["f1vdfbxk", "f1f5gg8d"],
27
28
  "Byoj8tv": "f1ov4xf1",
28
- "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
29
- "mc9l5x": "f22iagw",
30
- "Bt984gj": "f122n59",
31
- "Bh6795r": "fqerorx",
32
- "Bnnss6s": "f1neuvcm",
33
- "xawz": "fkjuxzh"
29
+ "uwmqm3": ["f1f5gg8d", "f1vdfbxk"]
34
30
  },
35
31
  "resetButton": {
32
+ "B3rzk8w": "fq6nmtn",
36
33
  "B7ck84d": "f1e4lqlz",
37
34
  "De3pzq": "f1u2r49w",
38
35
  "sj55zd": "f1ym3bx4",
@@ -53,12 +50,16 @@ const useStyles = /*#__PURE__*/react_1.__styles({
53
50
  "fsow6f": "fgusgyc"
54
51
  },
55
52
  "button": {
53
+ "a9b677": "fly5x3f",
56
54
  "mc9l5x": "f22iagw",
57
55
  "Bh6795r": "fqerorx",
58
56
  "Bqenvij": "f1l02sjl",
59
57
  "Bt984gj": "f122n59",
60
58
  "i8kkvl": "fsnqrgy",
61
- "Belr9w4": "fylz90v"
59
+ "Belr9w4": "fylz90v",
60
+ "sshi5w": "f5pgtk9",
61
+ "Bnnss6s": "f1neuvcm",
62
+ "xawz": "fkjuxzh"
62
63
  },
63
64
  "sortable": {
64
65
  "Bceei9c": "f1k6fduh"
@@ -68,7 +69,7 @@ const useStyles = /*#__PURE__*/react_1.__styles({
68
69
  "Bt984gj": "f122n59"
69
70
  }
70
71
  }, {
71
- "d": [".f5pgtk9{min-height:44px;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".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;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".fytdu2e{line-height:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".f1l02sjl{height:100%;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".f1k6fduh{cursor:pointer;}"]
72
+ "d": [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".fq6nmtn{resize:horizontal;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".fytdu2e{line-height:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".fly5x3f{width:100%;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1l02sjl{height:100%;}", ".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);}", ".f5pgtk9{min-height:44px;}", ".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;}", ".f1k6fduh{cursor:pointer;}"]
72
73
  });
73
74
  /**
74
75
  * Apply styling to the TableHeaderCell slots based on the state
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeaderCell/useTableHeaderCellStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,wBAAA,GAA2B,qBAA3B;AACA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OAAA,CAAA,iCAAA,GAAiC,iCAAjC","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\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};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n minHeight: '44px',\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n display: 'flex',\n alignItems: 'center',\n ...shorthands.flex(1, 1, '0px'),\n },\n\n resetButton: {\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'normal',\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n },\n button: {\n display: 'flex',\n flexGrow: 1,\n height: '100%',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n },\n sortable: {\n cursor: 'pointer',\n },\n\n sortIcon: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\n/**\n * Apply styling to the TableHeaderCell slots based on the state\n */\nexport const useTableHeaderCellStyles_unstable = (state: TableHeaderCellState): TableHeaderCellState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableHeaderCellClassNames.root, styles.root, state.root.className);\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 return state;\n};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AQA,IAAI,KAAK,CAAC,QAAV,EAAoB;IAClB,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,OAAA,CAAA,YAAA,CACzB,OAAA,CAAA,yBAAA,CAA0B,QADD,EAEzB,MAAM,CAAC,QAFkB,EAGzB,KAAK,CAAC,QAAN,CAAe,SAHU,CAA3B;EAKD;;EAED,OAAO,KAAP;AACD,CApBM;;AAAM,OAAA,CAAA,iCAAA,GAAiC,iCAAjC","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\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};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\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 ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n },\n button: {\n width: '100%',\n display: 'flex',\n flexGrow: 1,\n height: '100%',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n minHeight: '44px',\n ...shorthands.flex(1, 1, '0px'),\n },\n sortable: {\n cursor: 'pointer',\n },\n\n sortIcon: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\n/**\n * Apply styling to the TableHeaderCell slots based on the state\n */\nexport const useTableHeaderCellStyles_unstable = (state: TableHeaderCellState): TableHeaderCellState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableHeaderCellClassNames.root, styles.root, state.root.className);\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 return state;\n};\n"],"sourceRoot":"../src/"}
@@ -22,8 +22,10 @@ const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
22
22
  const useTableRow_unstable = (props, ref) => {
23
23
  var _a;
24
24
 
25
- const noNativeElements = tableContext_1.useTableContext(ctx => ctx.noNativeElements);
26
- const size = tableContext_1.useTableContext(ctx => ctx.size);
25
+ const {
26
+ noNativeElements,
27
+ size
28
+ } = tableContext_1.useTableContext();
27
29
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'tr';
28
30
  return {
29
31
  components: {
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableRow/useTableRow.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;;;EACvG,MAAM,gBAAgB,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,gBAA3B,CAAzB;EACA,MAAM,IAAI,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,IAA3B,CAAb;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,IAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,KAA1B,GAAkC,SAFC;MAGzC,GAAG;IAHsC,CAArC,CAJD;IASL;EATK,CAAP;AAWD,CAhBM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const noNativeElements = useTableContext(ctx => ctx.noNativeElements);\n const size = useTableContext(ctx => ctx.size);\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n size,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/TableRow/useTableRow.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;;;EACvG,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAA6B,cAAA,CAAA,eAAA,EAAnC;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,IAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,KAA1B,GAAkC,SAFC;MAGzC,GAAG;IAHsC,CAArC,CAJD;IASL;EATK,CAAP;AAWD,CAfM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n size,\n };\n};\n"],"sourceRoot":"../src/"}