@fluentui/react-drawer 9.0.0-beta.4 → 9.0.0-beta.40

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.json +1248 -1
  2. package/CHANGELOG.md +440 -2
  3. package/README.md +3 -2
  4. package/dist/index.d.ts +94 -78
  5. package/lib/InlineDrawer.js +1 -0
  6. package/lib/InlineDrawer.js.map +1 -0
  7. package/lib/OverlayDrawer.js +1 -0
  8. package/lib/OverlayDrawer.js.map +1 -0
  9. package/lib/components/Drawer/Drawer.js +1 -1
  10. package/lib/components/Drawer/Drawer.js.map +1 -1
  11. package/lib/components/Drawer/Drawer.types.js.map +1 -1
  12. package/lib/components/Drawer/renderDrawer.js +4 -4
  13. package/lib/components/Drawer/renderDrawer.js.map +1 -1
  14. package/lib/components/Drawer/useDrawer.js +10 -10
  15. package/lib/components/Drawer/useDrawer.js.map +1 -1
  16. package/lib/components/DrawerBody/DrawerBody.js +1 -1
  17. package/lib/components/DrawerBody/DrawerBody.js.map +1 -1
  18. package/lib/components/DrawerBody/renderDrawerBody.js +4 -4
  19. package/lib/components/DrawerBody/renderDrawerBody.js.map +1 -1
  20. package/lib/components/DrawerBody/useDrawerBody.js +8 -3
  21. package/lib/components/DrawerBody/useDrawerBody.js.map +1 -1
  22. package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js +3 -30
  23. package/lib/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
  24. package/lib/components/DrawerFooter/DrawerFooter.js +3 -1
  25. package/lib/components/DrawerFooter/DrawerFooter.js.map +1 -1
  26. package/lib/components/DrawerFooter/renderDrawerFooter.js +4 -4
  27. package/lib/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  28. package/lib/components/DrawerFooter/useDrawerFooter.js +4 -2
  29. package/lib/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  30. package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js +3 -16
  31. package/lib/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
  32. package/lib/components/DrawerHeader/DrawerHeader.js +1 -1
  33. package/lib/components/DrawerHeader/DrawerHeader.js.map +1 -1
  34. package/lib/components/DrawerHeader/renderDrawerHeader.js +4 -4
  35. package/lib/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  36. package/lib/components/DrawerHeader/useDrawerHeader.js +4 -2
  37. package/lib/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  38. package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js +3 -17
  39. package/lib/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
  40. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +1 -1
  41. package/lib/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  42. package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +4 -4
  43. package/lib/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  44. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +4 -2
  45. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  46. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +3 -13
  47. package/lib/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
  48. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js +1 -1
  49. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  50. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +1 -1
  51. package/lib/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  52. package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +9 -4
  53. package/lib/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  54. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +26 -15
  55. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  56. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +1 -1
  57. package/lib/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
  58. package/lib/components/InlineDrawer/InlineDrawer.js +16 -0
  59. package/lib/components/InlineDrawer/InlineDrawer.js.map +1 -0
  60. package/lib/components/InlineDrawer/InlineDrawer.types.js.map +1 -0
  61. package/lib/components/InlineDrawer/index.js +5 -0
  62. package/lib/components/InlineDrawer/index.js.map +1 -0
  63. package/lib/components/InlineDrawer/renderInlineDrawer.js +11 -0
  64. package/lib/components/InlineDrawer/renderInlineDrawer.js.map +1 -0
  65. package/lib/components/InlineDrawer/useInlineDrawer.js +32 -0
  66. package/lib/components/InlineDrawer/useInlineDrawer.js.map +1 -0
  67. package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js +64 -0
  68. package/lib/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -0
  69. package/lib/components/OverlayDrawer/OverlayDrawer.js +15 -0
  70. package/lib/components/OverlayDrawer/OverlayDrawer.js.map +1 -0
  71. package/lib/components/OverlayDrawer/OverlayDrawer.types.js.map +1 -0
  72. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js +13 -0
  73. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -0
  74. package/lib/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.types.js.map +1 -0
  75. package/lib/components/OverlayDrawer/OverlayDrawerSurface/index.js +2 -0
  76. package/lib/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -0
  77. package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +29 -0
  78. package/lib/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -0
  79. package/lib/components/OverlayDrawer/index.js +5 -0
  80. package/lib/components/OverlayDrawer/index.js.map +1 -0
  81. package/lib/components/OverlayDrawer/renderOverlayDrawer.js +13 -0
  82. package/lib/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -0
  83. package/lib/components/OverlayDrawer/useOverlayDrawer.js +56 -0
  84. package/lib/components/OverlayDrawer/useOverlayDrawer.js.map +1 -0
  85. package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +73 -0
  86. package/lib/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -0
  87. package/lib/e2e/DrawerShared.js +108 -0
  88. package/lib/e2e/DrawerShared.js.map +1 -0
  89. package/lib/index.js +2 -2
  90. package/lib/index.js.map +1 -1
  91. package/lib/shared/DrawerBase.types.js +1 -0
  92. package/lib/shared/DrawerBase.types.js.map +1 -0
  93. package/lib/shared/useDrawerBaseStyles.styles.js +96 -0
  94. package/lib/shared/useDrawerBaseStyles.styles.js.map +1 -0
  95. package/lib/shared/useDrawerDefaultProps.js +8 -0
  96. package/lib/shared/useDrawerDefaultProps.js.map +1 -0
  97. package/lib-commonjs/Drawer.js +2 -2
  98. package/lib-commonjs/Drawer.js.map +1 -1
  99. package/lib-commonjs/DrawerBody.js +2 -2
  100. package/lib-commonjs/DrawerBody.js.map +1 -1
  101. package/lib-commonjs/DrawerFooter.js +2 -2
  102. package/lib-commonjs/DrawerFooter.js.map +1 -1
  103. package/lib-commonjs/DrawerHeader.js +2 -2
  104. package/lib-commonjs/DrawerHeader.js.map +1 -1
  105. package/lib-commonjs/DrawerHeaderNavigation.js +2 -2
  106. package/lib-commonjs/DrawerHeaderNavigation.js.map +1 -1
  107. package/lib-commonjs/DrawerHeaderTitle.js +2 -2
  108. package/lib-commonjs/DrawerHeaderTitle.js.map +1 -1
  109. package/lib-commonjs/InlineDrawer.js +6 -0
  110. package/lib-commonjs/InlineDrawer.js.map +1 -0
  111. package/lib-commonjs/OverlayDrawer.js +6 -0
  112. package/lib-commonjs/OverlayDrawer.js.map +1 -0
  113. package/lib-commonjs/components/Drawer/Drawer.js +9 -7
  114. package/lib-commonjs/components/Drawer/Drawer.js.map +1 -1
  115. package/lib-commonjs/components/Drawer/index.js +6 -6
  116. package/lib-commonjs/components/Drawer/index.js.map +1 -1
  117. package/lib-commonjs/components/Drawer/renderDrawer.js +8 -6
  118. package/lib-commonjs/components/Drawer/renderDrawer.js.map +1 -1
  119. package/lib-commonjs/components/Drawer/useDrawer.js +15 -13
  120. package/lib-commonjs/components/Drawer/useDrawer.js.map +1 -1
  121. package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js +6 -2
  122. package/lib-commonjs/components/Drawer/useDrawerStyles.styles.js.map +1 -1
  123. package/lib-commonjs/components/DrawerBody/DrawerBody.js +9 -7
  124. package/lib-commonjs/components/DrawerBody/DrawerBody.js.map +1 -1
  125. package/lib-commonjs/components/DrawerBody/index.js +6 -6
  126. package/lib-commonjs/components/DrawerBody/index.js.map +1 -1
  127. package/lib-commonjs/components/DrawerBody/renderDrawerBody.js +7 -6
  128. package/lib-commonjs/components/DrawerBody/renderDrawerBody.js.map +1 -1
  129. package/lib-commonjs/components/DrawerBody/useDrawerBody.js +13 -6
  130. package/lib-commonjs/components/DrawerBody/useDrawerBody.js.map +1 -1
  131. package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js +15 -66
  132. package/lib-commonjs/components/DrawerBody/useDrawerBodyStyles.styles.js.map +1 -1
  133. package/lib-commonjs/components/DrawerFooter/DrawerFooter.js +9 -5
  134. package/lib-commonjs/components/DrawerFooter/DrawerFooter.js.map +1 -1
  135. package/lib-commonjs/components/DrawerFooter/index.js +6 -6
  136. package/lib-commonjs/components/DrawerFooter/index.js.map +1 -1
  137. package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js +7 -6
  138. package/lib-commonjs/components/DrawerFooter/renderDrawerFooter.js.map +1 -1
  139. package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js +9 -5
  140. package/lib-commonjs/components/DrawerFooter/useDrawerFooter.js.map +1 -1
  141. package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js +11 -32
  142. package/lib-commonjs/components/DrawerFooter/useDrawerFooterStyles.styles.js.map +1 -1
  143. package/lib-commonjs/components/DrawerHeader/DrawerHeader.js +9 -7
  144. package/lib-commonjs/components/DrawerHeader/DrawerHeader.js.map +1 -1
  145. package/lib-commonjs/components/DrawerHeader/index.js +6 -6
  146. package/lib-commonjs/components/DrawerHeader/index.js.map +1 -1
  147. package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js +7 -6
  148. package/lib-commonjs/components/DrawerHeader/renderDrawerHeader.js.map +1 -1
  149. package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js +9 -5
  150. package/lib-commonjs/components/DrawerHeader/useDrawerHeader.js.map +1 -1
  151. package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js +11 -34
  152. package/lib-commonjs/components/DrawerHeader/useDrawerHeaderStyles.styles.js.map +1 -1
  153. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js +9 -7
  154. package/lib-commonjs/components/DrawerHeaderNavigation/DrawerHeaderNavigation.js.map +1 -1
  155. package/lib-commonjs/components/DrawerHeaderNavigation/index.js +6 -6
  156. package/lib-commonjs/components/DrawerHeaderNavigation/index.js.map +1 -1
  157. package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js +7 -6
  158. package/lib-commonjs/components/DrawerHeaderNavigation/renderDrawerHeaderNavigation.js.map +1 -1
  159. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js +9 -5
  160. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigation.js.map +1 -1
  161. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js +11 -26
  162. package/lib-commonjs/components/DrawerHeaderNavigation/useDrawerHeaderNavigationStyles.styles.js.map +1 -1
  163. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js +9 -7
  164. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.js.map +1 -1
  165. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js +0 -2
  166. package/lib-commonjs/components/DrawerHeaderTitle/DrawerHeaderTitle.types.js.map +1 -1
  167. package/lib-commonjs/components/DrawerHeaderTitle/index.js +6 -6
  168. package/lib-commonjs/components/DrawerHeaderTitle/index.js.map +1 -1
  169. package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js +12 -6
  170. package/lib-commonjs/components/DrawerHeaderTitle/renderDrawerHeaderTitle.js.map +1 -1
  171. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js +31 -18
  172. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitle.js.map +1 -1
  173. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js +14 -10
  174. package/lib-commonjs/components/DrawerHeaderTitle/useDrawerHeaderTitleStyles.styles.js.map +1 -1
  175. package/lib-commonjs/components/InlineDrawer/InlineDrawer.js +24 -0
  176. package/lib-commonjs/components/InlineDrawer/InlineDrawer.js.map +1 -0
  177. package/lib-commonjs/components/InlineDrawer/index.js +10 -0
  178. package/lib-commonjs/components/InlineDrawer/index.js.map +1 -0
  179. package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js +19 -0
  180. package/lib-commonjs/components/InlineDrawer/renderInlineDrawer.js.map +1 -0
  181. package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js +35 -0
  182. package/lib-commonjs/components/InlineDrawer/useInlineDrawer.js.map +1 -0
  183. package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js +122 -0
  184. package/lib-commonjs/components/InlineDrawer/useInlineDrawerStyles.styles.js.map +1 -0
  185. package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.js +24 -0
  186. package/lib-commonjs/components/OverlayDrawer/OverlayDrawer.js.map +1 -0
  187. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js +21 -0
  188. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/OverlayDrawerSurface.js.map +1 -0
  189. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/index.js +7 -0
  190. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/index.js.map +1 -0
  191. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js +46 -0
  192. package/lib-commonjs/components/OverlayDrawer/OverlayDrawerSurface/useOverlayDrawerSurfaceStyles.styles.js.map +1 -0
  193. package/lib-commonjs/components/OverlayDrawer/index.js +10 -0
  194. package/lib-commonjs/components/OverlayDrawer/index.js.map +1 -0
  195. package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js +21 -0
  196. package/lib-commonjs/components/OverlayDrawer/renderOverlayDrawer.js.map +1 -0
  197. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawer.js +59 -0
  198. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawer.js.map +1 -0
  199. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js +112 -0
  200. package/lib-commonjs/components/OverlayDrawer/useOverlayDrawerStyles.styles.js.map +1 -0
  201. package/lib-commonjs/e2e/DrawerShared.js +119 -0
  202. package/lib-commonjs/e2e/DrawerShared.js.map +1 -0
  203. package/lib-commonjs/index.js +122 -46
  204. package/lib-commonjs/index.js.map +1 -1
  205. package/lib-commonjs/shared/DrawerBase.types.js +4 -0
  206. package/lib-commonjs/shared/DrawerBase.types.js.map +1 -0
  207. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js +165 -0
  208. package/lib-commonjs/shared/useDrawerBaseStyles.styles.js.map +1 -0
  209. package/lib-commonjs/shared/useDrawerDefaultProps.js +18 -0
  210. package/lib-commonjs/shared/useDrawerDefaultProps.js.map +1 -0
  211. package/package.json +15 -13
  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,11 +2,10 @@
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';
8
+ import { MotionState } from '@fluentui/react-motion-preview';
10
9
  import * as React_2 from 'react';
