@fluentui/react-drawer 9.0.0-beta.8 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/CHANGELOG.md +426 -2
  2. package/README.md +5 -4
  3. package/dist/index.d.ts +128 -78
  4. package/lib/InlineDrawer.js +1 -0
  5. package/lib/InlineDrawer.js.map +1 -0
  6. package/lib/OverlayDrawer.js +1 -0
  7. package/lib/OverlayDrawer.js.map +1 -0
  8. package/lib/components/Drawer/Drawer.js +1 -1
  9. package/lib/components/Drawer/Drawer.js.map +1 -1
  10. package/lib/components/Drawer/Drawer.types.js.map +1 -1
  11. package/lib/components/Drawer/renderDrawer.js +4 -4
  12. package/lib/components/Drawer/renderDrawer.js.map +1 -1
  13. package/lib/components/Drawer/useDrawer.js +10 -10
  14. package/lib/components/Drawer/useDrawer.js.map +1 -1
  15. package/lib/components/DrawerBody/DrawerBody.js +1 -1
  16. package/lib/components/DrawerBody/DrawerBody.js.map +1 -1
  17. package/lib/components/DrawerBody/renderDrawerBody.js +4 -4
  18. package/lib/components/DrawerBody/renderDrawerBody.js.map +1 -1
  19. package/lib/components/DrawerBody/useDrawerBody.js +8 -3
  20. package/lib/components/DrawerBody/useDrawerBody.js.map +1 -1
  21. package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js +3 -30
  22. package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
  23. package/lib/components/DrawerFooter/DrawerFooter.js +3 -1
  24. package/lib/components/DrawerFooter/DrawerFooter.js.map +1 -1
  25. package/lib/components/DrawerFooter/renderDrawerFooter.js +4 -4
  26. package/lib/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  27. package/lib/components/DrawerFooter/useDrawerFooter.js +4 -2
  28. package/lib/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  29. package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js +3 -16
  30. package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
  31. package/lib/components/DrawerHeader/DrawerHeader.js +1 -1
  32. package/lib/components/DrawerHeader/DrawerHeader.js.map +1 -1
  33. package/lib/components/DrawerHeader/renderDrawerHeader.js +4 -4
  34. package/lib/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  35. package/lib/components/DrawerHeader/useDrawerHeader.js +4 -2
  36. package/lib/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  37. package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js +3 -17
  38. package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
  39. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +1 -1
  40. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  41. package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +4 -4
  42. package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  43. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +4 -2
  44. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  45. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +3 -13
  46. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
  47. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js +1 -1
  48. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  49. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +1 -1
  50. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  51. package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +9 -4
  52. package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  53. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +26 -15
  54. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  55. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +1 -1
  56. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
  57. package/lib/components/InlineDrawer/InlineDrawer.js +16 -0
  58. package/lib/components/InlineDrawer/InlineDrawer.js.map +1 -0
  59. package/lib/components/InlineDrawer/InlineDrawer.types.js.map +1 -0
  60. package/lib/components/InlineDrawer/index.js +5 -0
  61. package/lib/components/InlineDrawer/index.js.map +1 -0
  62. package/lib/components/InlineDrawer/renderInlineDrawer.js +11 -0
  63. package/lib/components/InlineDrawer/renderInlineDrawer.js.map +1 -0
  64. package/lib/components/InlineDrawer/useInlineDrawer.js +32 -0
  65. package/lib/components/InlineDrawer/useInlineDrawer.js.map +1 -0
  66. package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js +64 -0
  67. package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -0
  68. package/lib/components/OverlayDrawer/OverlayDrawer.js +15 -0
  69. package/lib/components/OverlayDrawer/OverlayDrawer.js.map +1 -0
  70. package/lib/components/OverlayDrawer/OverlayDrawer.types.js.map +1 -0
  71. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js +13 -0
  72. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -0
  73. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js.map +1 -0
  74. package/lib/components/OverlayDrawer/OverlayDrawerSurface/index.js +2 -0
  75. package/lib/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -0
  76. package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +29 -0
  77. package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -0
  78. package/lib/components/OverlayDrawer/index.js +5 -0
  79. package/lib/components/OverlayDrawer/index.js.map +1 -0
  80. package/lib/components/OverlayDrawer/renderOverlayDrawer.js +13 -0
  81. package/lib/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -0
  82. package/lib/components/OverlayDrawer/useOverlayDrawer.js +56 -0
  83. package/lib/components/OverlayDrawer/useOverlayDrawer.js.map +1 -0
  84. package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +73 -0
  85. package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -0
  86. package/lib/e2e/DrawerShared.js +108 -0
  87. package/lib/e2e/DrawerShared.js.map +1 -0
  88. package/lib/index.js +3 -3
  89. package/lib/index.js.map +1 -1
  90. package/lib/shared/DrawerBase.types.js +1 -0
  91. package/lib/shared/DrawerBase.types.js.map +1 -0
  92. package/lib/shared/useDrawerBaseStyles.styles.js +96 -0
  93. package/lib/shared/useDrawerBaseStyles.styles.js.map +1 -0
  94. package/lib/shared/useDrawerDefaultProps.js +8 -0
  95. package/lib/shared/useDrawerDefaultProps.js.map +1 -0
  96. package/lib-commonjs/Drawer.js +2 -2
  97. package/lib-commonjs/Drawer.js.map +1 -1
  98. package/lib-commonjs/DrawerBody.js +2 -2
  99. package/lib-commonjs/DrawerBody.js.map +1 -1
  100. package/lib-commonjs/DrawerFooter.js +2 -2
  101. package/lib-commonjs/DrawerFooter.js.map +1 -1
  102. package/lib-commonjs/DrawerHeader.js +2 -2
  103. package/lib-commonjs/DrawerHeader.js.map +1 -1
  104. package/lib-commonjs/DrawerHeaderNavigation.js +2 -2
  105. package/lib-commonjs/DrawerHeaderNavigation.js.map +1 -1
  106. package/lib-commonjs/DrawerHeaderTitle.js +2 -2
  107. package/lib-commonjs/DrawerHeaderTitle.js.map +1 -1
  108. package/lib-commonjs/InlineDrawer.js +6 -0
  109. package/lib-commonjs/InlineDrawer.js.map +1 -0
  110. package/lib-commonjs/OverlayDrawer.js +6 -0
  111. package/lib-commonjs/OverlayDrawer.js.map +1 -0
  112. package/lib-commonjs/components/Drawer/Drawer.js +9 -7
  113. package/lib-commonjs/components/Drawer/Drawer.js.map +1 -1
  114. package/lib-commonjs/components/Drawer/index.js +6 -6
  115. package/lib-commonjs/components/Drawer/index.js.map +1 -1
  116. package/lib-commonjs/components/Drawer/renderDrawer.js +8 -6
  117. package/lib-commonjs/components/Drawer/renderDrawer.js.map +1 -1
  118. package/lib-commonjs/components/Drawer/useDrawer.js +15 -13
  119. package/lib-commonjs/components/Drawer/useDrawer.js.map +1 -1
  120. package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js +6 -2
  121. package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js.map +1 -1
  122. package/lib-commonjs/components/DrawerBody/DrawerBody.js +9 -7
  123. package/lib-commonjs/components/DrawerBody/DrawerBody.js.map +1 -1
  124. package/lib-commonjs/components/DrawerBody/index.js +6 -6
  125. package/lib-commonjs/components/DrawerBody/index.js.map +1 -1
  126. package/lib-commonjs/components/DrawerBody/renderDrawerBody.js +7 -6
  127. package/lib-commonjs/components/DrawerBody/renderDrawerBody.js.map +1 -1
  128. package/lib-commonjs/components/DrawerBody/useDrawerBody.js +13 -6
  129. package/lib-commonjs/components/DrawerBody/useDrawerBody.js.map +1 -1
  130. package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js +15 -66
  131. package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
  132. package/lib-commonjs/components/DrawerFooter/DrawerFooter.js +9 -5
  133. package/lib-commonjs/components/DrawerFooter/DrawerFooter.js.map +1 -1
  134. package/lib-commonjs/components/DrawerFooter/index.js +6 -6
  135. package/lib-commonjs/components/DrawerFooter/index.js.map +1 -1
  136. package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js +7 -6
  137. package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  138. package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js +9 -5
  139. package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  140. package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js +11 -32
  141. package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
  142. package/lib-commonjs/components/DrawerHeader/DrawerHeader.js +9 -7
  143. package/lib-commonjs/components/DrawerHeader/DrawerHeader.js.map +1 -1
  144. package/lib-commonjs/components/DrawerHeader/index.js +6 -6
  145. package/lib-commonjs/components/DrawerHeader/index.js.map +1 -1
  146. package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js +7 -6
  147. package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  148. package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js +9 -5
  149. package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  150. package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js +11 -34
  151. package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
  152. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +9 -7
  153. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  154. package/lib-commonjs/components/DrawerHeaderNavigation/index.js +6 -6
  155. package/lib-commonjs/components/DrawerHeaderNavigation/index.js.map +1 -1
  156. package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +7 -6
  157. package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  158. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +9 -5
  159. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  160. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +11 -26
  161. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
  162. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js +9 -7
  163. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  164. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +0 -2
  165. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  166. package/lib-commonjs/components/DrawerHeaderTitle/index.js +6 -6
  167. package/lib-commonjs/components/DrawerHeaderTitle/index.js.map +1 -1
  168. package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +12 -6
  169. package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  170. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +31 -18
  171. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  172. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +14 -10
  173. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
  174. package/lib-commonjs/components/InlineDrawer/InlineDrawer.js +24 -0
  175. package/lib-commonjs/components/InlineDrawer/InlineDrawer.js.map +1 -0
  176. package/lib-commonjs/components/InlineDrawer/index.js +10 -0
  177. package/lib-commonjs/components/InlineDrawer/index.js.map +1 -0
  178. package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js +19 -0
  179. package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js.map +1 -0
  180. package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js +35 -0
  181. package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js.map +1 -0
  182. package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js +122 -0
  183. package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -0
  184. package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.js +24 -0
  185. package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.js.map +1 -0
  186. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js +21 -0
  187. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -0
  188. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/index.js +7 -0
  189. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -0
  190. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +46 -0
  191. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -0
  192. package/lib-commonjs/components/OverlayDrawer/index.js +10 -0
  193. package/lib-commonjs/components/OverlayDrawer/index.js.map +1 -0
  194. package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js +21 -0
  195. package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -0
  196. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawer.js +59 -0
  197. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawer.js.map +1 -0
  198. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +112 -0
  199. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -0
  200. package/lib-commonjs/e2e/DrawerShared.js +119 -0
  201. package/lib-commonjs/e2e/DrawerShared.js.map +1 -0
  202. package/lib-commonjs/index.js +125 -46
  203. package/lib-commonjs/index.js.map +1 -1
  204. package/lib-commonjs/shared/DrawerBase.types.js +6 -0
  205. package/lib-commonjs/shared/DrawerBase.types.js.map +1 -0
  206. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js +165 -0
  207. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js.map +1 -0
  208. package/lib-commonjs/shared/useDrawerDefaultProps.js +18 -0
  209. package/lib-commonjs/shared/useDrawerDefaultProps.js.map +1 -0
  210. package/package.json +23 -16
  211. package/CHANGELOG.json +0 -267
  212. package/lib/DrawerInline.js +0 -1
  213. package/lib/DrawerInline.js.map +0 -1
  214. package/lib/DrawerOverlay.js +0 -1
  215. package/lib/DrawerOverlay.js.map +0 -1
  216. package/lib/components/DrawerInline/DrawerInline.js +0 -13
  217. package/lib/components/DrawerInline/DrawerInline.js.map +0 -1
  218. package/lib/components/DrawerInline/DrawerInline.types.js.map +0 -1
  219. package/lib/components/DrawerInline/index.js +0 -5
  220. package/lib/components/DrawerInline/index.js.map +0 -1
  221. package/lib/components/DrawerInline/renderDrawerInline.js +0 -11
  222. package/lib/components/DrawerInline/renderDrawerInline.js.map +0 -1
  223. package/lib/components/DrawerInline/useDrawerInline.js +0 -33
  224. package/lib/components/DrawerInline/useDrawerInline.js.map +0 -1
  225. package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js +0 -43
  226. package/lib/components/DrawerInline/useDrawerInlineStyles.styles.js.map +0 -1
  227. package/lib/components/DrawerOverlay/DrawerOverlay.js +0 -12
  228. package/lib/components/DrawerOverlay/DrawerOverlay.js.map +0 -1
  229. package/lib/components/DrawerOverlay/DrawerOverlay.types.js.map +0 -1
  230. package/lib/components/DrawerOverlay/index.js +0 -5
  231. package/lib/components/DrawerOverlay/index.js.map +0 -1
  232. package/lib/components/DrawerOverlay/renderDrawerOverlay.js +0 -9
  233. package/lib/components/DrawerOverlay/renderDrawerOverlay.js.map +0 -1
  234. package/lib/components/DrawerOverlay/useDrawerOverlay.js +0 -35
  235. package/lib/components/DrawerOverlay/useDrawerOverlay.js.map +0 -1
  236. package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +0 -33
  237. package/lib/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +0 -1
  238. package/lib/util/DrawerBase.types.js.map +0 -1
  239. package/lib/util/getDefaultDrawerProps.js +0 -9
  240. package/lib/util/getDefaultDrawerProps.js.map +0 -1
  241. package/lib/util/useDrawerBaseStyles.styles.js +0 -55
  242. package/lib/util/useDrawerBaseStyles.styles.js.map +0 -1
  243. package/lib-commonjs/DrawerInline.js +0 -6
  244. package/lib-commonjs/DrawerInline.js.map +0 -1
  245. package/lib-commonjs/DrawerOverlay.js +0 -6
  246. package/lib-commonjs/DrawerOverlay.js.map +0 -1
  247. package/lib-commonjs/components/DrawerInline/DrawerInline.js +0 -19
  248. package/lib-commonjs/components/DrawerInline/DrawerInline.js.map +0 -1
  249. package/lib-commonjs/components/DrawerInline/index.js +0 -10
  250. package/lib-commonjs/components/DrawerInline/index.js.map +0 -1
  251. package/lib-commonjs/components/DrawerInline/renderDrawerInline.js +0 -18
  252. package/lib-commonjs/components/DrawerInline/renderDrawerInline.js.map +0 -1
  253. package/lib-commonjs/components/DrawerInline/useDrawerInline.js +0 -34
  254. package/lib-commonjs/components/DrawerInline/useDrawerInline.js.map +0 -1
  255. package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js +0 -83
  256. package/lib-commonjs/components/DrawerInline/useDrawerInlineStyles.styles.js.map +0 -1
  257. package/lib-commonjs/components/DrawerOverlay/DrawerOverlay.js +0 -19
  258. package/lib-commonjs/components/DrawerOverlay/DrawerOverlay.js.map +0 -1
  259. package/lib-commonjs/components/DrawerOverlay/index.js +0 -10
  260. package/lib-commonjs/components/DrawerOverlay/index.js.map +0 -1
  261. package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js +0 -16
  262. package/lib-commonjs/components/DrawerOverlay/renderDrawerOverlay.js.map +0 -1
  263. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js +0 -36
  264. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlay.js.map +0 -1
  265. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js +0 -47
  266. package/lib-commonjs/components/DrawerOverlay/useDrawerOverlayStyles.styles.js.map +0 -1
  267. package/lib-commonjs/util/getDefaultDrawerProps.js +0 -17
  268. package/lib-commonjs/util/getDefaultDrawerProps.js.map +0 -1
  269. package/lib-commonjs/util/useDrawerBaseStyles.styles.js +0 -125
  270. package/lib-commonjs/util/useDrawerBaseStyles.styles.js.map +0 -1
  271. /package/lib/components/{DrawerInline/DrawerInline.types.js → InlineDrawer/InlineDrawer.types.js} +0 -0
  272. /package/lib/components/{DrawerOverlay/DrawerOverlay.types.js → OverlayDrawer/OverlayDrawer.types.js} +0 -0
  273. /package/lib/{util/DrawerBase.types.js → components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js} +0 -0
  274. /package/lib-commonjs/components/{DrawerInline/DrawerInline.types.js → InlineDrawer/InlineDrawer.types.js} +0 -0
  275. /package/lib-commonjs/components/{DrawerInline/DrawerInline.types.js.map → InlineDrawer/InlineDrawer.types.js.map} +0 -0
  276. /package/lib-commonjs/components/{DrawerOverlay/DrawerOverlay.types.js → OverlayDrawer/OverlayDrawer.types.js} +0 -0
  277. /package/lib-commonjs/components/{DrawerOverlay/DrawerOverlay.types.js.map → OverlayDrawer/OverlayDrawer.types.js.map} +0 -0
  278. /package/lib-commonjs/{util/DrawerBase.types.js → components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js} +0 -0
  279. /package/lib-commonjs/{util/DrawerBase.types.js.map → components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -2,10 +2,8 @@
2
2
 
3
3
  import type { ComponentProps } from '@fluentui/react-utilities';
4
4
  import type { ComponentState } from '@fluentui/react-utilities';
5
- import { DialogProps } from '@fluentui/react-dialog';
6
- import { DialogSurfaceProps } from '@fluentui/react-dialog';
7
- import { DialogSurfaceSlots } from '@fluentui/react-dialog';
8
- import { DialogTitleSlots } from '@fluentui/react-dialog';
5
+ import type { DialogProps } from '@fluentui/react-dialog';
6
+ import type { DialogSurfaceSlots } from '@fluentui/react-dialog';
9
7
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
10
8
  import * as React_2 from 'react';
11
9
  import type { Slot } from '@fluentui/react-utilities';
@@ -20,9 +18,9 @@ declare type DrawerBaseProps = {
20
18
  /**
21
19
  * Position of the drawer.
22
20
  *
23
- * @default 'left'
21
+ * @default 'start'
24
22
  */
25
- position?: 'left' | 'right';
23
+ position?: 'start' | 'end';
26
24
  /**
27
25
  * Size of the drawer.
28
26
  *
@@ -40,12 +38,10 @@ declare type DrawerBaseProps = {
40
38
  * @default false
41
39
  */
42
40
  open?: boolean;
43
- /**
44
- * Default value for the uncontrolled open state of the Drawer.
45
- *
46
- * @default false
47
- */
48
- defaultOpen?: boolean;
41
+ };
42
+
43
+ declare type DrawerBaseState = Required<Pick<DrawerBaseProps, 'position' | 'size'>> & {
44
+ motion: MotionState<HTMLDivElement>;
49
45
  };
50
46
 
51
47
  /**
@@ -70,7 +66,7 @@ export declare type DrawerBodySlots = {
70
66
  export declare type DrawerBodyState = ComponentState<DrawerBodySlots>;
71
67
 
72
68
  /**
73
- * DrawerFooter component - TODO: add more docs
69
+ * DrawerFooter provides a structured footer for the drawer component.
74
70
  */
75
71
  export declare const DrawerFooter: ForwardRefComponent<DrawerFooterProps>;
76
72
 
@@ -145,13 +141,7 @@ export declare const drawerHeaderTitleClassNames: SlotClassNames<DrawerHeaderTit
145
141
  /**
146
142
  * DrawerHeaderTitle Props
147
143
  */
148
- export declare type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots> & {
149
- /**
150
- * Content of the DrawerHeaderTitle
151
- * Children is mandatory because DrawerHeaderTitle is a wrapper component
152
- */
153
- children: React_2.ReactNode | undefined;
154
- };
144
+ export declare type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots>;
155
145
 
156
146
  export declare type DrawerHeaderTitleSlots = {
157
147
  root: Slot<'div'>;
@@ -159,11 +149,11 @@ export declare type DrawerHeaderTitleSlots = {
159
149
  * By default this is a h2, but can be any heading or div.
160
150
  * If `div` is provided do not forget to also provide proper `role="heading"` and `aria-level` attributes
161
151
  */
162
- heading?: DialogTitleSlots['root'];
152
+ heading?: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;
163
153
  /**
164
154
  * Action slot for the close button
165
155
  */
166
- action?: DialogTitleSlots['action'];
156
+ action?: Slot<'div'>;
167
157
  };
168
158
 
169
159
  /**
@@ -172,17 +162,44 @@ export declare type DrawerHeaderTitleSlots = {
172
162
  export declare type DrawerHeaderTitleState = ComponentState<DrawerHeaderTitleSlots>;
173
163
 
174
164
  /**
175
- * DrawerInline is often used for navigation that is not dissmissable. As it is on the same level as
165
+ * Drawer Props
166
+ */
167
+ export declare type DrawerProps = ComponentProps<DrawerSlots> & {
168
+ /**
169
+ * Type of the drawer.
170
+ *
171
+ * - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.
172
+ * - 'inline' - Drawer is stacked with the content
173
+ *
174
+ * @default overlay
175
+ */
176
+ type?: 'inline' | 'overlay';
177
+ };
178
+
179
+ export declare type DrawerSlots = {
180
+ /**
181
+ * Root slot of the Drawer.
182
+ */
183
+ root: Slot<OverlayDrawerProps | InlineDrawerProps>;
184
+ };
185
+
186
+ /**
187
+ * State used in rendering Drawer
188
+ */
189
+ export declare type DrawerState = ComponentState<DrawerSlots>;
190
+
191
+ /**
192
+ * InlineDrawer is often used for navigation that is not dismissible. As it is on the same level as
176
193
  * the main surface, users can still interact with other UI elements.
177
194
  */
178
- export declare const DrawerInline: ForwardRefComponent<DrawerInlineProps>;
195
+ export declare const InlineDrawer: ForwardRefComponent<InlineDrawerProps>;
179
196
 
180
- export declare const drawerInlineClassNames: SlotClassNames<DrawerInlineSlots>;
197
+ export declare const inlineDrawerClassNames: SlotClassNames<InlineDrawerSlots>;
181
198
 
182
199
  /**
183
- * DrawerInline Props
200
+ * InlineDrawer Props
184
201
  */
185
- export declare type DrawerInlineProps = ComponentProps<DrawerInlineSlots> & DrawerBaseProps & {
202
+ export declare type InlineDrawerProps = ComponentProps<InlineDrawerSlots> & DrawerBaseProps & {
186
203
  /**
187
204
  * Whether the drawer has a separator line.
188
205
  *
@@ -191,63 +208,91 @@ export declare type DrawerInlineProps = ComponentProps<DrawerInlineSlots> & Draw
191
208
  separator?: boolean;
192
209
  };
193
210
 
194
- export declare type DrawerInlineSlots = {
211
+ export declare type InlineDrawerSlots = {
195
212
  root: Slot<'div'>;
196
213
  };
197
214
 
198
215
  /**
199
- * State used in rendering DrawerInline
216
+ * State used in rendering InlineDrawer
200
217
  */
201
- export declare type DrawerInlineState = ComponentState<DrawerInlineSlots> & DrawerInlineProps;
218
+ export declare type InlineDrawerState = Required<ComponentState<InlineDrawerSlots> & DrawerBaseState & Pick<InlineDrawerProps, 'separator'>>;
219
+
220
+ declare type MotionState<Element extends HTMLElement = HTMLElement> = {
221
+ /**
222
+ * Ref to the element.
223
+ */
224
+ ref: React_2.Ref<Element>;
225
+ /**
226
+ * Current state of the element.
227
+ *
228
+ * - `unmounted` - The element is not yet rendered or can be safely removed from the DOM.
229
+ * - `entering` - The element is performing enter animation.
230
+ * - `entered` - The element has finished enter animation.
231
+ * - `idle` - The element is currently not animating, but rendered on screen.
232
+ * - `exiting` - The element is performing exit animation.
233
+ * - `exited` - The element has finished exit animation.
234
+ */
235
+ type: MotionType;
236
+ /**
237
+ * Indicates whether the component can be rendered.
238
+ * Useful to render the element before animating it or to remove it from the DOM after exit animation.
239
+ */
240
+ canRender: boolean;
241
+ /**
242
+ * Indicates whether the component is ready to receive a CSS transition className.
243
+ * Useful to apply CSS transitions when the element is mounted and ready to be animated.
244
+ */
245
+ active: boolean;
246
+ };
247
+
248
+ declare type MotionType = 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted';
202
249
 
203
250
  /**
204
- * DrawerOverlay contains supplementary content and are used for complex creation, edit, or management experiences.
251
+ * OverlayDrawer contains supplementary content and are used for complex creation, edit, or management experiences.
205
252
  */
206
- export declare const DrawerOverlay: ForwardRefComponent<DrawerOverlayProps>;
253
+ export declare const OverlayDrawer: ForwardRefComponent<OverlayDrawerProps>;
207
254
 
208
- export declare const drawerOverlayClassNames: SlotClassNames<DrawerOverlaySlots>;
255
+ export declare const overlayDrawerClassNames: SlotClassNames<OverlayDrawerSurfaceSlots>;
209
256
 
210
257
  /**
211
- * DrawerOverlay Props
258
+ * OverlayDrawer internal slots for when using with composition API
212
259
  */
213
- export declare type DrawerOverlayProps = ComponentProps<DrawerOverlaySlots> & DrawerBaseProps & Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus'>;
214
-
215
- export declare type DrawerOverlaySlots = DialogSurfaceSlots & {
216
- root: Slot<DialogSurfaceProps>;
260
+ declare type OverlayDrawerInternalSlots = OverlayDrawerSlots & {
261
+ /**
262
+ * Slot for the dialog component that wraps the drawer.
263
+ */
264
+ dialog: Slot<DialogProps>;
217
265
  };
218
266
 
219
267
  /**
220
- * State used in rendering DrawerOverlay
268
+ * OverlayDrawer Props
221
269
  */
222
- export declare type DrawerOverlayState = ComponentState<DrawerOverlaySlots> & DrawerBaseProps & {
223
- dialog: DialogProps;
224
- };
270
+ export declare type OverlayDrawerProps = ComponentProps<OverlayDrawerSlots> & Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus' | 'defaultOpen'> & DrawerBaseProps;
225
271
 
226
272
  /**
227
- * Drawer Props
273
+ * OverlayDrawer slots
228
274
  */
229
- export declare type DrawerProps = ComponentProps<Partial<DrawerSlots>> & {
275
+ export declare type OverlayDrawerSlots = {
230
276
  /**
231
- * Type of the drawer.
232
- * @default overlay
233
- *
234
- * - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.
235
- * - 'inline' - Drawer is stacked with the content
277
+ * Slot for the root element.
236
278
  */
237
- type?: 'inline' | 'overlay';
279
+ root: Slot<OverlayDrawerSurfaceProps>;
238
280
  };
239
281
 
240
- export declare type DrawerSlots = {
241
- /**
242
- * Root slot of the Drawer.
243
- */
244
- root: Slot<DrawerOverlayProps | DrawerInlineProps>;
245
- };
282
+ /**
283
+ * State used in rendering OverlayDrawer
284
+ */
285
+ export declare type OverlayDrawerState = Omit<ComponentState<OverlayDrawerInternalSlots>, 'backdrop'> & Required<DrawerBaseState>;
246
286
 
247
287
  /**
248
- * State used in rendering Drawer
288
+ * OverlayDrawerSurface Props
249
289
  */
250
- export declare type DrawerState = ComponentState<DrawerSlots>;
290
+ declare type OverlayDrawerSurfaceProps = ComponentProps<OverlayDrawerSurfaceSlots>;
291
+
292
+ /**
293
+ * OverlayDrawerSurface slots
294
+ */
295
+ declare type OverlayDrawerSurfaceSlots = DialogSurfaceSlots;
251
296
 
252
297
  /**
253
298
  * Render the final JSX of Drawer
@@ -280,14 +325,14 @@ export declare const renderDrawerHeaderNavigation_unstable: (state: DrawerHeader
280
325
  export declare const renderDrawerHeaderTitle_unstable: (state: DrawerHeaderTitleState) => JSX.Element;
281
326
 
282
327
  /**
283
- * Render the final JSX of DrawerInline
328
+ * Render the final JSX of InlineDrawer
284
329
  */
285
- export declare const renderDrawerInline_unstable: (state: DrawerInlineState) => JSX.Element | null;
330
+ export declare const renderInlineDrawer_unstable: (state: InlineDrawerState) => JSX.Element | null;
286
331
 
287
332
  /**
288
- * Render the final JSX of DrawerOverlay
333
+ * Render the final JSX of OverlayDrawer
289
334
  */
290
- export declare const renderDrawerOverlay_unstable: (state: DrawerOverlayState) => JSX.Element;
335
+ export declare const renderOverlayDrawer_unstable: (state: OverlayDrawerState) => JSX.Element | null;
291
336
 
292
337
  /**
293
338
  * Create the state required to render Drawer.
@@ -381,35 +426,40 @@ export declare const useDrawerHeaderTitle_unstable: (props: DrawerHeaderTitlePro
381
426
  export declare const useDrawerHeaderTitleStyles_unstable: (state: DrawerHeaderTitleState) => DrawerHeaderTitleState;
382
427
 
383
428
  /**
384
- * Create the state required to render DrawerInline.
429
+ * Apply styling to the Drawer slots based on the state
430
+ */
431
+ export declare const useDrawerStyles_unstable: (state: DrawerState) => DrawerState;
432
+
433
+ /**
434
+ * Create the state required to render InlineDrawer.
385
435
  *
386
- * The returned state can be modified with hooks such as useDrawerInlineStyles_unstable,
387
- * before being passed to renderDrawerInline_unstable.
436
+ * The returned state can be modified with hooks such as useInlineDrawerStyles_unstable,
437
+ * before being passed to renderInlineDrawer_unstable.
388
438
  *
389
- * @param props - props from this instance of DrawerInline
390
- * @param ref - reference to root HTMLElement of DrawerInline
439
+ * @param props - props from this instance of InlineDrawer
440
+ * @param ref - reference to root HTMLElement of InlineDrawer
391
441
  */
392
- export declare const useDrawerInline_unstable: (props: DrawerInlineProps, ref: React_2.Ref<HTMLElement>) => DrawerInlineState;
442
+ export declare const useInlineDrawer_unstable: (props: InlineDrawerProps, ref: React_2.Ref<HTMLDivElement>) => InlineDrawerState;
393
443
 
394
444
  /**
395
- * Apply styling to the DrawerInline slots based on the state
445
+ * Apply styling to the InlineDrawer slots based on the state
396
446
  */
397
- export declare const useDrawerInlineStyles_unstable: (state: DrawerInlineState) => DrawerInlineState;
447
+ export declare const useInlineDrawerStyles_unstable: (state: InlineDrawerState) => InlineDrawerState;
398
448
 
399
449
  /**
400
- * Create the state required to render DrawerOverlay.
450
+ * Create the state required to render OverlayDrawer.
401
451
  *
402
- * The returned state can be modified with hooks such as useDrawerOverlayStyles_unstable,
403
- * before being passed to renderDrawerOverlay_unstable.
452
+ * The returned state can be modified with hooks such as useOverlayDrawerStyles_unstable,
453
+ * before being passed to renderOverlayDrawer_unstable.
404
454
  *
405
- * @param props - props from this instance of DrawerOverlay
406
- * @param ref - reference to root HTMLElement of DrawerOverlay
455
+ * @param props - props from this instance of OverlayDrawer
456
+ * @param ref - reference to root HTMLDivElement of OverlayDrawer
407
457
  */
408
- export declare const useDrawerOverlay_unstable: (props: DrawerOverlayProps, ref: React_2.Ref<HTMLElement>) => DrawerOverlayState;
458
+ export declare const useOverlayDrawer_unstable: (props: OverlayDrawerProps, ref: React_2.Ref<HTMLDivElement>) => OverlayDrawerState;
409
459
 
410
460
  /**
411
- * Apply styling to the DrawerOverlay slots based on the state
461
+ * Apply styling to the OverlayDrawer slots based on the state
412
462
  */
413
- export declare const useDrawerOverlayStyles_unstable: (state: DrawerOverlayState) => DrawerOverlayState;
463
+ export declare const useOverlayDrawerStyles_unstable: (state: OverlayDrawerState) => OverlayDrawerState;
414
464
 
415
465
  export { }
@@ -0,0 +1 @@
1
+ export * from './components/InlineDrawer/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["InlineDrawer.ts"],"sourcesContent":["export * from './components/InlineDrawer/index';\n"],"names":[],"mappings":"AAAA,cAAc,kCAAkC"}
@@ -0,0 +1 @@
1
+ export * from './components/OverlayDrawer/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["OverlayDrawer.ts"],"sourcesContent":["export * from './components/OverlayDrawer/index';\n"],"names":[],"mappings":"AAAA,cAAc,mCAAmC"}
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
3
  import { useDrawer_unstable } from './useDrawer';
3
4
  import { renderDrawer_unstable } from './renderDrawer';
4
5
  import { useDrawerStyles_unstable } from './useDrawerStyles.styles';
5
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * Drawer contains supplementary content and are used for complex creation, edit, or management experiences.
8
8
  */ export const Drawer = /*#__PURE__*/ React.forwardRef((props, ref)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["Drawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDrawer_unstable } from './useDrawer';\nimport { renderDrawer_unstable } from './renderDrawer';\nimport { useDrawerStyles_unstable } from './useDrawerStyles.styles';\nimport type { DrawerProps } from './Drawer.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Drawer contains supplementary content and are used for complex creation, edit, or management experiences.\n */\nexport const Drawer: ForwardRefComponent<DrawerProps> = React.forwardRef((props, ref) => {\n const state = useDrawer_unstable(props, ref);\n\n useDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerStyles_unstable')(state);\n\n return renderDrawer_unstable(state);\n});\n\nDrawer.displayName = 'Drawer';\n"],"names":["React","useDrawer_unstable","renderDrawer_unstable","useDrawerStyles_unstable","useCustomStyleHook_unstable","Drawer","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,2BAA2B;AAGpE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,uBAA2CL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvF,MAAMC,QAAQR,mBAAmBM,OAAOC;IAExCL,yBAAyBM;IACzBL,4BAA4B,4BAA4BK;IAExD,OAAOP,sBAAsBO;AAC/B,GAAG;AAEHJ,OAAOK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Drawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawer_unstable } from './useDrawer';\nimport { renderDrawer_unstable } from './renderDrawer';\nimport { useDrawerStyles_unstable } from './useDrawerStyles.styles';\nimport type { DrawerProps } from './Drawer.types';\n\n/**\n * Drawer contains supplementary content and are used for complex creation, edit, or management experiences.\n */\nexport const Drawer: ForwardRefComponent<DrawerProps> = React.forwardRef((props, ref) => {\n const state = useDrawer_unstable(props, ref);\n\n useDrawerStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerStyles_unstable')(state);\n\n return renderDrawer_unstable(state);\n});\n\nDrawer.displayName = 'Drawer';\n"],"names":["React","useCustomStyleHook_unstable","useDrawer_unstable","renderDrawer_unstable","useDrawerStyles_unstable","Drawer","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,2BAA2B;AAGpE;;CAEC,GACD,OAAO,MAAMC,uBAA2CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,QAAQP,mBAAmBK,OAAOC;IAExCJ,yBAAyBK;IACzBR,4BAA4B,4BAA4BQ;IAExD,OAAON,sBAAsBM;AAC/B,GAAG;AAEHJ,OAAOK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Drawer.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DrawerOverlayProps } from '../DrawerOverlay/DrawerOverlay.types';\nimport { DrawerInlineProps } from '../DrawerInline/DrawerInline.types';\n\nexport type DrawerSlots = {\n /**\n * Root slot of the Drawer.\n */\n root: Slot<DrawerOverlayProps | DrawerInlineProps>;\n};\n\n/**\n * Drawer Props\n */\nexport type DrawerProps = ComponentProps<Partial<DrawerSlots>> & {\n /**\n * Type of the drawer.\n * @default overlay\n *\n * - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.\n * - 'inline' - Drawer is stacked with the content\n */\n type?: 'inline' | 'overlay';\n};\n\n/**\n * State used in rendering Drawer\n */\nexport type DrawerState = ComponentState<DrawerSlots>;\n"],"names":[],"mappings":"AAAA,WA4BsD"}
1
+ {"version":3,"sources":["Drawer.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nimport type { OverlayDrawerProps } from '../OverlayDrawer';\nimport type { InlineDrawerProps } from '../InlineDrawer';\n\nexport type DrawerSlots = {\n /**\n * Root slot of the Drawer.\n */\n root: Slot<OverlayDrawerProps | InlineDrawerProps>;\n};\n\n/**\n * Drawer Props\n */\nexport type DrawerProps = ComponentProps<DrawerSlots> & {\n /**\n * Type of the drawer.\n *\n * - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.\n * - 'inline' - Drawer is stacked with the content\n *\n * @default overlay\n */\n type?: 'inline' | 'overlay';\n};\n\n/**\n * State used in rendering Drawer\n */\nexport type DrawerState = ComponentState<DrawerSlots>;\n"],"names":[],"mappings":"AAAA,WA8BsD"}
@@ -1,8 +1,8 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } 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
  /**
4
4
  * Render the final JSX of Drawer
5
5
  */ export const renderDrawer_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return /*#__PURE__*/ createElement(slots.root, slotProps.root);
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ _jsx(state.root, {});
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDrawer.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DrawerState, DrawerSlots } from './Drawer.types';\n\n/**\n * Render the final JSX of Drawer\n */\nexport const renderDrawer_unstable = (state: DrawerState) => {\n const { slots, slotProps } = getSlotsNext<DrawerSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderDrawer_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC,QAAuB;IAC3D,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA0BE;IAEvD,qBAAO,AAbT,cAaUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
1
+ {"version":3,"sources":["renderDrawer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerState, DrawerSlots } from './Drawer.types';\n\n/**\n * Render the final JSX of Drawer\n */\nexport const renderDrawer_unstable = (state: DrawerState) => {\n assertSlots<DrawerSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderDrawer_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpCF,YAAyBE;IAEzB,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { resolveShorthand } from '@fluentui/react-utilities';
3
- import { DrawerOverlay } from '../DrawerOverlay/DrawerOverlay';
4
- import { DrawerInline } from '../DrawerInline/DrawerInline';
2
+ import { slot } from '@fluentui/react-utilities';
3
+ import { OverlayDrawer } from '../OverlayDrawer';
4
+ import { InlineDrawer } from '../InlineDrawer';
5
5
  /**
6
6
  * Create the state required to render Drawer.
7
7
  *
@@ -11,16 +11,16 @@ import { DrawerInline } from '../DrawerInline/DrawerInline';
11
11
  * @param props - props from this instance of Drawer
12
12
  * @param ref - reference to root HTMLElement of Drawer
13
13
  */ export const useDrawer_unstable = (props, ref)=>{
14
- const { type ='overlay' } = props;
14
+ const elementType = props.type === 'inline' ? InlineDrawer : OverlayDrawer;
15
15
  return {
16
16
  components: {
17
- root: type === 'overlay' ? DrawerOverlay : DrawerInline
17
+ root: elementType
18
18
  },
19
- root: resolveShorthand(props, {
20
- required: true,
21
- defaultProps: {
22
- ref
23
- }
19
+ root: slot.always(slot.resolveShorthand({
20
+ ref,
21
+ ...props
22
+ }), {
23
+ elementType
24
24
  })
25
25
  };
26
26
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\n\nimport type { DrawerProps, DrawerState } from './Drawer.types';\nimport { DrawerOverlay } from '../DrawerOverlay/DrawerOverlay';\nimport { DrawerInline } from '../DrawerInline/DrawerInline';\n\n/**\n * Create the state required to render Drawer.\n *\n * The returned state can be modified with hooks such as useDrawerStyles_unstable,\n * before being passed to renderDrawer_unstable.\n *\n * @param props - props from this instance of Drawer\n * @param ref - reference to root HTMLElement of Drawer\n */\nexport const useDrawer_unstable = (props: DrawerProps, ref: React.Ref<HTMLElement>): DrawerState => {\n const { type = 'overlay' } = props;\n\n return {\n components: {\n root: type === 'overlay' ? DrawerOverlay : DrawerInline,\n },\n\n root: resolveShorthand(props, {\n required: true,\n defaultProps: {\n ref,\n } as DrawerProps,\n }),\n };\n};\n"],"names":["React","resolveShorthand","DrawerOverlay","DrawerInline","useDrawer_unstable","props","ref","type","components","root","required","defaultProps"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,4BAA4B;AAG7D,SAASC,aAAa,QAAQ,iCAAiC;AAC/D,SAASC,YAAY,QAAQ,+BAA+B;AAE5D;;;;;;;;CAQC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAoBC,MAA6C;IAClG,MAAM,EAAEC,MAAO,UAAS,EAAE,GAAGF;IAE7B,OAAO;QACLG,YAAY;YACVC,MAAMF,SAAS,YAAYL,gBAAgBC,YAAY;QACzD;QAEAM,MAAMR,iBAAiBI,OAAO;YAC5BK,UAAU,IAAI;YACdC,cAAc;gBACZL;YACF;QACF;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useDrawer.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\n\nimport type { DrawerProps, DrawerState } from './Drawer.types';\nimport { OverlayDrawer } from '../OverlayDrawer';\nimport { InlineDrawer } from '../InlineDrawer';\n\n/**\n * Create the state required to render Drawer.\n *\n * The returned state can be modified with hooks such as useDrawerStyles_unstable,\n * before being passed to renderDrawer_unstable.\n *\n * @param props - props from this instance of Drawer\n * @param ref - reference to root HTMLElement of Drawer\n */\nexport const useDrawer_unstable = (props: DrawerProps, ref: React.Ref<HTMLElement>): DrawerState => {\n const elementType = props.type === 'inline' ? InlineDrawer : OverlayDrawer;\n\n return {\n components: {\n root: elementType,\n },\n\n root: slot.always<DrawerProps>(\n slot.resolveShorthand({\n ref,\n ...props,\n }),\n {\n elementType,\n },\n ),\n };\n};\n"],"names":["React","slot","OverlayDrawer","InlineDrawer","useDrawer_unstable","props","ref","elementType","type","components","root","always","resolveShorthand"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,QAAQ,4BAA4B;AAGjD,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,YAAY,QAAQ,kBAAkB;AAE/C;;;;;;;;CAQC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAoBC;IACrD,MAAMC,cAAcF,MAAMG,IAAI,KAAK,WAAWL,eAAeD;IAE7D,OAAO;QACLO,YAAY;YACVC,MAAMH;QACR;QAEAG,MAAMT,KAAKU,MAAM,CACfV,KAAKW,gBAAgB,CAAC;YACpBN;YACA,GAAGD,KAAK;QACV,IACA;YACEE;QACF;IAEJ;AACF,EAAE"}
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
3
  import { useDrawerBody_unstable } from './useDrawerBody';
3
4
  import { renderDrawerBody_unstable } from './renderDrawerBody';
4
5
  import { useDrawerBodyStyles_unstable } from './useDrawerBodyStyles.styles';
5
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * DrawerBody provides with a container for the main content of a Drawer.
8
8
  */ export const DrawerBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDrawerBody_unstable } from './useDrawerBody';\nimport { renderDrawerBody_unstable } from './renderDrawerBody';\nimport { useDrawerBodyStyles_unstable } from './useDrawerBodyStyles.styles';\nimport type { DrawerBodyProps } from './DrawerBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DrawerBody provides with a container for the main content of a Drawer.\n */\nexport const DrawerBody: ForwardRefComponent<DrawerBodyProps> = React.forwardRef((props, ref) => {\n const state = useDrawerBody_unstable(props, ref);\n\n useDrawerBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerBodyStyles_unstable')(state);\n\n return renderDrawerBody_unstable(state);\n});\n\nDrawerBody.displayName = 'DrawerBody';\n"],"names":["React","useDrawerBody_unstable","renderDrawerBody_unstable","useDrawerBodyStyles_unstable","useCustomStyleHook_unstable","DrawerBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC/F,MAAMC,QAAQR,uBAAuBM,OAAOC;IAE5CL,6BAA6BM;IAC7BL,4BAA4B,gCAAgCK;IAE5D,OAAOP,0BAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DrawerBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerBody_unstable } from './useDrawerBody';\nimport { renderDrawerBody_unstable } from './renderDrawerBody';\nimport { useDrawerBodyStyles_unstable } from './useDrawerBodyStyles.styles';\nimport type { DrawerBodyProps } from './DrawerBody.types';\n\n/**\n * DrawerBody provides with a container for the main content of a Drawer.\n */\nexport const DrawerBody: ForwardRefComponent<DrawerBodyProps> = React.forwardRef((props, ref) => {\n const state = useDrawerBody_unstable(props, ref);\n\n useDrawerBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerBodyStyles_unstable')(state);\n\n return renderDrawerBody_unstable(state);\n});\n\nDrawerBody.displayName = 'DrawerBody';\n"],"names":["React","useCustomStyleHook_unstable","useDrawerBody_unstable","renderDrawerBody_unstable","useDrawerBodyStyles_unstable","DrawerBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E;;CAEC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7BR,4BAA4B,gCAAgCQ;IAE5D,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -1,8 +1,8 @@
1
- import * as React from 'react';
2
- import { getSlots } 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
  /**
4
4
  * Render the final JSX of DrawerBody
5
5
  */ export const renderDrawerBody_unstable = (state)=>{
6
- const { slots , slotProps } = getSlots(state);
7
- return /*#__PURE__*/ React.createElement(slots.root, slotProps.root);
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ _jsx(state.root, {});
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDrawerBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DrawerBodyState, DrawerBodySlots } from './DrawerBody.types';\n\n/**\n * Render the final JSX of DrawerBody\n */\nexport const renderDrawerBody_unstable = (state: DrawerBodyState) => {\n const { slots, slotProps } = getSlots<DrawerBodySlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["React","getSlots","renderDrawerBody_unstable","state","slots","slotProps","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,QAAQ,QAAQ,4BAA4B;AAGrD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC,QAA2B;IACnE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,SAA0BE;IAEvD,qBAAO,oBAACC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
1
+ {"version":3,"sources":["renderDrawerBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerBodySlots, DrawerBodyState } from './DrawerBody.types';\n\n/**\n * Render the final JSX of DrawerBody\n */\nexport const renderDrawerBody_unstable = (state: DrawerBodyState) => {\n assertSlots<DrawerBodySlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderDrawerBody_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAE7B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
2
+ import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Create the state required to render DrawerBody.
5
5
  *
@@ -13,9 +13,14 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
13
13
  components: {
14
14
  root: 'div'
15
15
  },
16
- root: getNativeElementProps('div', {
17
- ref,
16
+ root: slot.always(getIntrinsicElementProps('div', {
17
+ // FIXME:
18
+ // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
19
+ // but since it would be a breaking change to fix it, we are casting ref to it's proper type
20
+ ref: ref,
18
21
  ...props
22
+ }), {
23
+ elementType: 'div'
19
24
  })
20
25
  };
21
26
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\n\n/**\n * Create the state required to render DrawerBody.\n *\n * The returned state can be modified with hooks such as useDrawerBodyStyles_unstable,\n * before being passed to renderDrawerBody_unstable.\n *\n * @param props - props from this instance of DrawerBody\n * @param ref - reference to root HTMLElement of DrawerBody\n */\nexport const useDrawerBody_unstable = (props: DrawerBodyProps, ref: React.Ref<HTMLElement>): DrawerBodyState => {\n return {\n components: {\n root: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n };\n};\n"],"names":["React","getNativeElementProps","useDrawerBody_unstable","props","ref","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC,MAAiD;IAC9G,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QAEAA,MAAML,sBAAsB,OAAO;YACjCG;YACA,GAAGD,KAAK;QACV;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useDrawerBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\n\nimport type { DrawerBodyProps, DrawerBodyState } from './DrawerBody.types';\n\n/**\n * Create the state required to render DrawerBody.\n *\n * The returned state can be modified with hooks such as useDrawerBodyStyles_unstable,\n * before being passed to renderDrawerBody_unstable.\n *\n * @param props - props from this instance of DrawerBody\n * @param ref - reference to root HTMLElement of DrawerBody\n */\nexport const useDrawerBody_unstable = (props: DrawerBodyProps, ref: React.Ref<HTMLElement>): DrawerBodyState => {\n return {\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useDrawerBody_unstable","props","ref","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAI3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QAEAA,MAAML,KAAKM,MAAM,CACfP,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -1,4 +1,4 @@
1
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
1
+ import { __resetStyles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
3
  export const drawerBodyClassNames = {
4
4
  root: 'fui-DrawerBody'
@@ -6,40 +6,13 @@ export const drawerBodyClassNames = {
6
6
  /**
7
7
  * Styles for the root slot
8
8
  */
9
- const useStyles = /*#__PURE__*/__styles({
10
- root: {
11
- B6of3ja: "fkrn0sh",
12
- t21cq0: ["f11qmguv", "f1tyq0we"],
13
- jrapky: "fmxx68s",
14
- Frg6f3: ["f1tyq0we", "f11qmguv"],
15
- z8tnut: "f1sl3k7w",
16
- z189sj: ["fnbas0t", "f1mswpri"],
17
- Byoj8tv: "f1brlhvm",
18
- uwmqm3: ["f1mswpri", "fnbas0t"],
19
- B68tc82: "f1oy3dpc",
20
- Bmxbyg5: "f5zp4f",
21
- Bh6795r: "fqerorx",
22
- Bnnss6s: "f1neuvcm",
23
- xawz: "f1pztt34",
24
- qb2dma: "f1ub7u0d",
25
- Bcmaq0h: "f1igvcbx",
26
- B676am1: "f1fofb6i",
27
- e5kdtc: "fo6xqva",
28
- De3pzq: "fxugw4r",
29
- Bkjc3bi: "fcre6b6",
30
- Bgh53k4: "f1besv5s",
31
- Bcx2cba: "f1pqm9hp",
32
- gonrqn: "f2c46kh"
33
- }
34
- }, {
35
- d: [".fkrn0sh{margin-top:-1px;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".fmxx68s{margin-bottom:-1px;}", ".f1sl3k7w{padding-top:1px;}", ".fnbas0t{padding-right:var(--spacingHorizontalXXL);}", ".f1mswpri{padding-left:var(--spacingHorizontalXXL);}", ".f1brlhvm{padding-bottom:1px;}", ".f1oy3dpc{overflow-x:auto;}", ".f5zp4f{overflow-y:auto;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".f1pztt34{-webkit-flex-basis:0;-ms-flex-preferred-size:0;flex-basis:0;}", ".f1ub7u0d{-webkit-align-self:stretch;-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch;}", ".f1igvcbx{background-image:linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralStroke1), var(--colorNeutralBackground1)),linear-gradient(to bottom, var(--colorNeutralStroke1), var(--colorNeutralBackground1));}", ".f1fofb6i{-webkit-background-position:bottom center,top center,bottom center,top center;background-position:bottom center,top center,bottom center,top center;}", ".fo6xqva{background-repeat:no-repeat;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fcre6b6{-webkit-background-size:100% 2px,100% 2px,100% 1px,100% 1px;background-size:100% 2px,100% 2px,100% 1px,100% 1px;}", ".f1besv5s{background-attachment:local,local,scroll,scroll;}", ".f1pqm9hp:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}", ".f2c46kh:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}"]
36
- });
9
+ const useStyles = /*#__PURE__*/__resetStyles("r10z3gsy", "r1ppc5ap", [".r10z3gsy{margin-top:-1px;margin-right:0;margin-bottom:-1px;margin-left:0;padding-top:1px;padding-right:var(--spacingHorizontalXXL);padding-bottom:1px;padding-left:var(--spacingHorizontalXXL);overflow-x:auto;overflow-y:auto;flex-grow:1;flex-shrink:1;flex-basis:0;align-self:stretch;background-image:linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralStroke1), var(--colorNeutralBackground1)),linear-gradient(to bottom, var(--colorNeutralStroke1), var(--colorNeutralBackground1));-webkit-background-position:bottom center,top center,bottom center,top center;background-position:bottom center,top center,bottom center,top center;background-repeat:no-repeat;background-color:var(--colorNeutralBackground1);background-size:100% 2px,100% 2px,100% 1px,100% 1px;background-attachment:local,local,scroll,scroll;}", ".r10z3gsy:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}", ".r10z3gsy:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}", ".r1ppc5ap{margin-top:-1px;margin-left:0;margin-bottom:-1px;margin-right:0;padding-top:1px;padding-left:var(--spacingHorizontalXXL);padding-bottom:1px;padding-right:var(--spacingHorizontalXXL);overflow-x:auto;overflow-y:auto;flex-grow:1;flex-shrink:1;flex-basis:0;align-self:stretch;background-image:linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralBackground1), var(--colorNeutralBackground1)),linear-gradient(to top, var(--colorNeutralStroke1), var(--colorNeutralBackground1)),linear-gradient(to bottom, var(--colorNeutralStroke1), var(--colorNeutralBackground1));-webkit-background-position:bottom center,top center,bottom center,top center;background-position:bottom center,top center,bottom center,top center;background-repeat:no-repeat;background-color:var(--colorNeutralBackground1);background-size:100% 2px,100% 2px,100% 1px,100% 1px;background-attachment:local,local,scroll,scroll;}", ".r1ppc5ap:last-child{padding-bottom:calc(var(--spacingHorizontalXXL) + 1px);}", ".r1ppc5ap:first-child{padding-top:calc(var(--spacingHorizontalXXL) + 1px);}"]);
37
10
  /**
38
11
  * Apply styling to the DrawerBody slots based on the state
39
12
  */
40
13
  export const useDrawerBodyStyles_unstable = state => {
41
14
  const styles = useStyles();
42
- state.root.className = mergeClasses(drawerBodyClassNames.root, styles.root, state.root.className);
15
+ state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);
43
16
  return state;
44
17
  };
45
18
  //# sourceMappingURL=useDrawerBodyStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","drawerBodyClassNames","root","useStyles","B6of3ja","t21cq0","jrapky","Frg6f3","z8tnut","z189sj","Byoj8tv","uwmqm3","B68tc82","Bmxbyg5","Bh6795r","Bnnss6s","xawz","qb2dma","Bcmaq0h","B676am1","e5kdtc","De3pzq","Bkjc3bi","Bgh53k4","Bcx2cba","gonrqn","d","useDrawerBodyStyles_unstable","state","styles","className"],"sources":["useDrawerBodyStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerBodyClassNames = {\n root: 'fui-DrawerBody'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n ...shorthands.margin('-1px', 0),\n ...shorthands.padding('1px', tokens.spacingHorizontalXXL),\n ...shorthands.overflow('auto'),\n ...shorthands.flex(1),\n alignSelf: 'stretch',\n // A \"good hack\" to display top and bottom borders based on the scroll position\n backgroundImage: `linear-gradient(to top, ${tokens.colorNeutralBackground1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to top, ${tokens.colorNeutralBackground1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to top, ${tokens.colorNeutralStroke1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to bottom, ${tokens.colorNeutralStroke1}, ${tokens.colorNeutralBackground1})`,\n 'background-position': 'bottom center, top center, bottom center, top center',\n backgroundRepeat: 'no-repeat',\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundSize: '100% 2px, 100% 2px, 100% 1px, 100% 1px',\n backgroundAttachment: 'local, local, scroll, scroll',\n ':last-child': {\n paddingBottom: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n },\n ':first-child': {\n paddingTop: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n }\n }\n});\n/**\n * Apply styling to the DrawerBody slots based on the state\n */ export const useDrawerBodyStyles_unstable = (state)=>{\n const styles = useStyles();\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,oBAAoB,GAAG;EAChCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGN,QAAA;EAAAK,IAAA;IAAAE,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAwBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,4BAA4B,GAAIC,KAAK,IAAG;EACrD,MAAMC,MAAM,GAAG1B,SAAS,CAAC,CAAC;EAC1ByB,KAAK,CAAC1B,IAAI,CAAC4B,SAAS,GAAGhC,YAAY,CAACG,oBAAoB,CAACC,IAAI,EAAE2B,MAAM,CAAC3B,IAAI,EAAE0B,KAAK,CAAC1B,IAAI,CAAC4B,SAAS,CAAC;EACjG,OAAOF,KAAK;AAChB,CAAC"}
1
+ {"version":3,"names":["__resetStyles","mergeClasses","shorthands","tokens","drawerBodyClassNames","root","useStyles","useDrawerBodyStyles_unstable","state","styles","className"],"sources":["useDrawerBodyStyles.styles.js"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const drawerBodyClassNames = {\n root: 'fui-DrawerBody'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeResetStyles({\n ...shorthands.margin('-1px', 0),\n ...shorthands.padding('1px', tokens.spacingHorizontalXXL),\n ...shorthands.overflow('auto'),\n ...shorthands.flex(1),\n alignSelf: 'stretch',\n // A \"good hack\" to display top and bottom borders based on the scroll position\n backgroundImage: `linear-gradient(to top, ${tokens.colorNeutralBackground1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to top, ${tokens.colorNeutralBackground1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to top, ${tokens.colorNeutralStroke1}, ${tokens.colorNeutralBackground1}),\n linear-gradient(to bottom, ${tokens.colorNeutralStroke1}, ${tokens.colorNeutralBackground1})`,\n 'background-position': 'bottom center, top center, bottom center, top center',\n backgroundRepeat: 'no-repeat',\n backgroundColor: tokens.colorNeutralBackground1,\n backgroundSize: '100% 2px, 100% 2px, 100% 1px, 100% 1px',\n backgroundAttachment: 'local, local, scroll, scroll',\n ':last-child': {\n paddingBottom: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n },\n ':first-child': {\n paddingTop: `calc(${tokens.spacingHorizontalXXL} + 1px)`\n }\n});\n/**\n * Apply styling to the DrawerBody slots based on the state\n */ export const useDrawerBodyStyles_unstable = (state)=>{\n const styles = useStyles();\n state.root.className = mergeClasses(drawerBodyClassNames.root, styles, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAA0BC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,oBAAoB,GAAG;EAChCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGN,aAAA,uvEAsBrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMO,4BAA4B,GAAIC,KAAK,IAAG;EACrD,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGT,YAAY,CAACG,oBAAoB,CAACC,IAAI,EAAEI,MAAM,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EAC5F,OAAOF,KAAK;AAChB,CAAC"}
@@ -1,12 +1,14 @@
1
1
  import * as React from 'react';
2
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
3
  import { useDrawerFooter_unstable } from './useDrawerFooter';
3
4
  import { renderDrawerFooter_unstable } from './renderDrawerFooter';
4
5
  import { useDrawerFooterStyles_unstable } from './useDrawerFooterStyles.styles';
5
6
  /**
6
- * DrawerFooter component - TODO: add more docs
7
+ * DrawerFooter provides a structured footer for the drawer component.
7
8
  */ export const DrawerFooter = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
9
  const state = useDrawerFooter_unstable(props, ref);
9
10
  useDrawerFooterStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDrawerFooterStyles_unstable')(state);
10
12
  return renderDrawerFooter_unstable(state);
11
13
  });
12
14
  DrawerFooter.displayName = 'DrawerFooter';