@fluentui/react-tree 9.0.0-beta.8 → 9.0.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 (311) hide show
  1. package/CHANGELOG.json +1608 -1
  2. package/CHANGELOG.md +430 -2
  3. package/LICENSE +1 -1
  4. package/dist/index.d.ts +404 -132
  5. package/lib/FlatTree.js +1 -0
  6. package/lib/FlatTree.js.map +1 -0
  7. package/lib/Tree.js +0 -1
  8. package/lib/Tree.js.map +1 -1
  9. package/lib/TreeItem.js +0 -1
  10. package/lib/TreeItem.js.map +1 -1
  11. package/lib/TreeItemLayout.js +0 -1
  12. package/lib/TreeItemLayout.js.map +1 -1
  13. package/lib/TreeItemPersonaLayout.js +0 -1
  14. package/lib/TreeItemPersonaLayout.js.map +1 -1
  15. package/lib/components/FlatTree/FlatTree.js +17 -0
  16. package/lib/components/FlatTree/FlatTree.js.map +1 -0
  17. package/lib/components/FlatTree/FlatTree.types.js +1 -0
  18. package/lib/components/FlatTree/FlatTree.types.js.map +1 -0
  19. package/lib/components/FlatTree/index.js +7 -0
  20. package/lib/components/FlatTree/index.js.map +1 -0
  21. package/lib/components/FlatTree/renderFlatTree.js +2 -0
  22. package/lib/components/FlatTree/renderFlatTree.js.map +1 -0
  23. package/lib/components/FlatTree/useFlatControllableCheckedItems.js +76 -0
  24. package/lib/components/FlatTree/useFlatControllableCheckedItems.js.map +1 -0
  25. package/lib/components/FlatTree/useFlatTree.js +3 -0
  26. package/lib/components/FlatTree/useFlatTree.js.map +1 -0
  27. package/lib/components/FlatTree/useFlatTreeContextValues.js +2 -0
  28. package/lib/components/FlatTree/useFlatTreeContextValues.js.map +1 -0
  29. package/lib/components/FlatTree/useFlatTreeNavigation.js +74 -0
  30. package/lib/components/FlatTree/useFlatTreeNavigation.js.map +1 -0
  31. package/lib/components/FlatTree/useFlatTreeStyles.styles.js +20 -0
  32. package/lib/components/FlatTree/useFlatTreeStyles.styles.js.map +1 -0
  33. package/lib/components/FlatTree/useHeadlessFlatTree.js +124 -0
  34. package/lib/components/FlatTree/useHeadlessFlatTree.js.map +1 -0
  35. package/lib/components/Tree/Tree.js +9 -15
  36. package/lib/components/Tree/Tree.js.map +1 -1
  37. package/lib/components/Tree/Tree.types.js +1 -2
  38. package/lib/components/Tree/Tree.types.js.map +1 -1
  39. package/lib/components/Tree/index.js +2 -3
  40. package/lib/components/Tree/index.js.map +1 -1
  41. package/lib/components/Tree/renderTree.js +7 -11
  42. package/lib/components/Tree/renderTree.js.map +1 -1
  43. package/lib/components/Tree/useNestedControllableCheckedItems.js +22 -0
  44. package/lib/components/Tree/useNestedControllableCheckedItems.js.map +1 -0
  45. package/lib/components/Tree/useTree.js +63 -111
  46. package/lib/components/Tree/useTree.js.map +1 -1
  47. package/lib/components/Tree/useTreeContextValues.js +16 -24
  48. package/lib/components/Tree/useTreeContextValues.js.map +1 -1
  49. package/lib/components/Tree/useTreeNavigation.js +52 -0
  50. package/lib/components/Tree/useTreeNavigation.js.map +1 -0
  51. package/lib/components/Tree/{useTreeStyles.js → useTreeStyles.styles.js} +7 -3
  52. package/lib/components/Tree/useTreeStyles.styles.js.map +1 -0
  53. package/lib/components/TreeItem/TreeItem.js +7 -9
  54. package/lib/components/TreeItem/TreeItem.js.map +1 -1
  55. package/lib/components/TreeItem/TreeItem.types.js +0 -1
  56. package/lib/components/TreeItem/TreeItem.types.js.map +1 -1
  57. package/lib/components/TreeItem/index.js +2 -2
  58. package/lib/components/TreeItem/index.js.map +1 -1
  59. package/lib/components/TreeItem/renderTreeItem.js +7 -15
  60. package/lib/components/TreeItem/renderTreeItem.js.map +1 -1
  61. package/lib/components/TreeItem/useTreeItem.js +161 -234
  62. package/lib/components/TreeItem/useTreeItem.js.map +1 -1
  63. package/lib/components/TreeItem/useTreeItemContextValues.js +20 -16
  64. package/lib/components/TreeItem/useTreeItemContextValues.js.map +1 -1
  65. package/lib/components/TreeItem/useTreeItemStyles.styles.js +100 -0
  66. package/lib/components/TreeItem/useTreeItemStyles.styles.js.map +1 -0
  67. package/lib/components/TreeItemChevron.js +24 -0
  68. package/lib/components/TreeItemChevron.js.map +1 -0
  69. package/lib/components/TreeItemLayout/TreeItemLayout.js +5 -7
  70. package/lib/components/TreeItemLayout/TreeItemLayout.js.map +1 -1
  71. package/lib/components/TreeItemLayout/TreeItemLayout.types.js +1 -2
  72. package/lib/components/TreeItemLayout/TreeItemLayout.types.js.map +1 -1
  73. package/lib/components/TreeItemLayout/index.js +1 -2
  74. package/lib/components/TreeItemLayout/index.js.map +1 -1
  75. package/lib/components/TreeItemLayout/renderTreeItemLayout.js +8 -13
  76. package/lib/components/TreeItemLayout/renderTreeItemLayout.js.map +1 -1
  77. package/lib/components/TreeItemLayout/useTreeItemLayout.js +109 -40
  78. package/lib/components/TreeItemLayout/useTreeItemLayout.js.map +1 -1
  79. package/lib/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js +237 -0
  80. package/lib/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js.map +1 -0
  81. package/lib/components/TreeItemPersonaLayout/TreeItemPersonaLayout.js +6 -8
  82. package/lib/components/TreeItemPersonaLayout/TreeItemPersonaLayout.js.map +1 -1
  83. package/lib/components/TreeItemPersonaLayout/TreeItemPersonaLayout.types.js +1 -2
  84. package/lib/components/TreeItemPersonaLayout/TreeItemPersonaLayout.types.js.map +1 -1
  85. package/lib/components/TreeItemPersonaLayout/index.js +1 -2
  86. package/lib/components/TreeItemPersonaLayout/index.js.map +1 -1
  87. package/lib/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js +10 -15
  88. package/lib/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js.map +1 -1
  89. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js +41 -48
  90. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js.map +1 -1
  91. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutContextValues.js +9 -10
  92. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutContextValues.js.map +1 -1
  93. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js +210 -0
  94. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js.map +1 -0
  95. package/lib/contexts/index.js +0 -1
  96. package/lib/contexts/index.js.map +1 -1
  97. package/lib/contexts/treeContext.js +13 -14
  98. package/lib/contexts/treeContext.js.map +1 -1
  99. package/lib/contexts/treeItemContext.js +16 -8
  100. package/lib/contexts/treeItemContext.js.map +1 -1
  101. package/lib/hooks/useControllableOpenItems.js +28 -0
  102. package/lib/hooks/useControllableOpenItems.js.map +1 -0
  103. package/lib/hooks/useRootTree.js +147 -0
  104. package/lib/hooks/useRootTree.js.map +1 -0
  105. package/lib/hooks/useRovingTabIndexes.js +30 -49
  106. package/lib/hooks/useRovingTabIndexes.js.map +1 -1
  107. package/lib/hooks/useSubtree.js +41 -0
  108. package/lib/hooks/useSubtree.js.map +1 -0
  109. package/lib/index.js +3 -4
  110. package/lib/index.js.map +1 -1
  111. package/lib/utils/ImmutableMap.js +41 -0
  112. package/lib/utils/ImmutableMap.js.map +1 -0
  113. package/lib/utils/ImmutableSet.js +42 -33
  114. package/lib/utils/ImmutableSet.js.map +1 -1
  115. package/lib/utils/assert.js +4 -5
  116. package/lib/utils/assert.js.map +1 -1
  117. package/lib/utils/createCheckedItems.js +18 -0
  118. package/lib/utils/createCheckedItems.js.map +1 -0
  119. package/lib/utils/createHTMLElementWalker.js +67 -0
  120. package/lib/utils/createHTMLElementWalker.js.map +1 -0
  121. package/lib/utils/createHeadlessTree.js +188 -0
  122. package/lib/utils/createHeadlessTree.js.map +1 -0
  123. package/lib/utils/createOpenItems.js +10 -0
  124. package/lib/utils/createOpenItems.js.map +1 -0
  125. package/lib/utils/flattenTree.js +53 -27
  126. package/lib/utils/flattenTree.js.map +1 -1
  127. package/lib/utils/getTreeItemValueFromElement.js +4 -0
  128. package/lib/utils/getTreeItemValueFromElement.js.map +1 -0
  129. package/lib/utils/nextTypeAheadElement.js +11 -12
  130. package/lib/utils/nextTypeAheadElement.js.map +1 -1
  131. package/lib/utils/normalizeOpenItems.js +6 -5
  132. package/lib/utils/normalizeOpenItems.js.map +1 -1
  133. package/lib/utils/tokens.js +14 -14
  134. package/lib/utils/tokens.js.map +1 -1
  135. package/lib/utils/treeItemFilter.js +2 -3
  136. package/lib/utils/treeItemFilter.js.map +1 -1
  137. package/lib-commonjs/FlatTree.js +6 -0
  138. package/lib-commonjs/FlatTree.js.map +1 -0
  139. package/lib-commonjs/Tree.js +0 -3
  140. package/lib-commonjs/Tree.js.map +1 -1
  141. package/lib-commonjs/TreeItem.js +0 -3
  142. package/lib-commonjs/TreeItem.js.map +1 -1
  143. package/lib-commonjs/TreeItemLayout.js +0 -3
  144. package/lib-commonjs/TreeItemLayout.js.map +1 -1
  145. package/lib-commonjs/TreeItemPersonaLayout.js +0 -3
  146. package/lib-commonjs/TreeItemPersonaLayout.js.map +1 -1
  147. package/lib-commonjs/components/FlatTree/FlatTree.js +21 -0
  148. package/lib-commonjs/components/FlatTree/FlatTree.js.map +1 -0
  149. package/lib-commonjs/components/FlatTree/FlatTree.types.js +4 -0
  150. package/lib-commonjs/components/FlatTree/FlatTree.types.js.map +1 -0
  151. package/lib-commonjs/components/FlatTree/index.js +12 -0
  152. package/lib-commonjs/components/FlatTree/index.js.map +1 -0
  153. package/lib-commonjs/components/FlatTree/renderFlatTree.js +10 -0
  154. package/lib-commonjs/components/FlatTree/renderFlatTree.js.map +1 -0
  155. package/lib-commonjs/components/FlatTree/useFlatControllableCheckedItems.js +91 -0
  156. package/lib-commonjs/components/FlatTree/useFlatControllableCheckedItems.js.map +1 -0
  157. package/lib-commonjs/components/FlatTree/useFlatTree.js +12 -0
  158. package/lib-commonjs/components/FlatTree/useFlatTree.js.map +1 -0
  159. package/lib-commonjs/components/FlatTree/useFlatTreeContextValues.js +10 -0
  160. package/lib-commonjs/components/FlatTree/useFlatTreeContextValues.js.map +1 -0
  161. package/lib-commonjs/components/FlatTree/useFlatTreeNavigation.js +82 -0
  162. package/lib-commonjs/components/FlatTree/useFlatTreeNavigation.js.map +1 -0
  163. package/lib-commonjs/components/FlatTree/useFlatTreeStyles.styles.js +36 -0
  164. package/lib-commonjs/components/FlatTree/useFlatTreeStyles.styles.js.map +1 -0
  165. package/lib-commonjs/components/FlatTree/useHeadlessFlatTree.js +121 -0
  166. package/lib-commonjs/components/FlatTree/useHeadlessFlatTree.js.map +1 -0
  167. package/lib-commonjs/components/Tree/Tree.js +4 -6
  168. package/lib-commonjs/components/Tree/Tree.js.map +1 -1
  169. package/lib-commonjs/components/Tree/Tree.types.js +0 -5
  170. package/lib-commonjs/components/Tree/Tree.types.js.map +1 -1
  171. package/lib-commonjs/components/Tree/index.js +2 -5
  172. package/lib-commonjs/components/Tree/index.js.map +1 -1
  173. package/lib-commonjs/components/Tree/renderTree.js +6 -9
  174. package/lib-commonjs/components/Tree/renderTree.js.map +1 -1
  175. package/lib-commonjs/components/Tree/useNestedControllableCheckedItems.js +37 -0
  176. package/lib-commonjs/components/Tree/useNestedControllableCheckedItems.js.map +1 -0
  177. package/lib-commonjs/components/Tree/useTree.js +53 -85
  178. package/lib-commonjs/components/Tree/useTree.js.map +1 -1
  179. package/lib-commonjs/components/Tree/useTreeContextValues.js +9 -10
  180. package/lib-commonjs/components/Tree/useTreeContextValues.js.map +1 -1
  181. package/lib-commonjs/components/Tree/useTreeNavigation.js +60 -0
  182. package/lib-commonjs/components/Tree/useTreeNavigation.js.map +1 -0
  183. package/lib-commonjs/components/Tree/{useTreeStyles.js → useTreeStyles.styles.js} +10 -7
  184. package/lib-commonjs/components/Tree/useTreeStyles.styles.js.map +1 -0
  185. package/lib-commonjs/components/TreeItem/TreeItem.js +3 -5
  186. package/lib-commonjs/components/TreeItem/TreeItem.js.map +1 -1
  187. package/lib-commonjs/components/TreeItem/TreeItem.types.js +0 -3
  188. package/lib-commonjs/components/TreeItem/TreeItem.types.js.map +1 -1
  189. package/lib-commonjs/components/TreeItem/index.js +2 -4
  190. package/lib-commonjs/components/TreeItem/index.js.map +1 -1
  191. package/lib-commonjs/components/TreeItem/renderTreeItem.js +6 -12
  192. package/lib-commonjs/components/TreeItem/renderTreeItem.js.map +1 -1
  193. package/lib-commonjs/components/TreeItem/useTreeItem.js +111 -170
  194. package/lib-commonjs/components/TreeItem/useTreeItem.js.map +1 -1
  195. package/lib-commonjs/components/TreeItem/useTreeItemContextValues.js +19 -18
  196. package/lib-commonjs/components/TreeItem/useTreeItemContextValues.js.map +1 -1
  197. package/lib-commonjs/components/TreeItem/useTreeItemStyles.styles.js +202 -0
  198. package/lib-commonjs/components/TreeItem/useTreeItemStyles.styles.js.map +1 -0
  199. package/lib-commonjs/components/TreeItemChevron.js +33 -0
  200. package/lib-commonjs/components/TreeItemChevron.js.map +1 -0
  201. package/lib-commonjs/components/TreeItemLayout/TreeItemLayout.js +3 -5
  202. package/lib-commonjs/components/TreeItemLayout/TreeItemLayout.js.map +1 -1
  203. package/lib-commonjs/components/TreeItemLayout/TreeItemLayout.types.js +0 -3
  204. package/lib-commonjs/components/TreeItemLayout/TreeItemLayout.types.js.map +1 -1
  205. package/lib-commonjs/components/TreeItemLayout/index.js +1 -4
  206. package/lib-commonjs/components/TreeItemLayout/index.js.map +1 -1
  207. package/lib-commonjs/components/TreeItemLayout/renderTreeItemLayout.js +8 -9
  208. package/lib-commonjs/components/TreeItemLayout/renderTreeItemLayout.js.map +1 -1
  209. package/lib-commonjs/components/TreeItemLayout/useTreeItemLayout.js +92 -18
  210. package/lib-commonjs/components/TreeItemLayout/useTreeItemLayout.js.map +1 -1
  211. package/lib-commonjs/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js +392 -0
  212. package/lib-commonjs/components/TreeItemLayout/useTreeItemLayoutStyles.styles.js.map +1 -0
  213. package/lib-commonjs/components/TreeItemPersonaLayout/TreeItemPersonaLayout.js +3 -5
  214. package/lib-commonjs/components/TreeItemPersonaLayout/TreeItemPersonaLayout.js.map +1 -1
  215. package/lib-commonjs/components/TreeItemPersonaLayout/TreeItemPersonaLayout.types.js +0 -3
  216. package/lib-commonjs/components/TreeItemPersonaLayout/TreeItemPersonaLayout.types.js.map +1 -1
  217. package/lib-commonjs/components/TreeItemPersonaLayout/index.js +1 -4
  218. package/lib-commonjs/components/TreeItemPersonaLayout/index.js.map +1 -1
  219. package/lib-commonjs/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js +9 -10
  220. package/lib-commonjs/components/TreeItemPersonaLayout/renderTreeItemPersonaLayout.js.map +1 -1
  221. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js +29 -26
  222. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayout.js.map +1 -1
  223. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutContextValues.js +1 -3
  224. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutContextValues.js.map +1 -1
  225. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js +379 -0
  226. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.styles.js.map +1 -0
  227. package/lib-commonjs/contexts/index.js +0 -3
  228. package/lib-commonjs/contexts/index.js.map +1 -1
  229. package/lib-commonjs/contexts/treeContext.js +7 -7
  230. package/lib-commonjs/contexts/treeContext.js.map +1 -1
  231. package/lib-commonjs/contexts/treeItemContext.js +15 -6
  232. package/lib-commonjs/contexts/treeItemContext.js.map +1 -1
  233. package/lib-commonjs/hooks/useControllableOpenItems.js +39 -0
  234. package/lib-commonjs/hooks/useControllableOpenItems.js.map +1 -0
  235. package/lib-commonjs/hooks/useRootTree.js +151 -0
  236. package/lib-commonjs/hooks/useRootTree.js.map +1 -0
  237. package/lib-commonjs/hooks/useRovingTabIndexes.js +9 -31
  238. package/lib-commonjs/hooks/useRovingTabIndexes.js.map +1 -1
  239. package/lib-commonjs/hooks/useSubtree.js +45 -0
  240. package/lib-commonjs/hooks/useSubtree.js.map +1 -0
  241. package/lib-commonjs/index.js +11 -7
  242. package/lib-commonjs/index.js.map +1 -1
  243. package/lib-commonjs/utils/ImmutableMap.js +49 -0
  244. package/lib-commonjs/utils/ImmutableMap.js.map +1 -0
  245. package/lib-commonjs/utils/ImmutableSet.js +28 -20
  246. package/lib-commonjs/utils/ImmutableSet.js.map +1 -1
  247. package/lib-commonjs/utils/assert.js +1 -3
  248. package/lib-commonjs/utils/assert.js.map +1 -1
  249. package/lib-commonjs/utils/createCheckedItems.js +26 -0
  250. package/lib-commonjs/utils/createCheckedItems.js.map +1 -0
  251. package/lib-commonjs/{hooks/useHTMLElementWalker.js → utils/createHTMLElementWalker.js} +3 -27
  252. package/lib-commonjs/utils/createHTMLElementWalker.js.map +1 -0
  253. package/lib-commonjs/utils/createHeadlessTree.js +202 -0
  254. package/lib-commonjs/utils/createHeadlessTree.js.map +1 -0
  255. package/lib-commonjs/utils/createOpenItems.js +18 -0
  256. package/lib-commonjs/utils/createOpenItems.js.map +1 -0
  257. package/lib-commonjs/utils/flattenTree.js +8 -17
  258. package/lib-commonjs/utils/flattenTree.js.map +1 -1
  259. package/lib-commonjs/utils/getTreeItemValueFromElement.js +18 -0
  260. package/lib-commonjs/utils/getTreeItemValueFromElement.js.map +1 -0
  261. package/lib-commonjs/utils/nextTypeAheadElement.js +1 -3
  262. package/lib-commonjs/utils/nextTypeAheadElement.js.map +1 -1
  263. package/lib-commonjs/utils/normalizeOpenItems.js +1 -3
  264. package/lib-commonjs/utils/normalizeOpenItems.js.map +1 -1
  265. package/lib-commonjs/utils/tokens.js +12 -13
  266. package/lib-commonjs/utils/tokens.js.map +1 -1
  267. package/lib-commonjs/utils/treeItemFilter.js +1 -3
  268. package/lib-commonjs/utils/treeItemFilter.js.map +1 -1
  269. package/package.json +31 -31
  270. package/.swcrc +0 -30
  271. package/lib/components/Tree/useTreeStyles.js.map +0 -1
  272. package/lib/components/TreeItem/useTreeItemStyles.js +0 -203
  273. package/lib/components/TreeItem/useTreeItemStyles.js.map +0 -1
  274. package/lib/components/TreeItemLayout/useTreeItemLayoutStyles.js +0 -98
  275. package/lib/components/TreeItemLayout/useTreeItemLayoutStyles.js.map +0 -1
  276. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.js +0 -115
  277. package/lib/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.js.map +0 -1
  278. package/lib/hooks/index.js +0 -4
  279. package/lib/hooks/index.js.map +0 -1
  280. package/lib/hooks/useFlatTree.js +0 -69
  281. package/lib/hooks/useFlatTree.js.map +0 -1
  282. package/lib/hooks/useFlatTreeNavigation.js +0 -74
  283. package/lib/hooks/useFlatTreeNavigation.js.map +0 -1
  284. package/lib/hooks/useHTMLElementWalker.js +0 -80
  285. package/lib/hooks/useHTMLElementWalker.js.map +0 -1
  286. package/lib/hooks/useNestedTreeNavigation.js +0 -59
  287. package/lib/hooks/useNestedTreeNavigation.js.map +0 -1
  288. package/lib/hooks/useOpenItemsState.js +0 -22
  289. package/lib/hooks/useOpenItemsState.js.map +0 -1
  290. package/lib/utils/createFlatTreeItems.js +0 -109
  291. package/lib/utils/createFlatTreeItems.js.map +0 -1
  292. package/lib-commonjs/components/Tree/useTreeStyles.js.map +0 -1
  293. package/lib-commonjs/components/TreeItem/useTreeItemStyles.js +0 -375
  294. package/lib-commonjs/components/TreeItem/useTreeItemStyles.js.map +0 -1
  295. package/lib-commonjs/components/TreeItemLayout/useTreeItemLayoutStyles.js +0 -143
  296. package/lib-commonjs/components/TreeItemLayout/useTreeItemLayoutStyles.js.map +0 -1
  297. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.js +0 -186
  298. package/lib-commonjs/components/TreeItemPersonaLayout/useTreeItemPersonaLayoutStyles.js.map +0 -1
  299. package/lib-commonjs/hooks/index.js +0 -11
  300. package/lib-commonjs/hooks/index.js.map +0 -1
  301. package/lib-commonjs/hooks/useFlatTree.js +0 -78
  302. package/lib-commonjs/hooks/useFlatTree.js.map +0 -1
  303. package/lib-commonjs/hooks/useFlatTreeNavigation.js +0 -82
  304. package/lib-commonjs/hooks/useFlatTreeNavigation.js.map +0 -1
  305. package/lib-commonjs/hooks/useHTMLElementWalker.js.map +0 -1
  306. package/lib-commonjs/hooks/useNestedTreeNavigation.js +0 -69
  307. package/lib-commonjs/hooks/useNestedTreeNavigation.js.map +0 -1
  308. package/lib-commonjs/hooks/useOpenItemsState.js +0 -39
  309. package/lib-commonjs/hooks/useOpenItemsState.js.map +0 -1
  310. package/lib-commonjs/utils/createFlatTreeItems.js +0 -126
  311. package/lib-commonjs/utils/createFlatTreeItems.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__styles","mergeClasses","tokens","createFocusOutlineStyle","treeItemLevelToken","treeItemClassNames","root","useRootStyles","level1","iytv0q","level2","level3","level4","level5","level6","level7","level8","level9","level10","base","qhf8xq","Bceei9c","mc9l5x","Beiy3e4","B7ck84d","De3pzq","sj55zd","z189sj","focusIndicator","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bule8hv","Bjwuhne","Ghsupd","d","f","i","useTreeItemStyles_unstable","state","rootStyles","level","className","isStaticallyDefinedLevel"],"sources":["useTreeItemStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { treeItemLevelToken } from '../../utils/tokens';\nexport const treeItemClassNames = {\n root: 'fui-TreeItem'\n};\nconst useRootStyles = makeStyles({\n ...Object.fromEntries(Array.from({\n length: 10\n }, (_, index)=>[\n `level${index + 1}`,\n {\n [treeItemLevelToken]: index + 1\n }\n ])),\n base: {\n position: 'relative',\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'column',\n boxSizing: 'border-box',\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForeground2,\n paddingRight: tokens.spacingHorizontalNone\n },\n focusIndicator: createFocusOutlineStyle()\n});\n/**\n * Apply styling to the TreeItem slots based on the state\n */ export const useTreeItemStyles_unstable = (state)=>{\n const rootStyles = useRootStyles();\n const { level } = state;\n state.root.className = mergeClasses(treeItemClassNames.root, isStaticallyDefinedLevel(level) && rootStyles[`level${level}`], rootStyles.base, rootStyles.focusIndicator, state.root.className);\n return state;\n};\nfunction isStaticallyDefinedLevel(level) {\n return level >= 1 && level <= 10;\n}\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,aAAa,gBAAGP,QAAA;EAAAQ,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAD,MAAA;EAAA;EAAAE,MAAA;IAAAF,MAAA;EAAA;EAAAG,MAAA;IAAAH,MAAA;EAAA;EAAAI,MAAA;IAAAJ,MAAA;EAAA;EAAAK,MAAA;IAAAL,MAAA;EAAA;EAAAM,MAAA;IAAAN,MAAA;EAAA;EAAAO,MAAA;IAAAP,MAAA;EAAA;EAAAQ,MAAA;IAAAR,MAAA;EAAA;EAAAS,OAAA;IAAAT,MAAA;EAAA;EAAAU,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,cAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;EAAAC,CAAA;EAAAC,CAAA;AAAA,CAoBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,0BAA0B,GAAIC,KAAK,IAAG;EACnD,MAAMC,UAAU,GAAGzD,aAAa,CAAC,CAAC;EAClC,MAAM;IAAE0D;EAAO,CAAC,GAAGF,KAAK;EACxBA,KAAK,CAACzD,IAAI,CAAC4D,SAAS,GAAGjE,YAAY,CAACI,kBAAkB,CAACC,IAAI,EAAE6D,wBAAwB,CAACF,KAAK,CAAC,IAAID,UAAU,CAAE,QAAOC,KAAM,EAAC,CAAC,EAAED,UAAU,CAAC7C,IAAI,EAAE6C,UAAU,CAACpC,cAAc,EAAEmC,KAAK,CAACzD,IAAI,CAAC4D,SAAS,CAAC;EAC9L,OAAOH,KAAK;AAChB,CAAC;AACD,SAASI,wBAAwBA,CAACF,KAAK,EAAE;EACrC,OAAOA,KAAK,IAAI,CAAC,IAAIA,KAAK,IAAI,EAAE;AACpC"}
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import { useFluent_unstable } from '@fluentui/react-shared-contexts';
3
+ import { ChevronRight12Regular } from '@fluentui/react-icons';
4
+ import { useTreeItemContext_unstable } from '../contexts/treeItemContext';
5
+ export const TreeItemChevron = /*#__PURE__*/ React.memo(()=>{
6
+ const open = useTreeItemContext_unstable((ctx)=>ctx.open);
7
+ const { dir } = useFluent_unstable();
8
+ const expandIconRotation = open ? 90 : dir !== 'rtl' ? 0 : 180;
9
+ return /*#__PURE__*/ React.createElement(ChevronRight12Regular, {
10
+ style: expandIconInlineStyles[expandIconRotation]
11
+ });
12
+ });
13
+ TreeItemChevron.displayName = 'TreeItemChevron';
14
+ const expandIconInlineStyles = {
15
+ 90: {
16
+ transform: `rotate(90deg)`
17
+ },
18
+ 0: {
19
+ transform: `rotate(0deg)`
20
+ },
21
+ 180: {
22
+ transform: `rotate(180deg)`
23
+ }
24
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["TreeItemChevron.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { ChevronRight12Regular } from '@fluentui/react-icons';\nimport { useTreeItemContext_unstable } from '../contexts/treeItemContext';\n\nexport const TreeItemChevron = React.memo(() => {\n const open = useTreeItemContext_unstable(ctx => ctx.open);\n\n const { dir } = useFluent_unstable();\n\n const expandIconRotation = open ? 90 : dir !== 'rtl' ? 0 : 180;\n return <ChevronRight12Regular style={expandIconInlineStyles[expandIconRotation]} />;\n});\nTreeItemChevron.displayName = 'TreeItemChevron';\n\nconst expandIconInlineStyles = {\n 90: { transform: `rotate(90deg)` },\n 0: { transform: `rotate(0deg)` },\n 180: { transform: `rotate(180deg)` },\n} as const;\n"],"names":["React","useFluent_unstable","ChevronRight12Regular","useTreeItemContext_unstable","TreeItemChevron","memo","open","ctx","dir","expandIconRotation","style","expandIconInlineStyles","displayName","transform"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,qBAAqB,QAAQ,wBAAwB;AAC9D,SAASC,2BAA2B,QAAQ,8BAA8B;AAE1E,OAAO,MAAMC,gCAAkBJ,MAAMK,IAAI,CAAC,IAAM;IAC9C,MAAMC,OAAOH,4BAA4BI,CAAAA,MAAOA,IAAID,IAAI;IAExD,MAAM,EAAEE,IAAG,EAAE,GAAGP;IAEhB,MAAMQ,qBAAqBH,OAAO,KAAKE,QAAQ,QAAQ,IAAI,GAAG;IAC9D,qBAAO,oBAACN;QAAsBQ,OAAOC,sBAAsB,CAACF,mBAAmB;;AACjF,GAAG;AACHL,gBAAgBQ,WAAW,GAAG;AAE9B,MAAMD,yBAAyB;IAC7B,IAAI;QAAEE,WAAW,CAAC,aAAa,CAAC;IAAC;IACjC,GAAG;QAAEA,WAAW,CAAC,YAAY,CAAC;IAAC;IAC/B,KAAK;QAAEA,WAAW,CAAC,cAAc,CAAC;IAAC;AACrC"}
@@ -1,16 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { useTreeItemLayout_unstable } from './useTreeItemLayout';
3
3
  import { renderTreeItemLayout_unstable } from './renderTreeItemLayout';
4
- import { useTreeItemLayoutStyles_unstable } from './useTreeItemLayoutStyles';
4
+ import { useTreeItemLayoutStyles_unstable } from './useTreeItemLayoutStyles.styles';
5
5
  /**
6
6
  * The `TreeItemLayout` component is used as a child of `TreeItem` to define the content and layout of a tree item.
7
7
  * It provides a consistent visual structure for tree items in a `Tree` component.
8
8
  * This component should only be used as a direct child of `TreeItem`.
9
- */
10
- export const TreeItemLayout = /*#__PURE__*/React.forwardRef((props, ref) => {
11
- const state = useTreeItemLayout_unstable(props, ref);
12
- useTreeItemLayoutStyles_unstable(state);
13
- return renderTreeItemLayout_unstable(state);
9
+ */ export const TreeItemLayout = /*#__PURE__*/ React.forwardRef((props, ref)=>{
10
+ const state = useTreeItemLayout_unstable(props, ref);
11
+ useTreeItemLayoutStyles_unstable(state);
12
+ return renderTreeItemLayout_unstable(state);
14
13
  });
15
14
  TreeItemLayout.displayName = 'TreeItemLayout';
16
- //# sourceMappingURL=TreeItemLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useTreeItemLayout_unstable","renderTreeItemLayout_unstable","useTreeItemLayoutStyles_unstable","TreeItemLayout","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/TreeItemLayout/TreeItemLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTreeItemLayout_unstable } from './useTreeItemLayout';\nimport { renderTreeItemLayout_unstable } from './renderTreeItemLayout';\nimport { useTreeItemLayoutStyles_unstable } from './useTreeItemLayoutStyles';\nimport type { TreeItemLayoutProps } from './TreeItemLayout.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * The `TreeItemLayout` component is used as a child of `TreeItem` to define the content and layout of a tree item.\n * It provides a consistent visual structure for tree items in a `Tree` component.\n * This component should only be used as a direct child of `TreeItem`.\n */\nexport const TreeItemLayout: ForwardRefComponent<TreeItemLayoutProps> = React.forwardRef((props, ref) => {\n const state = useTreeItemLayout_unstable(props, ref);\n\n useTreeItemLayoutStyles_unstable(state);\n return renderTreeItemLayout_unstable(state);\n});\n\nTreeItemLayout.displayName = 'TreeItemLayout';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,gCAAgC,QAAQ;AAIjD;;;;;AAKA,OAAO,MAAMC,cAAA,gBAA2DJ,KAAA,CAAMK,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACvG,MAAMC,KAAA,GAAQP,0BAAA,CAA2BK,KAAA,EAAOC,GAAA;EAEhDJ,gCAAA,CAAiCK,KAAA;EACjC,OAAON,6BAAA,CAA8BM,KAAA;AACvC;AAEAJ,cAAA,CAAeK,WAAW,GAAG"}
1
+ {"version":3,"sources":["TreeItemLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTreeItemLayout_unstable } from './useTreeItemLayout';\nimport { renderTreeItemLayout_unstable } from './renderTreeItemLayout';\nimport { useTreeItemLayoutStyles_unstable } from './useTreeItemLayoutStyles.styles';\nimport type { TreeItemLayoutProps } from './TreeItemLayout.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * The `TreeItemLayout` component is used as a child of `TreeItem` to define the content and layout of a tree item.\n * It provides a consistent visual structure for tree items in a `Tree` component.\n * This component should only be used as a direct child of `TreeItem`.\n */\nexport const TreeItemLayout: ForwardRefComponent<TreeItemLayoutProps> = React.forwardRef((props, ref) => {\n const state = useTreeItemLayout_unstable(props, ref);\n\n useTreeItemLayoutStyles_unstable(state);\n return renderTreeItemLayout_unstable(state);\n});\n\nTreeItemLayout.displayName = 'TreeItemLayout';\n"],"names":["React","useTreeItemLayout_unstable","renderTreeItemLayout_unstable","useTreeItemLayoutStyles_unstable","TreeItemLayout","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AAIpF;;;;CAIC,GACD,OAAO,MAAMC,+BAA2DJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvG,MAAMC,QAAQP,2BAA2BK,OAAOC;IAEhDJ,iCAAiCK;IACjC,OAAON,8BAA8BM;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=TreeItemLayout.types.js.map
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/TreeItemLayout/TreeItemLayout.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TreeItemContextValue } from '../../contexts/treeItemContext';\n\nexport type TreeItemLayoutSlots = {\n root: Slot<'div'>;\n /**\n * Icon slot that renders right before main content\n */\n iconBefore?: Slot<'span'>;\n /**\n * Icon slot that renders right after main content\n */\n iconAfter?: Slot<'span'>;\n aside?: Slot<'span'>;\n};\n\n/**\n * TreeItemLayout Props\n */\nexport type TreeItemLayoutProps = ComponentProps<Partial<TreeItemLayoutSlots>>;\n\n/**\n * State used in rendering TreeItemLayout\n */\nexport type TreeItemLayoutState = ComponentState<TreeItemLayoutSlots> & TreeItemContextValue;\n"],"mappings":"AAAA"}
1
+ {"version":3,"sources":["TreeItemLayout.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { ButtonContextValue } from '@fluentui/react-button';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\n\nexport type TreeItemLayoutSlots = {\n root: Slot<'div'>;\n /**\n * Content. Children of the root slot are automatically rendered here\n */\n main: NonNullable<Slot<'div'>>;\n /**\n * Icon slot that renders right before main content\n */\n iconBefore?: Slot<'div'>;\n /**\n * Icon slot that renders right after main content\n */\n iconAfter?: Slot<'div'>;\n /**\n * Expand icon slot,\n * by default renders a chevron icon to indicate opening and closing\n */\n expandIcon?: Slot<'div'>;\n /**\n * Aside content is normally used to render a badge or other non-actionable content\n * It is aria-hidden by default and is only meant to be used as visual aid.\n */\n aside?: Slot<'div'>;\n /**\n * Actionable elements are normally buttons, menus, or other focusable elements.\n * Those elements are only visibly available if the given tree item is currently active.\n *\n * `actions` and `aside` slots are positioned on the exact same spot,\n * so they won't be visible at the same time.\n * `aside` slot is visible by default meanwhile `actions` slot are only visible when the tree item is active.\n *\n * `actions` slot supports a `visible` prop to force visibility of the actions.\n */\n actions?: Slot<\n ExtractSlotProps<\n Slot<'div'> & {\n /**\n * Forces visibility of the aside/action content\n */\n visible?: boolean;\n }\n >\n >;\n selector?: Slot<typeof Checkbox> | Slot<typeof Radio>;\n};\n\n/**\n * TreeItemLayout Props\n */\nexport type TreeItemLayoutProps = ComponentProps<Partial<TreeItemLayoutSlots>>;\n\n/**\n * State used in rendering TreeItemLayout\n */\nexport type TreeItemLayoutState = ComponentState<TreeItemLayoutSlots> & {\n buttonContextValue: ButtonContextValue;\n};\n"],"names":[],"mappings":"AAAA,WA8DE"}
@@ -2,5 +2,4 @@ export * from './TreeItemLayout';
2
2
  export * from './TreeItemLayout.types';
3
3
  export * from './renderTreeItemLayout';
4
4
  export * from './useTreeItemLayout';
5
- export * from './useTreeItemLayoutStyles';
6
- //# sourceMappingURL=index.js.map
5
+ export * from './useTreeItemLayoutStyles.styles';
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/TreeItemLayout/index.ts"],"sourcesContent":["export * from './TreeItemLayout';\nexport * from './TreeItemLayout.types';\nexport * from './renderTreeItemLayout';\nexport * from './useTreeItemLayout';\nexport * from './useTreeItemLayoutStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TreeItemLayout';\nexport * from './TreeItemLayout.types';\nexport * from './renderTreeItemLayout';\nexport * from './useTreeItemLayout';\nexport * from './useTreeItemLayoutStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,mCAAmC"}
@@ -1,16 +1,11 @@
1
- import * as React from 'react';
2
- import { getSlots } from '@fluentui/react-utilities';
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
+ import { ButtonContextProvider } from '@fluentui/react-button';
3
4
  /**
4
5
  * Render the final JSX of TreeItemLayout
5
- */
6
- export const renderTreeItemLayout_unstable = state => {
7
- const {
8
- isActionsVisible
9
- } = state;
10
- const {
11
- slots,
12
- slotProps
13
- } = getSlots(state);
14
- return /*#__PURE__*/React.createElement(slots.root, slotProps.root, slots.iconBefore && /*#__PURE__*/React.createElement(slots.iconBefore, slotProps.iconBefore), slotProps.root.children, slots.iconAfter && /*#__PURE__*/React.createElement(slots.iconAfter, slotProps.iconAfter), !isActionsVisible && slots.aside && /*#__PURE__*/React.createElement(slots.aside, slotProps.aside));
6
+ */ export const renderTreeItemLayout_unstable = (state)=>{
7
+ assertSlots(state);
8
+ return /*#__PURE__*/ createElement(state.root, null, state.expandIcon && /*#__PURE__*/ createElement(state.expandIcon, null), state.selector && /*#__PURE__*/ createElement(state.selector, null), state.iconBefore && /*#__PURE__*/ createElement(state.iconBefore, null), /*#__PURE__*/ createElement(state.main, null, state.root.children), state.iconAfter && /*#__PURE__*/ createElement(state.iconAfter, null), /*#__PURE__*/ createElement(ButtonContextProvider, {
9
+ value: state.buttonContextValue
10
+ }, state.actions && /*#__PURE__*/ createElement(state.actions, null), state.aside && /*#__PURE__*/ createElement(state.aside, null)));
15
11
  };
16
- //# sourceMappingURL=renderTreeItemLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getSlots","renderTreeItemLayout_unstable","state","isActionsVisible","slots","slotProps","createElement","root","iconBefore","children","iconAfter","aside"],"sources":["../../../src/components/TreeItemLayout/renderTreeItemLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TreeItemLayoutState, TreeItemLayoutSlots } from './TreeItemLayout.types';\n\n/**\n * Render the final JSX of TreeItemLayout\n */\nexport const renderTreeItemLayout_unstable = (state: TreeItemLayoutState) => {\n const { isActionsVisible } = state;\n const { slots, slotProps } = getSlots<TreeItemLayoutSlots>(state);\n return (\n <slots.root {...slotProps.root}>\n {slots.iconBefore && <slots.iconBefore {...slotProps.iconBefore} />}\n {slotProps.root.children}\n {slots.iconAfter && <slots.iconAfter {...slotProps.iconAfter} />}\n {!isActionsVisible && slots.aside && <slots.aside {...slotProps.aside} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,6BAAA,GAAiCC,KAAA,IAA+B;EAC3E,MAAM;IAAEC;EAAgB,CAAE,GAAGD,KAAA;EAC7B,MAAM;IAAEE,KAAA;IAAOC;EAAS,CAAE,GAAGL,QAAA,CAA8BE,KAAA;EAC3D,oBACEH,KAAA,CAAAO,aAAA,CAACF,KAAA,CAAMG,IAAI,EAAKF,SAAA,CAAUE,IAAI,EAC3BH,KAAA,CAAMI,UAAU,iBAAIT,KAAA,CAAAO,aAAA,CAACF,KAAA,CAAMI,UAAU,EAAKH,SAAA,CAAUG,UAAU,GAC9DH,SAAA,CAAUE,IAAI,CAACE,QAAQ,EACvBL,KAAA,CAAMM,SAAS,iBAAIX,KAAA,CAAAO,aAAA,CAACF,KAAA,CAAMM,SAAS,EAAKL,SAAA,CAAUK,SAAS,GAC3D,CAACP,gBAAA,IAAoBC,KAAA,CAAMO,KAAK,iBAAIZ,KAAA,CAAAO,aAAA,CAACF,KAAA,CAAMO,KAAK,EAAKN,SAAA,CAAUM,KAAK;AAG3E"}
1
+ {"version":3,"sources":["renderTreeItemLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TreeItemLayoutState, TreeItemLayoutSlots } from './TreeItemLayout.types';\nimport { ButtonContextProvider } from '@fluentui/react-button';\n\n/**\n * Render the final JSX of TreeItemLayout\n */\nexport const renderTreeItemLayout_unstable = (state: TreeItemLayoutState) => {\n assertSlots<TreeItemLayoutSlots>(state);\n\n return (\n <state.root>\n {state.expandIcon && <state.expandIcon />}\n {state.selector && <state.selector />}\n {state.iconBefore && <state.iconBefore />}\n <state.main>{state.root.children}</state.main>\n {state.iconAfter && <state.iconAfter />}\n <ButtonContextProvider value={state.buttonContextValue}>\n {state.actions && <state.actions />}\n {state.aside && <state.aside />}\n </ButtonContextProvider>\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","ButtonContextProvider","renderTreeItemLayout_unstable","state","root","expandIcon","selector","iconBefore","main","children","iconAfter","value","buttonContextValue","actions","aside"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,qBAAqB,QAAQ,yBAAyB;AAE/D;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC,QAA+B;IAC3EH,YAAiCG;IAEjC,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAME,UAAU,kBAAI,AAf3B,cAe4BF,MAAME,UAAU,SACrCF,MAAMG,QAAQ,kBAAI,AAhBzB,cAgB0BH,MAAMG,QAAQ,SACjCH,MAAMI,UAAU,kBAAI,AAjB3B,cAiB4BJ,MAAMI,UAAU,uBACtC,AAlBN,cAkBOJ,MAAMK,IAAI,QAAEL,MAAMC,IAAI,CAACK,QAAQ,GAC/BN,MAAMO,SAAS,kBAAI,AAnB1B,cAmB2BP,MAAMO,SAAS,uBACpC,AApBN,cAoBOT;QAAsBU,OAAOR,MAAMS,kBAAkB;OACnDT,MAAMU,OAAO,kBAAI,AArB1B,cAqB2BV,MAAMU,OAAO,SAC/BV,MAAMW,KAAK,kBAAI,AAtBxB,cAsByBX,MAAMW,KAAK;AAIpC,EAAE"}
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
3
- import { useTreeItemContext_unstable } from '../../contexts/treeItemContext';
2
+ import { getNativeElementProps, isResolvedShorthand, useMergedRefs, slot } from '@fluentui/react-utilities';
3
+ import { useTreeItemContext_unstable, useTreeContext_unstable } from '../../contexts';
4
+ import { Checkbox } from '@fluentui/react-checkbox';
5
+ import { Radio } from '@fluentui/react-radio';
6
+ import { TreeItemChevron } from '../TreeItemChevron';
7
+ import { useArrowNavigationGroup } from '@fluentui/react-tabster';
4
8
  /**
5
9
  * Create the state required to render TreeItemLayout.
6
10
  *
@@ -9,42 +13,107 @@ import { useTreeItemContext_unstable } from '../../contexts/treeItemContext';
9
13
  *
10
14
  * @param props - props from this instance of TreeItemLayout
11
15
  * @param ref - reference to root HTMLElement of TreeItemLayout
12
- */
13
- export const useTreeItemLayout_unstable = (props, ref) => {
14
- const {
15
- iconAfter,
16
- iconBefore,
17
- aside,
18
- as = 'div'
19
- } = props;
20
- const treeItemContext = useTreeItemContext_unstable();
21
- return {
22
- ...treeItemContext,
23
- components: {
24
- root: 'div',
25
- iconBefore: 'span',
26
- iconAfter: 'span',
27
- aside: 'span'
28
- },
29
- root: getNativeElementProps(as, {
30
- ...props,
31
- ref
32
- }),
33
- iconBefore: resolveShorthand(iconBefore, {
34
- defaultProps: {
35
- 'aria-hidden': true
36
- }
37
- }),
38
- iconAfter: resolveShorthand(iconAfter, {
39
- defaultProps: {
40
- 'aria-hidden': true
41
- }
42
- }),
43
- aside: resolveShorthand(aside, {
44
- defaultProps: {
45
- 'aria-hidden': true
46
- }
47
- })
48
- };
16
+ */ export const useTreeItemLayout_unstable = (props, ref)=>{
17
+ const { main , iconAfter , iconBefore , as ='span' } = props;
18
+ const layoutRef = useTreeItemContext_unstable((ctx)=>ctx.layoutRef);
19
+ const selectionMode = useTreeContext_unstable((ctx)=>ctx.selectionMode);
20
+ const [isActionsVisibleExternal, actionsShorthand] = isResolvedShorthand(props.actions) ? [
21
+ props.actions.visible,
22
+ {
23
+ ...props.actions,
24
+ visible: undefined
25
+ }
26
+ ] : [
27
+ undefined,
28
+ props.actions
29
+ ];
30
+ const isActionsVisible = useTreeItemContext_unstable((ctx)=>ctx.isActionsVisible) || isActionsVisibleExternal;
31
+ const isAsideVisible = useTreeItemContext_unstable((ctx)=>ctx.isAsideVisible);
32
+ const selectionRef = useTreeItemContext_unstable((ctx)=>ctx.selectionRef);
33
+ const expandIconRef = useTreeItemContext_unstable((ctx)=>ctx.expandIconRef);
34
+ const actionsRef = useTreeItemContext_unstable((ctx)=>ctx.actionsRef);
35
+ const checked = useTreeItemContext_unstable((ctx)=>ctx.checked);
36
+ const isBranch = useTreeItemContext_unstable((ctx)=>ctx.itemType === 'branch');
37
+ const expandIcon = slot.optional(props.expandIcon, {
38
+ renderByDefault: isBranch,
39
+ defaultProps: {
40
+ children: /*#__PURE__*/ React.createElement(TreeItemChevron, null),
41
+ 'aria-hidden': true
42
+ },
43
+ elementType: 'div'
44
+ });
45
+ const expandIconRefs = useMergedRefs(expandIcon === null || expandIcon === void 0 ? void 0 : expandIcon.ref, expandIconRef);
46
+ if (expandIcon) {
47
+ expandIcon.ref = expandIconRefs;
48
+ }
49
+ const arrowNavigationProps = useArrowNavigationGroup({
50
+ circular: true,
51
+ axis: 'horizontal'
52
+ });
53
+ const actions = isActionsVisible ? slot.optional(actionsShorthand, {
54
+ defaultProps: {
55
+ ...arrowNavigationProps,
56
+ role: 'toolbar'
57
+ },
58
+ elementType: 'div'
59
+ }) : undefined;
60
+ const actionsRefs = useMergedRefs(actions === null || actions === void 0 ? void 0 : actions.ref, actionsRef);
61
+ if (actions) {
62
+ actions.ref = actionsRefs;
63
+ }
64
+ return {
65
+ components: {
66
+ root: 'div',
67
+ expandIcon: 'div',
68
+ iconBefore: 'div',
69
+ main: 'div',
70
+ iconAfter: 'div',
71
+ actions: 'div',
72
+ aside: 'div',
73
+ // Casting here to a union between checkbox and radio
74
+ selector: selectionMode === 'multiselect' ? Checkbox : Radio
75
+ },
76
+ buttonContextValue: {
77
+ size: 'small'
78
+ },
79
+ root: slot.always(getNativeElementProps(as, {
80
+ ...props,
81
+ ref: useMergedRefs(ref, layoutRef)
82
+ }), {
83
+ elementType: 'div'
84
+ }),
85
+ iconBefore: slot.optional(iconBefore, {
86
+ defaultProps: {
87
+ 'aria-hidden': true
88
+ },
89
+ elementType: 'div'
90
+ }),
91
+ main: slot.always(main, {
92
+ elementType: 'div'
93
+ }),
94
+ iconAfter: slot.optional(iconAfter, {
95
+ defaultProps: {
96
+ 'aria-hidden': true
97
+ },
98
+ elementType: 'div'
99
+ }),
100
+ aside: isAsideVisible ? slot.optional(props.aside, {
101
+ defaultProps: {
102
+ 'aria-hidden': true
103
+ },
104
+ elementType: 'div'
105
+ }) : undefined,
106
+ actions,
107
+ expandIcon,
108
+ selector: slot.optional(props.selector, {
109
+ renderByDefault: selectionMode !== 'none',
110
+ defaultProps: {
111
+ checked,
112
+ tabIndex: -1,
113
+ 'aria-hidden': true,
114
+ ref: selectionRef
115
+ },
116
+ elementType: selectionMode === 'multiselect' ? Checkbox : Radio
117
+ })
118
+ };
49
119
  };
50
- //# sourceMappingURL=useTreeItemLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getNativeElementProps","resolveShorthand","useTreeItemContext_unstable","useTreeItemLayout_unstable","props","ref","iconAfter","iconBefore","aside","as","treeItemContext","components","root","defaultProps"],"sources":["../../../src/components/TreeItemLayout/useTreeItemLayout.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TreeItemLayoutProps, TreeItemLayoutState } from './TreeItemLayout.types';\nimport { useTreeItemContext_unstable } from '../../contexts/treeItemContext';\n\n/**\n * Create the state required to render TreeItemLayout.\n *\n * The returned state can be modified with hooks such as useTreeItemLayoutStyles_unstable,\n * before being passed to renderTreeItemLayout_unstable.\n *\n * @param props - props from this instance of TreeItemLayout\n * @param ref - reference to root HTMLElement of TreeItemLayout\n */\nexport const useTreeItemLayout_unstable = (\n props: TreeItemLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TreeItemLayoutState => {\n const { iconAfter, iconBefore, aside, as = 'div' } = props;\n const treeItemContext = useTreeItemContext_unstable();\n\n return {\n ...treeItemContext,\n components: {\n root: 'div',\n iconBefore: 'span',\n iconAfter: 'span',\n aside: 'span',\n },\n root: getNativeElementProps(as, { ...props, ref }),\n iconBefore: resolveShorthand(iconBefore, { defaultProps: { 'aria-hidden': true } }),\n iconAfter: resolveShorthand(iconAfter, { defaultProps: { 'aria-hidden': true } }),\n aside: resolveShorthand(aside, { defaultProps: { 'aria-hidden': true } }),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AAExD,SAASC,2BAA2B,QAAQ;AAE5C;;;;;;;;;AASA,OAAO,MAAMC,0BAAA,GAA6BA,CACxCC,KAAA,EACAC,GAAA,KACwB;EACxB,MAAM;IAAEC,SAAA;IAAWC,UAAA;IAAYC,KAAA;IAAOC,EAAA,GAAK;EAAK,CAAE,GAAGL,KAAA;EACrD,MAAMM,eAAA,GAAkBR,2BAAA;EAExB,OAAO;IACL,GAAGQ,eAAe;IAClBC,UAAA,EAAY;MACVC,IAAA,EAAM;MACNL,UAAA,EAAY;MACZD,SAAA,EAAW;MACXE,KAAA,EAAO;IACT;IACAI,IAAA,EAAMZ,qBAAA,CAAsBS,EAAA,EAAI;MAAE,GAAGL,KAAK;MAAEC;IAAI;IAChDE,UAAA,EAAYN,gBAAA,CAAiBM,UAAA,EAAY;MAAEM,YAAA,EAAc;QAAE,eAAe;MAAK;IAAE;IACjFP,SAAA,EAAWL,gBAAA,CAAiBK,SAAA,EAAW;MAAEO,YAAA,EAAc;QAAE,eAAe;MAAK;IAAE;IAC/EL,KAAA,EAAOP,gBAAA,CAAiBO,KAAA,EAAO;MAAEK,YAAA,EAAc;QAAE,eAAe;MAAK;IAAE;EACzE;AACF"}
1
+ {"version":3,"sources":["useTreeItemLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ExtractSlotProps,\n getNativeElementProps,\n isResolvedShorthand,\n useMergedRefs,\n slot,\n} from '@fluentui/react-utilities';\nimport { useTreeItemContext_unstable, useTreeContext_unstable } from '../../contexts';\nimport type { TreeItemLayoutProps, TreeItemLayoutSlots, TreeItemLayoutState } from './TreeItemLayout.types';\nimport { Checkbox, CheckboxProps } from '@fluentui/react-checkbox';\nimport { Radio, RadioProps } from '@fluentui/react-radio';\nimport { TreeItemChevron } from '../TreeItemChevron';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render TreeItemLayout.\n *\n * The returned state can be modified with hooks such as useTreeItemLayoutStyles_unstable,\n * before being passed to renderTreeItemLayout_unstable.\n *\n * @param props - props from this instance of TreeItemLayout\n * @param ref - reference to root HTMLElement of TreeItemLayout\n */\nexport const useTreeItemLayout_unstable = (\n props: TreeItemLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TreeItemLayoutState => {\n const { main, iconAfter, iconBefore, as = 'span' } = props;\n\n const layoutRef = useTreeItemContext_unstable(ctx => ctx.layoutRef);\n const selectionMode = useTreeContext_unstable(ctx => ctx.selectionMode);\n\n const [isActionsVisibleExternal, actionsShorthand]: [boolean | undefined, TreeItemLayoutSlots['actions']] =\n isResolvedShorthand(props.actions)\n ? // .visible prop should not be propagated to the DOM\n [props.actions.visible, { ...props.actions, visible: undefined }]\n : [undefined, props.actions];\n\n const isActionsVisible = useTreeItemContext_unstable(ctx => ctx.isActionsVisible) || isActionsVisibleExternal;\n const isAsideVisible = useTreeItemContext_unstable(ctx => ctx.isAsideVisible);\n const selectionRef = useTreeItemContext_unstable(ctx => ctx.selectionRef);\n const expandIconRef = useTreeItemContext_unstable(ctx => ctx.expandIconRef);\n const actionsRef = useTreeItemContext_unstable(ctx => ctx.actionsRef);\n const checked = useTreeItemContext_unstable(ctx => ctx.checked);\n const isBranch = useTreeItemContext_unstable(ctx => ctx.itemType === 'branch');\n\n const expandIcon = slot.optional(props.expandIcon, {\n renderByDefault: isBranch,\n defaultProps: {\n children: <TreeItemChevron />,\n 'aria-hidden': true,\n },\n elementType: 'div',\n });\n const expandIconRefs = useMergedRefs(expandIcon?.ref, expandIconRef);\n if (expandIcon) {\n expandIcon.ref = expandIconRefs;\n }\n const arrowNavigationProps = useArrowNavigationGroup({ circular: true, axis: 'horizontal' });\n const actions = isActionsVisible\n ? slot.optional(actionsShorthand, {\n defaultProps: { ...arrowNavigationProps, role: 'toolbar' } as ExtractSlotProps<TreeItemLayoutSlots['actions']>,\n elementType: 'div',\n })\n : undefined;\n const actionsRefs = useMergedRefs(actions?.ref, actionsRef);\n if (actions) {\n actions.ref = actionsRefs;\n }\n return {\n components: {\n root: 'div',\n expandIcon: 'div',\n iconBefore: 'div',\n main: 'div',\n iconAfter: 'div',\n actions: 'div',\n aside: 'div',\n // Casting here to a union between checkbox and radio\n selector: (selectionMode === 'multiselect' ? Checkbox : Radio) as React.ElementType<CheckboxProps | RadioProps>,\n },\n buttonContextValue: { size: 'small' },\n root: slot.always(getNativeElementProps(as, { ...props, ref: useMergedRefs(ref, layoutRef) }), {\n elementType: 'div',\n }),\n iconBefore: slot.optional(iconBefore, { defaultProps: { 'aria-hidden': true }, elementType: 'div' }),\n main: slot.always(main, { elementType: 'div' }),\n iconAfter: slot.optional(iconAfter, { defaultProps: { 'aria-hidden': true }, elementType: 'div' }),\n aside: isAsideVisible\n ? slot.optional(props.aside, { defaultProps: { 'aria-hidden': true }, elementType: 'div' })\n : undefined,\n actions,\n expandIcon,\n selector: slot.optional(props.selector, {\n renderByDefault: selectionMode !== 'none',\n defaultProps: {\n checked,\n tabIndex: -1,\n 'aria-hidden': true,\n ref: selectionRef,\n // casting here to a union between checkbox and radio\n // since ref is not present on the selector signature\n // FIXME: look into Slot type to see if we can make this work\n } as CheckboxProps | RadioProps,\n elementType: (selectionMode === 'multiselect' ? Checkbox : Radio) as React.ElementType<\n CheckboxProps | RadioProps\n >,\n }),\n };\n};\n"],"names":["React","getNativeElementProps","isResolvedShorthand","useMergedRefs","slot","useTreeItemContext_unstable","useTreeContext_unstable","Checkbox","Radio","TreeItemChevron","useArrowNavigationGroup","useTreeItemLayout_unstable","props","ref","main","iconAfter","iconBefore","as","layoutRef","ctx","selectionMode","isActionsVisibleExternal","actionsShorthand","actions","visible","undefined","isActionsVisible","isAsideVisible","selectionRef","expandIconRef","actionsRef","checked","isBranch","itemType","expandIcon","optional","renderByDefault","defaultProps","children","elementType","expandIconRefs","arrowNavigationProps","circular","axis","role","actionsRefs","components","root","aside","selector","buttonContextValue","size","always","tabIndex"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAEEC,qBAAqB,EACrBC,mBAAmB,EACnBC,aAAa,EACbC,IAAI,QACC,4BAA4B;AACnC,SAASC,2BAA2B,E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,eAAe,IAAI;YAAC;YAAGE,aAAa;QAAM,KACvFd,SAAS;QACbF;QACAW;QACAe,UAAU7C,KAAK+B,QAAQ,CAACvB,MAAMqC,QAAQ,EAAE;YACtCb,iBAAiBhB,kBAAkB;YACnCiB,cAAc;gBACZN;gBACAsB,UAAU,CAAC;gBACX,eAAe,IAAI;gBACnBxC,KAAKe;YAIP;YACAW,aAAcnB,kBAAkB,gBAAgBb,WAAWC,KAAK;QAGlE;IACF;AACF,EAAE"}
@@ -0,0 +1,237 @@
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
+ import { tokens, typographyStyles } from '@fluentui/react-theme';
3
+ import { useTreeContext_unstable } from '../../contexts/treeContext';
4
+ import { treeItemLevelToken } from '../../utils/tokens';
5
+ import { useTreeItemContext_unstable } from '../../contexts/treeItemContext';
6
+ export const treeItemLayoutClassNames = {
7
+ root: 'fui-TreeItemLayout',
8
+ iconBefore: 'fui-TreeItemLayout__iconBefore',
9
+ main: 'fui-TreeItemLayout__main',
10
+ iconAfter: 'fui-TreeItemLayout__iconAfter',
11
+ expandIcon: 'fui-TreeItemLayout__expandIcon',
12
+ aside: 'fui-TreeItemLayout__aside',
13
+ actions: 'fui-TreeItemLayout__actions',
14
+ selector: 'fui-TreeItemLayout__selector'
15
+ };
16
+ /**
17
+ * Styles for the root slot
18
+ */
19
+ const useRootStyles = /*#__PURE__*/__styles({
20
+ base: {
21
+ mc9l5x: "f22iagw",
22
+ Bt984gj: "f122n59",
23
+ sshi5w: "f1nxs5xn",
24
+ B7ck84d: "f1ewtqcl",
25
+ Ijaq50: "f15ws6j",
26
+ Br312pm: "f135tdbu",
27
+ nk6f5a: "f2e2169",
28
+ Bw0ie65: "f4rqp6x",
29
+ Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
30
+ Beyfa6y: ["f16jpd5f", "f1aa9q02"],
31
+ B7oj6ja: ["f1jar5jt", "fyu767a"],
32
+ Btl43ni: ["fyu767a", "f1jar5jt"],
33
+ lj723h: "flvvhsy",
34
+ ecr2s2: "f1wfn5kd",
35
+ qya0sb: "f1ih54s9",
36
+ Bi91k9c: "fnwyq0v",
37
+ Jwef8y: "f1t94bn6",
38
+ Becwuud: "f1jk1nfw"
39
+ },
40
+ leaf: {
41
+ uwmqm3: ["f1k1erfc", "faevyjx"]
42
+ },
43
+ branch: {
44
+ uwmqm3: ["fo100m9", "f6yw3pu"]
45
+ },
46
+ medium: {
47
+ Bahqtrf: "fk6fouc",
48
+ Be2twd7: "fkhj508",
49
+ Bhrd7zp: "figsok6",
50
+ Bg96gwp: "f1i3iumi"
51
+ },
52
+ small: {
53
+ sshi5w: "f1pha7fy",
54
+ Bahqtrf: "fk6fouc",
55
+ Be2twd7: "fy9rknc",
56
+ Bhrd7zp: "figsok6",
57
+ Bg96gwp: "fwrc4pm"
58
+ },
59
+ subtle: {},
60
+ "subtle-alpha": {
61
+ Jwef8y: "f146ro5n",
62
+ ecr2s2: "fkam630"
63
+ },
64
+ transparent: {
65
+ De3pzq: "f1c21dwh",
66
+ Jwef8y: "fjxutwb",
67
+ ecr2s2: "fophhak"
68
+ }
69
+ }, {
70
+ d: [".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".f1nxs5xn{min-height:32px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f15ws6j{grid-row-start:layout;}", ".f135tdbu{grid-column-start:layout;}", ".f2e2169{grid-row-end:layout;}", ".f4rqp6x{grid-column-end:layout;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1k1erfc{padding-left:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}", ".faevyjx{padding-right:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}", ".fo100m9{padding-left:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}", ".f6yw3pu{padding-right:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1pha7fy{min-height:24px;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}"],
71
+ a: [".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1ih54s9:active .fui-TreeItemLayout__expandIcon{color:var(--colorNeutralForeground3Pressed);}", ".fkam630:active{background-color:var(--colorSubtleBackgroundLightAlphaPressed);}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}"],
72
+ h: [".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f1jk1nfw:hover .fui-TreeItemLayout__expandIcon{color:var(--colorNeutralForeground3Hover);}", ".f146ro5n:hover{background-color:var(--colorSubtleBackgroundLightAlphaHover);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}"]
73
+ });
74
+ /**
75
+ * Styles for the action icon slot
76
+ */
77
+ const useActionsStyles = /*#__PURE__*/__styles({
78
+ base: {
79
+ mc9l5x: "f22iagw",
80
+ Frg6f3: ["fcgxt0o", "f1ujusj6"],
81
+ qhf8xq: "f10pi13n",
82
+ Bj3rh1h: "f19g0ac",
83
+ Ijaq50: "fobksn0",
84
+ Br312pm: "fmy5l6f",
85
+ nk6f5a: "fzqypwc",
86
+ Bw0ie65: "f1tmftl3",
87
+ z8tnut: "f1g0x7ka",
88
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
89
+ Byoj8tv: "f1qch9an",
90
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"]
91
+ }
92
+ }, {
93
+ d: [".f22iagw{display:flex;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f10pi13n{position:relative;}", ".f19g0ac{z-index:1;}", ".fobksn0{grid-row-start:aside;}", ".fmy5l6f{grid-column-start:aside;}", ".fzqypwc{grid-row-end:aside;}", ".f1tmftl3{grid-column-end:aside;}", ".f1g0x7ka{padding-top:0;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1qch9an{padding-bottom:0;}"]
94
+ });
95
+ /**
96
+ * Styles for the action icon slot
97
+ */
98
+ const useAsideStyles = /*#__PURE__*/__styles({
99
+ base: {
100
+ mc9l5x: "f22iagw",
101
+ Frg6f3: ["fcgxt0o", "f1ujusj6"],
102
+ Bt984gj: "f122n59",
103
+ Bj3rh1h: "f11zp4z2",
104
+ Ijaq50: "fobksn0",
105
+ Br312pm: "fmy5l6f",
106
+ nk6f5a: "fzqypwc",
107
+ Bw0ie65: "f1tmftl3",
108
+ z8tnut: "f1g0x7ka",
109
+ z189sj: ["fw5db7e", "f1uw59to"],
110
+ Byoj8tv: "f1qch9an",
111
+ uwmqm3: ["f1uw59to", "fw5db7e"],
112
+ i8kkvl: "f1ufnopg",
113
+ Belr9w4: "f14sijuj"
114
+ }
115
+ }, {
116
+ d: [".f22iagw{display:flex;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f122n59{align-items:center;}", ".f11zp4z2{z-index:0;}", ".fobksn0{grid-row-start:aside;}", ".fmy5l6f{grid-column-start:aside;}", ".fzqypwc{grid-row-end:aside;}", ".f1tmftl3{grid-column-end:aside;}", ".f1g0x7ka{padding-top:0;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".f1qch9an{padding-bottom:0;}", ".f1ufnopg{column-gap:var(--spacingHorizontalXS);}", ".f14sijuj{row-gap:var(--spacingHorizontalXS);}"]
117
+ });
118
+ /**
119
+ * Styles for the expand icon slot
120
+ */
121
+ const useExpandIconStyles = /*#__PURE__*/__styles({
122
+ base: {
123
+ mc9l5x: "f22iagw",
124
+ Bt984gj: "f122n59",
125
+ Brf1p80: "f4d9j23",
126
+ Bf4jedk: "f17fgpbq",
127
+ B7ck84d: "f1ewtqcl",
128
+ sj55zd: "f11d4kpn",
129
+ Bh6795r: "f1jhi6b8",
130
+ Bnnss6s: "fi64zpg",
131
+ xawz: "f1rmlqtg",
132
+ z8tnut: "f1ywm7hm",
133
+ z189sj: ["fhxju0i", "f1cnd47f"],
134
+ Byoj8tv: "f14wxoun",
135
+ uwmqm3: ["f1cnd47f", "fhxju0i"]
136
+ }
137
+ }, {
138
+ d: [".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".f4d9j23{justify-content:center;}", ".f17fgpbq{min-width:24px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f1jhi6b8{flex-grow:0;}", ".fi64zpg{flex-shrink:0;}", ".f1rmlqtg{flex-basis:auto;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}"]
139
+ });
140
+ /**
141
+ * Styles for the content slot
142
+ */
143
+ const useMainStyles = /*#__PURE__*/__styles({
144
+ base: {
145
+ z8tnut: "f1g0x7ka",
146
+ z189sj: ["ffczdla", "fgiv446"],
147
+ Byoj8tv: "f1qch9an",
148
+ uwmqm3: ["fgiv446", "ffczdla"]
149
+ }
150
+ }, {
151
+ d: [".f1g0x7ka{padding-top:0;}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".f1qch9an{padding-bottom:0;}"]
152
+ });
153
+ /**
154
+ * Styles for the before/after icon slot
155
+ */
156
+ const useIconStyles = /*#__PURE__*/__styles({
157
+ base: {
158
+ mc9l5x: "f22iagw",
159
+ Bt984gj: "f122n59",
160
+ sj55zd: "fkfq4zb",
161
+ Bg96gwp: "f106mvju",
162
+ Be2twd7: "f1pp30po"
163
+ }
164
+ }, {
165
+ d: [".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".f1pp30po{font-size:var(--fontSizeBase500);}"]
166
+ });
167
+ const useIconBeforeStyles = /*#__PURE__*/__styles({
168
+ medium: {
169
+ z189sj: ["f7x41pl", "fruq291"]
170
+ },
171
+ small: {
172
+ z189sj: ["ffczdla", "fgiv446"]
173
+ }
174
+ }, {
175
+ d: [".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}"]
176
+ });
177
+ const useIconAfterStyles = /*#__PURE__*/__styles({
178
+ medium: {
179
+ uwmqm3: ["fruq291", "f7x41pl"]
180
+ },
181
+ small: {
182
+ uwmqm3: ["fgiv446", "ffczdla"]
183
+ }
184
+ }, {
185
+ d: [".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}"]
186
+ });
187
+ /**
188
+ * Apply styling to the TreeItemLayout slots based on the state
189
+ */
190
+ export const useTreeItemLayoutStyles_unstable = state => {
191
+ const {
192
+ main,
193
+ iconAfter,
194
+ iconBefore,
195
+ expandIcon,
196
+ root,
197
+ aside,
198
+ actions,
199
+ selector
200
+ } = state;
201
+ const rootStyles = useRootStyles();
202
+ const actionsStyles = useActionsStyles();
203
+ const asideStyles = useAsideStyles();
204
+ const mainStyles = useMainStyles();
205
+ const expandIconStyles = useExpandIconStyles();
206
+ const iconStyles = useIconStyles();
207
+ const iconBeforeStyles = useIconBeforeStyles();
208
+ const iconAfterStyles = useIconAfterStyles();
209
+ const size = useTreeContext_unstable(ctx => ctx.size);
210
+ const appearance = useTreeContext_unstable(ctx => ctx.appearance);
211
+ const itemType = useTreeItemContext_unstable(ctx => ctx.itemType);
212
+ root.className = mergeClasses(treeItemLayoutClassNames.root, rootStyles.base, rootStyles[appearance], rootStyles[size], rootStyles[itemType], root.className);
213
+ main.className = mergeClasses(treeItemLayoutClassNames.main, mainStyles.base, main.className);
214
+ if (expandIcon) {
215
+ expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, expandIcon.className);
216
+ }
217
+ if (iconBefore) {
218
+ iconBefore.className = mergeClasses(treeItemLayoutClassNames.iconBefore, iconStyles.base, iconBeforeStyles[size], iconBefore.className);
219
+ }
220
+ if (iconAfter) {
221
+ iconAfter.className = mergeClasses(treeItemLayoutClassNames.iconAfter, iconStyles.base, iconAfterStyles[size], iconAfter.className);
222
+ }
223
+ if (actions) {
224
+ actions.className = mergeClasses(treeItemLayoutClassNames.actions, actionsStyles.base, actions.className);
225
+ }
226
+ if (aside) {
227
+ aside.className = mergeClasses(treeItemLayoutClassNames.aside, asideStyles.base, aside.className);
228
+ }
229
+ if (expandIcon) {
230
+ expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, expandIcon.className);
231
+ }
232
+ if (selector) {
233
+ selector.className = mergeClasses(treeItemLayoutClassNames.selector, selector.className);
234
+ }
235
+ return state;
236
+ };
237
+ //# sourceMappingURL=useTreeItemLayoutStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","useTreeContext_unstable","treeItemLevelToken","useTreeItemContext_unstable","treeItemLayoutClassNames","root","iconBefore","main","iconAfter","expandIcon","aside","actions","selector","useRootStyles","base","mc9l5x","Bt984gj","sshi5w","B7ck84d","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","lj723h","ecr2s2","qya0sb","Bi91k9c","Jwef8y","Becwuud","leaf","uwmqm3","branch","medium","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","small","subtle","transparent","De3pzq","d","a","h","useActionsStyles","Frg6f3","qhf8xq","Bj3rh1h","z8tnut","z189sj","Byoj8tv","useAsideStyles","i8kkvl","Belr9w4","useExpandIconStyles","Brf1p80","Bf4jedk","sj55zd","Bh6795r","Bnnss6s","xawz","useMainStyles","useIconStyles","useIconBeforeStyles","useIconAfterStyles","useTreeItemLayoutStyles_unstable","state","rootStyles","actionsStyles","asideStyles","mainStyles","expandIconStyles","iconStyles","iconBeforeStyles","iconAfterStyles","size","ctx","appearance","itemType","className"],"sources":["useTreeItemLayoutStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useTreeContext_unstable } from '../../contexts/treeContext';\nimport { treeItemLevelToken } from '../../utils/tokens';\nimport { useTreeItemContext_unstable } from '../../contexts/treeItemContext';\nexport const treeItemLayoutClassNames = {\n root: 'fui-TreeItemLayout',\n iconBefore: 'fui-TreeItemLayout__iconBefore',\n main: 'fui-TreeItemLayout__main',\n iconAfter: 'fui-TreeItemLayout__iconAfter',\n expandIcon: 'fui-TreeItemLayout__expandIcon',\n aside: 'fui-TreeItemLayout__aside',\n actions: 'fui-TreeItemLayout__actions',\n selector: 'fui-TreeItemLayout__selector'\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.gridArea('layout'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ':active': {\n color: tokens.colorNeutralForeground2Pressed,\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n // TODO: stop using treeItemLayoutClassNames.expandIcon for styling\n [`& .${treeItemLayoutClassNames.expandIcon}`]: {\n color: tokens.colorNeutralForeground3Pressed\n }\n },\n ':hover': {\n color: tokens.colorNeutralForeground2Hover,\n backgroundColor: tokens.colorSubtleBackgroundHover,\n // TODO: stop using treeItemLayoutClassNames.expandIcon for styling\n [`& .${treeItemLayoutClassNames.expandIcon}`]: {\n color: tokens.colorNeutralForeground3Hover\n }\n }\n },\n leaf: {\n paddingLeft: `calc(var(${treeItemLevelToken}, 1) * ${tokens.spacingHorizontalXXL})`\n },\n branch: {\n paddingLeft: `calc((var(${treeItemLevelToken}, 1) - 1) * ${tokens.spacingHorizontalXXL})`\n },\n medium: {\n ...typographyStyles.body1\n },\n small: {\n minHeight: '24px',\n ...typographyStyles.caption1\n },\n // Appearance variations\n subtle: {},\n 'subtle-alpha': {\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundLightAlphaHover\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundLightAlphaPressed\n }\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed\n }\n }\n});\n/**\n * Styles for the action icon slot\n */ const useActionsStyles = makeStyles({\n base: {\n display: 'flex',\n marginLeft: 'auto',\n position: 'relative',\n zIndex: 1,\n ...shorthands.gridArea('aside'),\n ...shorthands.padding(0, tokens.spacingHorizontalS)\n }\n});\n/**\n * Styles for the action icon slot\n */ const useAsideStyles = makeStyles({\n base: {\n display: 'flex',\n marginLeft: 'auto',\n alignItems: 'center',\n zIndex: 0,\n ...shorthands.gridArea('aside'),\n ...shorthands.padding(0, tokens.spacingHorizontalM),\n ...shorthands.gap(tokens.spacingHorizontalXS)\n }\n});\n/**\n * Styles for the expand icon slot\n */ const useExpandIconStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minWidth: '24px',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3,\n ...shorthands.flex(0, 0, 'auto'),\n ...shorthands.padding(tokens.spacingVerticalXS, 0)\n }\n});\n/**\n * Styles for the content slot\n */ const useMainStyles = makeStyles({\n base: {\n ...shorthands.padding(0, tokens.spacingHorizontalXXS)\n }\n});\n/**\n * Styles for the before/after icon slot\n */ const useIconStyles = makeStyles({\n base: {\n display: 'flex',\n alignItems: 'center',\n color: tokens.colorNeutralForeground2,\n lineHeight: tokens.lineHeightBase500,\n fontSize: tokens.fontSizeBase500\n }\n});\nconst useIconBeforeStyles = makeStyles({\n medium: {\n paddingRight: tokens.spacingHorizontalXS\n },\n small: {\n paddingRight: tokens.spacingHorizontalXXS\n }\n});\nconst useIconAfterStyles = makeStyles({\n medium: {\n paddingLeft: tokens.spacingHorizontalXS\n },\n small: {\n paddingLeft: tokens.spacingHorizontalXXS\n }\n});\n/**\n * Apply styling to the TreeItemLayout slots based on the state\n */ export const useTreeItemLayoutStyles_unstable = (state)=>{\n const { main , iconAfter , iconBefore , expandIcon , root , aside , actions , selector } = state;\n const rootStyles = useRootStyles();\n const actionsStyles = useActionsStyles();\n const asideStyles = useAsideStyles();\n const mainStyles = useMainStyles();\n const expandIconStyles = useExpandIconStyles();\n const iconStyles = useIconStyles();\n const iconBeforeStyles = useIconBeforeStyles();\n const iconAfterStyles = useIconAfterStyles();\n const size = useTreeContext_unstable((ctx)=>ctx.size);\n const appearance = useTreeContext_unstable((ctx)=>ctx.appearance);\n const itemType = useTreeItemContext_unstable((ctx)=>ctx.itemType);\n root.className = mergeClasses(treeItemLayoutClassNames.root, rootStyles.base, rootStyles[appearance], rootStyles[size], rootStyles[itemType], root.className);\n main.className = mergeClasses(treeItemLayoutClassNames.main, mainStyles.base, main.className);\n if (expandIcon) {\n expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, expandIcon.className);\n }\n if (iconBefore) {\n iconBefore.className = mergeClasses(treeItemLayoutClassNames.iconBefore, iconStyles.base, iconBeforeStyles[size], iconBefore.className);\n }\n if (iconAfter) {\n iconAfter.className = mergeClasses(treeItemLayoutClassNames.iconAfter, iconStyles.base, iconAfterStyles[size], iconAfter.className);\n }\n if (actions) {\n actions.className = mergeClasses(treeItemLayoutClassNames.actions, actionsStyles.base, actions.className);\n }\n if (aside) {\n aside.className = mergeClasses(treeItemLayoutClassNames.aside, asideStyles.base, aside.className);\n }\n if (expandIcon) {\n expandIcon.className = mergeClasses(treeItemLayoutClassNames.expandIcon, expandIconStyles.base, expandIcon.className);\n }\n if (selector) {\n selector.className = mergeClasses(treeItemLayoutClassNames.selector, selector.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,uBAAuB,QAAQ,4BAA4B;AACpE,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE,oBAAoB;EAC1BC,UAAU,EAAE,gCAAgC;EAC5CC,IAAI,EAAE,0BAA0B;EAChCC,SAAS,EAAE,+BAA+B;EAC1CC,UAAU,EAAE,gCAAgC;EAC5CC,KAAK,EAAE,2BAA2B;EAClCC,OAAO,EAAE,6BAA6B;EACtCC,QAAQ,EAAE;AACd,CAAC;AACD;AACA;AACA;AAAI,MAAMC,aAAa,gBAAGjB,QAAA;EAAAkB,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,IAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;I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