11
10
  import type { Slot } from '@fluentui/react-utilities';
12
11
  import type { SlotClassNames } from '@fluentui/react-utilities';
@@ -20,9 +19,9 @@ declare type DrawerBaseProps = {
20
19
  /**
21
20
  * Position of the drawer.
22
21
  *
23
- * @default 'left'
22
+ * @default 'start'
24
23
  */
25
- position?: 'left' | 'right';
24
+ position?: 'start' | 'end';
26
25
  /**
27
26
  * Size of the drawer.
28
27
  *
@@ -40,12 +39,10 @@ declare type DrawerBaseProps = {
40
39
  * @default false
41
40
  */
42
41
  open?: boolean;
43
- /**
44
- * Default value for the uncontrolled open state of the Drawer.
45
- *
46
- * @default false
47
- */
48
- defaultOpen?: boolean;
42
+ };
43
+
44
+ declare type DrawerBaseState = Required<Pick<DrawerBaseProps, 'position' | 'size'>> & {
45
+ motion: MotionState<HTMLDivElement>;
49
46
  };
50
47
 
51
48
  /**
@@ -70,7 +67,7 @@ export declare type DrawerBodySlots = {
70
67
  export declare type DrawerBodyState = ComponentState<DrawerBodySlots>;
71
68
 
72
69
  /**
73
- * DrawerFooter component - TODO: add more docs
70
+ * DrawerFooter provides a structured footer for the drawer component.
74
71
  */
