@fluentui/react-nav 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.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 (466) hide show
  1. package/CHANGELOG.md +76 -18
  2. package/README.md +25 -0
  3. package/lib/components/AppItem/AppItem.js.map +1 -1
  4. package/lib/components/AppItem/AppItem.module.css +22 -0
  5. package/lib/components/AppItem/AppItem.types.js.map +1 -1
  6. package/lib/components/AppItem/index.js.map +1 -1
  7. package/lib/components/AppItem/renderAppItem.js +2 -2
  8. package/lib/components/AppItem/renderAppItem.js.map +1 -1
  9. package/lib/components/AppItem/useAppItem.js.map +1 -1
  10. package/lib/components/AppItem/useAppItemStyles.styles.css.js +24 -0
  11. package/lib/components/AppItem/useAppItemStyles.styles.css.js.map +1 -0
  12. package/lib/components/AppItem/useAppItemStyles.styles.raw.css.js +24 -0
  13. package/lib/components/AppItem/useAppItemStyles.styles.raw.css.js.map +1 -0
  14. package/lib/components/AppItem/useAppItemStyles.styles.raw.js.map +1 -1
  15. package/lib/components/AppItemStatic/AppItemStatic.js.map +1 -1
  16. package/lib/components/AppItemStatic/AppItemStatic.module.css +11 -0
  17. package/lib/components/AppItemStatic/AppItemStatic.types.js.map +1 -1
  18. package/lib/components/AppItemStatic/index.js.map +1 -1
  19. package/lib/components/AppItemStatic/renderAppItemStatic.js +2 -2
  20. package/lib/components/AppItemStatic/renderAppItemStatic.js.map +1 -1
  21. package/lib/components/AppItemStatic/useAppItemStatic.js.map +1 -1
  22. package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.css.js +21 -0
  23. package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.css.js.map +1 -0
  24. package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.raw.css.js +21 -0
  25. package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.raw.css.js.map +1 -0
  26. package/lib/components/AppItemStatic/useAppItemStaticStyles.styles.raw.js.map +1 -1
  27. package/lib/components/Hamburger/Hamburger.js.map +1 -1
  28. package/lib/components/Hamburger/Hamburger.module.css +17 -0
  29. package/lib/components/Hamburger/Hamburger.types.js.map +1 -1
  30. package/lib/components/Hamburger/index.js.map +1 -1
  31. package/lib/components/Hamburger/useHamburger.js.map +1 -1
  32. package/lib/components/Hamburger/useHamburgerStyles.styles.css.js +18 -0
  33. package/lib/components/Hamburger/useHamburgerStyles.styles.css.js.map +1 -0
  34. package/lib/components/Hamburger/useHamburgerStyles.styles.raw.css.js +18 -0
  35. package/lib/components/Hamburger/useHamburgerStyles.styles.raw.css.js.map +1 -0
  36. package/lib/components/Hamburger/useHamburgerStyles.styles.raw.js.map +1 -1
  37. package/lib/components/Nav/Nav.js.map +1 -1
  38. package/lib/components/Nav/Nav.module.css +6 -0
  39. package/lib/components/Nav/Nav.types.js.map +1 -1
  40. package/lib/components/Nav/index.js.map +1 -1
  41. package/lib/components/Nav/renderNav.js +2 -2
  42. package/lib/components/Nav/renderNav.js.map +1 -1
  43. package/lib/components/Nav/useNav.js.map +1 -1
  44. package/lib/components/Nav/useNavStyles.styles.css.js +9 -0
  45. package/lib/components/Nav/useNavStyles.styles.css.js.map +1 -0
  46. package/lib/components/Nav/useNavStyles.styles.raw.css.js +9 -0
  47. package/lib/components/Nav/useNavStyles.styles.raw.css.js.map +1 -0
  48. package/lib/components/Nav/useNavStyles.styles.raw.js.map +1 -1
  49. package/lib/components/NavCategory/NavCategory.js.map +1 -1
  50. package/lib/components/NavCategory/NavCategory.types.js.map +1 -1
  51. package/lib/components/NavCategory/index.js.map +1 -1
  52. package/lib/components/NavCategory/renderNavCategory.js.map +1 -1
  53. package/lib/components/NavCategory/useNavCategory.js.map +1 -1
  54. package/lib/components/NavCategoryContext.js.map +1 -1
  55. package/lib/components/NavCategoryItem/NavCategoryItem.js.map +1 -1
  56. package/lib/components/NavCategoryItem/NavCategoryItem.module.css +9 -0
  57. package/lib/components/NavCategoryItem/NavCategoryItem.types.js.map +1 -1
  58. package/lib/components/NavCategoryItem/index.js.map +1 -1
  59. package/lib/components/NavCategoryItem/renderNavCategoryItem.js +2 -2
  60. package/lib/components/NavCategoryItem/renderNavCategoryItem.js.map +1 -1
  61. package/lib/components/NavCategoryItem/useNavCategoryItem.js.map +1 -1
  62. package/lib/components/NavCategoryItem/useNavCategoryItem.styles.css.js +26 -0
  63. package/lib/components/NavCategoryItem/useNavCategoryItem.styles.css.js.map +1 -0
  64. package/lib/components/NavCategoryItem/useNavCategoryItem.styles.raw.css.js +26 -0
  65. package/lib/components/NavCategoryItem/useNavCategoryItem.styles.raw.css.js.map +1 -0
  66. package/lib/components/NavCategoryItem/useNavCategoryItem.styles.raw.js.map +1 -1
  67. package/lib/components/NavCategoryItemContext.js.map +1 -1
  68. package/lib/components/NavContext.js.map +1 -1
  69. package/lib/components/NavContext.types.js.map +1 -1
  70. package/lib/components/NavDivider/NavDivider.js.map +1 -1
  71. package/lib/components/NavDivider/NavDivider.module.css +6 -0
  72. package/lib/components/NavDivider/NavDivider.types.js.map +1 -1
  73. package/lib/components/NavDivider/index.js.map +1 -1
  74. package/lib/components/NavDivider/useNavDivider.js.map +1 -1
  75. package/lib/components/NavDivider/useNavDividerStyles.styles.css.js +18 -0
  76. package/lib/components/NavDivider/useNavDividerStyles.styles.css.js.map +1 -0
  77. package/lib/components/NavDivider/useNavDividerStyles.styles.raw.css.js +18 -0
  78. package/lib/components/NavDivider/useNavDividerStyles.styles.raw.css.js.map +1 -0
  79. package/lib/components/NavDivider/useNavDividerStyles.styles.raw.js.map +1 -1
  80. package/lib/components/NavDrawer/NavDrawer.js.map +1 -1
  81. package/lib/components/NavDrawer/NavDrawer.module.css +9 -0
  82. package/lib/components/NavDrawer/NavDrawer.types.js.map +1 -1
  83. package/lib/components/NavDrawer/index.js.map +1 -1
  84. package/lib/components/NavDrawer/renderNavDrawer.js +2 -2
  85. package/lib/components/NavDrawer/renderNavDrawer.js.map +1 -1
  86. package/lib/components/NavDrawer/useNavDrawer.js.map +1 -1
  87. package/lib/components/NavDrawer/useNavDrawerStyles.styles.css.js +9 -0
  88. package/lib/components/NavDrawer/useNavDrawerStyles.styles.css.js.map +1 -0
  89. package/lib/components/NavDrawer/useNavDrawerStyles.styles.raw.css.js +9 -0
  90. package/lib/components/NavDrawer/useNavDrawerStyles.styles.raw.css.js.map +1 -0
  91. package/lib/components/NavDrawer/useNavDrawerStyles.styles.raw.js.map +1 -1
  92. package/lib/components/NavDrawerBody/NavDrawerBody.js.map +1 -1
  93. package/lib/components/NavDrawerBody/NavDrawerBody.module.css +9 -0
  94. package/lib/components/NavDrawerBody/NavDrawerBody.types.js.map +1 -1
  95. package/lib/components/NavDrawerBody/index.js.map +1 -1
  96. package/lib/components/NavDrawerBody/useNavDrawerBody.js.map +1 -1
  97. package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.css.js +13 -0
  98. package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.css.js.map +1 -0
  99. package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.css.js +13 -0
  100. package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.css.js.map +1 -0
  101. package/lib/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.js.map +1 -1
  102. package/lib/components/NavDrawerFooter/NavDrawerFooter.js.map +1 -1
  103. package/lib/components/NavDrawerFooter/NavDrawerFooter.module.css +7 -0
  104. package/lib/components/NavDrawerFooter/NavDrawerFooter.types.js.map +1 -1
  105. package/lib/components/NavDrawerFooter/index.js.map +1 -1
  106. package/lib/components/NavDrawerFooter/useNavDrawerFooter.js.map +1 -1
  107. package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.css.js +13 -0
  108. package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.css.js.map +1 -0
  109. package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.css.js +13 -0
  110. package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.css.js.map +1 -0
  111. package/lib/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.js.map +1 -1
  112. package/lib/components/NavDrawerHeader/NavDrawerHeader.js.map +1 -1
  113. package/lib/components/NavDrawerHeader/NavDrawerHeader.module.css +7 -0
  114. package/lib/components/NavDrawerHeader/NavDrawerHeader.types.js.map +1 -1
  115. package/lib/components/NavDrawerHeader/index.js.map +1 -1
  116. package/lib/components/NavDrawerHeader/useNavDrawerHeader.js.map +1 -1
  117. package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.css.js +13 -0
  118. package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.css.js.map +1 -0
  119. package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.css.js +13 -0
  120. package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.css.js.map +1 -0
  121. package/lib/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.js.map +1 -1
  122. package/lib/components/NavItem/NavItem.js.map +1 -1
  123. package/lib/components/NavItem/NavItem.module.css +1 -0
  124. package/lib/components/NavItem/NavItem.types.js.map +1 -1
  125. package/lib/components/NavItem/index.js.map +1 -1
  126. package/lib/components/NavItem/renderNavItem.js +2 -2
  127. package/lib/components/NavItem/renderNavItem.js.map +1 -1
  128. package/lib/components/NavItem/useNavItem.js.map +1 -1
  129. package/lib/components/NavItem/useNavItemStyles.styles.css.js +19 -0
  130. package/lib/components/NavItem/useNavItemStyles.styles.css.js.map +1 -0
  131. package/lib/components/NavItem/useNavItemStyles.styles.raw.css.js +19 -0
  132. package/lib/components/NavItem/useNavItemStyles.styles.raw.css.js.map +1 -0
  133. package/lib/components/NavItem/useNavItemStyles.styles.raw.js.map +1 -1
  134. package/lib/components/NavSectionHeader/NavSectionHeader.js.map +1 -1
  135. package/lib/components/NavSectionHeader/NavSectionHeader.module.css +10 -0
  136. package/lib/components/NavSectionHeader/NavSectionHeader.types.js.map +1 -1
  137. package/lib/components/NavSectionHeader/index.js.map +1 -1
  138. package/lib/components/NavSectionHeader/renderNavSectionHeader.js +2 -2
  139. package/lib/components/NavSectionHeader/renderNavSectionHeader.js.map +1 -1
  140. package/lib/components/NavSectionHeader/useNavSectionHeader.js.map +1 -1
  141. package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.css.js +9 -0
  142. package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.css.js.map +1 -0
  143. package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.css.js +9 -0
  144. package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.css.js.map +1 -0
  145. package/lib/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.js.map +1 -1
  146. package/lib/components/NavSubItem/NavSubItem.js.map +1 -1
  147. package/lib/components/NavSubItem/NavSubItem.module.css +10 -0
  148. package/lib/components/NavSubItem/NavSubItem.types.js.map +1 -1
  149. package/lib/components/NavSubItem/index.js.map +1 -1
  150. package/lib/components/NavSubItem/renderNavSubItem.js +2 -2
  151. package/lib/components/NavSubItem/renderNavSubItem.js.map +1 -1
  152. package/lib/components/NavSubItem/useNavSubItem.js.map +1 -1
  153. package/lib/components/NavSubItem/useNavSubItemStyles.styles.css.js +14 -0
  154. package/lib/components/NavSubItem/useNavSubItemStyles.styles.css.js.map +1 -0
  155. package/lib/components/NavSubItem/useNavSubItemStyles.styles.raw.css.js +14 -0
  156. package/lib/components/NavSubItem/useNavSubItemStyles.styles.raw.css.js.map +1 -0
  157. package/lib/components/NavSubItem/useNavSubItemStyles.styles.raw.js.map +1 -1
  158. package/lib/components/NavSubItemContext.js.map +1 -1
  159. package/lib/components/NavSubItemGroup/NavSubItemGroup.js.map +1 -1
  160. package/lib/components/NavSubItemGroup/NavSubItemGroup.module.css +7 -0
  161. package/lib/components/NavSubItemGroup/NavSubItemGroup.types.js.map +1 -1
  162. package/lib/components/NavSubItemGroup/index.js.map +1 -1
  163. package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js +2 -2
  164. package/lib/components/NavSubItemGroup/renderNavSubItemGroup.js.map +1 -1
  165. package/lib/components/NavSubItemGroup/useNavSubItemGroup.js.map +1 -1
  166. package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.css.js +9 -0
  167. package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.css.js.map +1 -0
  168. package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.css.js +9 -0
  169. package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.css.js.map +1 -0
  170. package/lib/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.js.map +1 -1
  171. package/lib/components/SplitNavItem/SplitNavItem.js.map +1 -1
  172. package/lib/components/SplitNavItem/SplitNavItem.module.css +52 -0
  173. package/lib/components/SplitNavItem/SplitNavItem.types.js.map +1 -1
  174. package/lib/components/SplitNavItem/index.js.map +1 -1
  175. package/lib/components/SplitNavItem/renderSplitNavItem.js +2 -2
  176. package/lib/components/SplitNavItem/renderSplitNavItem.js.map +1 -1
  177. package/lib/components/SplitNavItem/useSplitNavItem.js.map +1 -1
  178. package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.css.js +38 -0
  179. package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.css.js.map +1 -0
  180. package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.raw.css.js +38 -0
  181. package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.raw.css.js.map +1 -0
  182. package/lib/components/SplitNavItem/useSplitNavItemStyles.styles.raw.js.map +1 -1
  183. package/lib/components/sharedNavStyles.module.css +126 -0
  184. package/lib/components/sharedNavStyles.styles.css.js +35 -0
  185. package/lib/components/sharedNavStyles.styles.css.js.map +1 -0
  186. package/lib/components/sharedNavStyles.styles.raw.css.js +35 -0
  187. package/lib/components/sharedNavStyles.styles.raw.css.js.map +1 -0
  188. package/lib/components/sharedNavStyles.styles.raw.js.map +1 -1
  189. package/lib/components/useNavCategoryContextValues_unstable.js.map +1 -1
  190. package/lib/components/useNavCategoryItemContextValues_unstable.js.map +1 -1
  191. package/lib/components/useNavContextValues.js.map +1 -1
  192. package/lib-commonjs/AppItem.cjs +8 -8
  193. package/lib-commonjs/AppItemStatic.cjs +7 -7
  194. package/lib-commonjs/Hamburger.cjs +5 -5
  195. package/lib-commonjs/Nav.cjs +15 -15
  196. package/lib-commonjs/Nav.cjs.map +1 -1
  197. package/lib-commonjs/NavCategory.cjs +4 -4
  198. package/lib-commonjs/NavDivider.cjs +5 -5
  199. package/lib-commonjs/NavDrawer.cjs +6 -6
  200. package/lib-commonjs/NavDrawerBody.cjs +5 -5
  201. package/lib-commonjs/NavDrawerFooter.cjs +5 -5
  202. package/lib-commonjs/NavDrawerHeader.cjs +5 -5
  203. package/lib-commonjs/NavItem.cjs +7 -7
  204. package/lib-commonjs/NavSectionHeader.cjs +6 -6
  205. package/lib-commonjs/NavSubItem.cjs +7 -7
  206. package/lib-commonjs/NavSubItemGroup.cjs +7 -7
  207. package/lib-commonjs/SplitNavItem.cjs +6 -6
  208. package/lib-commonjs/components/AppItem/AppItem.cjs.map +1 -1
  209. package/lib-commonjs/components/AppItem/AppItem.module.css +22 -0
  210. package/lib-commonjs/components/AppItem/AppItem.types.cjs.map +1 -1
  211. package/lib-commonjs/components/AppItem/index.cjs +8 -8
  212. package/lib-commonjs/components/AppItem/index.cjs.map +1 -1
  213. package/lib-commonjs/components/AppItem/renderAppItem.cjs.map +1 -1
  214. package/lib-commonjs/components/AppItem/useAppItem.cjs +3 -3
  215. package/lib-commonjs/components/AppItem/useAppItem.cjs.map +1 -1
  216. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.cjs +4 -4
  217. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.cjs.map +1 -1
  218. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.css.cjs +46 -0
  219. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.css.cjs.map +1 -0
  220. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.raw.cjs +4 -4
  221. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.raw.cjs.map +1 -1
  222. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.raw.css.cjs +46 -0
  223. package/lib-commonjs/components/AppItem/useAppItemStyles.styles.raw.css.cjs.map +1 -0
  224. package/lib-commonjs/components/AppItemStatic/AppItemStatic.cjs.map +1 -1
  225. package/lib-commonjs/components/AppItemStatic/AppItemStatic.module.css +11 -0
  226. package/lib-commonjs/components/AppItemStatic/AppItemStatic.types.cjs.map +1 -1
  227. package/lib-commonjs/components/AppItemStatic/index.cjs +7 -7
  228. package/lib-commonjs/components/AppItemStatic/index.cjs.map +1 -1
  229. package/lib-commonjs/components/AppItemStatic/renderAppItemStatic.cjs.map +1 -1
  230. package/lib-commonjs/components/AppItemStatic/useAppItemStatic.cjs +3 -3
  231. package/lib-commonjs/components/AppItemStatic/useAppItemStatic.cjs.map +1 -1
  232. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.cjs +3 -3
  233. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.cjs.map +1 -1
  234. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.css.cjs +40 -0
  235. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.css.cjs.map +1 -0
  236. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.raw.cjs +3 -3
  237. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.raw.cjs.map +1 -1
  238. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.raw.css.cjs +40 -0
  239. package/lib-commonjs/components/AppItemStatic/useAppItemStaticStyles.styles.raw.css.cjs.map +1 -0
  240. package/lib-commonjs/components/Hamburger/Hamburger.cjs.map +1 -1
  241. package/lib-commonjs/components/Hamburger/Hamburger.module.css +17 -0
  242. package/lib-commonjs/components/Hamburger/Hamburger.types.cjs.map +1 -1
  243. package/lib-commonjs/components/Hamburger/index.cjs +5 -5
  244. package/lib-commonjs/components/Hamburger/index.cjs.map +1 -1
  245. package/lib-commonjs/components/Hamburger/useHamburger.cjs.map +1 -1
  246. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.cjs +3 -3
  247. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.cjs.map +1 -1
  248. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.css.cjs +37 -0
  249. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.css.cjs.map +1 -0
  250. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.raw.cjs +3 -3
  251. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.raw.cjs.map +1 -1
  252. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.raw.css.cjs +37 -0
  253. package/lib-commonjs/components/Hamburger/useHamburgerStyles.styles.raw.css.cjs.map +1 -0
  254. package/lib-commonjs/components/Nav/Nav.cjs.map +1 -1
  255. package/lib-commonjs/components/Nav/Nav.module.css +6 -0
  256. package/lib-commonjs/components/Nav/Nav.types.cjs.map +1 -1
  257. package/lib-commonjs/components/Nav/index.cjs +7 -7
  258. package/lib-commonjs/components/Nav/index.cjs.map +1 -1
  259. package/lib-commonjs/components/Nav/renderNav.cjs.map +1 -1
  260. package/lib-commonjs/components/Nav/useNav.cjs +3 -3
  261. package/lib-commonjs/components/Nav/useNav.cjs.map +1 -1
  262. package/lib-commonjs/components/Nav/useNavStyles.styles.cjs +3 -3
  263. package/lib-commonjs/components/Nav/useNavStyles.styles.cjs.map +1 -1
  264. package/lib-commonjs/components/Nav/useNavStyles.styles.css.cjs +28 -0
  265. package/lib-commonjs/components/Nav/useNavStyles.styles.css.cjs.map +1 -0
  266. package/lib-commonjs/components/Nav/useNavStyles.styles.raw.cjs +3 -3
  267. package/lib-commonjs/components/Nav/useNavStyles.styles.raw.cjs.map +1 -1
  268. package/lib-commonjs/components/Nav/useNavStyles.styles.raw.css.cjs +28 -0
  269. package/lib-commonjs/components/Nav/useNavStyles.styles.raw.css.cjs.map +1 -0
  270. package/lib-commonjs/components/NavCategory/NavCategory.cjs.map +1 -1
  271. package/lib-commonjs/components/NavCategory/NavCategory.types.cjs.map +1 -1
  272. package/lib-commonjs/components/NavCategory/index.cjs +4 -4
  273. package/lib-commonjs/components/NavCategory/index.cjs.map +1 -1
  274. package/lib-commonjs/components/NavCategory/renderNavCategory.cjs.map +1 -1
  275. package/lib-commonjs/components/NavCategory/useNavCategory.cjs.map +1 -1
  276. package/lib-commonjs/components/NavCategoryContext.cjs +3 -3
  277. package/lib-commonjs/components/NavCategoryContext.cjs.map +1 -1
  278. package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.cjs.map +1 -1
  279. package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.module.css +9 -0
  280. package/lib-commonjs/components/NavCategoryItem/NavCategoryItem.types.cjs.map +1 -1
  281. package/lib-commonjs/components/NavCategoryItem/index.cjs +7 -7
  282. package/lib-commonjs/components/NavCategoryItem/index.cjs.map +1 -1
  283. package/lib-commonjs/components/NavCategoryItem/renderNavCategoryItem.cjs.map +1 -1
  284. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.cjs +3 -3
  285. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.cjs.map +1 -1
  286. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.cjs +4 -4
  287. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.cjs.map +1 -1
  288. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.css.cjs +48 -0
  289. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.css.cjs.map +1 -0
  290. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.raw.cjs +4 -4
  291. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.raw.cjs.map +1 -1
  292. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.raw.css.cjs +48 -0
  293. package/lib-commonjs/components/NavCategoryItem/useNavCategoryItem.styles.raw.css.cjs.map +1 -0
  294. package/lib-commonjs/components/NavCategoryItemContext.cjs +3 -3
  295. package/lib-commonjs/components/NavCategoryItemContext.cjs.map +1 -1
  296. package/lib-commonjs/components/NavContext.cjs +3 -3
  297. package/lib-commonjs/components/NavContext.cjs.map +1 -1
  298. package/lib-commonjs/components/NavContext.types.cjs.map +1 -1
  299. package/lib-commonjs/components/NavDivider/NavDivider.cjs.map +1 -1
  300. package/lib-commonjs/components/NavDivider/NavDivider.module.css +6 -0
  301. package/lib-commonjs/components/NavDivider/NavDivider.types.cjs.map +1 -1
  302. package/lib-commonjs/components/NavDivider/index.cjs +5 -5
  303. package/lib-commonjs/components/NavDivider/index.cjs.map +1 -1
  304. package/lib-commonjs/components/NavDivider/useNavDivider.cjs.map +1 -1
  305. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.cjs +3 -3
  306. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.cjs.map +1 -1
  307. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.css.cjs +37 -0
  308. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.css.cjs.map +1 -0
  309. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.raw.cjs +3 -3
  310. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.raw.cjs.map +1 -1
  311. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.raw.css.cjs +37 -0
  312. package/lib-commonjs/components/NavDivider/useNavDividerStyles.styles.raw.css.cjs.map +1 -0
  313. package/lib-commonjs/components/NavDrawer/NavDrawer.cjs.map +1 -1
  314. package/lib-commonjs/components/NavDrawer/NavDrawer.module.css +9 -0
  315. package/lib-commonjs/components/NavDrawer/NavDrawer.types.cjs.map +1 -1
  316. package/lib-commonjs/components/NavDrawer/index.cjs +6 -6
  317. package/lib-commonjs/components/NavDrawer/index.cjs.map +1 -1
  318. package/lib-commonjs/components/NavDrawer/renderNavDrawer.cjs.map +1 -1
  319. package/lib-commonjs/components/NavDrawer/useNavDrawer.cjs.map +1 -1
  320. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.cjs +3 -3
  321. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.cjs.map +1 -1
  322. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.css.cjs +28 -0
  323. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.css.cjs.map +1 -0
  324. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.raw.cjs +3 -3
  325. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.raw.cjs.map +1 -1
  326. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.raw.css.cjs +28 -0
  327. package/lib-commonjs/components/NavDrawer/useNavDrawerStyles.styles.raw.css.cjs.map +1 -0
  328. package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.cjs.map +1 -1
  329. package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.module.css +9 -0
  330. package/lib-commonjs/components/NavDrawerBody/NavDrawerBody.types.cjs.map +1 -1
  331. package/lib-commonjs/components/NavDrawerBody/index.cjs +5 -5
  332. package/lib-commonjs/components/NavDrawerBody/index.cjs.map +1 -1
  333. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBody.cjs.map +1 -1
  334. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.cjs +3 -3
  335. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.cjs.map +1 -1
  336. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.css.cjs +32 -0
  337. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.css.cjs.map +1 -0
  338. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.cjs +3 -3
  339. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.cjs.map +1 -1
  340. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.css.cjs +32 -0
  341. package/lib-commonjs/components/NavDrawerBody/useNavDrawerBodyStyles.styles.raw.css.cjs.map +1 -0
  342. package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.cjs.map +1 -1
  343. package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.module.css +7 -0
  344. package/lib-commonjs/components/NavDrawerFooter/NavDrawerFooter.types.cjs.map +1 -1
  345. package/lib-commonjs/components/NavDrawerFooter/index.cjs +5 -5
  346. package/lib-commonjs/components/NavDrawerFooter/index.cjs.map +1 -1
  347. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooter.cjs.map +1 -1
  348. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.cjs +3 -3
  349. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.cjs.map +1 -1
  350. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.css.cjs +32 -0
  351. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.css.cjs.map +1 -0
  352. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.cjs +3 -3
  353. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.cjs.map +1 -1
  354. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.css.cjs +32 -0
  355. package/lib-commonjs/components/NavDrawerFooter/useNavDrawerFooterStyles.styles.raw.css.cjs.map +1 -0
  356. package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.cjs.map +1 -1
  357. package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.module.css +7 -0
  358. package/lib-commonjs/components/NavDrawerHeader/NavDrawerHeader.types.cjs.map +1 -1
  359. package/lib-commonjs/components/NavDrawerHeader/index.cjs +5 -5
  360. package/lib-commonjs/components/NavDrawerHeader/index.cjs.map +1 -1
  361. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeader.cjs.map +1 -1
  362. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.cjs +3 -3
  363. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.cjs.map +1 -1
  364. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.css.cjs +32 -0
  365. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.css.cjs.map +1 -0
  366. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.cjs +3 -3
  367. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.cjs.map +1 -1
  368. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.css.cjs +32 -0
  369. package/lib-commonjs/components/NavDrawerHeader/useNavDrawerHeaderStyles.styles.raw.css.cjs.map +1 -0
  370. package/lib-commonjs/components/NavItem/NavItem.cjs.map +1 -1
  371. package/lib-commonjs/components/NavItem/NavItem.module.css +1 -0
  372. package/lib-commonjs/components/NavItem/NavItem.types.cjs.map +1 -1
  373. package/lib-commonjs/components/NavItem/index.cjs +7 -7
  374. package/lib-commonjs/components/NavItem/index.cjs.map +1 -1
  375. package/lib-commonjs/components/NavItem/renderNavItem.cjs.map +1 -1
  376. package/lib-commonjs/components/NavItem/useNavItem.cjs +3 -3
  377. package/lib-commonjs/components/NavItem/useNavItem.cjs.map +1 -1
  378. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.cjs +3 -3
  379. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.cjs.map +1 -1
  380. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.css.cjs +38 -0
  381. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.css.cjs.map +1 -0
  382. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.raw.cjs +3 -3
  383. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.raw.cjs.map +1 -1
  384. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.raw.css.cjs +38 -0
  385. package/lib-commonjs/components/NavItem/useNavItemStyles.styles.raw.css.cjs.map +1 -0
  386. package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.cjs.map +1 -1
  387. package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.module.css +10 -0
  388. package/lib-commonjs/components/NavSectionHeader/NavSectionHeader.types.cjs.map +1 -1
  389. package/lib-commonjs/components/NavSectionHeader/index.cjs +6 -6
  390. package/lib-commonjs/components/NavSectionHeader/index.cjs.map +1 -1
  391. package/lib-commonjs/components/NavSectionHeader/renderNavSectionHeader.cjs.map +1 -1
  392. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeader.cjs.map +1 -1
  393. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.cjs +3 -3
  394. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.cjs.map +1 -1
  395. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.css.cjs +28 -0
  396. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.css.cjs.map +1 -0
  397. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.cjs +3 -3
  398. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.cjs.map +1 -1
  399. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.css.cjs +28 -0
  400. package/lib-commonjs/components/NavSectionHeader/useNavSectionHeaderStyles.styles.raw.css.cjs.map +1 -0
  401. package/lib-commonjs/components/NavSubItem/NavSubItem.cjs.map +1 -1
  402. package/lib-commonjs/components/NavSubItem/NavSubItem.module.css +10 -0
  403. package/lib-commonjs/components/NavSubItem/NavSubItem.types.cjs.map +1 -1
  404. package/lib-commonjs/components/NavSubItem/index.cjs +7 -7
  405. package/lib-commonjs/components/NavSubItem/index.cjs.map +1 -1
  406. package/lib-commonjs/components/NavSubItem/renderNavSubItem.cjs.map +1 -1
  407. package/lib-commonjs/components/NavSubItem/useNavSubItem.cjs +3 -3
  408. package/lib-commonjs/components/NavSubItem/useNavSubItem.cjs.map +1 -1
  409. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.cjs +3 -3
  410. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.cjs.map +1 -1
  411. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.css.cjs +33 -0
  412. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.css.cjs.map +1 -0
  413. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.raw.cjs +3 -3
  414. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.raw.cjs.map +1 -1
  415. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.raw.css.cjs +33 -0
  416. package/lib-commonjs/components/NavSubItem/useNavSubItemStyles.styles.raw.css.cjs.map +1 -0
  417. package/lib-commonjs/components/NavSubItemContext.cjs +3 -3
  418. package/lib-commonjs/components/NavSubItemContext.cjs.map +1 -1
  419. package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.cjs.map +1 -1
  420. package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.module.css +7 -0
  421. package/lib-commonjs/components/NavSubItemGroup/NavSubItemGroup.types.cjs.map +1 -1
  422. package/lib-commonjs/components/NavSubItemGroup/index.cjs +7 -7
  423. package/lib-commonjs/components/NavSubItemGroup/index.cjs.map +1 -1
  424. package/lib-commonjs/components/NavSubItemGroup/renderNavSubItemGroup.cjs.map +1 -1
  425. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.cjs +3 -3
  426. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroup.cjs.map +1 -1
  427. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.cjs +3 -3
  428. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.cjs.map +1 -1
  429. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.css.cjs +28 -0
  430. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.css.cjs.map +1 -0
  431. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.cjs +3 -3
  432. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.cjs.map +1 -1
  433. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.css.cjs +28 -0
  434. package/lib-commonjs/components/NavSubItemGroup/useNavSubItemGroupStyles.styles.raw.css.cjs.map +1 -0
  435. package/lib-commonjs/components/SplitNavItem/SplitNavItem.cjs.map +1 -1
  436. package/lib-commonjs/components/SplitNavItem/SplitNavItem.module.css +52 -0
  437. package/lib-commonjs/components/SplitNavItem/SplitNavItem.types.cjs.map +1 -1
  438. package/lib-commonjs/components/SplitNavItem/index.cjs +6 -6
  439. package/lib-commonjs/components/SplitNavItem/index.cjs.map +1 -1
  440. package/lib-commonjs/components/SplitNavItem/renderSplitNavItem.cjs.map +1 -1
  441. package/lib-commonjs/components/SplitNavItem/useSplitNavItem.cjs.map +1 -1
  442. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.cjs +3 -3
  443. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.cjs.map +1 -1
  444. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.css.cjs +57 -0
  445. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.css.cjs.map +1 -0
  446. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.raw.cjs +3 -3
  447. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.raw.cjs.map +1 -1
  448. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.raw.css.cjs +57 -0
  449. package/lib-commonjs/components/SplitNavItem/useSplitNavItemStyles.styles.raw.css.cjs.map +1 -0
  450. package/lib-commonjs/components/sharedNavStyles.module.css +126 -0
  451. package/lib-commonjs/components/sharedNavStyles.styles.cjs +7 -7
  452. package/lib-commonjs/components/sharedNavStyles.styles.cjs.map +1 -1
  453. package/lib-commonjs/components/sharedNavStyles.styles.css.cjs +66 -0
  454. package/lib-commonjs/components/sharedNavStyles.styles.css.cjs.map +1 -0
  455. package/lib-commonjs/components/sharedNavStyles.styles.raw.cjs +7 -7
  456. package/lib-commonjs/components/sharedNavStyles.styles.raw.cjs.map +1 -1
  457. package/lib-commonjs/components/sharedNavStyles.styles.raw.css.cjs +66 -0
  458. package/lib-commonjs/components/sharedNavStyles.styles.raw.css.cjs.map +1 -0
  459. package/lib-commonjs/components/useNavCategoryContextValues_unstable.cjs.map +1 -1
  460. package/lib-commonjs/components/useNavCategoryItemContextValues_unstable.cjs.map +1 -1
  461. package/lib-commonjs/components/useNavContextValues.cjs.map +1 -1
  462. package/lib-commonjs/index.cjs +90 -90
  463. package/lib-commonjs/index.cjs.map +1 -1
  464. package/package.json +21 -21
  465. package/dist/metadata/api/api-root.json +0 -1
  466. package/dist/metadata/index.json +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Hamburger/useHamburgerStyles.styles.css.ts"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { HamburgerState } from './Hamburger.types';\nimport { useButtonStyles_unstable, type ButtonSlots } from '@fluentui/react-button';\nimport styles from './Hamburger.module.css';\n\nexport const hamburgerClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Hamburger',\n icon: 'fui-Hamburger__icon',\n};\n\nexport const useHamburgerStyles_unstable = (state: HamburgerState): HamburgerState => {\n useButtonStyles_unstable(state);\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(hamburgerClassNames.root, styles.root, state.root.className);\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = clsx(hamburgerClassNames.icon, state.icon.className);\n }\n return state;\n};\n"],"names":["clsx","useButtonStyles_unstable","styles","hamburgerClassNames","root","icon","useHamburgerStyles_unstable","state","className"],"mappings":"AAAA;AAEA,SAASA,IAAI,QAAQ,OAAO;AAG5B,SAASC,wBAAwB,QAA0B,yBAAyB;AACpF,OAAOC,YAAY,yBAAyB;AAE5C,OAAO,MAAMC,sBAAmD;IAC9DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,8BAA8B,CAACC;IAC1CN,yBAAyBM;IACzB,oDAAoD;IACpDA,MAAMH,IAAI,CAACI,SAAS,GAAGR,KAAKG,oBAAoBC,IAAI,EAAEF,OAAOE,IAAI,EAAEG,MAAMH,IAAI,CAACI,SAAS;IACvF,IAAID,MAAMF,IAAI,EAAE;QACd,oDAAoD;QACpDE,MAAMF,IAAI,CAACG,SAAS,GAAGR,KAAKG,oBAAoBE,IAAI,EAAEE,MAAMF,IAAI,CAACG,SAAS;IAC5E;IACA,OAAOD;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Hamburger/useHamburgerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { ButtonSlots } from '@fluentui/react-button';\nimport { useButtonStyles_unstable } from '@fluentui/react-button';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { HamburgerState } from './Hamburger.types';\nimport { navItemTokens } from '../sharedNavStyles.styles';\n\nexport const hamburgerClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Hamburger',\n icon: 'fui-Hamburger__icon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n textDecorationLine: 'none',\n backgroundColor: navItemTokens.backgroundColor,\n border: 'none',\n ':hover': {\n backgroundColor: navItemTokens.backgroundColorHover,\n },\n ':active': {\n backgroundColor: navItemTokens.backgroundColorPressed,\n },\n },\n});\n\n/**\n * Apply styling to the Hamburger slots based on the state\n */\nexport const useHamburgerStyles_unstable = (state: HamburgerState): HamburgerState => {\n useButtonStyles_unstable(state);\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(hamburgerClassNames.root, styles.root, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(hamburgerClassNames.icon, state.icon.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useButtonStyles_unstable","navItemTokens","hamburgerClassNames","root","icon","useStyles","textDecorationLine","backgroundColor","border","backgroundColorHover","backgroundColorPressed","useHamburgerStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,wBAAwB,QAAQ,yBAAyB;AAGlE,SAASC,aAAa,QAAQ,+BAA4B;AAE1D,OAAO,MAAMC,sBAAmD;IAC9DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BK,MAAM;QACJG,oBAAoB;QACpBC,iBAAiBN,cAAcM,eAAe;QAC9CC,QAAQ;QACR,UAAU;YACRD,iBAAiBN,cAAcQ,oBAAoB;QACrD;QACA,WAAW;YACTF,iBAAiBN,cAAcS,sBAAsB;QACvD;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CZ,yBAAyBY;IACzB,MAAMC,SAASR;IAEf,oDAAoD;IACpDO,MAAMT,IAAI,CAACW,SAAS,GAAGf,aAAaG,oBAAoBC,IAAI,EAAEU,OAAOV,IAAI,EAAES,MAAMT,IAAI,CAACW,SAAS;IAE/F,IAAIF,MAAMR,IAAI,EAAE;QACd,oDAAoD;QACpDQ,MAAMR,IAAI,CAACU,SAAS,GAAGf,aAAaG,oBAAoBE,IAAI,EAAEQ,MAAMR,IAAI,CAACU,SAAS;IACpF;IAEA,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Hamburger/useHamburgerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { ButtonSlots } from '@fluentui/react-button';\nimport { useButtonStyles_unstable } from '@fluentui/react-button';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { HamburgerState } from './Hamburger.types';\nimport { navItemTokens } from '../sharedNavStyles.styles';\n\nexport const hamburgerClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Hamburger',\n icon: 'fui-Hamburger__icon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n textDecorationLine: 'none',\n backgroundColor: navItemTokens.backgroundColor,\n border: 'none',\n ':hover': {\n backgroundColor: navItemTokens.backgroundColorHover,\n },\n ':active': {\n backgroundColor: navItemTokens.backgroundColorPressed,\n },\n },\n});\n\n/**\n * Apply styling to the Hamburger slots based on the state\n */\nexport const useHamburgerStyles_unstable = (state: HamburgerState): HamburgerState => {\n useButtonStyles_unstable(state);\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(hamburgerClassNames.root, styles.root, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(hamburgerClassNames.icon, state.icon.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useButtonStyles_unstable","navItemTokens","hamburgerClassNames","root","icon","useStyles","textDecorationLine","backgroundColor","border","backgroundColorHover","backgroundColorPressed","useHamburgerStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,wBAAwB,QAAQ,yBAAyB;AAGlE,SAASC,aAAa,QAAQ,+BAA4B;AAE1D,OAAO,MAAMC,sBAAmD;IAC9DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BK,MAAM;QACJG,oBAAoB;QACpBC,iBAAiBN,cAAcM,eAAe;QAC9CC,QAAQ;QACR,UAAU;YACRD,iBAAiBN,cAAcQ,oBAAoB;QACrD;QACA,WAAW;YACTF,iBAAiBN,cAAcS,sBAAsB;QACvD;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CZ,yBAAyBY;IACzB,MAAMC,SAASR;IAEf,oDAAoD;IACpDO,MAAMT,IAAI,CAACW,SAAS,GAAGf,aAAaG,oBAAoBC,IAAI,EAAEU,OAAOV,IAAI,EAAES,MAAMT,IAAI,CAACW,SAAS;IAE/F,IAAIF,MAAMR,IAAI,EAAE;QACd,oDAAoD;QACpDQ,MAAMR,IAAI,CAACU,SAAS,GAAGf,aAAaG,oBAAoBE,IAAI,EAAEQ,MAAMR,IAAI,CAACU,SAAS;IACpF;IAEA,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Nav/Nav.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNav_unstable } from './useNav';\nimport { renderNav_unstable } from './renderNav';\nimport { useNavStyles_unstable } from './useNavStyles.styles';\nimport { useNavContextValues_unstable } from '../useNavContextValues';\nimport type { NavProps } from './Nav.types';\n\n/**\n * Nav - A component that provides up to two levels of nesting for navigation.\n */\nexport const Nav: ForwardRefComponent<NavProps> = React.forwardRef((props, ref) => {\n const state = useNav_unstable(props, ref);\n\n const contextValues = useNavContextValues_unstable(state);\n\n useNavStyles_unstable(state);\n useCustomStyleHook_unstable('useHamburgerStyles_unstable')(state);\n\n return renderNav_unstable(state, contextValues);\n});\n\nNav.displayName = 'Nav';\n"],"names":["React","useCustomStyleHook_unstable","useNav_unstable","renderNav_unstable","useNavStyles_unstable","useNavContextValues_unstable","Nav","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,eAAe,QAAQ,cAAW;AAC3C,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,qBAAqB,QAAQ,2BAAwB;AAC9D,SAASC,4BAA4B,QAAQ,4BAAyB;AAGtE;;CAEC,GACD,OAAO,MAAMC,oBAAqCN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACzE,MAAMC,QAAQR,gBAAgBM,OAAOC;IAErC,MAAME,gBAAgBN,6BAA6BK;IAEnDN,sBAAsBM;IACtBT,4BAA4B,+BAA+BS;IAE3D,OAAOP,mBAAmBO,OAAOC;AACnC,GAAG;AAEHL,IAAIM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Nav/Nav.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNav_unstable } from './useNav';\nimport { renderNav_unstable } from './renderNav';\nimport { useNavStyles_unstable } from './useNavStyles.styles';\nimport { useNavContextValues_unstable } from '../useNavContextValues';\nimport type { NavProps } from './Nav.types';\n\n/**\n * Nav - A component that provides up to two levels of nesting for navigation.\n */\nexport const Nav: ForwardRefComponent<NavProps> = React.forwardRef((props, ref) => {\n const state = useNav_unstable(props, ref);\n\n const contextValues = useNavContextValues_unstable(state);\n\n useNavStyles_unstable(state);\n useCustomStyleHook_unstable('useHamburgerStyles_unstable')(state);\n\n return renderNav_unstable(state, contextValues);\n});\n\nNav.displayName = 'Nav';\n"],"names":["React","useCustomStyleHook_unstable","useNav_unstable","renderNav_unstable","useNavStyles_unstable","useNavContextValues_unstable","Nav","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,eAAe,QAAQ,cAAW;AAC3C,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,qBAAqB,QAAQ,2BAAwB;AAC9D,SAASC,4BAA4B,QAAQ,4BAAyB;AAGtE;;CAEC,GACD,OAAO,MAAMC,oBAAqCN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACzE,MAAMC,QAAQR,gBAAgBM,OAAOC;IAErC,MAAME,gBAAgBN,6BAA6BK;IAEnDN,sBAAsBM;IACtBT,4BAA4B,+BAA+BS;IAE3D,OAAOP,mBAAmBO,OAAOC;AACnC,GAAG;AAEHL,IAAIM,WAAW,GAAG"}
@@ -0,0 +1,6 @@
1
+ @layer fluentui {
2
+ .root {
3
+ display: flex;
4
+ flex-direction: column;
5
+ }
6
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Nav/Nav.types.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport type { ComponentProps, ComponentState, EventData, EventHandler, Slot } from '@fluentui/react-utilities';\nimport type { NavContextValue, NavItemValue } from '../NavContext.types';\n\nexport type NavSlots = {\n root: NonNullable<Slot<'div'>>;\n};\n\n/***\n * Indicates the vertical density of the Nav content.\n * This does not affect horizontal spacing.\n */\nexport type NavDensity = 'small' | 'medium';\n\n/**\n * Nav Props\n */\nexport type NavProps = ComponentProps<NavSlots> & {\n /**\n * The value of the navItem to be selected by default.\n * Typically useful when the selectedValue is uncontrolled.\n * Mutually exclusive with selectedValue.\n * Empty string indicates no selection.\n */\n defaultSelectedValue?: NavItemValue;\n\n /**\n * The value of the navCategory to be selected by default.\n * Typically useful when the selectedValue is uncontrolled.\n * Mutually exclusive with selectedValue.\n * Empty string indicates no selection.\n */\n defaultSelectedCategoryValue?: NavItemValue;\n\n /**\n * Set of categories that are opened by default.\n * Typically useful when the openCategories is uncontrolled.\n */\n defaultOpenCategories?: NavItemValue[];\n\n /**\n * Controls the open categories.\n * For use in controlled scenarios.\n */\n openCategories?: NavItemValue[];\n\n /**\n * Raised when a navItem is selected.\n * If the navItem is child of a category, the categoryValue will be provided\n */\n onNavItemSelect?: EventHandler<OnNavItemSelectData>;\n\n /**\n * The value of the currently selected navItem.\n * Mutually exclusive with defaultSelectedValue.\n * @default undefined\n */\n selectedValue?: NavItemValue;\n\n /**\n * Indicates a category that has a selected child\n * Will show the category as selected if it is closed.\n * @default undefined\n */\n selectedCategoryValue?: NavItemValue;\n\n /**\n * Indicates if Nav supports multiple open Categories at the same time.\n * @default true, indicating that multiple categories can be open at the same time.\n */\n multiple?: boolean;\n\n /**\n * Callback raised when a NavCategoryItem is toggled.\n */\n onNavCategoryItemToggle?: EventHandler<OnNavItemSelectData>;\n\n /**\n * The vertical density of the Nav and it's children\n * @default 'medium'\n */\n density?: NavDensity;\n};\n\nexport type NavBaseProps = Omit<NavProps, 'density'>;\n\nexport type OnNavItemSelectData = EventData<'click', React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>> & {\n /**\n * The value of the selected navItem.\n * In the case of a category selection, this will be the value of the selected category.\n */\n value: NavItemValue;\n\n /**\n * The parent value of the selected navSubItem\n * Null if not a child of a category\n */\n categoryValue?: NavItemValue;\n};\n\n/**\n * State used in rendering Nav\n */\nexport type NavState = ComponentState<NavSlots> & NavContextValue;\n\nexport type NavBaseState = Omit<NavState, 'density' | 'tabbable'>;\n"],"names":[],"mappings":"AA0GA,WAAkE"}
1
+ {"version":3,"sources":["../../../src/components/Nav/Nav.types.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport type { ComponentProps, ComponentState, EventData, EventHandler, Slot } from '@fluentui/react-utilities';\nimport type { NavContextValue, NavItemValue } from '../NavContext.types';\n\nexport type NavSlots = {\n root: NonNullable<Slot<'div'>>;\n};\n\n/***\n * Indicates the vertical density of the Nav content.\n * This does not affect horizontal spacing.\n */\nexport type NavDensity = 'small' | 'medium';\n\n/**\n * Nav Props\n */\nexport type NavProps = ComponentProps<NavSlots> & {\n /**\n * The value of the navItem to be selected by default.\n * Typically useful when the selectedValue is uncontrolled.\n * Mutually exclusive with selectedValue.\n * Empty string indicates no selection.\n */\n defaultSelectedValue?: NavItemValue;\n\n /**\n * The value of the navCategory to be selected by default.\n * Typically useful when the selectedValue is uncontrolled.\n * Mutually exclusive with selectedValue.\n * Empty string indicates no selection.\n */\n defaultSelectedCategoryValue?: NavItemValue;\n\n /**\n * Set of categories that are opened by default.\n * Typically useful when the openCategories is uncontrolled.\n */\n defaultOpenCategories?: NavItemValue[];\n\n /**\n * Controls the open categories.\n * For use in controlled scenarios.\n */\n openCategories?: NavItemValue[];\n\n /**\n * Raised when a navItem is selected.\n * If the navItem is child of a category, the categoryValue will be provided\n */\n onNavItemSelect?: EventHandler<OnNavItemSelectData>;\n\n /**\n * The value of the currently selected navItem.\n * Mutually exclusive with defaultSelectedValue.\n * @default undefined\n */\n selectedValue?: NavItemValue;\n\n /**\n * Indicates a category that has a selected child\n * Will show the category as selected if it is closed.\n * @default undefined\n */\n selectedCategoryValue?: NavItemValue;\n\n /**\n * Indicates if Nav supports multiple open Categories at the same time.\n * @default true, indicating that multiple categories can be open at the same time.\n */\n multiple?: boolean;\n\n /**\n * Callback raised when a NavCategoryItem is toggled.\n */\n onNavCategoryItemToggle?: EventHandler<OnNavItemSelectData>;\n\n /**\n * The vertical density of the Nav and it's children\n * @default 'medium'\n */\n density?: NavDensity;\n};\n\nexport type NavBaseProps = Omit<NavProps, 'density'>;\n\nexport type OnNavItemSelectData = EventData<'click', React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>> & {\n /**\n * The value of the selected navItem.\n * In the case of a category selection, this will be the value of the selected category.\n */\n value: NavItemValue;\n\n /**\n * The parent value of the selected navSubItem\n * Null if not a child of a category\n */\n categoryValue?: NavItemValue;\n};\n\n/**\n * State used in rendering Nav\n */\nexport type NavState = ComponentState<NavSlots> & NavContextValue;\n\nexport type NavBaseState = Omit<NavState, 'density' | 'tabbable'>;\n"],"names":[],"mappings":"AA0GA,WAAkE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Nav/index.ts"],"sourcesContent":["export { Nav } from './Nav';\nexport type {\n NavSlots,\n NavProps,\n OnNavItemSelectData,\n NavState,\n NavDensity,\n NavBaseProps,\n NavBaseState,\n} from './Nav.types';\nexport { renderNav_unstable } from './renderNav';\nexport { useNav_unstable, useNavBase_unstable } from './useNav';\nexport { useNavStyles_unstable, navClassNames } from './useNavStyles.styles';\n"],"names":["Nav","renderNav_unstable","useNav_unstable","useNavBase_unstable","useNavStyles_unstable","navClassNames"],"mappings":"AAAA,SAASA,GAAG,QAAQ,WAAQ;AAU5B,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,cAAW;AAChE,SAASC,qBAAqB,EAAEC,aAAa,QAAQ,2BAAwB"}
1
+ {"version":3,"sources":["../../../src/components/Nav/index.ts"],"sourcesContent":["export { Nav } from './Nav';\nexport type {\n NavSlots,\n NavProps,\n OnNavItemSelectData,\n NavState,\n NavDensity,\n NavBaseProps,\n NavBaseState,\n} from './Nav.types';\nexport { renderNav_unstable } from './renderNav';\nexport { useNav_unstable, useNavBase_unstable } from './useNav';\nexport { useNavStyles_unstable, navClassNames } from './useNavStyles.styles';\n"],"names":["Nav","renderNav_unstable","useNav_unstable","useNavBase_unstable","useNavStyles_unstable","navClassNames"],"mappings":"AAAA,SAASA,GAAG,QAAQ,WAAQ;AAU5B,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,cAAW;AAChE,SAASC,qBAAqB,EAAEC,aAAa,QAAQ,2BAAwB"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  import { NavProvider } from "../NavContext.js";
4
4
  export const renderNav_unstable = (state, contextValues)=>{
5
5
  assertSlots(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Nav/renderNav.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { NavProvider } from '../NavContext';\nimport type { NavState, NavSlots } from './Nav.types';\nimport type { NavContextValues } from '../NavContext.types';\n\nexport const renderNav_unstable = (state: NavState, contextValues: NavContextValues): JSXElement => {\n assertSlots<NavSlots>(state);\n\n return (\n <NavProvider value={contextValues.nav}>\n <state.root />\n </NavProvider>\n );\n};\n"],"names":["assertSlots","NavProvider","renderNav_unstable","state","contextValues","value","nav","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,WAAW,QAAQ,mBAAgB;AAI5C,OAAO,MAAMC,qBAAqB,CAACC,OAAiBC;IAClDJ,YAAsBG;IAEtB,qBACE,KAACF;QAAYI,OAAOD,cAAcE,GAAG;kBACnC,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Nav/renderNav.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { NavProvider } from '../NavContext';\nimport type { NavState, NavSlots } from './Nav.types';\nimport type { NavContextValues } from '../NavContext.types';\n\nexport const renderNav_unstable = (state: NavState, contextValues: NavContextValues): JSXElement => {\n assertSlots<NavSlots>(state);\n\n return (\n <NavProvider value={contextValues.nav}>\n <state.root />\n </NavProvider>\n );\n};\n"],"names":["assertSlots","NavProvider","renderNav_unstable","state","contextValues","value","nav","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,WAAW,QAAQ,mBAAgB;AAI5C,OAAO,MAAMC,qBAAqB,CAACC,OAAiBC;IAClDJ,YAAsBG;IAEtB,qBACE,KAACF;QAAYI,OAAOD,cAAcE,GAAG;kBACnC,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Nav/useNav.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { EventHandler } from '@fluentui/react-utilities';\nimport {\n useControllableState,\n useEventCallback,\n useMergedRefs,\n slot,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport type { NavBaseProps, NavBaseState, NavProps, NavState, OnNavItemSelectData } from './Nav.types';\nimport type { NavItemRegisterData, NavItemValue } from '../NavContext.types';\n\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */\nfunction initializeUncontrolledOpenCategories({\n defaultOpenCategories,\n multiple,\n}: Pick<NavProps, 'defaultOpenCategories' | 'multiple'>): NavItemValue[] | undefined {\n if (defaultOpenCategories !== undefined) {\n if (Array.isArray(defaultOpenCategories)) {\n return multiple ? defaultOpenCategories : [defaultOpenCategories[0]];\n }\n return [defaultOpenCategories];\n }\n return undefined;\n}\n\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Nav supports open categories at the same time\n */\nconst updateOpenCategories = (value: NavItemValue, previousOpenItems: NavItemValue[], multiple: boolean) => {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n return previousOpenItems.filter(i => i !== value);\n } else {\n return [...previousOpenItems, value];\n }\n }\n\n return previousOpenItems[0] === value ? [] : [value];\n};\n\n/**\n * Create the state required to render Nav.\n *\n * The returned state can be modified with hooks such as useNavStyles,\n * before being passed to renderNav.\n *\n * @param props - props from this instance of Nav\n * @param ref - reference to root HTMLDivElement of Nav\n */\nexport const useNav_unstable = (props: NavProps, ref: React.Ref<HTMLDivElement>): NavState => {\n const { density = 'medium' } = props;\n\n const state = useNavBase_unstable(props, ref);\n\n return {\n ...state,\n density,\n tabbable: false,\n };\n};\n\nexport const useNavBase_unstable = (props: NavBaseProps, ref: React.Ref<HTMLDivElement>): NavBaseState => {\n const {\n onNavItemSelect,\n onNavCategoryItemToggle,\n multiple = true,\n openCategories: controlledOpenCategoryItems,\n selectedCategoryValue: controlledSelectedCategoryValue,\n selectedValue: controlledSelectedValue,\n defaultOpenCategories,\n defaultSelectedValue,\n defaultSelectedCategoryValue,\n } = props;\n\n const innerRef = React.useRef<HTMLElement>(null);\n\n const [openCategories, setOpenCategories] = useControllableState({\n state: controlledOpenCategoryItems,\n defaultState: initializeUncontrolledOpenCategories({ defaultOpenCategories, multiple }),\n initialState: [],\n });\n\n const [selectedCategoryValue, setSelectedCategoryValue] = useControllableState({\n state: controlledSelectedCategoryValue,\n defaultState: defaultSelectedCategoryValue,\n initialState: undefined,\n });\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: controlledSelectedValue,\n defaultState: defaultSelectedValue,\n initialState: undefined,\n });\n\n // considered usePrevious, but it is sensitive to re-renders\n // this could cause the previous to move to current in the case where the navItem list re-renders.\n // these refs avoid getRegisteredNavItems changing when selectedValue changes and causing\n // renders for navItems that have not changed.\n const currentSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n\n const currentSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedValue.current !== selectedValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedValue.current = currentSelectedValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedValue.current = selectedValue;\n }\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedCategoryValue.current !== selectedCategoryValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedCategoryValue.current = currentSelectedCategoryValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedCategoryValue.current = selectedCategoryValue;\n }\n\n // used for NavItems and NavSubItems\n const onSelect: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n setSelectedValue(data.value);\n setSelectedCategoryValue(data.categoryValue ? data.categoryValue : '');\n onNavItemSelect?.(event, data);\n });\n\n // used for NavCategoryItems\n const onRequestNavCategoryItemToggle: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n if (data.categoryValue !== undefined) {\n const nextOpenCategories = updateOpenCategories(data.categoryValue, openCategories ?? [], multiple);\n onNavCategoryItemToggle?.(event, data);\n setOpenCategories(nextOpenCategories);\n }\n });\n\n const registeredNavItems = React.useRef<Record<string, NavItemRegisterData>>({});\n\n const onRegister = React.useCallback((data: NavItemRegisterData) => {\n registeredNavItems.current[JSON.stringify(data.value)] = data;\n }, []);\n\n const onUnregister = React.useCallback((data: NavItemRegisterData) => {\n delete registeredNavItems.current[JSON.stringify(data.value)];\n }, []);\n\n const getRegisteredNavItems = React.useCallback(() => {\n return {\n selectedValue: currentSelectedValue.current,\n previousSelectedValue: previousSelectedValue.current,\n selectedCategoryValue: currentSelectedCategoryValue.current,\n previousSelectedCategoryValue: previousSelectedCategoryValue.current,\n registeredNavItems: registeredNavItems.current,\n };\n }, []);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, innerRef) as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n openCategories,\n selectedValue,\n selectedCategoryValue,\n onRegister,\n onUnregister,\n onSelect,\n getRegisteredNavItems,\n onRequestNavCategoryItemToggle,\n multiple,\n };\n};\n"],"names":["React","useControllableState","useEventCallback","useMergedRefs","slot","getIntrinsicElementProps","initializeUncontrolledOpenCategories","defaultOpenCategories","multiple","undefined","Array","isArray","updateOpenCategories","value","previousOpenItems","includes","filter","i","useNav_unstable","props","ref","density","state","useNavBase_unstable","tabbable","onNavItemSelect","onNavCategoryItemToggle","openCategories","controlledOpenCategoryItems","selectedCategoryValue","controlledSelectedCategoryValue","selectedValue","controlledSelectedValue","defaultSelectedValue","defaultSelectedCategoryValue","innerRef","useRef","setOpenCategories","defaultState","initialState","setSelectedCategoryValue","setSelectedValue","currentSelectedValue","previousSelectedValue","currentSelectedCategoryValue","previousSelectedCategoryValue","current","onSelect","event","data","categoryValue","onRequestNavCategoryItemToggle","nextOpenCategories","registeredNavItems","onRegister","useCallback","JSON","stringify","onUnregister","getRegisteredNavItems","components","root","always","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,oBAAoB,EACpBC,gBAAgB,EAChBC,aAAa,EACbC,IAAI,EACJC,wBAAwB,QACnB,4BAA4B;AAKnC;;CAEC,GACD,SAASC,qCAAqC,EAC5CC,qBAAqB,EACrBC,QAAQ,EAC6C;IACrD,IAAID,0BAA0BE,WAAW;QACvC,IAAIC,MAAMC,OAAO,CAACJ,wBAAwB;YACxC,OAAOC,WAAWD,wBAAwB;gBAACA,qBAAqB,CAAC,EAAE;aAAC;QACtE;QACA,OAAO;YAACA;SAAsB;IAChC;IACA,OAAOE;AACT;AAEA;;;;;CAKC,GACD,MAAMG,uBAAuB,CAACC,OAAqBC,mBAAmCN;IACpF,IAAIA,UAAU;QACZ,IAAIM,kBAAkBC,QAAQ,CAACF,QAAQ;YACrC,OAAOC,kBAAkBE,MAAM,CAACC,CAAAA,IAAKA,MAAMJ;QAC7C,OAAO;YACL,OAAO;mBAAIC;gBAAmBD;aAAM;QACtC;IACF;IAEA,OAAOC,iBAAiB,CAAC,EAAE,KAAKD,QAAQ,EAAE,GAAG;QAACA;KAAM;AACtD;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMK,kBAAkB,CAACC,OAAiBC;IAC/C,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGF;IAE/B,MAAMG,QAAQC,oBAAoBJ,OAAOC;IAEzC,OAAO;QACL,GAAGE,KAAK;QACRD;QACAG,UAAU;IACZ;AACF,EAAE;AAEF,OAAO,MAAMD,sBAAsB,CAACJ,OAAqBC;IACvD,MAAM,EACJK,eAAe,EACfC,uBAAuB,EACvBlB,WAAW,IAAI,EACfmB,gBAAgBC,2BAA2B,EAC3CC,uBAAuBC,+BAA+B,EACtDC,eAAeC,uBAAuB,EACtCzB,qBAAqB,EACrB0B,oBAAoB,EACpBC,4BAA4B,EAC7B,GAAGf;IAEJ,MAAMgB,WAAWnC,MAAMoC,MAAM,CAAc;IAE3C,MAAM,CAACT,gBAAgBU,kBAAkB,GAAGpC,qBAAqB;QAC/DqB,OAAOM;QACPU,cAAchC,qCAAqC;YAAEC;YAAuBC;QAAS;QACrF+B,cAAc,EAAE;IAClB;IAEA,MAAM,CAACV,uBAAuBW,yBAAyB,GAAGvC,qBAAqB;QAC7EqB,OAAOQ;QACPQ,cAAcJ;QACdK,cAAc9B;IAChB;IAEA,MAAM,CAACsB,eAAeU,iBAAiB,GAAGxC,qBAAqB;QAC7DqB,OAAOU;QACPM,cAAcL;QACdM,cAAc9B;IAChB;IAEA,4DAA4D;IAC5D,kGAAkG;IAClG,yFAAyF;IACzF,8CAA8C;IAC9C,MAAMiC,uBAAuB1C,MAAMoC,MAAM,CAA2B3B;IACpE,MAAMkC,wBAAwB3C,MAAMoC,MAAM,CAA2B3B;IAErE,MAAMmC,+BAA+B5C,MAAMoC,MAAM,CAA2B3B;IAC5E,MAAMoC,gCAAgC7C,MAAMoC,MAAM,CAA2B3B;IAE7E,4CAA4C;IAC5C,IAAIiC,qBAAqBI,OAAO,KAAKf,eAAe;QAClD,4CAA4C;QAC5CY,sBAAsBG,OAAO,GAAGJ,qBAAqBI,OAAO;QAC5D,4CAA4C;QAC5CJ,qBAAqBI,OAAO,GAAGf;IACjC;IAEA,4CAA4C;IAC5C,IAAIa,6BAA6BE,OAAO,KAAKjB,uBAAuB;QAClE,4CAA4C;QAC5CgB,8BAA8BC,OAAO,GAAGF,6BAA6BE,OAAO;QAC5E,4CAA4C;QAC5CF,6BAA6BE,OAAO,GAAGjB;IACzC;IAEA,oCAAoC;IACpC,MAAMkB,WAA8C7C,iBAAiB,CAAC8C,OAAOC;QAC3ER,iBAAiBQ,KAAKpC,KAAK;QAC3B2B,yBAAyBS,KAAKC,aAAa,GAAGD,KAAKC,aAAa,GAAG;QACnEzB,4BAAAA,sCAAAA,gBAAkBuB,OAAOC;IAC3B;IAEA,4BAA4B;IAC5B,MAAME,iCAAoEjD,iBAAiB,CAAC8C,OAAOC;QACjG,IAAIA,KAAKC,aAAa,KAAKzC,WAAW;YACpC,MAAM2C,qBAAqBxC,qBAAqBqC,KAAKC,aAAa,EAAEvB,2BAAAA,4BAAAA,iBAAkB,EAAE,EAAEnB;YAC1FkB,oCAAAA,8CAAAA,wBAA0BsB,OAAOC;YACjCZ,kBAAkBe;QACpB;IACF;IAEA,MAAMC,qBAAqBrD,MAAMoC,MAAM,CAAsC,CAAC;IAE9E,MAAMkB,aAAatD,MAAMuD,WAAW,CAAC,CAACN;QACpCI,mBAAmBP,OAAO,CAACU,KAAKC,SAAS,CAACR,KAAKpC,KAAK,EAAE,GAAGoC;IAC3D,GAAG,EAAE;IAEL,MAAMS,eAAe1D,MAAMuD,WAAW,CAAC,CAACN;QACtC,OAAOI,mBAAmBP,OAAO,CAACU,KAAKC,SAAS,CAACR,KAAKpC,KAAK,EAAE;IAC/D,GAAG,EAAE;IAEL,MAAM8C,wBAAwB3D,MAAMuD,WAAW,CAAC;QAC9C,OAAO;YACLxB,eAAeW,qBAAqBI,OAAO;YAC3CH,uBAAuBA,sBAAsBG,OAAO;YACpDjB,uBAAuBe,6BAA6BE,OAAO;YAC3DD,+BAA+BA,8BAA8BC,OAAO;YACpEO,oBAAoBA,mBAAmBP,OAAO;QAChD;IACF,GAAG,EAAE;IAEL,OAAO;QACLc,YAAY;YACVC,MAAM;QACR;QACAA,MAAMzD,KAAK0D,MAAM,CACfzD,yBAAyB,OAAO;YAC9Be,KAAKjB,cAAciB,KAAKe;YACxB,GAAGhB,KAAK;QACV,IACA;YAAE4C,aAAa;QAAM;QAEvBpC;QACAI;QACAF;QACAyB;QACAI;QACAX;QACAY;QACAR;QACA3C;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Nav/useNav.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { EventHandler } from '@fluentui/react-utilities';\nimport {\n useControllableState,\n useEventCallback,\n useMergedRefs,\n slot,\n getIntrinsicElementProps,\n} from '@fluentui/react-utilities';\n\nimport type { NavBaseProps, NavBaseState, NavProps, NavState, OnNavItemSelectData } from './Nav.types';\nimport type { NavItemRegisterData, NavItemValue } from '../NavContext.types';\n\n/**\n * Initial value for the uncontrolled case of the list of open indexes\n */\nfunction initializeUncontrolledOpenCategories({\n defaultOpenCategories,\n multiple,\n}: Pick<NavProps, 'defaultOpenCategories' | 'multiple'>): NavItemValue[] | undefined {\n if (defaultOpenCategories !== undefined) {\n if (Array.isArray(defaultOpenCategories)) {\n return multiple ? defaultOpenCategories : [defaultOpenCategories[0]];\n }\n return [defaultOpenCategories];\n }\n return undefined;\n}\n\n/**\n * Updates the list of open indexes based on an index that changes\n * @param value - the index that will change\n * @param previousOpenItems - list of current open indexes\n * @param multiple - if Nav supports open categories at the same time\n */\nconst updateOpenCategories = (value: NavItemValue, previousOpenItems: NavItemValue[], multiple: boolean) => {\n if (multiple) {\n if (previousOpenItems.includes(value)) {\n return previousOpenItems.filter(i => i !== value);\n } else {\n return [...previousOpenItems, value];\n }\n }\n\n return previousOpenItems[0] === value ? [] : [value];\n};\n\n/**\n * Create the state required to render Nav.\n *\n * The returned state can be modified with hooks such as useNavStyles,\n * before being passed to renderNav.\n *\n * @param props - props from this instance of Nav\n * @param ref - reference to root HTMLDivElement of Nav\n */\nexport const useNav_unstable = (props: NavProps, ref: React.Ref<HTMLDivElement>): NavState => {\n const { density = 'medium' } = props;\n\n const state = useNavBase_unstable(props, ref);\n\n return {\n ...state,\n density,\n tabbable: false,\n };\n};\n\nexport const useNavBase_unstable = (props: NavBaseProps, ref: React.Ref<HTMLDivElement>): NavBaseState => {\n const {\n onNavItemSelect,\n onNavCategoryItemToggle,\n multiple = true,\n openCategories: controlledOpenCategoryItems,\n selectedCategoryValue: controlledSelectedCategoryValue,\n selectedValue: controlledSelectedValue,\n defaultOpenCategories,\n defaultSelectedValue,\n defaultSelectedCategoryValue,\n } = props;\n\n const innerRef = React.useRef<HTMLElement>(null);\n\n const [openCategories, setOpenCategories] = useControllableState({\n state: controlledOpenCategoryItems,\n defaultState: initializeUncontrolledOpenCategories({ defaultOpenCategories, multiple }),\n initialState: [],\n });\n\n const [selectedCategoryValue, setSelectedCategoryValue] = useControllableState({\n state: controlledSelectedCategoryValue,\n defaultState: defaultSelectedCategoryValue,\n initialState: undefined,\n });\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: controlledSelectedValue,\n defaultState: defaultSelectedValue,\n initialState: undefined,\n });\n\n // considered usePrevious, but it is sensitive to re-renders\n // this could cause the previous to move to current in the case where the navItem list re-renders.\n // these refs avoid getRegisteredNavItems changing when selectedValue changes and causing\n // renders for navItems that have not changed.\n const currentSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedValue = React.useRef<NavItemValue | undefined>(undefined);\n\n const currentSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n const previousSelectedCategoryValue = React.useRef<NavItemValue | undefined>(undefined);\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedValue.current !== selectedValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedValue.current = currentSelectedValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedValue.current = selectedValue;\n }\n\n // eslint-disable-next-line react-hooks/refs\n if (currentSelectedCategoryValue.current !== selectedCategoryValue) {\n // eslint-disable-next-line react-hooks/refs\n previousSelectedCategoryValue.current = currentSelectedCategoryValue.current;\n // eslint-disable-next-line react-hooks/refs\n currentSelectedCategoryValue.current = selectedCategoryValue;\n }\n\n // used for NavItems and NavSubItems\n const onSelect: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n setSelectedValue(data.value);\n setSelectedCategoryValue(data.categoryValue ? data.categoryValue : '');\n onNavItemSelect?.(event, data);\n });\n\n // used for NavCategoryItems\n const onRequestNavCategoryItemToggle: EventHandler<OnNavItemSelectData> = useEventCallback((event, data) => {\n if (data.categoryValue !== undefined) {\n const nextOpenCategories = updateOpenCategories(data.categoryValue, openCategories ?? [], multiple);\n onNavCategoryItemToggle?.(event, data);\n setOpenCategories(nextOpenCategories);\n }\n });\n\n const registeredNavItems = React.useRef<Record<string, NavItemRegisterData>>({});\n\n const onRegister = React.useCallback((data: NavItemRegisterData) => {\n registeredNavItems.current[JSON.stringify(data.value)] = data;\n }, []);\n\n const onUnregister = React.useCallback((data: NavItemRegisterData) => {\n delete registeredNavItems.current[JSON.stringify(data.value)];\n }, []);\n\n const getRegisteredNavItems = React.useCallback(() => {\n return {\n selectedValue: currentSelectedValue.current,\n previousSelectedValue: previousSelectedValue.current,\n selectedCategoryValue: currentSelectedCategoryValue.current,\n previousSelectedCategoryValue: previousSelectedCategoryValue.current,\n registeredNavItems: registeredNavItems.current,\n };\n }, []);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, innerRef) as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n openCategories,\n selectedValue,\n selectedCategoryValue,\n onRegister,\n onUnregister,\n onSelect,\n getRegisteredNavItems,\n onRequestNavCategoryItemToggle,\n multiple,\n };\n};\n"],"names":["React","useControllableState","useEventCallback","useMergedRefs","slot","getIntrinsicElementProps","initializeUncontrolledOpenCategories","defaultOpenCategories","multiple","undefined","Array","isArray","updateOpenCategories","value","previousOpenItems","includes","filter","i","useNav_unstable","props","ref","density","state","useNavBase_unstable","tabbable","onNavItemSelect","onNavCategoryItemToggle","openCategories","controlledOpenCategoryItems","selectedCategoryValue","controlledSelectedCategoryValue","selectedValue","controlledSelectedValue","defaultSelectedValue","defaultSelectedCategoryValue","innerRef","useRef","setOpenCategories","defaultState","initialState","setSelectedCategoryValue","setSelectedValue","currentSelectedValue","previousSelectedValue","currentSelectedCategoryValue","previousSelectedCategoryValue","current","onSelect","event","data","categoryValue","onRequestNavCategoryItemToggle","nextOpenCategories","registeredNavItems","onRegister","useCallback","JSON","stringify","onUnregister","getRegisteredNavItems","components","root","always","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,oBAAoB,EACpBC,gBAAgB,EAChBC,aAAa,EACbC,IAAI,EACJC,wBAAwB,QACnB,4BAA4B;AAKnC;;CAEC,GACD,SAASC,qCAAqC,EAC5CC,qBAAqB,EACrBC,QAAQ,EAC6C;IACrD,IAAID,0BAA0BE,WAAW;QACvC,IAAIC,MAAMC,OAAO,CAACJ,wBAAwB;YACxC,OAAOC,WAAWD,wBAAwB;gBAACA,qBAAqB,CAAC,EAAE;aAAC;QACtE;QACA,OAAO;YAACA;SAAsB;IAChC;IACA,OAAOE;AACT;AAEA;;;;;CAKC,GACD,MAAMG,uBAAuB,CAACC,OAAqBC,mBAAmCN;IACpF,IAAIA,UAAU;QACZ,IAAIM,kBAAkBC,QAAQ,CAACF,QAAQ;YACrC,OAAOC,kBAAkBE,MAAM,CAACC,CAAAA,IAAKA,MAAMJ;QAC7C,OAAO;YACL,OAAO;mBAAIC;gBAAmBD;aAAM;QACtC;IACF;IAEA,OAAOC,iBAAiB,CAAC,EAAE,KAAKD,QAAQ,EAAE,GAAG;QAACA;KAAM;AACtD;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMK,kBAAkB,CAACC,OAAiBC;IAC/C,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGF;IAE/B,MAAMG,QAAQC,oBAAoBJ,OAAOC;IAEzC,OAAO;QACL,GAAGE,KAAK;QACRD;QACAG,UAAU;IACZ;AACF,EAAE;AAEF,OAAO,MAAMD,sBAAsB,CAACJ,OAAqBC;IACvD,MAAM,EACJK,eAAe,EACfC,uBAAuB,EACvBlB,WAAW,IAAI,EACfmB,gBAAgBC,2BAA2B,EAC3CC,uBAAuBC,+BAA+B,EACtDC,eAAeC,uBAAuB,EACtCzB,qBAAqB,EACrB0B,oBAAoB,EACpBC,4BAA4B,EAC7B,GAAGf;IAEJ,MAAMgB,WAAWnC,MAAMoC,MAAM,CAAc;IAE3C,MAAM,CAACT,gBAAgBU,kBAAkB,GAAGpC,qBAAqB;QAC/DqB,OAAOM;QACPU,cAAchC,qCAAqC;YAAEC;YAAuBC;QAAS;QACrF+B,cAAc,EAAE;IAClB;IAEA,MAAM,CAACV,uBAAuBW,yBAAyB,GAAGvC,qBAAqB;QAC7EqB,OAAOQ;QACPQ,cAAcJ;QACdK,cAAc9B;IAChB;IAEA,MAAM,CAACsB,eAAeU,iBAAiB,GAAGxC,qBAAqB;QAC7DqB,OAAOU;QACPM,cAAcL;QACdM,cAAc9B;IAChB;IAEA,4DAA4D;IAC5D,kGAAkG;IAClG,yFAAyF;IACzF,8CAA8C;IAC9C,MAAMiC,uBAAuB1C,MAAMoC,MAAM,CAA2B3B;IACpE,MAAMkC,wBAAwB3C,MAAMoC,MAAM,CAA2B3B;IAErE,MAAMmC,+BAA+B5C,MAAMoC,MAAM,CAA2B3B;IAC5E,MAAMoC,gCAAgC7C,MAAMoC,MAAM,CAA2B3B;IAE7E,4CAA4C;IAC5C,IAAIiC,qBAAqBI,OAAO,KAAKf,eAAe;QAClD,4CAA4C;QAC5CY,sBAAsBG,OAAO,GAAGJ,qBAAqBI,OAAO;QAC5D,4CAA4C;QAC5CJ,qBAAqBI,OAAO,GAAGf;IACjC;IAEA,4CAA4C;IAC5C,IAAIa,6BAA6BE,OAAO,KAAKjB,uBAAuB;QAClE,4CAA4C;QAC5CgB,8BAA8BC,OAAO,GAAGF,6BAA6BE,OAAO;QAC5E,4CAA4C;QAC5CF,6BAA6BE,OAAO,GAAGjB;IACzC;IAEA,oCAAoC;IACpC,MAAMkB,WAA8C7C,iBAAiB,CAAC8C,OAAOC;QAC3ER,iBAAiBQ,KAAKpC,KAAK;QAC3B2B,yBAAyBS,KAAKC,aAAa,GAAGD,KAAKC,aAAa,GAAG;QACnEzB,4BAAAA,sCAAAA,gBAAkBuB,OAAOC;IAC3B;IAEA,4BAA4B;IAC5B,MAAME,iCAAoEjD,iBAAiB,CAAC8C,OAAOC;QACjG,IAAIA,KAAKC,aAAa,KAAKzC,WAAW;YACpC,MAAM2C,qBAAqBxC,qBAAqBqC,KAAKC,aAAa,EAAEvB,2BAAAA,4BAAAA,iBAAkB,EAAE,EAAEnB;YAC1FkB,oCAAAA,8CAAAA,wBAA0BsB,OAAOC;YACjCZ,kBAAkBe;QACpB;IACF;IAEA,MAAMC,qBAAqBrD,MAAMoC,MAAM,CAAsC,CAAC;IAE9E,MAAMkB,aAAatD,MAAMuD,WAAW,CAAC,CAACN;QACpCI,mBAAmBP,OAAO,CAACU,KAAKC,SAAS,CAACR,KAAKpC,KAAK,EAAE,GAAGoC;IAC3D,GAAG,EAAE;IAEL,MAAMS,eAAe1D,MAAMuD,WAAW,CAAC,CAACN;QACtC,OAAOI,mBAAmBP,OAAO,CAACU,KAAKC,SAAS,CAACR,KAAKpC,KAAK,EAAE;IAC/D,GAAG,EAAE;IAEL,MAAM8C,wBAAwB3D,MAAMuD,WAAW,CAAC;QAC9C,OAAO;YACLxB,eAAeW,qBAAqBI,OAAO;YAC3CH,uBAAuBA,sBAAsBG,OAAO;YACpDjB,uBAAuBe,6BAA6BE,OAAO;YAC3DD,+BAA+BA,8BAA8BC,OAAO;YACpEO,oBAAoBA,mBAAmBP,OAAO;QAChD;IACF,GAAG,EAAE;IAEL,OAAO;QACLc,YAAY;YACVC,MAAM;QACR;QACAA,MAAMzD,KAAK0D,MAAM,CACfzD,yBAAyB,OAAO;YAC9Be,KAAKjB,cAAciB,KAAKe;YACxB,GAAGhB,KAAK;QACV,IACA;YAAE4C,aAAa;QAAM;QAEvBpC;QACAI;QACAF;QACAyB;QACAI;QACAX;QACAY;QACAR;QACA3C;IACF;AACF,EAAE"}
@@ -0,0 +1,9 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./Nav.module.css";
3
+ export const navClassNames = {
4
+ root: 'fui-Nav'
5
+ };
6
+ export const useNavStyles_unstable = (state)=>{
7
+ state.root.className = clsx(navClassNames.root, styles.root, state.root.className);
8
+ return state;
9
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Nav/useNavStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { NavSlots, NavState } from './Nav.types';\nimport styles from './Nav.module.css';\n\nexport const navClassNames: SlotClassNames<NavSlots> = {\n root: 'fui-Nav',\n};\n\nexport const useNavStyles_unstable = (state: NavState): NavState => {\n state.root.className = clsx(navClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"names":["clsx","styles","navClassNames","root","useNavStyles_unstable","state","className"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,mBAAmB;AAEtC,OAAO,MAAMC,gBAA0C;IACrDC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,wBAAwB,CAACC;IACpCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KAAKE,cAAcC,IAAI,EAAEF,OAAOE,IAAI,EAAEE,MAAMF,IAAI,CAACG,SAAS;IACjF,OAAOD;AACT,EAAE"}
@@ -0,0 +1,9 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./Nav.module.css";
3
+ export const navClassNames = {
4
+ root: 'fui-Nav'
5
+ };
6
+ export const useNavStyles_unstable = (state)=>{
7
+ state.root.className = clsx(navClassNames.root, styles.root, state.root.className);
8
+ return state;
9
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Nav/useNavStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { NavSlots, NavState } from './Nav.types';\nimport styles from './Nav.module.css';\n\nexport const navClassNames: SlotClassNames<NavSlots> = {\n root: 'fui-Nav',\n};\n\nexport const useNavStyles_unstable = (state: NavState): NavState => {\n state.root.className = clsx(navClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"names":["clsx","styles","navClassNames","root","useNavStyles_unstable","state","className"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,mBAAmB;AAEtC,OAAO,MAAMC,gBAA0C;IACrDC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,wBAAwB,CAACC;IACpCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KAAKE,cAAcC,IAAI,EAAEF,OAAOE,IAAI,EAAEE,MAAMF,IAAI,CAACG,SAAS;IACjF,OAAOD;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Nav/useNavStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { NavSlots, NavState } from './Nav.types';\n\nexport const navClassNames: SlotClassNames<NavSlots> = {\n root: 'fui-Nav',\n // TODO: add class names for all slots on NavSlots.\n // Should be of the form `<slotName>: 'fui-Nav__<slotName>`\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the Nav slots based on the state\n */\nexport const useNavStyles_unstable = (state: NavState): NavState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(navClassNames.root, styles.root, state.root.className);\n\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","navClassNames","root","useStyles","display","flexDirection","useNavStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,gBAA0C;IACrDC,MAAM;AAGR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,SAAS;QACTC,eAAe;IACjB;AAGF;AAEA;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpC,MAAMC,SAASL;IACf,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,cAAcC,IAAI,EAAEM,OAAON,IAAI,EAAEK,MAAML,IAAI,CAACO,SAAS;IAEzF,8CAA8C;IAC9C,gFAAgF;IAEhF,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Nav/useNavStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { NavSlots, NavState } from './Nav.types';\n\nexport const navClassNames: SlotClassNames<NavSlots> = {\n root: 'fui-Nav',\n // TODO: add class names for all slots on NavSlots.\n // Should be of the form `<slotName>: 'fui-Nav__<slotName>`\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the Nav slots based on the state\n */\nexport const useNavStyles_unstable = (state: NavState): NavState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(navClassNames.root, styles.root, state.root.className);\n\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","navClassNames","root","useStyles","display","flexDirection","useNavStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,gBAA0C;IACrDC,MAAM;AAGR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,SAAS;QACTC,eAAe;IACjB;AAGF;AAEA;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpC,MAAMC,SAASL;IACf,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,cAAcC,IAAI,EAAEM,OAAON,IAAI,EAAEK,MAAML,IAAI,CAACO,SAAS;IAEzF,8CAA8C;IAC9C,gFAAgF;IAEhF,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategory/NavCategory.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { NavCategoryProps } from './NavCategory.types';\n\nimport { useNavCategory_unstable } from './useNavCategory';\nimport { renderNavCategory_unstable } from './renderNavCategory';\nimport { useNavCategoryContextValues_unstable } from '../useNavCategoryContextValues_unstable';\n\n/**\n * NavCategory component - a category in the navigation menu that can contain multiple items.\n */\nexport const NavCategory: ForwardRefComponent<NavCategoryProps> = React.forwardRef((props, ref) => {\n const state = useNavCategory_unstable(props, ref);\n const contextValues = useNavCategoryContextValues_unstable(state);\n\n return renderNavCategory_unstable(state, contextValues);\n});\n\nNavCategory.displayName = 'NavCategory';\n"],"names":["React","useNavCategory_unstable","renderNavCategory_unstable","useNavCategoryContextValues_unstable","NavCategory","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAK/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,oCAAoC,QAAQ,6CAA0C;AAE/F;;CAEC,GACD,OAAO,MAAMC,4BAAqDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQP,wBAAwBK,OAAOC;IAC7C,MAAME,gBAAgBN,qCAAqCK;IAE3D,OAAON,2BAA2BM,OAAOC;AAC3C,GAAG;AAEHL,YAAYM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/NavCategory/NavCategory.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { NavCategoryProps } from './NavCategory.types';\n\nimport { useNavCategory_unstable } from './useNavCategory';\nimport { renderNavCategory_unstable } from './renderNavCategory';\nimport { useNavCategoryContextValues_unstable } from '../useNavCategoryContextValues_unstable';\n\n/**\n * NavCategory component - a category in the navigation menu that can contain multiple items.\n */\nexport const NavCategory: ForwardRefComponent<NavCategoryProps> = React.forwardRef((props, ref) => {\n const state = useNavCategory_unstable(props, ref);\n const contextValues = useNavCategoryContextValues_unstable(state);\n\n return renderNavCategory_unstable(state, contextValues);\n});\n\nNavCategory.displayName = 'NavCategory';\n"],"names":["React","useNavCategory_unstable","renderNavCategory_unstable","useNavCategoryContextValues_unstable","NavCategory","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAK/B,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,oCAAoC,QAAQ,6CAA0C;AAE/F;;CAEC,GACD,OAAO,MAAMC,4BAAqDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,QAAQP,wBAAwBK,OAAOC;IAC7C,MAAME,gBAAgBN,qCAAqCK;IAE3D,OAAON,2BAA2BM,OAAOC;AAC3C,GAAG;AAEHL,YAAYM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategory/NavCategory.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { NavItemValue } from '../NavContext.types';\nimport type { NavCategoryContextValue } from '../NavCategoryContext';\n\n/**\n * NavCategory Props\n */\nexport type NavCategoryProps = {\n /**\n * Required value that identifies this item inside an Nav component.\n */\n value: NavItemValue;\n\n /**\n * Children of the NavCategory\n */\n children?: React.ReactNode | null;\n};\n\n/**\n * State used in rendering NavCategory\n */\nexport type NavCategoryState = NavCategoryContextValue & Required<NavCategoryProps>;\n"],"names":[],"mappings":"AAmBA;;CAEC,GACD,WAAoF"}
1
+ {"version":3,"sources":["../../../src/components/NavCategory/NavCategory.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { NavItemValue } from '../NavContext.types';\nimport type { NavCategoryContextValue } from '../NavCategoryContext';\n\n/**\n * NavCategory Props\n */\nexport type NavCategoryProps = {\n /**\n * Required value that identifies this item inside an Nav component.\n */\n value: NavItemValue;\n\n /**\n * Children of the NavCategory\n */\n children?: React.ReactNode | null;\n};\n\n/**\n * State used in rendering NavCategory\n */\nexport type NavCategoryState = NavCategoryContextValue & Required<NavCategoryProps>;\n"],"names":[],"mappings":"AAmBA;;CAEC,GACD,WAAoF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategory/index.ts"],"sourcesContent":["export { NavCategory } from './NavCategory';\nexport type { NavCategoryProps, NavCategoryState } from './NavCategory.types';\nexport { renderNavCategory_unstable } from './renderNavCategory';\nexport { useNavCategory_unstable } from './useNavCategory';\n"],"names":["NavCategory","renderNavCategory_unstable","useNavCategory_unstable"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,uBAAuB,QAAQ,sBAAmB"}
1
+ {"version":3,"sources":["../../../src/components/NavCategory/index.ts"],"sourcesContent":["export { NavCategory } from './NavCategory';\nexport type { NavCategoryProps, NavCategoryState } from './NavCategory.types';\nexport { renderNavCategory_unstable } from './renderNavCategory';\nexport { useNavCategory_unstable } from './useNavCategory';\n"],"names":["NavCategory","renderNavCategory_unstable","useNavCategory_unstable"],"mappings":"AAAA,SAASA,WAAW,QAAQ,mBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,uBAAuB,QAAQ,sBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategory/renderNavCategory.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { NavCategoryContextValues } from '../NavCategoryContext';\nimport { NavCategoryProvider } from '../NavCategoryContext';\n\nimport type { NavCategoryState } from './NavCategory.types';\n\n/**\n * Render the final JSX of NavCategory\n */\nexport const renderNavCategory_unstable = (\n state: NavCategoryState,\n contextValues: NavCategoryContextValues,\n): JSXElement => {\n return <NavCategoryProvider value={contextValues.categoryValue}>{state.children}</NavCategoryProvider>;\n};\n"],"names":["React","NavCategoryProvider","renderNavCategory_unstable","state","contextValues","value","categoryValue","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,mBAAmB,QAAQ,2BAAwB;AAI5D;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,qBAAO,oBAACH;QAAoBI,OAAOD,cAAcE,aAAa;OAAGH,MAAMI,QAAQ;AACjF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/NavCategory/renderNavCategory.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { NavCategoryContextValues } from '../NavCategoryContext';\nimport { NavCategoryProvider } from '../NavCategoryContext';\n\nimport type { NavCategoryState } from './NavCategory.types';\n\n/**\n * Render the final JSX of NavCategory\n */\nexport const renderNavCategory_unstable = (\n state: NavCategoryState,\n contextValues: NavCategoryContextValues,\n): JSXElement => {\n return <NavCategoryProvider value={contextValues.categoryValue}>{state.children}</NavCategoryProvider>;\n};\n"],"names":["React","NavCategoryProvider","renderNavCategory_unstable","state","contextValues","value","categoryValue","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,mBAAmB,QAAQ,2BAAwB;AAI5D;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,qBAAO,oBAACH;QAAoBI,OAAOD,cAAcE,aAAa;OAAGH,MAAMI,QAAQ;AACjF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategory/useNavCategory.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useNavContext_unstable } from '../NavContext';\n\nimport type { NavCategoryProps, NavCategoryState } from './NavCategory.types';\n\n/**\n * Create the state required to render NavCategory.\n *\n * The returned state can be modified with hooks such as useNavCategoryStyles_unstable,\n * before being passed to renderNavCategory_unstable.\n *\n * @param props - props from this instance of NavCategory\n * @param ref - reference to root HTMLDivElement of NavCategory\n */\nexport const useNavCategory_unstable = (props: NavCategoryProps, ref: React.Ref<HTMLDivElement>): NavCategoryState => {\n const { value, children } = props;\n\n const { openCategories } = useNavContext_unstable();\n\n const open: boolean = openCategories?.includes(value);\n\n return {\n open,\n value,\n children: children ?? null,\n };\n};\n"],"names":["useNavContext_unstable","useNavCategory_unstable","props","ref","value","children","openCategories","open","includes"],"mappings":"AAAA;AAGA,SAASA,sBAAsB,QAAQ,mBAAgB;AAIvD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGH;IAE5B,MAAM,EAAEI,cAAc,EAAE,GAAGN;IAE3B,MAAMO,OAAgBD,2BAAAA,qCAAAA,eAAgBE,QAAQ,CAACJ;IAE/C,OAAO;QACLG;QACAH;QACAC,UAAUA,qBAAAA,sBAAAA,WAAY;IACxB;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/NavCategory/useNavCategory.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useNavContext_unstable } from '../NavContext';\n\nimport type { NavCategoryProps, NavCategoryState } from './NavCategory.types';\n\n/**\n * Create the state required to render NavCategory.\n *\n * The returned state can be modified with hooks such as useNavCategoryStyles_unstable,\n * before being passed to renderNavCategory_unstable.\n *\n * @param props - props from this instance of NavCategory\n * @param ref - reference to root HTMLDivElement of NavCategory\n */\nexport const useNavCategory_unstable = (props: NavCategoryProps, ref: React.Ref<HTMLDivElement>): NavCategoryState => {\n const { value, children } = props;\n\n const { openCategories } = useNavContext_unstable();\n\n const open: boolean = openCategories?.includes(value);\n\n return {\n open,\n value,\n children: children ?? null,\n };\n};\n"],"names":["useNavContext_unstable","useNavCategory_unstable","props","ref","value","children","openCategories","open","includes"],"mappings":"AAAA;AAGA,SAASA,sBAAsB,QAAQ,mBAAgB;AAIvD;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGH;IAE5B,MAAM,EAAEI,cAAc,EAAE,GAAGN;IAE3B,MAAMO,OAAgBD,2BAAAA,qCAAAA,eAAgBE,QAAQ,CAACJ;IAE/C,OAAO;QACLG;QACAH;QACAC,QAAQ,EAAEA,qBAAAA,sBAAAA,WAAY;IACxB;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { NavItemValue } from './NavContext.types';\n\n// This context is analogous to AccordionItemContext\n\nexport type NavCategoryContextValues = {\n categoryValue: NavCategoryContextValue;\n};\n\nexport type NavCategoryContextValue = {\n open: boolean;\n value: NavItemValue;\n};\n\nconst NavCategoryContext = React.createContext<NavCategoryContextValue | undefined>(\n undefined,\n) as React.Context<NavCategoryContextValue>;\n\nconst navCategoryContextDefaultValue: NavCategoryContextValue = {\n open: false,\n value: '',\n};\n\nexport const { Provider: NavCategoryProvider } = NavCategoryContext;\n\nexport const useNavCategoryContext_unstable = (): NavCategoryContextValue => {\n return React.useContext(NavCategoryContext) ?? navCategoryContextDefaultValue;\n};\n"],"names":["React","NavCategoryContext","createContext","undefined","navCategoryContextDefaultValue","open","value","Provider","NavCategoryProvider","useNavCategoryContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAc/B,MAAMC,qBAAqBD,MAAME,aAAa,CAC5CC;AAGF,MAAMC,iCAA0D;IAC9DC,MAAM;IACNC,OAAO;AACT;AAEA,OAAO,MAAM,EAAEC,UAAUC,mBAAmB,EAAE,GAAGP,mBAAmB;AAEpE,OAAO,MAAMQ,iCAAiC;QACrCT;IAAP,OAAOA,CAAAA,oBAAAA,MAAMU,UAAU,CAACT,iCAAjBD,+BAAAA,oBAAwCI;AACjD,EAAE"}
1
+ {"version":3,"sources":["../../src/components/NavCategoryContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { NavItemValue } from './NavContext.types';\n\n// This context is analogous to AccordionItemContext\n\nexport type NavCategoryContextValues = {\n categoryValue: NavCategoryContextValue;\n};\n\nexport type NavCategoryContextValue = {\n open: boolean;\n value: NavItemValue;\n};\n\nconst NavCategoryContext = React.createContext<NavCategoryContextValue | undefined>(\n undefined,\n) as React.Context<NavCategoryContextValue>;\n\nconst navCategoryContextDefaultValue: NavCategoryContextValue = {\n open: false,\n value: '',\n};\n\nexport const { Provider: NavCategoryProvider } = NavCategoryContext;\n\nexport const useNavCategoryContext_unstable = (): NavCategoryContextValue => {\n return React.useContext(NavCategoryContext) ?? navCategoryContextDefaultValue;\n};\n"],"names":["React","NavCategoryContext","createContext","undefined","navCategoryContextDefaultValue","open","value","Provider","NavCategoryProvider","useNavCategoryContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAc/B,MAAMC,qBAAqBD,MAAME,aAAa,CAC5CC;AAGF,MAAMC,iCAA0D;IAC9DC,MAAM;IACNC,OAAO;AACT;AAEA,OAAO,MAAM,EAAEC,UAAUC,mBAAmB,EAAE,GAAGP,mBAAmB;AAEpE,OAAO,MAAMQ,iCAAiC;QACrCT;IAAP,QAAOA,oBAAAA,MAAMU,UAAU,CAACT,iCAAjBD,+BAAAA,oBAAwCI;AACjD,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryItem/NavCategoryItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNavCategoryItem_unstable } from './useNavCategoryItem';\nimport { renderNavCategoryItem_unstable } from './renderNavCategoryItem';\nimport type { NavCategoryItemProps } from './NavCategoryItem.types';\nimport { useNavCategoryItemStyles_unstable } from './useNavCategoryItem.styles';\nimport { useNavCategoryItemContextValues_unstable } from '../useNavCategoryItemContextValues_unstable';\n\n/**\n * A Nav Category Item provides provides a clickable accordion like header that exposes\n * a list of NavSubItems to take users to a new destination.\n */\nexport const NavCategoryItem: ForwardRefComponent<NavCategoryItemProps> = React.forwardRef((props, ref) => {\n const state = useNavCategoryItem_unstable(props, ref);\n const contextValues = useNavCategoryItemContextValues_unstable(state);\n\n useNavCategoryItemStyles_unstable(state);\n useCustomStyleHook_unstable('useNavCategoryItemStyles')(state);\n\n return renderNavCategoryItem_unstable(state, contextValues);\n});\n\nNavCategoryItem.displayName = 'NavCategoryItem';\n"],"names":["React","useCustomStyleHook_unstable","useNavCategoryItem_unstable","renderNavCategoryItem_unstable","useNavCategoryItemStyles_unstable","useNavCategoryItemContextValues_unstable","NavCategoryItem","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AAEzE,SAASC,iCAAiC,QAAQ,iCAA8B;AAChF,SAASC,wCAAwC,QAAQ,iDAA8C;AAEvG;;;CAGC,GACD,OAAO,MAAMC,gCAA6DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IACjD,MAAME,gBAAgBN,yCAAyCK;IAE/DN,kCAAkCM;IAClCT,4BAA4B,4BAA4BS;IAExD,OAAOP,+BAA+BO,OAAOC;AAC/C,GAAG;AAEHL,gBAAgBM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/NavCategoryItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNavCategoryItem_unstable } from './useNavCategoryItem';\nimport { renderNavCategoryItem_unstable } from './renderNavCategoryItem';\nimport type { NavCategoryItemProps } from './NavCategoryItem.types';\nimport { useNavCategoryItemStyles_unstable } from './useNavCategoryItem.styles';\nimport { useNavCategoryItemContextValues_unstable } from '../useNavCategoryItemContextValues_unstable';\n\n/**\n * A Nav Category Item provides provides a clickable accordion like header that exposes\n * a list of NavSubItems to take users to a new destination.\n */\nexport const NavCategoryItem: ForwardRefComponent<NavCategoryItemProps> = React.forwardRef((props, ref) => {\n const state = useNavCategoryItem_unstable(props, ref);\n const contextValues = useNavCategoryItemContextValues_unstable(state);\n\n useNavCategoryItemStyles_unstable(state);\n useCustomStyleHook_unstable('useNavCategoryItemStyles')(state);\n\n return renderNavCategoryItem_unstable(state, contextValues);\n});\n\nNavCategoryItem.displayName = 'NavCategoryItem';\n"],"names":["React","useCustomStyleHook_unstable","useNavCategoryItem_unstable","renderNavCategoryItem_unstable","useNavCategoryItemStyles_unstable","useNavCategoryItemContextValues_unstable","NavCategoryItem","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AAEzE,SAASC,iCAAiC,QAAQ,iCAA8B;AAChF,SAASC,wCAAwC,QAAQ,iDAA8C;AAEvG;;;CAGC,GACD,OAAO,MAAMC,gCAA6DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IACjD,MAAME,gBAAgBN,yCAAyCK;IAE/DN,kCAAkCM;IAClCT,4BAA4B,4BAA4BS;IAExD,OAAOP,+BAA+BO,OAAOC;AAC/C,GAAG;AAEHL,gBAAgBM,WAAW,GAAG"}
@@ -0,0 +1,9 @@
1
+ @layer fluentui {
2
+ .root {
3
+ width: 100%;
4
+ }
5
+ .expandIcon {
6
+ margin-inline-start: auto;
7
+ height: var(--spacingVerticalXL);
8
+ }
9
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryItem/NavCategoryItem.types.ts"],"sourcesContent":["import type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { NavDensity } from '../Nav/Nav.types';\nimport type { NavCategoryItemContextValue } from '../NavCategoryItemContext';\n\nexport type NavCategoryItemContextValues = {\n navCategoryItem: NavCategoryItemContextValue;\n};\n\nexport type NavCategoryItemSlots = {\n /**\n * The root element\n */\n root: NonNullable<Slot<'button'>>;\n\n /**\n * Icon that renders before the content.\n * Should be specific to each Category\n */\n icon?: Slot<'span'>;\n\n /**\n * Expand icon slot rendered after the content to indicate an open and closed state.\n */\n expandIcon: NonNullable<Slot<'span'>>;\n\n /**\n * Expand icon motion slot.\n */\n expandIconMotion?: Slot<PresenceMotionSlotProps>;\n};\n\n/**\n * Base slots for NavCategoryItem, excluding design/animation-specific slots.\n */\nexport type NavCategoryItemBaseSlots = Omit<NavCategoryItemSlots, 'expandIconMotion'>;\n\n/**\n * navCategoryItem Props\n */\nexport type NavCategoryItemProps = ComponentProps<Partial<NavCategoryItemSlots>>;\n\n/**\n * Base NavCategoryItemProps, excluding design/animation-specific props.\n */\nexport type NavCategoryItemBaseProps = ComponentProps<Partial<NavCategoryItemBaseSlots>>;\n\n/**\n * State used in rendering NavCategoryItem\n */\nexport type NavCategoryItemState = ComponentState<NavCategoryItemSlots> &\n NavCategoryItemContextValue & {\n /**\n * If this navCategoryItem is selected\n */\n selected: boolean;\n /**\n * The density of the NavItem\n *\n * @default 'medium'\n */\n density: NavDensity;\n };\n\n/**\n * State used in rendering NavCategoryItem, excluding design/animation-specific state.\n */\nexport type NavCategoryItemBaseState = ComponentState<NavCategoryItemBaseSlots> &\n Pick<NavCategoryItemState, 'open' | 'value' | 'selected'>;\n"],"names":[],"mappings":"AAgEA;;CAEC,GACD,WAC4D"}
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/NavCategoryItem.types.ts"],"sourcesContent":["import type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { NavDensity } from '../Nav/Nav.types';\nimport type { NavCategoryItemContextValue } from '../NavCategoryItemContext';\n\nexport type NavCategoryItemContextValues = {\n navCategoryItem: NavCategoryItemContextValue;\n};\n\nexport type NavCategoryItemSlots = {\n /**\n * The root element\n */\n root: NonNullable<Slot<'button'>>;\n\n /**\n * Icon that renders before the content.\n * Should be specific to each Category\n */\n icon?: Slot<'span'>;\n\n /**\n * Expand icon slot rendered after the content to indicate an open and closed state.\n */\n expandIcon: NonNullable<Slot<'span'>>;\n\n /**\n * Expand icon motion slot.\n */\n expandIconMotion?: Slot<PresenceMotionSlotProps>;\n};\n\n/**\n * Base slots for NavCategoryItem, excluding design/animation-specific slots.\n */\nexport type NavCategoryItemBaseSlots = Omit<NavCategoryItemSlots, 'expandIconMotion'>;\n\n/**\n * navCategoryItem Props\n */\nexport type NavCategoryItemProps = ComponentProps<Partial<NavCategoryItemSlots>>;\n\n/**\n * Base NavCategoryItemProps, excluding design/animation-specific props.\n */\nexport type NavCategoryItemBaseProps = ComponentProps<Partial<NavCategoryItemBaseSlots>>;\n\n/**\n * State used in rendering NavCategoryItem\n */\nexport type NavCategoryItemState = ComponentState<NavCategoryItemSlots> &\n NavCategoryItemContextValue & {\n /**\n * If this navCategoryItem is selected\n */\n selected: boolean;\n /**\n * The density of the NavItem\n *\n * @default 'medium'\n */\n density: NavDensity;\n };\n\n/**\n * State used in rendering NavCategoryItem, excluding design/animation-specific state.\n */\nexport type NavCategoryItemBaseState = ComponentState<NavCategoryItemBaseSlots> &\n Pick<NavCategoryItemState, 'open' | 'value' | 'selected'>;\n"],"names":[],"mappings":"AAgEA;;CAEC,GACD,WAC4D"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryItem/index.ts"],"sourcesContent":["export { NavCategoryItem } from './NavCategoryItem';\nexport type {\n NavCategoryItemSlots,\n NavCategoryItemProps,\n NavCategoryItemState,\n NavCategoryItemBaseProps,\n NavCategoryItemBaseSlots,\n NavCategoryItemBaseState,\n} from './NavCategoryItem.types';\nexport { renderNavCategoryItem_unstable } from './renderNavCategoryItem';\nexport { useNavCategoryItem_unstable, useNavCategoryItemBase_unstable } from './useNavCategoryItem';\nexport { useNavCategoryItemStyles_unstable, navCategoryItemClassNames } from './useNavCategoryItem.styles';\n"],"names":["NavCategoryItem","renderNavCategoryItem_unstable","useNavCategoryItem_unstable","useNavCategoryItemBase_unstable","useNavCategoryItemStyles_unstable","navCategoryItemClassNames"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AASpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,iCAAiC,EAAEC,yBAAyB,QAAQ,iCAA8B"}
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/index.ts"],"sourcesContent":["export { NavCategoryItem } from './NavCategoryItem';\nexport type {\n NavCategoryItemSlots,\n NavCategoryItemProps,\n NavCategoryItemState,\n NavCategoryItemBaseProps,\n NavCategoryItemBaseSlots,\n NavCategoryItemBaseState,\n} from './NavCategoryItem.types';\nexport { renderNavCategoryItem_unstable } from './renderNavCategoryItem';\nexport { useNavCategoryItem_unstable, useNavCategoryItemBase_unstable } from './useNavCategoryItem';\nexport { useNavCategoryItemStyles_unstable, navCategoryItemClassNames } from './useNavCategoryItem.styles';\n"],"names":["NavCategoryItem","renderNavCategoryItem_unstable","useNavCategoryItem_unstable","useNavCategoryItemBase_unstable","useNavCategoryItemStyles_unstable","navCategoryItemClassNames"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AASpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,iCAAiC,EAAEC,yBAAyB,QAAQ,iCAA8B"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  import { NavCategoryItemProvider } from "../NavCategoryItemContext.js";
4
4
  const getExpandIcon = (state)=>{
5
5
  assertSlots(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryItem/renderNavCategoryItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { NavCategoryItemState, NavCategoryItemSlots, NavCategoryItemContextValues } from './NavCategoryItem.types';\nimport { NavCategoryItemProvider } from '../NavCategoryItemContext';\n\nconst getExpandIcon = (state: NavCategoryItemState) => {\n assertSlots<NavCategoryItemSlots>(state);\n\n if (!state.expandIcon) {\n return null;\n }\n\n if (!state.expandIconMotion) {\n return <state.expandIcon />;\n }\n\n return (\n <state.expandIconMotion>\n <state.expandIcon />\n </state.expandIconMotion>\n );\n};\n\n/**\n * Render the final JSX of NavCategoryItem\n */\nexport const renderNavCategoryItem_unstable = (\n state: NavCategoryItemState,\n contextValues: NavCategoryItemContextValues,\n): JSXElement => {\n assertSlots<NavCategoryItemSlots>(state);\n\n return (\n <NavCategoryItemProvider value={contextValues.navCategoryItem}>\n <state.root>\n {state.icon && <state.icon />}\n {state.root.children}\n {getExpandIcon(state)}\n </state.root>\n </NavCategoryItemProvider>\n );\n};\n"],"names":["assertSlots","NavCategoryItemProvider","getExpandIcon","state","expandIcon","expandIconMotion","renderNavCategoryItem_unstable","contextValues","value","navCategoryItem","root","icon","children"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,uBAAuB,QAAQ,+BAA4B;AAEpE,MAAMC,gBAAgB,CAACC;IACrBH,YAAkCG;IAElC,IAAI,CAACA,MAAMC,UAAU,EAAE;QACrB,OAAO;IACT;IAEA,IAAI,CAACD,MAAME,gBAAgB,EAAE;QAC3B,qBAAO,KAACF,MAAMC,UAAU;IAC1B;IAEA,qBACE,KAACD,MAAME,gBAAgB;kBACrB,cAAA,KAACF,MAAMC,UAAU;;AAGvB;AAEA;;CAEC,GACD,OAAO,MAAME,iCAAiC,CAC5CH,OACAI;IAEAP,YAAkCG;IAElC,qBACE,KAACF;QAAwBO,OAAOD,cAAcE,eAAe;kBAC3D,cAAA,MAACN,MAAMO,IAAI;;gBACRP,MAAMQ,IAAI,kBAAI,KAACR,MAAMQ,IAAI;gBACzBR,MAAMO,IAAI,CAACE,QAAQ;gBACnBV,cAAcC;;;;AAIvB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/renderNavCategoryItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { NavCategoryItemState, NavCategoryItemSlots, NavCategoryItemContextValues } from './NavCategoryItem.types';\nimport { NavCategoryItemProvider } from '../NavCategoryItemContext';\n\nconst getExpandIcon = (state: NavCategoryItemState) => {\n assertSlots<NavCategoryItemSlots>(state);\n\n if (!state.expandIcon) {\n return null;\n }\n\n if (!state.expandIconMotion) {\n return <state.expandIcon />;\n }\n\n return (\n <state.expandIconMotion>\n <state.expandIcon />\n </state.expandIconMotion>\n );\n};\n\n/**\n * Render the final JSX of NavCategoryItem\n */\nexport const renderNavCategoryItem_unstable = (\n state: NavCategoryItemState,\n contextValues: NavCategoryItemContextValues,\n): JSXElement => {\n assertSlots<NavCategoryItemSlots>(state);\n\n return (\n <NavCategoryItemProvider value={contextValues.navCategoryItem}>\n <state.root>\n {state.icon && <state.icon />}\n {state.root.children}\n {getExpandIcon(state)}\n </state.root>\n </NavCategoryItemProvider>\n );\n};\n"],"names":["assertSlots","NavCategoryItemProvider","getExpandIcon","state","expandIcon","expandIconMotion","renderNavCategoryItem_unstable","contextValues","value","navCategoryItem","root","icon","children"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,uBAAuB,QAAQ,+BAA4B;AAEpE,MAAMC,gBAAgB,CAACC;IACrBH,YAAkCG;IAElC,IAAI,CAACA,MAAMC,UAAU,EAAE;QACrB,OAAO;IACT;IAEA,IAAI,CAACD,MAAME,gBAAgB,EAAE;QAC3B,qBAAO,KAACF,MAAMC,UAAU;IAC1B;IAEA,qBACE,KAACD,MAAME,gBAAgB;kBACrB,cAAA,KAACF,MAAMC,UAAU;;AAGvB;AAEA;;CAEC,GACD,OAAO,MAAME,iCAAiC,CAC5CH,OACAI;IAEAP,YAAkCG;IAElC,qBACE,KAACF;QAAwBO,OAAOD,cAAcE,eAAe;kBAC3D,cAAA,MAACN,MAAMO,IAAI;;gBACRP,MAAMQ,IAAI,kBAAI,KAACR,MAAMQ,IAAI;gBACzBR,MAAMO,IAAI,CAACE,QAAQ;gBACnBV,cAAcC;;;;AAIvB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryItem/useNavCategoryItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useEventCallback } from '@fluentui/react-utilities';\nimport { ChevronDown20Regular } from '@fluentui/react-icons';\nimport { createPresenceComponentVariant, motionTokens, presenceMotionSlot } from '@fluentui/react-motion';\n\nimport type {\n NavCategoryItemBaseProps,\n NavCategoryItemBaseState,\n NavCategoryItemProps,\n NavCategoryItemState,\n} from './NavCategoryItem.types';\nimport { useNavCategoryContext_unstable } from '../NavCategoryContext';\nimport { useNavContext_unstable } from '../NavContext';\nimport { Rotate } from '@fluentui/react-motion-components-preview';\n\nconst ExpandIconMotion = createPresenceComponentVariant(Rotate, {\n duration: motionTokens.durationFast,\n easing: motionTokens.curveEasyEase,\n animateOpacity: false, // Don't fade out the icon\n outAngle: 0,\n inAngle: 180,\n});\n\n/**\n * Create the state required to render NavCategoryItem.\n *\n * The returned state can be modified with hooks such as useNavCategoryItemStyles,\n * before being passed to renderNavCategoryItem.\n *\n * @param props - props from this instance of NavCategoryItem\n * @param ref - reference to root HTMLButtonElement of NavCategoryItem\n */\nexport const useNavCategoryItem_unstable = (\n props: NavCategoryItemProps,\n ref: React.Ref<HTMLButtonElement>,\n): NavCategoryItemState => {\n const { density = 'medium' } = useNavContext_unstable();\n\n const state = useNavCategoryItemBase_unstable(props, ref);\n\n return {\n ...state,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...state.components,\n expandIconMotion: ExpandIconMotion,\n },\n expandIcon: slot.always(props.expandIcon, {\n defaultProps: {\n children: <ChevronDown20Regular />,\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n expandIconMotion: presenceMotionSlot(props.expandIconMotion, {\n elementType: ExpandIconMotion,\n defaultProps: {\n visible: state.open,\n },\n }),\n density,\n };\n};\n\n/**\n * Create the base state required to render NavCategoryItem.\n *\n * @param props - props from this instance of NavCategoryItem\n * @param ref - reference to root HTMLButtonElement of NavCategoryItem\n */\nexport const useNavCategoryItemBase_unstable = (\n props: NavCategoryItemBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): NavCategoryItemBaseState => {\n const { onClick, expandIcon, icon } = props;\n\n const { open, value } = useNavCategoryContext_unstable();\n\n const { onRequestNavCategoryItemToggle, selectedCategoryValue } = useNavContext_unstable();\n\n const onNavCategoryItemClick = useEventCallback(\n mergeCallbacks(onClick, event =>\n onRequestNavCategoryItemToggle(event, { type: 'click', event, value: '', categoryValue: value }),\n ),\n );\n\n // don't fill the icon when it's open\n const selected = selectedCategoryValue === value && !open;\n // there's more than 2 possible values for aria-current, but this is the only one that's used in this component\n const validAriaCurrent: 'page' | 'false' = selected && !open ? 'page' : 'false';\n\n return {\n open,\n value,\n selected,\n components: {\n root: 'button',\n icon: 'span',\n expandIcon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-current': validAriaCurrent,\n 'aria-expanded': open,\n ...props,\n onClick: onNavCategoryItemClick,\n }),\n { elementType: 'button' },\n ),\n expandIcon: slot.always(expandIcon, {\n defaultProps: {\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n icon: slot.optional(icon, {\n elementType: 'span',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useEventCallback","ChevronDown20Regular","createPresenceComponentVariant","motionTokens","presenceMotionSlot","useNavCategoryContext_unstable","useNavContext_unstable","Rotate","ExpandIconMotion","duration","durationFast","easing","curveEasyEase","animateOpacity","outAngle","inAngle","useNavCategoryItem_unstable","props","ref","density","state","useNavCategoryItemBase_unstable","components","expandIconMotion","expandIcon","always","defaultProps","children","elementType","visible","open","onClick","icon","value","onRequestNavCategoryItemToggle","selectedCategoryValue","onNavCategoryItemClick","event","type","categoryValue","selected","validAriaCurrent","root","optional"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC7G,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,8BAA8B,EAAEC,YAAY,EAAEC,kBAAkB,QAAQ,yBAAyB;AAQ1G,SAASC,8BAA8B,QAAQ,2BAAwB;AACvE,SAASC,sBAAsB,QAAQ,mBAAgB;AACvD,SAASC,MAAM,QAAQ,4CAA4C;AAEnE,MAAMC,mBAAmBN,+BAA+BK,QAAQ;IAC9DE,UAAUN,aAAaO,YAAY;IACnCC,QAAQR,aAAaS,aAAa;IAClCC,gBAAgB;IAChBC,UAAU;IACVC,SAAS;AACX;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGb;IAE/B,MAAMc,QAAQC,gCAAgCJ,OAAOC;IAErD,OAAO;QACL,GAAGE,KAAK;QACRE,YAAY;YACV,4DAA4D;YAC5D,GAAGF,MAAME,UAAU;YACnBC,kBAAkBf;QACpB;QACAgB,YAAYzB,KAAK0B,MAAM,CAACR,MAAMO,UAAU,EAAE;YACxCE,cAAc;gBACZC,wBAAU,oBAAC1B;gBACX,eAAe;YACjB;YACA2B,aAAa;QACf;QACAL,kBAAkBnB,mBAAmBa,MAAMM,gBAAgB,EAAE;YAC3DK,aAAapB;YACbkB,cAAc;gBACZG,SAAST,MAAMU,IAAI;YACrB;QACF;QACAX;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAME,kCAAkC,CAC7CJ,OACAC;IAEA,MAAM,EAAEa,OAAO,EAAEP,UAAU,EAAEQ,IAAI,EAAE,GAAGf;IAEtC,MAAM,EAAEa,IAAI,EAAEG,KAAK,EAAE,GAAG5B;IAExB,MAAM,EAAE6B,8BAA8B,EAAEC,qBAAqB,EAAE,GAAG7B;IAElE,MAAM8B,yBAAyBpC,iBAC7BF,eAAeiC,SAASM,CAAAA,QACtBH,+BAA+BG,OAAO;YAAEC,MAAM;YAASD;YAAOJ,OAAO;YAAIM,eAAeN;QAAM;IAIlG,qCAAqC;IACrC,MAAMO,WAAWL,0BAA0BF,SAAS,CAACH;IACrD,+GAA+G;IAC/G,MAAMW,mBAAqCD,YAAY,CAACV,OAAO,SAAS;IAExE,OAAO;QACLA;QACAG;QACAO;QACAlB,YAAY;YACVoB,MAAM;YACNV,MAAM;YACNR,YAAY;QACd;QACAkB,MAAM3C,KAAK0B,MAAM,CACf5B,yBAAyB,UAAU;YACjCqB;YACA,gBAAgBuB;YAChB,iBAAiBX;YACjB,GAAGb,KAAK;YACRc,SAASK;QACX,IACA;YAAER,aAAa;QAAS;QAE1BJ,YAAYzB,KAAK0B,MAAM,CAACD,YAAY;YAClCE,cAAc;gBACZ,eAAe;YACjB;YACAE,aAAa;QACf;QACAI,MAAMjC,KAAK4C,QAAQ,CAACX,MAAM;YACxBJ,aAAa;QACf;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/useNavCategoryItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useEventCallback } from '@fluentui/react-utilities';\nimport { ChevronDown20Regular } from '@fluentui/react-icons';\nimport { createPresenceComponentVariant, motionTokens, presenceMotionSlot } from '@fluentui/react-motion';\n\nimport type {\n NavCategoryItemBaseProps,\n NavCategoryItemBaseState,\n NavCategoryItemProps,\n NavCategoryItemState,\n} from './NavCategoryItem.types';\nimport { useNavCategoryContext_unstable } from '../NavCategoryContext';\nimport { useNavContext_unstable } from '../NavContext';\nimport { Rotate } from '@fluentui/react-motion-components-preview';\n\nconst ExpandIconMotion = createPresenceComponentVariant(Rotate, {\n duration: motionTokens.durationFast,\n easing: motionTokens.curveEasyEase,\n animateOpacity: false, // Don't fade out the icon\n outAngle: 0,\n inAngle: 180,\n});\n\n/**\n * Create the state required to render NavCategoryItem.\n *\n * The returned state can be modified with hooks such as useNavCategoryItemStyles,\n * before being passed to renderNavCategoryItem.\n *\n * @param props - props from this instance of NavCategoryItem\n * @param ref - reference to root HTMLButtonElement of NavCategoryItem\n */\nexport const useNavCategoryItem_unstable = (\n props: NavCategoryItemProps,\n ref: React.Ref<HTMLButtonElement>,\n): NavCategoryItemState => {\n const { density = 'medium' } = useNavContext_unstable();\n\n const state = useNavCategoryItemBase_unstable(props, ref);\n\n return {\n ...state,\n components: {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...state.components,\n expandIconMotion: ExpandIconMotion,\n },\n expandIcon: slot.always(props.expandIcon, {\n defaultProps: {\n children: <ChevronDown20Regular />,\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n expandIconMotion: presenceMotionSlot(props.expandIconMotion, {\n elementType: ExpandIconMotion,\n defaultProps: {\n visible: state.open,\n },\n }),\n density,\n };\n};\n\n/**\n * Create the base state required to render NavCategoryItem.\n *\n * @param props - props from this instance of NavCategoryItem\n * @param ref - reference to root HTMLButtonElement of NavCategoryItem\n */\nexport const useNavCategoryItemBase_unstable = (\n props: NavCategoryItemBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): NavCategoryItemBaseState => {\n const { onClick, expandIcon, icon } = props;\n\n const { open, value } = useNavCategoryContext_unstable();\n\n const { onRequestNavCategoryItemToggle, selectedCategoryValue } = useNavContext_unstable();\n\n const onNavCategoryItemClick = useEventCallback(\n mergeCallbacks(onClick, event =>\n onRequestNavCategoryItemToggle(event, { type: 'click', event, value: '', categoryValue: value }),\n ),\n );\n\n // don't fill the icon when it's open\n const selected = selectedCategoryValue === value && !open;\n // there's more than 2 possible values for aria-current, but this is the only one that's used in this component\n const validAriaCurrent: 'page' | 'false' = selected && !open ? 'page' : 'false';\n\n return {\n open,\n value,\n selected,\n components: {\n root: 'button',\n icon: 'span',\n expandIcon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n 'aria-current': validAriaCurrent,\n 'aria-expanded': open,\n ...props,\n onClick: onNavCategoryItemClick,\n }),\n { elementType: 'button' },\n ),\n expandIcon: slot.always(expandIcon, {\n defaultProps: {\n 'aria-hidden': true,\n },\n elementType: 'span',\n }),\n icon: slot.optional(icon, {\n elementType: 'span',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useEventCallback","ChevronDown20Regular","createPresenceComponentVariant","motionTokens","presenceMotionSlot","useNavCategoryContext_unstable","useNavContext_unstable","Rotate","ExpandIconMotion","duration","durationFast","easing","curveEasyEase","animateOpacity","outAngle","inAngle","useNavCategoryItem_unstable","props","ref","density","state","useNavCategoryItemBase_unstable","components","expandIconMotion","expandIcon","always","defaultProps","children","elementType","visible","open","onClick","icon","value","onRequestNavCategoryItemToggle","selectedCategoryValue","onNavCategoryItemClick","event","type","categoryValue","selected","validAriaCurrent","root","optional"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC7G,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,8BAA8B,EAAEC,YAAY,EAAEC,kBAAkB,QAAQ,yBAAyB;AAQ1G,SAASC,8BAA8B,QAAQ,2BAAwB;AACvE,SAASC,sBAAsB,QAAQ,mBAAgB;AACvD,SAASC,MAAM,QAAQ,4CAA4C;AAEnE,MAAMC,mBAAmBN,+BAA+BK,QAAQ;IAC9DE,UAAUN,aAAaO,YAAY;IACnCC,QAAQR,aAAaS,aAAa;IAClCC,gBAAgB;IAChBC,UAAU;IACVC,SAAS;AACX;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,UAAU,QAAQ,EAAE,GAAGb;IAE/B,MAAMc,QAAQC,gCAAgCJ,OAAOC;IAErD,OAAO;QACL,GAAGE,KAAK;QACRE,YAAY;YACV,4DAA4D;YAC5D,GAAGF,MAAME,UAAU;YACnBC,kBAAkBf;QACpB;QACAgB,YAAYzB,KAAK0B,MAAM,CAACR,MAAMO,UAAU,EAAE;YACxCE,cAAc;gBACZC,wBAAU,oBAAC1B;gBACX,eAAe;YACjB;YACA2B,aAAa;QACf;QACAL,kBAAkBnB,mBAAmBa,MAAMM,gBAAgB,EAAE;YAC3DK,aAAapB;YACbkB,cAAc;gBACZG,SAAST,MAAMU,IAAI;YACrB;QACF;QACAX;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAME,kCAAkC,CAC7CJ,OACAC;IAEA,MAAM,EAAEa,OAAO,EAAEP,UAAU,EAAEQ,IAAI,EAAE,GAAGf;IAEtC,MAAM,EAAEa,IAAI,EAAEG,KAAK,EAAE,GAAG5B;IAExB,MAAM,EAAE6B,8BAA8B,EAAEC,qBAAqB,EAAE,GAAG7B;IAElE,MAAM8B,yBAAyBpC,iBAC7BF,eAAeiC,SAASM,CAAAA,QACtBH,+BAA+BG,OAAO;YAAEC,MAAM;YAASD;YAAOJ,OAAO;YAAIM,eAAeN;QAAM;IAIlG,qCAAqC;IACrC,MAAMO,WAAWL,0BAA0BF,SAAS,CAACH;IACrD,+GAA+G;IAC/G,MAAMW,mBAAqCD,YAAY,CAACV,OAAO,SAAS;IAExE,OAAO;QACLA;QACAG;QACAO;QACAlB,YAAY;YACVoB,MAAM;YACNV,MAAM;YACNR,YAAY;QACd;QACAkB,MAAM3C,KAAK0B,MAAM,CACf5B,yBAAyB,UAAU;YACjCqB;YACA,gBAAgBuB;YAChB,iBAAiBX;YACjB,GAAGb,KAAK;YACRc,SAASK;QACX,IACA;YAAER,aAAa;QAAS;QAE1BJ,YAAYzB,KAAK0B,MAAM,CAACD,YAAY;YAClCE,cAAc;gBACZ,eAAe;YACjB;YACAE,aAAa;QACf;QACAI,MAAMjC,KAAK4C,QAAQ,CAACX,MAAM;YACxBJ,aAAa;QACf;IACF;AACF,EAAE"}
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+ import { clsx } from "clsx";
3
+ import { useRootDefaultClassName } from "../sharedNavStyles.styles.css.js";
4
+ import sharedStyles from "../sharedNavStyles.module.css";
5
+ import styles from "./NavCategoryItem.module.css";
6
+ export const navCategoryItemClassNames = {
7
+ root: 'fui-NavCategoryItem',
8
+ icon: 'fui-NavCategoryItem__icon',
9
+ expandIcon: 'fui-NavCategoryItem__expandIcon',
10
+ expandIconMotion: 'fui-NavCategoryItem__expandIconMotion'
11
+ };
12
+ export const useRootStyles = ()=>({
13
+ base: styles.root
14
+ });
15
+ export const useNavCategoryItemStyles_unstable = (state)=>{
16
+ const rootDefaultClassName = useRootDefaultClassName();
17
+ // eslint-disable-next-line react-hooks/immutability
18
+ state.root.className = clsx(navCategoryItemClassNames.root, rootDefaultClassName, styles.root, sharedStyles[state.density], state.selected && sharedStyles.selected, state.selected && state.open === false && sharedStyles.indicator, state.selected && state.open === false && sharedStyles.contentSelected, state.root.className);
19
+ // eslint-disable-next-line react-hooks/immutability
20
+ state.expandIcon.className = clsx(navCategoryItemClassNames.expandIcon, styles.expandIcon, state.expandIcon.className);
21
+ if (state.icon) {
22
+ // eslint-disable-next-line react-hooks/immutability
23
+ state.icon.className = clsx(navCategoryItemClassNames.icon, sharedStyles.icon, state.icon.className);
24
+ }
25
+ return state;
26
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/useNavCategoryItem.styles.css.ts"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { NavCategoryItemSlots, NavCategoryItemState } from './NavCategoryItem.types';\nimport { useRootDefaultClassName } from '../sharedNavStyles.styles.css';\nimport sharedStyles from '../sharedNavStyles.module.css';\nimport styles from './NavCategoryItem.module.css';\n\nexport const navCategoryItemClassNames: SlotClassNames<NavCategoryItemSlots> = {\n root: 'fui-NavCategoryItem',\n icon: 'fui-NavCategoryItem__icon',\n expandIcon: 'fui-NavCategoryItem__expandIcon',\n expandIconMotion: 'fui-NavCategoryItem__expandIconMotion',\n};\n\nexport const useRootStyles = (): Record<'base', string> => ({ base: styles.root });\n\nexport const useNavCategoryItemStyles_unstable = (state: NavCategoryItemState): NavCategoryItemState => {\n const rootDefaultClassName = useRootDefaultClassName();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(\n navCategoryItemClassNames.root,\n rootDefaultClassName,\n styles.root,\n sharedStyles[state.density],\n state.selected && sharedStyles.selected,\n state.selected && state.open === false && sharedStyles.indicator,\n state.selected && state.open === false && sharedStyles.contentSelected,\n state.root.className,\n );\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = clsx(\n navCategoryItemClassNames.expandIcon,\n styles.expandIcon,\n state.expandIcon.className,\n );\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = clsx(navCategoryItemClassNames.icon, sharedStyles.icon, state.icon.className);\n }\n return state;\n};\n"],"names":["clsx","useRootDefaultClassName","sharedStyles","styles","navCategoryItemClassNames","root","icon","expandIcon","expandIconMotion","useRootStyles","base","useNavCategoryItemStyles_unstable","state","rootDefaultClassName","className","density","selected","open","indicator","contentSelected"],"mappings":"AAAA;AAEA,SAASA,IAAI,QAAQ,OAAO;AAG5B,SAASC,uBAAuB,QAAQ,mCAAgC;AACxE,OAAOC,kBAAkB,gCAAgC;AACzD,OAAOC,YAAY,+BAA+B;AAElD,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,MAAM;IACNC,YAAY;IACZC,kBAAkB;AACpB,EAAE;AAEF,OAAO,MAAMC,gBAAgB,IAA+B,CAAA;QAAEC,MAAMP,OAAOE,IAAI;IAAC,CAAA,EAAG;AAEnF,OAAO,MAAMM,oCAAoC,CAACC;IAChD,MAAMC,uBAAuBZ;IAC7B,oDAAoD;IACpDW,MAAMP,IAAI,CAACS,SAAS,GAAGd,KACrBI,0BAA0BC,IAAI,EAC9BQ,sBACAV,OAAOE,IAAI,EACXH,YAAY,CAACU,MAAMG,OAAO,CAAC,EAC3BH,MAAMI,QAAQ,IAAId,aAAac,QAAQ,EACvCJ,MAAMI,QAAQ,IAAIJ,MAAMK,IAAI,KAAK,SAASf,aAAagB,SAAS,EAChEN,MAAMI,QAAQ,IAAIJ,MAAMK,IAAI,KAAK,SAASf,aAAaiB,eAAe,EACtEP,MAAMP,IAAI,CAACS,SAAS;IAEtB,oDAAoD;IACpDF,MAAML,UAAU,CAACO,SAAS,GAAGd,KAC3BI,0BAA0BG,UAAU,EACpCJ,OAAOI,UAAU,EACjBK,MAAML,UAAU,CAACO,SAAS;IAE5B,IAAIF,MAAMN,IAAI,EAAE;QACd,oDAAoD;QACpDM,MAAMN,IAAI,CAACQ,SAAS,GAAGd,KAAKI,0BAA0BE,IAAI,EAAEJ,aAAaI,IAAI,EAAEM,MAAMN,IAAI,CAACQ,SAAS;IACrG;IACA,OAAOF;AACT,EAAE"}
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+ import { clsx } from "clsx";
3
+ import { useRootDefaultClassName } from "../sharedNavStyles.styles.css.js";
4
+ import sharedStyles from "../sharedNavStyles.module.css";
5
+ import styles from "./NavCategoryItem.module.css";
6
+ export const navCategoryItemClassNames = {
7
+ root: 'fui-NavCategoryItem',
8
+ icon: 'fui-NavCategoryItem__icon',
9
+ expandIcon: 'fui-NavCategoryItem__expandIcon',
10
+ expandIconMotion: 'fui-NavCategoryItem__expandIconMotion'
11
+ };
12
+ export const useRootStyles = ()=>({
13
+ base: styles.root
14
+ });
15
+ export const useNavCategoryItemStyles_unstable = (state)=>{
16
+ const rootDefaultClassName = useRootDefaultClassName();
17
+ // eslint-disable-next-line react-hooks/immutability
18
+ state.root.className = clsx(navCategoryItemClassNames.root, rootDefaultClassName, styles.root, sharedStyles[state.density], state.selected && sharedStyles.selected, state.selected && state.open === false && sharedStyles.indicator, state.selected && state.open === false && sharedStyles.contentSelected, state.root.className);
19
+ // eslint-disable-next-line react-hooks/immutability
20
+ state.expandIcon.className = clsx(navCategoryItemClassNames.expandIcon, styles.expandIcon, state.expandIcon.className);
21
+ if (state.icon) {
22
+ // eslint-disable-next-line react-hooks/immutability
23
+ state.icon.className = clsx(navCategoryItemClassNames.icon, sharedStyles.icon, state.icon.className);
24
+ }
25
+ return state;
26
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/useNavCategoryItem.styles.css.ts"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { NavCategoryItemSlots, NavCategoryItemState } from './NavCategoryItem.types';\nimport { useRootDefaultClassName } from '../sharedNavStyles.styles.css';\nimport sharedStyles from '../sharedNavStyles.module.css';\nimport styles from './NavCategoryItem.module.css';\n\nexport const navCategoryItemClassNames: SlotClassNames<NavCategoryItemSlots> = {\n root: 'fui-NavCategoryItem',\n icon: 'fui-NavCategoryItem__icon',\n expandIcon: 'fui-NavCategoryItem__expandIcon',\n expandIconMotion: 'fui-NavCategoryItem__expandIconMotion',\n};\n\nexport const useRootStyles = (): Record<'base', string> => ({ base: styles.root });\n\nexport const useNavCategoryItemStyles_unstable = (state: NavCategoryItemState): NavCategoryItemState => {\n const rootDefaultClassName = useRootDefaultClassName();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(\n navCategoryItemClassNames.root,\n rootDefaultClassName,\n styles.root,\n sharedStyles[state.density],\n state.selected && sharedStyles.selected,\n state.selected && state.open === false && sharedStyles.indicator,\n state.selected && state.open === false && sharedStyles.contentSelected,\n state.root.className,\n );\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = clsx(\n navCategoryItemClassNames.expandIcon,\n styles.expandIcon,\n state.expandIcon.className,\n );\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = clsx(navCategoryItemClassNames.icon, sharedStyles.icon, state.icon.className);\n }\n return state;\n};\n"],"names":["clsx","useRootDefaultClassName","sharedStyles","styles","navCategoryItemClassNames","root","icon","expandIcon","expandIconMotion","useRootStyles","base","useNavCategoryItemStyles_unstable","state","rootDefaultClassName","className","density","selected","open","indicator","contentSelected"],"mappings":"AAAA;AAEA,SAASA,IAAI,QAAQ,OAAO;AAG5B,SAASC,uBAAuB,QAAQ,mCAAgC;AACxE,OAAOC,kBAAkB,gCAAgC;AACzD,OAAOC,YAAY,+BAA+B;AAElD,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,MAAM;IACNC,YAAY;IACZC,kBAAkB;AACpB,EAAE;AAEF,OAAO,MAAMC,gBAAgB,IAA+B,CAAA;QAAEC,MAAMP,OAAOE,IAAI;IAAC,CAAA,EAAG;AAEnF,OAAO,MAAMM,oCAAoC,CAACC;IAChD,MAAMC,uBAAuBZ;IAC7B,oDAAoD;IACpDW,MAAMP,IAAI,CAACS,SAAS,GAAGd,KACrBI,0BAA0BC,IAAI,EAC9BQ,sBACAV,OAAOE,IAAI,EACXH,YAAY,CAACU,MAAMG,OAAO,CAAC,EAC3BH,MAAMI,QAAQ,IAAId,aAAac,QAAQ,EACvCJ,MAAMI,QAAQ,IAAIJ,MAAMK,IAAI,KAAK,SAASf,aAAagB,SAAS,EAChEN,MAAMI,QAAQ,IAAIJ,MAAMK,IAAI,KAAK,SAASf,aAAaiB,eAAe,EACtEP,MAAMP,IAAI,CAACS,SAAS;IAEtB,oDAAoD;IACpDF,MAAML,UAAU,CAACO,SAAS,GAAGd,KAC3BI,0BAA0BG,UAAU,EACpCJ,OAAOI,UAAU,EACjBK,MAAML,UAAU,CAACO,SAAS;IAE5B,IAAIF,MAAMN,IAAI,EAAE;QACd,oDAAoD;QACpDM,MAAMN,IAAI,CAACQ,SAAS,GAAGd,KAAKI,0BAA0BE,IAAI,EAAEJ,aAAaI,IAAI,EAAEM,MAAMN,IAAI,CAACQ,SAAS;IACrG;IACA,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryItem/useNavCategoryItem.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport {\n useContentStyles,\n useIconStyles,\n useIndicatorStyles,\n useRootDefaultClassName,\n useSmallStyles,\n} from '../sharedNavStyles.styles';\n\nimport type { NavCategoryItemSlots, NavCategoryItemState } from './NavCategoryItem.types';\n\nexport const navCategoryItemClassNames: SlotClassNames<NavCategoryItemSlots> = {\n root: 'fui-NavCategoryItem',\n icon: 'fui-NavCategoryItem__icon',\n expandIcon: 'fui-NavCategoryItem__expandIcon',\n expandIconMotion: 'fui-NavCategoryItem__expandIconMotion',\n};\n\nconst useExpandIconStyles = makeStyles({\n base: {\n marginInlineStart: 'auto',\n height: '20px',\n },\n selected: typographyStyles.body1Strong,\n});\n\n/**\n * Styles for the root slot\n */\nexport const useRootStyles = makeStyles({\n base: {\n width: '100%',\n },\n});\n\n/**\n * Apply styling to the NavCategoryItem slots based on the state\n */\nexport const useNavCategoryItemStyles_unstable = (state: NavCategoryItemState): NavCategoryItemState => {\n const rootStyles = useRootStyles();\n const smallStyles = useSmallStyles();\n const defaultRootClassName = useRootDefaultClassName();\n const contentStyles = useContentStyles();\n const indicatorStyles = useIndicatorStyles();\n const iconStyles = useIconStyles();\n const expandIconStyles = useExpandIconStyles();\n\n const { selected, open, density } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n navCategoryItemClassNames.root,\n defaultRootClassName,\n rootStyles.base,\n density === 'small' && smallStyles.root,\n selected && open === false && indicatorStyles.base,\n selected && open === false && contentStyles.selected,\n state.root.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = mergeClasses(\n navCategoryItemClassNames.expandIcon,\n expandIconStyles.base,\n state.expandIcon.className,\n );\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(\n navCategoryItemClassNames.icon,\n iconStyles.base,\n selected && iconStyles.selected,\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","typographyStyles","useContentStyles","useIconStyles","useIndicatorStyles","useRootDefaultClassName","useSmallStyles","navCategoryItemClassNames","root","icon","expandIcon","expandIconMotion","useExpandIconStyles","base","marginInlineStart","height","selected","body1Strong","useRootStyles","width","useNavCategoryItemStyles_unstable","state","rootStyles","smallStyles","defaultRootClassName","contentStyles","indicatorStyles","iconStyles","expandIconStyles","open","density","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SACEC,gBAAgB,EAChBC,aAAa,EACbC,kBAAkB,EAClBC,uBAAuB,EACvBC,cAAc,QACT,+BAA4B;AAInC,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,MAAM;IACNC,YAAY;IACZC,kBAAkB;AACpB,EAAE;AAEF,MAAMC,sBAAsBb,WAAW;IACrCc,MAAM;QACJC,mBAAmB;QACnBC,QAAQ;IACV;IACAC,UAAUf,iBAAiBgB,WAAW;AACxC;AAEA;;CAEC,GACD,OAAO,MAAMC,gBAAgBnB,WAAW;IACtCc,MAAM;QACJM,OAAO;IACT;AACF,GAAG;AAEH;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,MAAMC,aAAaJ;IACnB,MAAMK,cAAcjB;IACpB,MAAMkB,uBAAuBnB;IAC7B,MAAMoB,gBAAgBvB;IACtB,MAAMwB,kBAAkBtB;IACxB,MAAMuB,aAAaxB;IACnB,MAAMyB,mBAAmBhB;IAEzB,MAAM,EAAEI,QAAQ,EAAEa,IAAI,EAAEC,OAAO,EAAE,GAAGT;IAEpC,oDAAoD;IACpDA,MAAMb,IAAI,CAACuB,SAAS,GAAG/B,aACrBO,0BAA0BC,IAAI,EAC9BgB,sBACAF,WAAWT,IAAI,EACfiB,YAAY,WAAWP,YAAYf,IAAI,EACvCQ,YAAYa,SAAS,SAASH,gBAAgBb,IAAI,EAClDG,YAAYa,SAAS,SAASJ,cAAcT,QAAQ,EACpDK,MAAMb,IAAI,CAACuB,SAAS;IAGtB,oDAAoD;IACpDV,MAAMX,UAAU,CAACqB,SAAS,GAAG/B,aAC3BO,0BAA0BG,UAAU,EACpCkB,iBAAiBf,IAAI,EACrBQ,MAAMX,UAAU,CAACqB,SAAS;IAG5B,IAAIV,MAAMZ,IAAI,EAAE;QACd,oDAAoD;QACpDY,MAAMZ,IAAI,CAACsB,SAAS,GAAG/B,aACrBO,0BAA0BE,IAAI,EAC9BkB,WAAWd,IAAI,EACfG,YAAYW,WAAWX,QAAQ,EAC/BK,MAAMZ,IAAI,CAACsB,SAAS;IAExB;IAEA,OAAOV;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/NavCategoryItem/useNavCategoryItem.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport {\n useContentStyles,\n useIconStyles,\n useIndicatorStyles,\n useRootDefaultClassName,\n useSmallStyles,\n} from '../sharedNavStyles.styles';\n\nimport type { NavCategoryItemSlots, NavCategoryItemState } from './NavCategoryItem.types';\n\nexport const navCategoryItemClassNames: SlotClassNames<NavCategoryItemSlots> = {\n root: 'fui-NavCategoryItem',\n icon: 'fui-NavCategoryItem__icon',\n expandIcon: 'fui-NavCategoryItem__expandIcon',\n expandIconMotion: 'fui-NavCategoryItem__expandIconMotion',\n};\n\nconst useExpandIconStyles = makeStyles({\n base: {\n marginInlineStart: 'auto',\n height: '20px',\n },\n selected: typographyStyles.body1Strong,\n});\n\n/**\n * Styles for the root slot\n */\nexport const useRootStyles = makeStyles({\n base: {\n width: '100%',\n },\n});\n\n/**\n * Apply styling to the NavCategoryItem slots based on the state\n */\nexport const useNavCategoryItemStyles_unstable = (state: NavCategoryItemState): NavCategoryItemState => {\n const rootStyles = useRootStyles();\n const smallStyles = useSmallStyles();\n const defaultRootClassName = useRootDefaultClassName();\n const contentStyles = useContentStyles();\n const indicatorStyles = useIndicatorStyles();\n const iconStyles = useIconStyles();\n const expandIconStyles = useExpandIconStyles();\n\n const { selected, open, density } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n navCategoryItemClassNames.root,\n defaultRootClassName,\n rootStyles.base,\n density === 'small' && smallStyles.root,\n selected && open === false && indicatorStyles.base,\n selected && open === false && contentStyles.selected,\n state.root.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability\n state.expandIcon.className = mergeClasses(\n navCategoryItemClassNames.expandIcon,\n expandIconStyles.base,\n state.expandIcon.className,\n );\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(\n navCategoryItemClassNames.icon,\n iconStyles.base,\n selected && iconStyles.selected,\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","typographyStyles","useContentStyles","useIconStyles","useIndicatorStyles","useRootDefaultClassName","useSmallStyles","navCategoryItemClassNames","root","icon","expandIcon","expandIconMotion","useExpandIconStyles","base","marginInlineStart","height","selected","body1Strong","useRootStyles","width","useNavCategoryItemStyles_unstable","state","rootStyles","smallStyles","defaultRootClassName","contentStyles","indicatorStyles","iconStyles","expandIconStyles","open","density","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SACEC,gBAAgB,EAChBC,aAAa,EACbC,kBAAkB,EAClBC,uBAAuB,EACvBC,cAAc,QACT,+BAA4B;AAInC,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,MAAM;IACNC,YAAY;IACZC,kBAAkB;AACpB,EAAE;AAEF,MAAMC,sBAAsBb,WAAW;IACrCc,MAAM;QACJC,mBAAmB;QACnBC,QAAQ;IACV;IACAC,UAAUf,iBAAiBgB,WAAW;AACxC;AAEA;;CAEC,GACD,OAAO,MAAMC,gBAAgBnB,WAAW;IACtCc,MAAM;QACJM,OAAO;IACT;AACF,GAAG;AAEH;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,MAAMC,aAAaJ;IACnB,MAAMK,cAAcjB;IACpB,MAAMkB,uBAAuBnB;IAC7B,MAAMoB,gBAAgBvB;IACtB,MAAMwB,kBAAkBtB;IACxB,MAAMuB,aAAaxB;IACnB,MAAMyB,mBAAmBhB;IAEzB,MAAM,EAAEI,QAAQ,EAAEa,IAAI,EAAEC,OAAO,EAAE,GAAGT;IAEpC,oDAAoD;IACpDA,MAAMb,IAAI,CAACuB,SAAS,GAAG/B,aACrBO,0BAA0BC,IAAI,EAC9BgB,sBACAF,WAAWT,IAAI,EACfiB,YAAY,WAAWP,YAAYf,IAAI,EACvCQ,YAAYa,SAAS,SAASH,gBAAgBb,IAAI,EAClDG,YAAYa,SAAS,SAASJ,cAAcT,QAAQ,EACpDK,MAAMb,IAAI,CAACuB,SAAS;IAGtB,oDAAoD;IACpDV,MAAMX,UAAU,CAACqB,SAAS,GAAG/B,aAC3BO,0BAA0BG,UAAU,EACpCkB,iBAAiBf,IAAI,EACrBQ,MAAMX,UAAU,CAACqB,SAAS;IAG5B,IAAIV,MAAMZ,IAAI,EAAE;QACd,oDAAoD;QACpDY,MAAMZ,IAAI,CAACsB,SAAS,GAAG/B,aACrBO,0BAA0BE,IAAI,EAC9BkB,WAAWd,IAAI,EACfG,YAAYW,WAAWX,QAAQ,EAC/BK,MAAMZ,IAAI,CAACsB,SAAS;IAExB;IAEA,OAAOV;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavCategoryItemContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { NavItemValue } from './NavContext.types';\n\n// This context is analogous to AccordionHeaderContext\n\nexport type NavCategoryItemContextValue = {\n open: boolean;\n value: NavItemValue;\n};\n\nconst NavCategoryItemContext = React.createContext<NavCategoryItemContextValue | undefined>(\n undefined,\n) as React.Context<NavCategoryItemContextValue>;\n\nconst NavCategoryItemContextDefaultValues = {\n open: false,\n};\n\nexport const { Provider: NavCategoryItemProvider } = NavCategoryItemContext;\n\nexport const useNavCategoryItemContext_unstable = (): NavCategoryItemContextValue =>\n React.useContext(NavCategoryItemContext) ?? NavCategoryItemContextDefaultValues;\n"],"names":["React","NavCategoryItemContext","createContext","undefined","NavCategoryItemContextDefaultValues","open","Provider","NavCategoryItemProvider","useNavCategoryItemContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAU/B,MAAMC,yBAAyBD,MAAME,aAAa,CAChDC;AAGF,MAAMC,sCAAsC;IAC1CC,MAAM;AACR;AAEA,OAAO,MAAM,EAAEC,UAAUC,uBAAuB,EAAE,GAAGN,uBAAuB;AAE5E,OAAO,MAAMO,qCAAqC;QAChDR;WAAAA,CAAAA,oBAAAA,MAAMS,UAAU,CAACR,qCAAjBD,+BAAAA,oBAA4CI;EAAoC"}
1
+ {"version":3,"sources":["../../src/components/NavCategoryItemContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { NavItemValue } from './NavContext.types';\n\n// This context is analogous to AccordionHeaderContext\n\nexport type NavCategoryItemContextValue = {\n open: boolean;\n value: NavItemValue;\n};\n\nconst NavCategoryItemContext = React.createContext<NavCategoryItemContextValue | undefined>(\n undefined,\n) as React.Context<NavCategoryItemContextValue>;\n\nconst NavCategoryItemContextDefaultValues = {\n open: false,\n};\n\nexport const { Provider: NavCategoryItemProvider } = NavCategoryItemContext;\n\nexport const useNavCategoryItemContext_unstable = (): NavCategoryItemContextValue =>\n React.useContext(NavCategoryItemContext) ?? NavCategoryItemContextDefaultValues;\n"],"names":["React","NavCategoryItemContext","createContext","undefined","NavCategoryItemContextDefaultValues","open","Provider","NavCategoryItemProvider","useNavCategoryItemContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAU/B,MAAMC,yBAAyBD,MAAME,aAAa,CAChDC;AAGF,MAAMC,sCAAsC;IAC1CC,MAAM;AACR;AAEA,OAAO,MAAM,EAAEC,UAAUC,uBAAuB,EAAE,GAAGN,uBAAuB;AAE5E,OAAO,MAAMO,qCAAqC;QAChDR;YAAAA,oBAAAA,MAAMS,UAAU,CAACR,qCAAjBD,+BAAAA,oBAA4CI;EAAoC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { NavContextValue } from './NavContext.types';\n\nconst navContextDefaultValue: NavContextValue = {\n selectedValue: undefined,\n selectedCategoryValue: undefined,\n onRegister: () => {\n /* noop */\n },\n onUnregister: () => {\n /* noop */\n },\n onSelect: () => {\n /* noop */\n },\n getRegisteredNavItems: () => {\n return {\n registeredNavItems: {},\n };\n },\n onRequestNavCategoryItemToggle() {\n /* noop */\n },\n /**\n * The list of opened panels by index\n */\n openCategories: [],\n\n /**\n * Indicates if Nav supports multiple open Categories at the same time.\n */\n multiple: true,\n\n /**\n * Indicates the vertical density and density of the Nav.\n */\n density: 'medium',\n\n /**\n * By default, the Nav is a single tab stop with only arrow key navigation\n */\n tabbable: false,\n};\n\nconst NavContext = React.createContext<NavContextValue | undefined>(undefined);\n\nexport const NavProvider = NavContext.Provider;\n\nexport const useNavContext_unstable = (): NavContextValue => React.useContext(NavContext) || navContextDefaultValue;\n"],"names":["React","navContextDefaultValue","selectedValue","undefined","selectedCategoryValue","onRegister","onUnregister","onSelect","getRegisteredNavItems","registeredNavItems","onRequestNavCategoryItemToggle","openCategories","multiple","density","tabbable","NavContext","createContext","NavProvider","Provider","useNavContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,yBAA0C;IAC9CC,eAAeC;IACfC,uBAAuBD;IACvBE,YAAY;IACV,QAAQ,GACV;IACAC,cAAc;IACZ,QAAQ,GACV;IACAC,UAAU;IACR,QAAQ,GACV;IACAC,uBAAuB;QACrB,OAAO;YACLC,oBAAoB,CAAC;QACvB;IACF;IACAC;IACE,QAAQ,GACV;IACA;;GAEC,GACDC,gBAAgB,EAAE;IAElB;;GAEC,GACDC,UAAU;IAEV;;GAEC,GACDC,SAAS;IAET;;GAEC,GACDC,UAAU;AACZ;AAEA,MAAMC,aAAaf,MAAMgB,aAAa,CAA8Bb;AAEpE,OAAO,MAAMc,cAAcF,WAAWG,QAAQ,CAAC;AAE/C,OAAO,MAAMC,yBAAyB,IAAuBnB,MAAMoB,UAAU,CAACL,eAAed,uBAAuB"}
1
+ {"version":3,"sources":["../../src/components/NavContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { NavContextValue } from './NavContext.types';\n\nconst navContextDefaultValue: NavContextValue = {\n selectedValue: undefined,\n selectedCategoryValue: undefined,\n onRegister: () => {\n /* noop */\n },\n onUnregister: () => {\n /* noop */\n },\n onSelect: () => {\n /* noop */\n },\n getRegisteredNavItems: () => {\n return {\n registeredNavItems: {},\n };\n },\n onRequestNavCategoryItemToggle() {\n /* noop */\n },\n /**\n * The list of opened panels by index\n */\n openCategories: [],\n\n /**\n * Indicates if Nav supports multiple open Categories at the same time.\n */\n multiple: true,\n\n /**\n * Indicates the vertical density and density of the Nav.\n */\n density: 'medium',\n\n /**\n * By default, the Nav is a single tab stop with only arrow key navigation\n */\n tabbable: false,\n};\n\nconst NavContext = React.createContext<NavContextValue | undefined>(undefined);\n\nexport const NavProvider = NavContext.Provider;\n\nexport const useNavContext_unstable = (): NavContextValue => React.useContext(NavContext) || navContextDefaultValue;\n"],"names":["React","navContextDefaultValue","selectedValue","undefined","selectedCategoryValue","onRegister","onUnregister","onSelect","getRegisteredNavItems","registeredNavItems","onRequestNavCategoryItemToggle","openCategories","multiple","density","tabbable","NavContext","createContext","NavProvider","Provider","useNavContext_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,yBAA0C;IAC9CC,eAAeC;IACfC,uBAAuBD;IACvBE,YAAY;IACV,QAAQ,GACV;IACAC,cAAc;IACZ,QAAQ,GACV;IACAC,UAAU;IACR,QAAQ,GACV;IACAC,uBAAuB;QACrB,OAAO;YACLC,oBAAoB,CAAC;QACvB;IACF;IACAC;IACE,QAAQ,GACV;IACA;;GAEC,GACDC,gBAAgB,EAAE;IAElB;;GAEC,GACDC,UAAU;IAEV;;GAEC,GACDC,SAAS;IAET;;GAEC,GACDC,UAAU;AACZ;AAEA,MAAMC,aAAaf,MAAMgB,aAAa,CAA8Bb;AAEpE,OAAO,MAAMc,cAAcF,WAAWG,QAAQ,CAAC;AAE/C,OAAO,MAAMC,yBAAyB,IAAuBnB,MAAMoB,UAAU,CAACL,eAAed,uBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavContext.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { EventHandler } from '@fluentui/react-utilities';\n\nimport type { NavProps, OnNavItemSelectData } from './Nav/Nav.types';\n\nexport type NavContextValue = Pick<\n NavProps,\n 'onNavItemSelect' | 'selectedValue' | 'selectedCategoryValue' | 'density'\n> & {\n /** A callback to allow a navItem to register itself with the navItem list. */\n onRegister: RegisterNavItemEventHandler;\n\n /** A callback to allow a navItem to unregister itself with the navItem list. */\n onUnregister: RegisterNavItemEventHandler;\n /**\n * A callback to allow a navItem to select itself when pressed.\n */\n onSelect: EventHandler<OnNavItemSelectData>;\n /**\n * Gets the registered navItem data along with current and previous selected values.\n */\n getRegisteredNavItems: () => {\n selectedValue?: NavItemValue;\n selectedCategoryValue?: NavItemValue;\n previousSelectedValue?: NavItemValue;\n registeredNavItems: Record<string, NavItemRegisterData>;\n };\n /**\n * Callback used by NavCategoryItem to request a change on it's own opened state\n * Should be used to toggle NavCategoryItem's open state\n */\n onRequestNavCategoryItemToggle: EventHandler<OnNavItemSelectData>;\n\n /**\n * The list of opened panels by index\n */\n openCategories: NavItemValue[];\n\n /**\n * Indicates if Nav supports multiple open Categories at the same time.\n * @default true, indicating that multiple categories can be open at the same time.\n */\n multiple: boolean;\n\n /**\n * Setting this to true enables tab AND arrow navigation.\n * @default false\n */\n tabbable: boolean;\n};\n\n/**\n * Any value that identifies a specific Item.\n */\nexport type NavItemValue = string;\n\n/**\n * Context values used in rendering navItemList.\n */\nexport type NavContextValues = {\n /**\n * The context of the navItem list available to each navItem.\n */\n nav: NavContextValue;\n};\n\nexport type NavItemRegisterData = {\n /**\n * The value of the navItem.\n */\n value: NavItemValue;\n\n /**\n * The reference to the navItem HTML element.\n */\n ref: React.RefObject<HTMLElement | null>;\n};\n\nexport type RegisterNavItemEventHandler = (data: NavItemRegisterData) => void;\n"],"names":[],"mappings":"AA8EA,WAA8E"}
1
+ {"version":3,"sources":["../../src/components/NavContext.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { EventHandler } from '@fluentui/react-utilities';\n\nimport type { NavProps, OnNavItemSelectData } from './Nav/Nav.types';\n\nexport type NavContextValue = Pick<\n NavProps,\n 'onNavItemSelect' | 'selectedValue' | 'selectedCategoryValue' | 'density'\n> & {\n /** A callback to allow a navItem to register itself with the navItem list. */\n onRegister: RegisterNavItemEventHandler;\n\n /** A callback to allow a navItem to unregister itself with the navItem list. */\n onUnregister: RegisterNavItemEventHandler;\n /**\n * A callback to allow a navItem to select itself when pressed.\n */\n onSelect: EventHandler<OnNavItemSelectData>;\n /**\n * Gets the registered navItem data along with current and previous selected values.\n */\n getRegisteredNavItems: () => {\n selectedValue?: NavItemValue;\n selectedCategoryValue?: NavItemValue;\n previousSelectedValue?: NavItemValue;\n registeredNavItems: Record<string, NavItemRegisterData>;\n };\n /**\n * Callback used by NavCategoryItem to request a change on it's own opened state\n * Should be used to toggle NavCategoryItem's open state\n */\n onRequestNavCategoryItemToggle: EventHandler<OnNavItemSelectData>;\n\n /**\n * The list of opened panels by index\n */\n openCategories: NavItemValue[];\n\n /**\n * Indicates if Nav supports multiple open Categories at the same time.\n * @default true, indicating that multiple categories can be open at the same time.\n */\n multiple: boolean;\n\n /**\n * Setting this to true enables tab AND arrow navigation.\n * @default false\n */\n tabbable: boolean;\n};\n\n/**\n * Any value that identifies a specific Item.\n */\nexport type NavItemValue = string;\n\n/**\n * Context values used in rendering navItemList.\n */\nexport type NavContextValues = {\n /**\n * The context of the navItem list available to each navItem.\n */\n nav: NavContextValue;\n};\n\nexport type NavItemRegisterData = {\n /**\n * The value of the navItem.\n */\n value: NavItemValue;\n\n /**\n * The reference to the navItem HTML element.\n */\n ref: React.RefObject<HTMLElement | null>;\n};\n\nexport type RegisterNavItemEventHandler = (data: NavItemRegisterData) => void;\n"],"names":[],"mappings":"AA8EA,WAA8E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavDivider/NavDivider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderDivider_unstable } from '@fluentui/react-divider';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNavDivider_unstable } from './useNavDivider';\nimport { useNavDividerStyles_unstable } from './useNavDividerStyles.styles';\nimport type { NavDividerProps } from './NavDivider.types';\n\n/**\n * NavDivider component - a divider used within navigation components to separate items.\n */\nexport const NavDivider: ForwardRefComponent<NavDividerProps> = React.forwardRef((props, ref) => {\n const state = useNavDivider_unstable(props, ref);\n\n useNavDividerStyles_unstable(state);\n useCustomStyleHook_unstable('useNavDividerStyles_unstable')(state);\n\n return renderDivider_unstable(state);\n});\n\nNavDivider.displayName = 'NavDivider';\n"],"names":["React","renderDivider_unstable","useCustomStyleHook_unstable","useNavDivider_unstable","useNavDividerStyles_unstable","NavDivider","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,0BAA0B;AAEjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,4BAA4B,QAAQ,kCAA+B;AAG5E;;CAEC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQN,uBAAuBI,OAAOC;IAE5CJ,6BAA6BK;IAC7BP,4BAA4B,gCAAgCO;IAE5D,OAAOR,uBAAuBQ;AAChC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/NavDivider/NavDivider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { renderDivider_unstable } from '@fluentui/react-divider';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useNavDivider_unstable } from './useNavDivider';\nimport { useNavDividerStyles_unstable } from './useNavDividerStyles.styles';\nimport type { NavDividerProps } from './NavDivider.types';\n\n/**\n * NavDivider component - a divider used within navigation components to separate items.\n */\nexport const NavDivider: ForwardRefComponent<NavDividerProps> = React.forwardRef((props, ref) => {\n const state = useNavDivider_unstable(props, ref);\n\n useNavDividerStyles_unstable(state);\n useCustomStyleHook_unstable('useNavDividerStyles_unstable')(state);\n\n return renderDivider_unstable(state);\n});\n\nNavDivider.displayName = 'NavDivider';\n"],"names":["React","renderDivider_unstable","useCustomStyleHook_unstable","useNavDivider_unstable","useNavDividerStyles_unstable","NavDivider","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,0BAA0B;AAEjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,4BAA4B,QAAQ,kCAA+B;AAG5E;;CAEC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQN,uBAAuBI,OAAOC;IAE5CJ,6BAA6BK;IAC7BP,4BAA4B,gCAAgCO;IAE5D,OAAOR,uBAAuBQ;AAChC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -0,0 +1,6 @@
1
+ @layer fluentui {
2
+ .root {
3
+ flex-grow: 0;
4
+ margin-block: var(--spacingVerticalXS);
5
+ }
6
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavDivider/NavDivider.types.ts"],"sourcesContent":["import type { DividerProps, DividerState } from '@fluentui/react-divider';\n\n/**\n * NavDivider Props\n */\nexport type NavDividerProps = DividerProps;\n\n/**\n * State used in rendering NavDivider\n */\nexport type NavDividerState = DividerState;\n"],"names":[],"mappings":"AAOA;;CAEC,GACD,WAA2C"}
1
+ {"version":3,"sources":["../../../src/components/NavDivider/NavDivider.types.ts"],"sourcesContent":["import type { DividerProps, DividerState } from '@fluentui/react-divider';\n\n/**\n * NavDivider Props\n */\nexport type NavDividerProps = DividerProps;\n\n/**\n * State used in rendering NavDivider\n */\nexport type NavDividerState = DividerState;\n"],"names":[],"mappings":"AAOA;;CAEC,GACD,WAA2C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavDivider/index.ts"],"sourcesContent":["export { NavDivider } from './NavDivider';\nexport type { NavDividerProps, NavDividerState } from './NavDivider.types';\nexport { useNavDivider_unstable } from './useNavDivider';\nexport { navDividerClassNames, useNavDividerStyles_unstable } from './useNavDividerStyles.styles';\n"],"names":["NavDivider","useNavDivider_unstable","navDividerClassNames","useNavDividerStyles_unstable"],"mappings":"AAAA,SAASA,UAAU,QAAQ,kBAAe;AAE1C,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,oBAAoB,EAAEC,4BAA4B,QAAQ,kCAA+B"}
1
+ {"version":3,"sources":["../../../src/components/NavDivider/index.ts"],"sourcesContent":["export { NavDivider } from './NavDivider';\nexport type { NavDividerProps, NavDividerState } from './NavDivider.types';\nexport { useNavDivider_unstable } from './useNavDivider';\nexport { navDividerClassNames, useNavDividerStyles_unstable } from './useNavDividerStyles.styles';\n"],"names":["NavDivider","useNavDivider_unstable","navDividerClassNames","useNavDividerStyles_unstable"],"mappings":"AAAA,SAASA,UAAU,QAAQ,kBAAe;AAE1C,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,oBAAoB,EAAEC,4BAA4B,QAAQ,kCAA+B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/NavDivider/useNavDivider.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { NavDividerProps, NavDividerState } from './NavDivider.types';\nimport { useDivider_unstable } from '@fluentui/react-divider';\n\n/**\n * Create the state required to render NavDivider.\n *\n * The returned state can be modified with hooks such as useNavDividerStyles_unstable,\n * before being passed to renderNavDivider_unstable.\n *\n * @param props - props from this instance of NavDivider\n * @param ref - reference to root HTMLDivElement of NavDivider\n */\nexport const useNavDivider_unstable = (props: NavDividerProps, ref: React.Ref<HTMLElement>): NavDividerState => {\n return useDivider_unstable({ appearance: 'strong', ...props }, ref);\n};\n"],"names":["useDivider_unstable","useNavDivider_unstable","props","ref","appearance"],"mappings":"AAAA;AAIA,SAASA,mBAAmB,QAAQ,0BAA0B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,OAAOH,oBAAoB;QAAEI,YAAY;QAAU,GAAGF,KAAK;IAAC,GAAGC;AACjE,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/NavDivider/useNavDivider.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { NavDividerProps, NavDividerState } from './NavDivider.types';\nimport { useDivider_unstable } from '@fluentui/react-divider';\n\n/**\n * Create the state required to render NavDivider.\n *\n * The returned state can be modified with hooks such as useNavDividerStyles_unstable,\n * before being passed to renderNavDivider_unstable.\n *\n * @param props - props from this instance of NavDivider\n * @param ref - reference to root HTMLDivElement of NavDivider\n */\nexport const useNavDivider_unstable = (props: NavDividerProps, ref: React.Ref<HTMLElement>): NavDividerState => {\n return useDivider_unstable({ appearance: 'strong', ...props }, ref);\n};\n"],"names":["useDivider_unstable","useNavDivider_unstable","props","ref","appearance"],"mappings":"AAAA;AAIA,SAASA,mBAAmB,QAAQ,0BAA0B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,OAAOH,oBAAoB;QAAEI,YAAY;QAAU,GAAGF,KAAK;IAAC,GAAGC;AACjE,EAAE"}
@@ -0,0 +1,18 @@
1
+ 'use client';
2
+ import { clsx } from "clsx";
3
+ import { useDividerStyles_unstable } from "@fluentui/react-divider";
4
+ import styles from "./NavDivider.module.css";
5
+ export const navDividerClassNames = {
6
+ root: 'fui-NavDivider',
7
+ wrapper: 'fui-NavDivider__wrapper'
8
+ };
9
+ export const useNavDividerStyles_unstable = (state)=>{
10
+ // eslint-disable-next-line react-hooks/immutability
11
+ state.root.className = clsx(navDividerClassNames.root, styles.root, state.root.className);
12
+ if (state.wrapper) {
13
+ // eslint-disable-next-line react-hooks/immutability
14
+ state.wrapper.className = clsx(navDividerClassNames.wrapper, state.wrapper.className);
15
+ }
16
+ useDividerStyles_unstable(state);
17
+ return state;
18
+ };