75
72
  export declare const DrawerFooter: ForwardRefComponent<DrawerFooterProps>;
76
73
 
@@ -145,13 +142,7 @@ export declare const drawerHeaderTitleClassNames: SlotClassNames<DrawerHeaderTit
145
142
  /**
146
143
  * DrawerHeaderTitle Props
147
144
  */
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
- };
145
+ export declare type DrawerHeaderTitleProps = ComponentProps<DrawerHeaderTitleSlots>;
155
146
 
156
147
  export declare type DrawerHeaderTitleSlots = {
157
148
  root: Slot<'div'>;
@@ -159,11 +150,11 @@ export declare type DrawerHeaderTitleSlots = {
159
150
  * By default this is a h2, but can be any heading or div.
160
151
  * If `div` is provided do not forget to also provide proper `role="heading"` and `aria-level` attributes
161
152
  */
162
- heading?: DialogTitleSlots['root'];
153
+ heading?: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;
163
154
  /**
164
155
  * Action slot for the close button
165
156
  */
166
- action?: DialogTitleSlots['action'];
157
+ action?: Slot<'div'>;
167
158
  };
168
159
 
169
160
  /**
@@ -172,17 +163,44 @@ export declare type DrawerHeaderTitleSlots = {
172
163
  export declare type DrawerHeaderTitleState = ComponentState<DrawerHeaderTitleSlots>;
173
164
 
174
165
  /**
175
- * DrawerInline is often used for navigation that is not dissmissable. As it is on the same level as
166
+ * Drawer Props
167
+ */
168
+ export declare type DrawerProps = ComponentProps<DrawerSlots> & {
169
+ /**
170
+ * Type of the drawer.
171
+ *
172
+ * - 'overlay' - Drawer is hidden by default and can be opened by clicking on the trigger.
173
+ * - 'inline' - Drawer is stacked with the content
174
+ *
175
+ * @default overlay
176
+ */
177
+ type?: 'inline' | 'overlay';
178
+ };
179
+
180
+ export declare type DrawerSlots = {
181
+ /**
182
+ * Root slot of the Drawer.
183
+ */
184
+ root: Slot<OverlayDrawerProps | InlineDrawerProps>;
185
+ };
186
+
187
+ /**
188
+ * State used in rendering Drawer
189
+ */
190
+ export declare type DrawerState = ComponentState<DrawerSlots>;
191
+
192
+ /**
193
+ * InlineDrawer is often used for navigation that is not dismissible. As it is on the same level as
176
194
  * the main surface, users can still interact with other UI elements.
177
195
  */
178
- export declare const DrawerInline: ForwardRefComponent<DrawerInlineProps>;
196
+ export declare const InlineDrawer: ForwardRefComponent<InlineDrawerProps>;
179
197
 
180
- export declare const drawerInlineClassNames: SlotClassNames<DrawerInlineSlots>;
198
+ export declare const inlineDrawerClassNames: SlotClassNames<InlineDrawerSlots>;
181
199
 
182
200
  /**
183
- * DrawerInline Props
201
+ * InlineDrawer Props
184
202
  */
185
- export declare type DrawerInlineProps = ComponentProps<DrawerInlineSlots> & DrawerBaseProps & {
203
+ export declare type InlineDrawerProps = ComponentProps<InlineDrawerSlots> & DrawerBaseProps & {
186
204
  /**
187
205
  * Whether the drawer has a separator line.
188
206
  *
@@ -191,63 +209,61 @@ export declare type DrawerInlineProps = ComponentProps<DrawerInlineSlots> & Draw
191
209
  separator?: boolean;
192
210
  };
193
211
 
194
- export declare type DrawerInlineSlots = {
212
+ export declare type InlineDrawerSlots = {
195
213
  root: Slot<'div'>;
196
214
  };
197
215
 
198
216
  /**
199
- * State used in rendering DrawerInline
217
+ * State used in rendering InlineDrawer
200
218
  */
201
- export declare type DrawerInlineState = ComponentState<DrawerInlineSlots> & DrawerInlineProps;
219
+ export declare type InlineDrawerState = Required<ComponentState<InlineDrawerSlots> & DrawerBaseState & Pick<InlineDrawerProps, 'separator'>>;
202
220
 
203
221
  /**
204
- * DrawerOverlay contains supplementary content and are used for complex creation, edit, or management experiences.
222
+ * OverlayDrawer contains supplementary content and are used for complex creation, edit, or management experiences.
205
223
  */
206
- export declare const DrawerOverlay: ForwardRefComponent<DrawerOverlayProps>;
224
+ export declare const OverlayDrawer: ForwardRefComponent<OverlayDrawerProps>;
207
225
 
208
- export declare const drawerOverlayClassNames: SlotClassNames<DrawerOverlaySlots>;
226
+ export declare const overlayDrawerClassNames: SlotClassNames<OverlayDrawerSurfaceSlots>;
209
227
 
210
228
  /**
211
- * DrawerOverlay Props
229
+ * OverlayDrawer internal slots for when using with composition API
212
230
  */
213
- export declare type DrawerOverlayProps = ComponentProps<DrawerOverlaySlots> & DrawerBaseProps & Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus'>;
214
-
215
- export declare type DrawerOverlaySlots = DialogSurfaceSlots & {
216
- root: Slot<DialogSurfaceProps>;
231
+ declare type OverlayDrawerInternalSlots = OverlayDrawerSlots & {
232
+ /**
233
+ * Slot for the dialog component that wraps the drawer.
234
+ */
235
+ dialog: Slot<DialogProps>;
217
236
  };
218
237
 
219
238
  /**
220
- * State used in rendering DrawerOverlay
239
+ * OverlayDrawer Props
221
240
  */
222
- export declare type DrawerOverlayState = ComponentState<DrawerOverlaySlots> & DrawerBaseProps & {
223
- dialog: DialogProps;
224
- };
241
+ export declare type OverlayDrawerProps = ComponentProps<OverlayDrawerSlots> & Pick<DialogProps, 'modalType' | 'onOpenChange' | 'inertTrapFocus' | 'defaultOpen'> & DrawerBaseProps;
225
242
 
226
243
  /**
227
- * Drawer Props
244
+ * OverlayDrawer slots
228
245
  */
229
- export declare type DrawerProps = ComponentProps<Partial<DrawerSlots>> & {
246
+ export declare type OverlayDrawerSlots = {
230
247
  /**
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
248
+ * Slot for the root element.
236
249
  */
237
- type?: 'inline' | 'overlay';
250
+ root: Slot<OverlayDrawerSurfaceProps>;
238
251
  };
239
252
 
240
- export declare type DrawerSlots = {
241
- /**
242
- * Root slot of the Drawer.
243
- */
244
- root: Slot<DrawerOverlayProps | DrawerInlineProps>;
245
- };
253
+ /**
254
+ * State used in rendering OverlayDrawer
255
+ */
256
+ export declare type OverlayDrawerState = Omit<ComponentState<OverlayDrawerInternalSlots>, 'backdrop'> & Required<DrawerBaseState>;
246
257
 
247
258
  /**
248
- * State used in rendering Drawer
259
+ * OverlayDrawerSurface Props
249
260
  */
250
- export declare type DrawerState = ComponentState<DrawerSlots>;
261
+ declare type OverlayDrawerSurfaceProps = ComponentProps<OverlayDrawerSurfaceSlots>;
262
+
263
+ /**
264
+ * OverlayDrawerSurface slots
265
+ */
266
+ declare type OverlayDrawerSurfaceSlots = DialogSurfaceSlots;
251
267
 
252
268
  /**
253
269
  * Render the final JSX of Drawer
@@ -280,14 +296,14 @@ export declare const renderDrawerHeaderNavigation_unstable: (state: DrawerHeader
280
296
  export declare const renderDrawerHeaderTitle_unstable: (state: DrawerHeaderTitleState) => JSX.Element;
281
297
 
282
298
  /**
283
- * Render the final JSX of DrawerInline
299
+ * Render the final JSX of InlineDrawer
284
300
  */
285
- export declare const renderDrawerInline_unstable: (state: DrawerInlineState) => JSX.Element | null;
301
+ export declare const renderInlineDrawer_unstable: (state: InlineDrawerState) => JSX.Element | null;
286
302
 
287
303
  /**
288
- * Render the final JSX of DrawerOverlay
304
+ * Render the final JSX of OverlayDrawer
289
305
  */
290
- export declare const renderDrawerOverlay_unstable: (state: DrawerOverlayState) => JSX.Element;
306
+ export declare const renderOverlayDrawer_unstable: (state: OverlayDrawerState) => JSX.Element | null;
291
307
 
292
308
  /**
293
309
  * Create the state required to render Drawer.
@@ -381,35 +397,35 @@ export declare const useDrawerHeaderTitle_unstable: (props: DrawerHeaderTitlePro
381
397
  export declare const useDrawerHeaderTitleStyles_unstable: (state: DrawerHeaderTitleState) => DrawerHeaderTitleState;
382
398
 
383
399
  /**
384
- * Create the state required to render DrawerInline.
400
+ * Create the state required to render InlineDrawer.
385
401
  *
386
- * The returned state can be modified with hooks such as useDrawerInlineStyles_unstable,
387
- * before being passed to renderDrawerInline_unstable.
402
+ * The returned state can be modified with hooks such as useInlineDrawerStyles_unstable,
403
+ * before being passed to renderInlineDrawer_unstable.
388
404
  *
389
- * @param props - props from this instance of DrawerInline
390
- * @param ref - reference to root HTMLElement of DrawerInline
405
+ * @param props - props from this instance of InlineDrawer
406
+ * @param ref - reference to root HTMLElement of InlineDrawer
391
407
  */
392
- export declare const useDrawerInline_unstable: (props: DrawerInlineProps, ref: React_2.Ref<HTMLElement>) => DrawerInlineState;
408
+ export declare const useInlineDrawer_unstable: (props: InlineDrawerProps, ref: React_2.Ref<HTMLDivElement>) => InlineDrawerState;
393
409
 
394
410
  /**
395
- * Apply styling to the DrawerInline slots based on the state
411
+ * Apply styling to the InlineDrawer slots based on the state
396
412
  */
397
- export declare const useDrawerInlineStyles_unstable: (state: DrawerInlineState) => DrawerInlineState;
413
+ export declare const useInlineDrawerStyles_unstable: (state: InlineDrawerState) => InlineDrawerState;
398
414
 
399
415
  /**
400
- * Create the state required to render DrawerOverlay.
416
+ * Create the state required to render OverlayDrawer.
401
417
  *
402
- * The returned state can be modified with hooks such as useDrawerOverlayStyles_unstable,
403
- * before being passed to renderDrawerOverlay_unstable.
418
+ * The returned state can be modified with hooks such as useOverlayDrawerStyles_unstable,
419
+ * before being passed to renderOverlayDrawer_unstable.
404
420
  *
405
- * @param props - props from this instance of DrawerOverlay
406
- * @param ref - reference to root HTMLElement of DrawerOverlay
421
+ * @param props - props from this instance of OverlayDrawer
422
+ * @param ref - reference to root HTMLDivElement of OverlayDrawer
407
423
  */
408
- export declare const useDrawerOverlay_unstable: (props: DrawerOverlayProps, ref: React_2.Ref<HTMLElement>) => DrawerOverlayState;
424
+ export declare const useOverlayDrawer_unstable: (props: OverlayDrawerProps, ref: React_2.Ref<HTMLDivElement>) => OverlayDrawerState;
409
425
 
410
426
  /**
411
- * Apply styling to the DrawerOverlay slots based on the state
427
+ * Apply styling to the OverlayDrawer slots based on the state
412
428
  */
413
- export declare const useDrawerOverlayStyles_unstable: (state: DrawerOverlayState) => DrawerOverlayState;
429
+ export declare const useOverlayDrawerStyles_unstable: (state: OverlayDrawerState) => OverlayDrawerState;
414
430
 
415
431
  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;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';
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerFooter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDrawerFooter_unstable } from './useDrawerFooter';\nimport { renderDrawerFooter_unstable } from './renderDrawerFooter';\nimport { useDrawerFooterStyles_unstable } from './useDrawerFooterStyles.styles';\nimport type { DrawerFooterProps } from './DrawerFooter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * DrawerFooter component - TODO: add more docs\n */\nexport const DrawerFooter: ForwardRefComponent<DrawerFooterProps> = React.forwardRef((props, ref) => {\n const state = useDrawerFooter_unstable(props, ref);\n\n useDrawerFooterStyles_unstable(state);\n return renderDrawerFooter_unstable(state);\n});\n\nDrawerFooter.displayName = 'DrawerFooter';\n"],"names":["React","useDrawerFooter_unstable","renderDrawerFooter_unstable","useDrawerFooterStyles_unstable","DrawerFooter","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAIhF;;CAEC,GACD,OAAO,MAAMC,6BAAuDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACnG,MAAMC,QAAQP,yBAAyBK,OAAOC;IAE9CJ,+BAA+BK;IAC/B,OAAON,4BAA4BM;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DrawerFooter.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\nimport { useDrawerFooter_unstable } from './useDrawerFooter';\nimport { renderDrawerFooter_unstable } from './renderDrawerFooter';\nimport { useDrawerFooterStyles_unstable } from './useDrawerFooterStyles.styles';\nimport type { DrawerFooterProps } from './DrawerFooter.types';\n\n/**\n * DrawerFooter provides a structured footer for the drawer component.\n */\nexport const DrawerFooter: ForwardRefComponent<DrawerFooterProps> = React.forwardRef((props, ref) => {\n const state = useDrawerFooter_unstable(props, ref);\n\n useDrawerFooterStyles_unstable(state);\n useCustomStyleHook_unstable('useDrawerFooterStyles_unstable')(state);\n\n return renderDrawerFooter_unstable(state);\n});\n\nDrawerFooter.displayName = 'DrawerFooter';\n"],"names":["React","useCustomStyleHook_unstable","useDrawerFooter_unstable","renderDrawerFooter_unstable","useDrawerFooterStyles_unstable","DrawerFooter","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQP,yBAAyBK,OAAOC;IAE9CJ,+BAA+BK;IAC/BR,4BAA4B,kCAAkCQ;IAE9D,OAAON,4BAA4BM;AACrC,GAAG;AAEHJ,aAAaK,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 DrawerFooter
5
5
  */ export const renderDrawerFooter_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":["renderDrawerFooter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DrawerFooterState, DrawerFooterSlots } from './DrawerFooter.types';\n\n/**\n * Render the final JSX of DrawerFooter\n */\nexport const renderDrawerFooter_unstable = (state: DrawerFooterState) => {\n const { slots, slotProps } = getSlots<DrawerFooterSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["React","getSlots","renderDrawerFooter_unstable","state","slots","slotProps","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,QAAQ,QAAQ,4BAA4B;AAGrD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,SAA4BE;IAEzD,qBAAO,oBAACC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
1
+ {"version":3,"sources":["renderDrawerFooter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\n\nimport type { DrawerFooterSlots, DrawerFooterState } from './DrawerFooter.types';\n\n/**\n * Render the final JSX of DrawerFooter\n */\nexport const renderDrawerFooter_unstable = (state: DrawerFooterState) => {\n assertSlots<DrawerFooterSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderDrawerFooter_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CF,YAA+BE;IAE/B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}