@fluentui/react-dialog 9.3.2 → 9.4.1

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 (317) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +141 -1
  3. package/CHANGELOG.md +41 -2
  4. package/dist/index.d.ts +6 -3
  5. package/lib/Dialog.js.map +1 -1
  6. package/lib/DialogActions.js.map +1 -1
  7. package/lib/DialogBody.js.map +1 -1
  8. package/lib/DialogContent.js.map +1 -1
  9. package/lib/DialogSurface.js.map +1 -1
  10. package/lib/DialogTitle.js.map +1 -1
  11. package/lib/DialogTrigger.js.map +1 -1
  12. package/lib/components/Dialog/Dialog.js.map +1 -1
  13. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  14. package/lib/components/Dialog/index.js.map +1 -1
  15. package/lib/components/Dialog/renderDialog.js.map +1 -1
  16. package/lib/components/Dialog/useDialog.js.map +1 -1
  17. package/lib/components/Dialog/useDialogContextValues.js +3 -3
  18. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  19. package/lib/components/DialogActions/DialogActions.js.map +1 -1
  20. package/lib/components/DialogActions/DialogActions.types.js.map +1 -1
  21. package/lib/components/DialogActions/index.js.map +1 -1
  22. package/lib/components/DialogActions/renderDialogActions.js +1 -3
  23. package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
  24. package/lib/components/DialogActions/useDialogActions.js +5 -2
  25. package/lib/components/DialogActions/useDialogActions.js.map +1 -1
  26. package/lib/components/DialogActions/useDialogActionsStyles.js +7 -1
  27. package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  28. package/lib/components/DialogBody/DialogBody.js.map +1 -1
  29. package/lib/components/DialogBody/DialogBody.types.js.map +1 -1
  30. package/lib/components/DialogBody/index.js.map +1 -1
  31. package/lib/components/DialogBody/renderDialogBody.js +1 -3
  32. package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
  33. package/lib/components/DialogBody/useDialogBody.js +3 -2
  34. package/lib/components/DialogBody/useDialogBody.js.map +1 -1
  35. package/lib/components/DialogBody/useDialogBodyStyles.js +1 -2
  36. package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  37. package/lib/components/DialogContent/DialogContent.js.map +1 -1
  38. package/lib/components/DialogContent/DialogContent.types.js.map +1 -1
  39. package/lib/components/DialogContent/index.js.map +1 -1
  40. package/lib/components/DialogContent/renderDialogContent.js +1 -3
  41. package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
  42. package/lib/components/DialogContent/useDialogContent.js +3 -2
  43. package/lib/components/DialogContent/useDialogContent.js.map +1 -1
  44. package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -1
  45. package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
  46. package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
  47. package/lib/components/DialogSurface/index.js.map +1 -1
  48. package/lib/components/DialogSurface/renderDialogSurface.js +2 -6
  49. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
  50. package/lib/components/DialogSurface/useDialogSurface.js +5 -4
  51. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  52. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  53. package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  54. package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
  55. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
  56. package/lib/components/DialogTitle/index.js.map +1 -1
  57. package/lib/components/DialogTitle/renderDialogTitle.js +1 -5
  58. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
  59. package/lib/components/DialogTitle/useDialogTitle.js +2 -0
  60. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  61. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  62. package/lib/components/DialogTrigger/DialogTrigger.js +1 -0
  63. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
  64. package/lib/components/DialogTrigger/DialogTrigger.types.js +1 -1
  65. package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  66. package/lib/components/DialogTrigger/index.js.map +1 -1
  67. package/lib/components/DialogTrigger/renderDialogTrigger.js +1 -2
  68. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  69. package/lib/components/DialogTrigger/useDialogTrigger.js +3 -2
  70. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  71. package/lib/contexts/constants.js.map +1 -1
  72. package/lib/contexts/dialogContext.js +2 -2
  73. package/lib/contexts/dialogContext.js.map +1 -1
  74. package/lib/contexts/dialogSurfaceContext.js +2 -4
  75. package/lib/contexts/dialogSurfaceContext.js.map +1 -1
  76. package/lib/contexts/index.js.map +1 -1
  77. package/lib/index.js.map +1 -1
  78. package/lib/utils/index.js.map +1 -1
  79. package/lib/utils/isEscapeKeyDown.js +1 -0
  80. package/lib/utils/isEscapeKeyDown.js.map +1 -1
  81. package/lib/utils/useDisableBodyScroll.js +6 -5
  82. package/lib/utils/useDisableBodyScroll.js.map +1 -1
  83. package/lib/utils/useFocusFirstElement.js +4 -3
  84. package/lib/utils/useFocusFirstElement.js.map +1 -1
  85. package/lib-commonjs/Dialog.js +5 -4
  86. package/lib-commonjs/Dialog.js.map +1 -1
  87. package/lib-commonjs/DialogActions.js +5 -4
  88. package/lib-commonjs/DialogActions.js.map +1 -1
  89. package/lib-commonjs/DialogBody.js +5 -4
  90. package/lib-commonjs/DialogBody.js.map +1 -1
  91. package/lib-commonjs/DialogContent.js +5 -4
  92. package/lib-commonjs/DialogContent.js.map +1 -1
  93. package/lib-commonjs/DialogSurface.js +5 -4
  94. package/lib-commonjs/DialogSurface.js.map +1 -1
  95. package/lib-commonjs/DialogTitle.js +5 -4
  96. package/lib-commonjs/DialogTitle.js.map +1 -1
  97. package/lib-commonjs/DialogTrigger.js +5 -4
  98. package/lib-commonjs/DialogTrigger.js.map +1 -1
  99. package/lib-commonjs/components/Dialog/Dialog.js +16 -19
  100. package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
  101. package/lib-commonjs/components/Dialog/Dialog.types.js +3 -2
  102. package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -1
  103. package/lib-commonjs/components/Dialog/index.js +8 -7
  104. package/lib-commonjs/components/Dialog/index.js.map +1 -1
  105. package/lib-commonjs/components/Dialog/renderDialog.js +17 -20
  106. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
  107. package/lib-commonjs/components/Dialog/useDialog.js +78 -80
  108. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
  109. package/lib-commonjs/components/Dialog/useDialogContextValues.js +25 -32
  110. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
  111. package/lib-commonjs/components/DialogActions/DialogActions.js +19 -21
  112. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
  113. package/lib-commonjs/components/DialogActions/DialogActions.types.js +3 -2
  114. package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -1
  115. package/lib-commonjs/components/DialogActions/index.js +9 -8
  116. package/lib-commonjs/components/DialogActions/index.js.map +1 -1
  117. package/lib-commonjs/components/DialogActions/renderDialogActions.js +14 -19
  118. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
  119. package/lib-commonjs/components/DialogActions/useDialogActions.js +23 -29
  120. package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
  121. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +81 -46
  122. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  123. package/lib-commonjs/components/DialogBody/DialogBody.js +19 -21
  124. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
  125. package/lib-commonjs/components/DialogBody/DialogBody.types.js +3 -2
  126. package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -1
  127. package/lib-commonjs/components/DialogBody/index.js +9 -8
  128. package/lib-commonjs/components/DialogBody/index.js.map +1 -1
  129. package/lib-commonjs/components/DialogBody/renderDialogBody.js +14 -19
  130. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
  131. package/lib-commonjs/components/DialogBody/useDialogBody.js +21 -26
  132. package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
  133. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +74 -45
  134. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  135. package/lib-commonjs/components/DialogContent/DialogContent.js +19 -21
  136. package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
  137. package/lib-commonjs/components/DialogContent/DialogContent.types.js +3 -2
  138. package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -1
  139. package/lib-commonjs/components/DialogContent/index.js +9 -8
  140. package/lib-commonjs/components/DialogContent/index.js.map +1 -1
  141. package/lib-commonjs/components/DialogContent/renderDialogContent.js +13 -18
  142. package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
  143. package/lib-commonjs/components/DialogContent/useDialogContent.js +21 -26
  144. package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
  145. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +51 -35
  146. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -1
  147. package/lib-commonjs/components/DialogSurface/DialogSurface.js +21 -23
  148. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
  149. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js +3 -2
  150. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -1
  151. package/lib-commonjs/components/DialogSurface/index.js +9 -8
  152. package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
  153. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +17 -24
  154. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
  155. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +75 -85
  156. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
  157. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +11 -9
  158. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  159. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +309 -123
  160. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  161. package/lib-commonjs/components/DialogTitle/DialogTitle.js +19 -21
  162. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
  163. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js +3 -2
  164. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -1
  165. package/lib-commonjs/components/DialogTitle/index.js +9 -8
  166. package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
  167. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +13 -20
  168. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
  169. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +43 -51
  170. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
  171. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +225 -107
  172. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  173. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +15 -21
  174. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
  175. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +5 -2
  176. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  177. package/lib-commonjs/components/DialogTrigger/index.js +8 -7
  178. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
  179. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +10 -9
  180. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  181. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +45 -53
  182. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  183. package/lib-commonjs/contexts/constants.js +28 -12
  184. package/lib-commonjs/contexts/constants.js.map +1 -1
  185. package/lib-commonjs/contexts/dialogContext.js +28 -19
  186. package/lib-commonjs/contexts/dialogContext.js.map +1 -1
  187. package/lib-commonjs/contexts/dialogSurfaceContext.js +18 -11
  188. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
  189. package/lib-commonjs/contexts/index.js +7 -6
  190. package/lib-commonjs/contexts/index.js.map +1 -1
  191. package/lib-commonjs/index.js +50 -197
  192. package/lib-commonjs/index.js.map +1 -1
  193. package/lib-commonjs/utils/index.js +7 -6
  194. package/lib-commonjs/utils/index.js.map +1 -1
  195. package/lib-commonjs/utils/isEscapeKeyDown.js +11 -10
  196. package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
  197. package/lib-commonjs/utils/useDisableBodyScroll.js +45 -47
  198. package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
  199. package/lib-commonjs/utils/useFocusFirstElement.js +42 -37
  200. package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
  201. package/package.json +14 -13
  202. package/lib-amd/Dialog.js +0 -6
  203. package/lib-amd/Dialog.js.map +0 -1
  204. package/lib-amd/DialogActions.js +0 -6
  205. package/lib-amd/DialogActions.js.map +0 -1
  206. package/lib-amd/DialogBody.js +0 -6
  207. package/lib-amd/DialogBody.js.map +0 -1
  208. package/lib-amd/DialogContent.js +0 -6
  209. package/lib-amd/DialogContent.js.map +0 -1
  210. package/lib-amd/DialogSurface.js +0 -6
  211. package/lib-amd/DialogSurface.js.map +0 -1
  212. package/lib-amd/DialogTitle.js +0 -6
  213. package/lib-amd/DialogTitle.js.map +0 -1
  214. package/lib-amd/DialogTrigger.js +0 -6
  215. package/lib-amd/DialogTrigger.js.map +0 -1
  216. package/lib-amd/components/Dialog/Dialog.js +0 -19
  217. package/lib-amd/components/Dialog/Dialog.js.map +0 -1
  218. package/lib-amd/components/Dialog/Dialog.types.js +0 -5
  219. package/lib-amd/components/Dialog/Dialog.types.js.map +0 -1
  220. package/lib-amd/components/Dialog/index.js +0 -9
  221. package/lib-amd/components/Dialog/index.js.map +0 -1
  222. package/lib-amd/components/Dialog/renderDialog.js +0 -17
  223. package/lib-amd/components/Dialog/renderDialog.js.map +0 -1
  224. package/lib-amd/components/Dialog/useDialog.js +0 -78
  225. package/lib-amd/components/Dialog/useDialog.js.map +0 -1
  226. package/lib-amd/components/Dialog/useDialogContextValues.js +0 -25
  227. package/lib-amd/components/Dialog/useDialogContextValues.js.map +0 -1
  228. package/lib-amd/components/DialogActions/DialogActions.js +0 -18
  229. package/lib-amd/components/DialogActions/DialogActions.js.map +0 -1
  230. package/lib-amd/components/DialogActions/DialogActions.types.js +0 -5
  231. package/lib-amd/components/DialogActions/DialogActions.types.js.map +0 -1
  232. package/lib-amd/components/DialogActions/index.js +0 -10
  233. package/lib-amd/components/DialogActions/index.js.map +0 -1
  234. package/lib-amd/components/DialogActions/renderDialogActions.js +0 -15
  235. package/lib-amd/components/DialogActions/renderDialogActions.js.map +0 -1
  236. package/lib-amd/components/DialogActions/useDialogActions.js +0 -26
  237. package/lib-amd/components/DialogActions/useDialogActions.js.map +0 -1
  238. package/lib-amd/components/DialogActions/useDialogActionsStyles.js +0 -27
  239. package/lib-amd/components/DialogActions/useDialogActionsStyles.js.map +0 -1
  240. package/lib-amd/components/DialogBody/DialogBody.js +0 -18
  241. package/lib-amd/components/DialogBody/DialogBody.js.map +0 -1
  242. package/lib-amd/components/DialogBody/DialogBody.types.js +0 -5
  243. package/lib-amd/components/DialogBody/DialogBody.types.js.map +0 -1
  244. package/lib-amd/components/DialogBody/index.js +0 -10
  245. package/lib-amd/components/DialogBody/index.js.map +0 -1
  246. package/lib-amd/components/DialogBody/renderDialogBody.js +0 -15
  247. package/lib-amd/components/DialogBody/renderDialogBody.js.map +0 -1
  248. package/lib-amd/components/DialogBody/useDialogBody.js +0 -25
  249. package/lib-amd/components/DialogBody/useDialogBody.js.map +0 -1
  250. package/lib-amd/components/DialogBody/useDialogBodyStyles.js +0 -31
  251. package/lib-amd/components/DialogBody/useDialogBodyStyles.js.map +0 -1
  252. package/lib-amd/components/DialogContent/DialogContent.js +0 -18
  253. package/lib-amd/components/DialogContent/DialogContent.js.map +0 -1
  254. package/lib-amd/components/DialogContent/DialogContent.types.js +0 -5
  255. package/lib-amd/components/DialogContent/DialogContent.types.js.map +0 -1
  256. package/lib-amd/components/DialogContent/index.js +0 -10
  257. package/lib-amd/components/DialogContent/index.js.map +0 -1
  258. package/lib-amd/components/DialogContent/renderDialogContent.js +0 -14
  259. package/lib-amd/components/DialogContent/renderDialogContent.js.map +0 -1
  260. package/lib-amd/components/DialogContent/useDialogContent.js +0 -25
  261. package/lib-amd/components/DialogContent/useDialogContent.js.map +0 -1
  262. package/lib-amd/components/DialogContent/useDialogContentStyles.js +0 -24
  263. package/lib-amd/components/DialogContent/useDialogContentStyles.js.map +0 -1
  264. package/lib-amd/components/DialogSurface/DialogSurface.js +0 -19
  265. package/lib-amd/components/DialogSurface/DialogSurface.js.map +0 -1
  266. package/lib-amd/components/DialogSurface/DialogSurface.types.js +0 -5
  267. package/lib-amd/components/DialogSurface/DialogSurface.types.js.map +0 -1
  268. package/lib-amd/components/DialogSurface/index.js +0 -10
  269. package/lib-amd/components/DialogSurface/index.js.map +0 -1
  270. package/lib-amd/components/DialogSurface/renderDialogSurface.js +0 -17
  271. package/lib-amd/components/DialogSurface/renderDialogSurface.js.map +0 -1
  272. package/lib-amd/components/DialogSurface/useDialogSurface.js +0 -70
  273. package/lib-amd/components/DialogSurface/useDialogSurface.js.map +0 -1
  274. package/lib-amd/components/DialogSurface/useDialogSurfaceContextValues.js +0 -11
  275. package/lib-amd/components/DialogSurface/useDialogSurfaceContextValues.js.map +0 -1
  276. package/lib-amd/components/DialogSurface/useDialogSurfaceStyles.js +0 -44
  277. package/lib-amd/components/DialogSurface/useDialogSurfaceStyles.js.map +0 -1
  278. package/lib-amd/components/DialogTitle/DialogTitle.js +0 -18
  279. package/lib-amd/components/DialogTitle/DialogTitle.js.map +0 -1
  280. package/lib-amd/components/DialogTitle/DialogTitle.types.js +0 -5
  281. package/lib-amd/components/DialogTitle/DialogTitle.types.js.map +0 -1
  282. package/lib-amd/components/DialogTitle/index.js +0 -10
  283. package/lib-amd/components/DialogTitle/index.js.map +0 -1
  284. package/lib-amd/components/DialogTitle/renderDialogTitle.js +0 -16
  285. package/lib-amd/components/DialogTitle/renderDialogTitle.js.map +0 -1
  286. package/lib-amd/components/DialogTitle/useDialogTitle.js +0 -36
  287. package/lib-amd/components/DialogTitle/useDialogTitle.js.map +0 -1
  288. package/lib-amd/components/DialogTitle/useDialogTitleStyles.js +0 -37
  289. package/lib-amd/components/DialogTitle/useDialogTitleStyles.js.map +0 -1
  290. package/lib-amd/components/DialogTrigger/DialogTrigger.js +0 -24
  291. package/lib-amd/components/DialogTrigger/DialogTrigger.js.map +0 -1
  292. package/lib-amd/components/DialogTrigger/DialogTrigger.types.js +0 -5
  293. package/lib-amd/components/DialogTrigger/DialogTrigger.types.js.map +0 -1
  294. package/lib-amd/components/DialogTrigger/index.js +0 -9
  295. package/lib-amd/components/DialogTrigger/index.js.map +0 -1
  296. package/lib-amd/components/DialogTrigger/renderDialogTrigger.js +0 -13
  297. package/lib-amd/components/DialogTrigger/renderDialogTrigger.js.map +0 -1
  298. package/lib-amd/components/DialogTrigger/useDialogTrigger.js +0 -37
  299. package/lib-amd/components/DialogTrigger/useDialogTrigger.js.map +0 -1
  300. package/lib-amd/contexts/constants.js +0 -15
  301. package/lib-amd/contexts/constants.js.map +0 -1
  302. package/lib-amd/contexts/dialogContext.js +0 -26
  303. package/lib-amd/contexts/dialogContext.js.map +0 -1
  304. package/lib-amd/contexts/dialogSurfaceContext.js +0 -11
  305. package/lib-amd/contexts/dialogSurfaceContext.js.map +0 -1
  306. package/lib-amd/contexts/index.js +0 -8
  307. package/lib-amd/contexts/index.js.map +0 -1
  308. package/lib-amd/index.js +0 -37
  309. package/lib-amd/index.js.map +0 -1
  310. package/lib-amd/utils/index.js +0 -8
  311. package/lib-amd/utils/index.js.map +0 -1
  312. package/lib-amd/utils/isEscapeKeyDown.js +0 -13
  313. package/lib-amd/utils/isEscapeKeyDown.js.map +0 -1
  314. package/lib-amd/utils/useDisableBodyScroll.js +0 -52
  315. package/lib-amd/utils/useDisableBodyScroll.js.map +0 -1
  316. package/lib-amd/utils/useFocusFirstElement.js +0 -38
  317. package/lib-amd/utils/useFocusFirstElement.js.map +0 -1
package/.swcrc ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/swcrc",
3
+ "exclude": [
4
+ "/testing",
5
+ "/**/*.cy.ts",
6
+ "/**/*.cy.tsx",
7
+ "/**/*.spec.ts",
8
+ "/**/*.spec.tsx",
9
+ "/**/*.test.ts",
10
+ "/**/*.test.tsx"
11
+ ],
12
+ "jsc": {
13
+ "parser": {
14
+ "syntax": "typescript",
15
+ "tsx": true,
16
+ "decorators": false,
17
+ "dynamicImport": false
18
+ },
19
+ "externalHelpers": true,
20
+ "transform": {
21
+ "react": {
22
+ "runtime": "classic",
23
+ "useSpread": true
24
+ }
25
+ },
26
+ "target": "es2019"
27
+ },
28
+ "minify": false,
29
+ "sourceMaps": true
30
+ }
package/CHANGELOG.json CHANGED
@@ -2,7 +2,147 @@
2
2
  "name": "@fluentui/react-dialog",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 15 Mar 2023 10:17:05 GMT",
5
+ "date": "Tue, 21 Mar 2023 21:18:44 GMT",
6
+ "tag": "@fluentui/react-dialog_v9.4.1",
7
+ "version": "9.4.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "tristan.watanabe@gmail.com",
12
+ "package": "@fluentui/react-dialog",
13
+ "commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
14
+ "comment": "chore: migrate to swc transpilation approach."
15
+ },
16
+ {
17
+ "author": "bernardo.sunderhus@gmail.com",
18
+ "package": "@fluentui/react-dialog",
19
+ "commit": "d015b6f9f91acc08c496f265ff9a102dc4c823f6",
20
+ "comment": "fix(DialogTitle): adds type=\"button\" to close action"
21
+ },
22
+ {
23
+ "author": "makotom@microsoft.com",
24
+ "package": "@fluentui/react-dialog",
25
+ "commit": "7fde5c94869ff9841b142b7ff1d0a3df0ab58f74",
26
+ "comment": "chore: Bumping version of @fluentui/react-icons to ^2.0.196."
27
+ },
28
+ {
29
+ "author": "tristan.watanabe@gmail.com",
30
+ "package": "@fluentui/react-dialog",
31
+ "commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
32
+ "comment": "fix: add node field to package.json exports map."
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-dialog",
37
+ "comment": "Bump @fluentui/react-utilities to v9.7.2",
38
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-dialog",
43
+ "comment": "Bump @fluentui/keyboard-keys to v9.0.2",
44
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-dialog",
49
+ "comment": "Bump @fluentui/react-context-selector to v9.1.15",
50
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-dialog",
55
+ "comment": "Bump @fluentui/react-shared-contexts to v9.3.2",
56
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/react-dialog",
61
+ "comment": "Bump @fluentui/react-aria to v9.3.15",
62
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui/react-dialog",
67
+ "comment": "Bump @fluentui/react-tabster to v9.6.1",
68
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@fluentui/react-dialog",
73
+ "comment": "Bump @fluentui/react-theme to v9.1.7",
74
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@fluentui/react-dialog",
79
+ "comment": "Bump @fluentui/react-portal to v9.2.2",
80
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@fluentui/react-dialog",
85
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20",
86
+ "commit": "b7a26f6263c80e3253c6b8338c33b73bae33e2b5"
87
+ }
88
+ ]
89
+ }
90
+ },
91
+ {
92
+ "date": "Thu, 16 Mar 2023 14:36:57 GMT",
93
+ "tag": "@fluentui/react-dialog_v9.4.0",
94
+ "version": "9.4.0",
95
+ "comments": {
96
+ "patch": [
97
+ {
98
+ "author": "lingfangao@hotmail.com",
99
+ "package": "@fluentui/react-dialog",
100
+ "commit": "a3ad6f25502d8ec77c9376eaa09ed7d1238f6c73",
101
+ "comment": "fix(DialogBody): Remove `maxWidth` style"
102
+ }
103
+ ],
104
+ "minor": [
105
+ {
106
+ "author": "lingfangao@hotmail.com",
107
+ "package": "@fluentui/react-dialog",
108
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81",
109
+ "comment": "feat(DialogActions): Implment `fluid` prop"
110
+ },
111
+ {
112
+ "author": "beachball",
113
+ "package": "@fluentui/react-dialog",
114
+ "comment": "Bump @fluentui/react-utilities to v9.7.1",
115
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
116
+ },
117
+ {
118
+ "author": "beachball",
119
+ "package": "@fluentui/react-dialog",
120
+ "comment": "Bump @fluentui/react-context-selector to v9.1.14",
121
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
122
+ },
123
+ {
124
+ "author": "beachball",
125
+ "package": "@fluentui/react-dialog",
126
+ "comment": "Bump @fluentui/react-aria to v9.3.14",
127
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
128
+ },
129
+ {
130
+ "author": "beachball",
131
+ "package": "@fluentui/react-dialog",
132
+ "comment": "Bump @fluentui/react-tabster to v9.6.0",
133
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
134
+ },
135
+ {
136
+ "author": "beachball",
137
+ "package": "@fluentui/react-dialog",
138
+ "comment": "Bump @fluentui/react-portal to v9.2.1",
139
+ "commit": "e7dcadf7cabae6bc6811ca04a630e7d850388f81"
140
+ }
141
+ ]
142
+ }
143
+ },
144
+ {
145
+ "date": "Wed, 15 Mar 2023 10:19:53 GMT",
6
146
  "tag": "@fluentui/react-dialog_v9.3.2",
7
147
  "version": "9.3.2",
8
148
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,51 @@
1
1
  # Change Log - @fluentui/react-dialog
2
2
 
3
- This log was last generated on Wed, 15 Mar 2023 10:17:05 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 21 Mar 2023 21:18:44 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.4.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.4.1)
8
+
9
+ Tue, 21 Mar 2023 21:18:44 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.4.0..@fluentui/react-dialog_v9.4.1)
11
+
12
+ ### Patches
13
+
14
+ - chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
15
+ - fix(DialogTitle): adds type="button" to close action ([PR #27247](https://github.com/microsoft/fluentui/pull/27247) by bernardo.sunderhus@gmail.com)
16
+ - chore: Bumping version of @fluentui/react-icons to ^2.0.196. ([PR #27100](https://github.com/microsoft/fluentui/pull/27100) by makotom@microsoft.com)
17
+ - fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
18
+ - Bump @fluentui/react-utilities to v9.7.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
19
+ - Bump @fluentui/keyboard-keys to v9.0.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
20
+ - Bump @fluentui/react-context-selector to v9.1.15 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
21
+ - Bump @fluentui/react-shared-contexts to v9.3.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
22
+ - Bump @fluentui/react-aria to v9.3.15 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
23
+ - Bump @fluentui/react-tabster to v9.6.1 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
24
+ - Bump @fluentui/react-theme to v9.1.7 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
25
+ - Bump @fluentui/react-portal to v9.2.2 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
26
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.20 ([PR #27271](https://github.com/microsoft/fluentui/pull/27271) by beachball)
27
+
28
+ ## [9.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.4.0)
29
+
30
+ Thu, 16 Mar 2023 14:36:57 GMT
31
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.3.2..@fluentui/react-dialog_v9.4.0)
32
+
33
+ ### Minor changes
34
+
35
+ - feat(DialogActions): Implment `fluid` prop ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by lingfangao@hotmail.com)
36
+ - Bump @fluentui/react-utilities to v9.7.1 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
37
+ - Bump @fluentui/react-context-selector to v9.1.14 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
38
+ - Bump @fluentui/react-aria to v9.3.14 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
39
+ - Bump @fluentui/react-tabster to v9.6.0 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
40
+ - Bump @fluentui/react-portal to v9.2.1 ([PR #27229](https://github.com/microsoft/fluentui/pull/27229) by beachball)
41
+
42
+ ### Patches
43
+
44
+ - fix(DialogBody): Remove `maxWidth` style ([PR #27230](https://github.com/microsoft/fluentui/pull/27230) by lingfangao@hotmail.com)
45
+
7
46
  ## [9.3.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.3.2)
8
47
 
9
- Wed, 15 Mar 2023 10:17:05 GMT
48
+ Wed, 15 Mar 2023 10:19:53 GMT
10
49
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.3.1..@fluentui/react-dialog_v9.3.2)
11
50
 
12
51
  ### Patches
package/dist/index.d.ts CHANGED
@@ -40,6 +40,11 @@ export declare type DialogActionsProps = ComponentProps<DialogActionsSlots> & {
40
40
  * @default 'end'
41
41
  */
42
42
  position?: DialogActionsPosition;
43
+ /**
44
+ * Makes the actions expand the entire width of the DialogBody
45
+ * @default false
46
+ */
47
+ fluid?: boolean;
43
48
  };
44
49
 
45
50
  export declare type DialogActionsSlots = {
@@ -49,9 +54,7 @@ export declare type DialogActionsSlots = {
49
54
  /**
50
55
  * State used in rendering DialogActions
51
56
  */
52
- export declare type DialogActionsState = ComponentState<DialogActionsSlots> & {
53
- position: DialogActionsPosition;
54
- };
57
+ export declare type DialogActionsState = ComponentState<DialogActionsSlots> & Pick<Required<DialogActionsProps>, 'position' | 'fluid'>;
55
58
 
56
59
  /**
57
60
  * The `DialogBody` is a container where the content of the dialog is rendered.
package/lib/Dialog.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/Dialog.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Dialog/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/Dialog.ts"],"sourcesContent":["export * from './components/Dialog/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogActions.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogActions/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/DialogActions.ts"],"sourcesContent":["export * from './components/DialogActions/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogBody.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogBody.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/DialogBody/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/DialogBody.ts"],"sourcesContent":["export * from './components/DialogBody/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogContent.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogContent/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/DialogContent.ts"],"sourcesContent":["export * from './components/DialogContent/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogSurface.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogSurface.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogSurface/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/DialogSurface.ts"],"sourcesContent":["export * from './components/DialogSurface/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTitle.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogTitle.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/DialogTitle/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/DialogTitle.ts"],"sourcesContent":["export * from './components/DialogTitle/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTrigger.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogTrigger.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogTrigger/index';\n"]}
1
+ {"version":3,"names":[],"sources":["../src/DialogTrigger.ts"],"sourcesContent":["export * from './components/DialogTrigger/index';\n"],"mappings":"AAAA,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialog_unstable","renderDialog_unstable","useDialogContextValues_unstable","Dialog","memo","props","state","contextValues","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/Dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,QAAQ,aAAa;AAChD,SAASC,qBAAqB,QAAQ,gBAAgB;AAEtD,SAASC,+BAA+B,QAAQ,0BAA0B;AAE1E;;;;;;;AAOA,OAAO,MAAMC,MAAM,gBAA0BJ,KAAK,CAACK,IAAI,CAACC,KAAK,IAAG;EAC9D,MAAMC,KAAK,GAAGN,kBAAkB,CAACK,KAAK,CAAC;EACvC,MAAME,aAAa,GAAGL,+BAA+B,CAACI,KAAK,CAAC;EAE5D,OAAOL,qBAAqB,CAACK,KAAK,EAAEC,aAAa,CAAC;AACpD,CAAC,CAAC;AAEFJ,MAAM,CAACK,WAAW,GAAG,QAAQ"}
1
+ {"version":3,"names":["React","useDialog_unstable","renderDialog_unstable","useDialogContextValues_unstable","Dialog","memo","props","state","contextValues","displayName"],"sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,kBAAkB,QAAQ;AACnC,SAASC,qBAAqB,QAAQ;AAEtC,SAASC,+BAA+B,QAAQ;AAEhD;;;;;;;AAOA,OAAO,MAAMC,MAAA,gBAAgCJ,KAAA,CAAMK,IAAI,CAACC,KAAA,IAAS;EAC/D,MAAMC,KAAA,GAAQN,kBAAA,CAAmBK,KAAA;EACjC,MAAME,aAAA,GAAgBL,+BAAA,CAAgCI,KAAA;EAEtD,OAAOL,qBAAA,CAAsBK,KAAA,EAAOC,aAAA;AACtC;AAEAJ,MAAA,CAAOK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface/DialogSurface.types';\n\nexport type DialogSlots = {};\n\nexport type DialogOpenChangeEvent = DialogOpenChangeData['event'];\n\nexport type DialogOpenChangeData =\n | {\n type: 'escapeKeyDown';\n open: boolean;\n event: React.KeyboardEvent<DialogSurfaceElement>;\n }\n | {\n type: 'backdropClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n }\n | {\n type: 'triggerClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n };\n\nexport type DialogModalType = 'modal' | 'non-modal' | 'alert';\n\n/**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\nexport type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;\n\nexport type DialogContextValues = {\n dialog: DialogContextValue;\n /**\n * dialogSurface context is provided by Dialog as false\n * to ensure components inside Dialog but outside DialogSurface will consume this as false\n */\n dialogSurface: DialogSurfaceContextValue;\n};\n\nexport type DialogProps = ComponentProps<Partial<DialogSlots>> & {\n /**\n * Dialog variations.\n *\n * `modal`: When this type of dialog is open, the rest of the page is dimmed out and cannot be interacted with.\n * The tab sequence is kept within the dialog and moving the focus outside\n * the dialog will imply closing it. This is the default type of the component.\n *\n * `non-modal`: When a non-modal dialog is open, the rest of the page is not dimmed out\n * and users can interact with the rest of the page.\n * This also implies that the tab focus can move outside the dialog when it reaches the last focusable element.\n *\n * `alert`: is a special type of modal dialogs that interrupts the user's workflow\n * to communicate an important message or ask for a decision.\n * Unlike a typical modal dialog, the user must take an action through the options given to dismiss the dialog,\n * and it cannot be dismissed through the dimmed background or escape key.\n *\n * @default modal\n */\n modalType?: DialogModalType;\n /**\n * Controls the open state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Default value for the uncontrolled open state of the dialog.\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\n onOpenChange?: DialogOpenChangeEventHandler;\n /**\n * Can contain two children including {@link DialogTrigger} and {@link DialogSurface}.\n * Alternatively can only contain {@link DialogSurface} if using trigger outside dialog, or controlling state.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n};\n\nexport type DialogState = ComponentState<DialogSlots> &\n DialogContextValue & {\n content: React.ReactNode;\n trigger: React.ReactNode;\n };\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/Dialog/Dialog.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface/DialogSurface.types';\n\nexport type DialogSlots = {};\n\nexport type DialogOpenChangeEvent = DialogOpenChangeData['event'];\n\nexport type DialogOpenChangeData =\n | {\n type: 'escapeKeyDown';\n open: boolean;\n event: React.KeyboardEvent<DialogSurfaceElement>;\n }\n | {\n type: 'backdropClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n }\n | {\n type: 'triggerClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n };\n\nexport type DialogModalType = 'modal' | 'non-modal' | 'alert';\n\n/**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\nexport type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;\n\nexport type DialogContextValues = {\n dialog: DialogContextValue;\n /**\n * dialogSurface context is provided by Dialog as false\n * to ensure components inside Dialog but outside DialogSurface will consume this as false\n */\n dialogSurface: DialogSurfaceContextValue;\n};\n\nexport type DialogProps = ComponentProps<Partial<DialogSlots>> & {\n /**\n * Dialog variations.\n *\n * `modal`: When this type of dialog is open, the rest of the page is dimmed out and cannot be interacted with.\n * The tab sequence is kept within the dialog and moving the focus outside\n * the dialog will imply closing it. This is the default type of the component.\n *\n * `non-modal`: When a non-modal dialog is open, the rest of the page is not dimmed out\n * and users can interact with the rest of the page.\n * This also implies that the tab focus can move outside the dialog when it reaches the last focusable element.\n *\n * `alert`: is a special type of modal dialogs that interrupts the user's workflow\n * to communicate an important message or ask for a decision.\n * Unlike a typical modal dialog, the user must take an action through the options given to dismiss the dialog,\n * and it cannot be dismissed through the dimmed background or escape key.\n *\n * @default modal\n */\n modalType?: DialogModalType;\n /**\n * Controls the open state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Default value for the uncontrolled open state of the dialog.\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\n onOpenChange?: DialogOpenChangeEventHandler;\n /**\n * Can contain two children including {@link DialogTrigger} and {@link DialogSurface}.\n * Alternatively can only contain {@link DialogSurface} if using trigger outside dialog, or controlling state.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n};\n\nexport type DialogState = ComponentState<DialogSlots> &\n DialogContextValue & {\n content: React.ReactNode;\n trigger: React.ReactNode;\n };\n"],"mappings":"AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC","sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","DialogProvider","DialogSurfaceProvider","renderDialog_unstable","state","contextValues","content","trigger","createElement","value","dialog","dialogSurface"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/renderDialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,EAAEC,qBAAqB,QAAQ,gBAAgB;AAGtE;;;AAGA,OAAO,MAAMC,qBAAqB,GAAGA,CAACC,KAAkB,EAAEC,aAAkC,KAAI;EAC9F,MAAM;IAAEC,OAAO;IAAEC;EAAO,CAAE,GAAGH,KAAK;EAElC,oBACEJ,KAAA,CAAAQ,aAAA,CAACP,cAAc;IAACQ,KAAK,EAAEJ,aAAa,CAACK;EAAM,gBACzCV,KAAA,CAAAQ,aAAA,CAACN,qBAAqB;IAACO,KAAK,EAAEJ,aAAa,CAACM;EAAa,GACtDJ,OAAO,EACPD,OAAO,CACc,CACT;AAErB,CAAC"}
1
+ {"version":3,"names":["React","DialogProvider","DialogSurfaceProvider","renderDialog_unstable","state","contextValues","content","trigger","createElement","value","dialog","dialogSurface"],"sources":["../../../src/components/Dialog/renderDialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,cAAc,EAAEC,qBAAqB,QAAQ;AAGtD;;;AAGA,OAAO,MAAMC,qBAAA,GAAwBA,CAACC,KAAA,EAAoBC,aAAA,KAAuC;EAC/F,MAAM;IAAEC,OAAA;IAASC;EAAO,CAAE,GAAGH,KAAA;EAE7B,oBACEJ,KAAA,CAAAQ,aAAA,CAACP,cAAA;IAAeQ,KAAA,EAAOJ,aAAA,CAAcK;kBACnCV,KAAA,CAAAQ,aAAA,CAACN,qBAAA;IAAsBO,KAAA,EAAOJ,aAAA,CAAcM;KACzCJ,OAAA,EACAD,OAAA;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useControllableState","useEventCallback","useId","useIsomorphicLayoutEffect","useHasParentContext","useDisableBodyScroll","useFocusFirstElement","DialogContext","useDialog_unstable","props","children","modalType","onOpenChange","inertTrapFocus","trigger","content","childrenToTriggerAndContent","open","setOpen","state","defaultState","defaultOpen","initialState","requestOpenChange","data","event","isDefaultPrevented","focusRef","disableBodyScroll","isBodyScrollLocked","Boolean","components","backdrop","dialogTitleId","isNestedDialog","dialogRef","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn","undefined"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/useDialog.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange, inertTrapFocus = false } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,yBAAyB,QAAQ,2BAA2B;AACpH,SAASC,mBAAmB,QAAQ,kCAAkC;AACtE,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,aAAa;AACxE,SAASC,aAAa,QAAQ,gBAAgB;AAI9C;;;;;;;;AAQA,OAAO,MAAMC,kBAAkB,GAAIC,KAAkB,IAAiB;EACpE,MAAM;IAAEC,QAAQ;IAAEC,SAAS,GAAG,OAAO;IAAEC,YAAY;IAAEC,cAAc,GAAG;EAAK,CAAE,GAAGJ,KAAK;EAErF,MAAM,CAACK,OAAO,EAAEC,OAAO,CAAC,GAAGC,2BAA2B,CAACN,QAAQ,CAAC;EAEhE,MAAM,CAACO,IAAI,EAAEC,OAAO,CAAC,GAAGlB,oBAAoB,CAAC;IAC3CmB,KAAK,EAAEV,KAAK,CAACQ,IAAI;IACjBG,YAAY,EAAEX,KAAK,CAACY,WAAW;IAC/BC,YAAY,EAAE;GACf,CAAC;EAEF,MAAMC,iBAAiB,GAAGtB,gBAAgB,CAAEuB,IAA0B,IAAI;IACxEZ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGY,IAAI,CAACC,KAAK,EAAED,IAAI,CAAC;IAEhC;IACA;IACA,IAAI,CAACA,IAAI,CAACC,KAAK,CAACC,kBAAkB,EAAE,EAAE;MACpCR,OAAO,CAACM,IAAI,CAACP,IAAI,CAAC;;EAEtB,CAAC,CAAC;EAEF,MAAMU,QAAQ,GAAGrB,oBAAoB,CAACW,IAAI,EAAEN,SAAS,CAAC;EACtD,MAAMiB,iBAAiB,GAAGvB,oBAAoB,EAAE;EAChD,MAAMwB,kBAAkB,GAAGC,OAAO,CAACb,IAAI,IAAIN,SAAS,KAAK,WAAW,CAAC;EAErER,yBAAyB,CAAC,MAAK;IAC7B,IAAI0B,kBAAkB,EAAE;MACtB,OAAOD,iBAAiB,EAAE;;EAE9B,CAAC,EAAE,CAACA,iBAAiB,EAAEC,kBAAkB,CAAC,CAAC;EAE3C,OAAO;IACLE,UAAU,EAAE;MACVC,QAAQ,EAAE;KACX;IACDnB,cAAc;IACdI,IAAI;IACJN,SAAS;IACTI,OAAO,EAAEE,IAAI,GAAGF,OAAO,GAAG,IAAI;IAC9BD,OAAO;IACPS,iBAAiB;IACjBU,aAAa,EAAE/B,KAAK,CAAC,eAAe,CAAC;IACrCgC,cAAc,EAAE9B,mBAAmB,CAACG,aAAa,CAAC;IAClD4B,SAAS,EAAER;GACZ;AACH,CAAC;AAED;;;AAGA,SAASX,2BAA2BA,CAClCN,QAAyB;EAEzB,MAAM0B,aAAa,GAAGrC,KAAK,CAACsC,QAAQ,CAACC,OAAO,CAAC5B,QAAQ,CAAyB;EAC9E,IAAI6B,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIL,aAAa,CAACM,MAAM,KAAK,CAAC,IAAIN,aAAa,CAACM,MAAM,KAAK,CAAC,EAAE;MAC5D;MACAC,OAAO,CAACC,IAAI,CACV,4DAA4D,GAC1D,4EAA4E,CAC/E;;;EAGL,QAAQR,aAAa,CAACM,MAAM;IAC1B;IACA,KAAK,CAAC;MACJ,OAAON,aAAqE;IAC9E;IACA,KAAK,CAAC;MACJ,OAAO,CAACS,SAAS,EAAET,aAAa,CAAC,CAAC,CAAC,CAAC;IACtC;IACA;MACE,OAAO,CAACS,SAAS,EAAEA,SAAS,CAAC;EAAC;AAEpC"}
1
+ {"version":3,"names":["React","useControllableState","useEventCallback","useId","useIsomorphicLayoutEffect","useHasParentContext","useDisableBodyScroll","useFocusFirstElement","DialogContext","useDialog_unstable","props","children","modalType","onOpenChange","inertTrapFocus","trigger","content","childrenToTriggerAndContent","open","setOpen","state","defaultState","defaultOpen","initialState","requestOpenChange","data","event","isDefaultPrevented","focusRef","disableBodyScroll","isBodyScrollLocked","Boolean","components","backdrop","dialogTitleId","isNestedDialog","dialogRef","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn","undefined"],"sources":["../../../src/components/Dialog/useDialog.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange, inertTrapFocus = false } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,yBAAyB,QAAQ;AACzF,SAASC,mBAAmB,QAAQ;AACpC,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ;AAC3D,SAASC,aAAa,QAAQ;AAI9B;;;;;;;;AAQA,OAAO,MAAMC,kBAAA,GAAsBC,KAAA,IAAoC;EACrE,MAAM;IAAEC,QAAA;IAAUC,SAAA,GAAY;IAASC,YAAA;IAAcC,cAAA,GAAiB;EAAK,CAAE,GAAGJ,KAAA;EAEhF,MAAM,CAACK,OAAA,EAASC,OAAA,CAAQ,GAAGC,2BAAA,CAA4BN,QAAA;EAEvD,MAAM,CAACO,IAAA,EAAMC,OAAA,CAAQ,GAAGlB,oBAAA,CAAqB;IAC3CmB,KAAA,EAAOV,KAAA,CAAMQ,IAAI;IACjBG,YAAA,EAAcX,KAAA,CAAMY,WAAW;IAC/BC,YAAA,EAAc;EAChB;EAEA,MAAMC,iBAAA,GAAoBtB,gBAAA,CAAkBuB,IAAA,IAA+B;IACzEZ,YAAA,aAAAA,YAAA,uBAAAA,YAAA,CAAeY,IAAA,CAAKC,KAAK,EAAED,IAAA;IAE3B;IACA;IACA,IAAI,CAACA,IAAA,CAAKC,KAAK,CAACC,kBAAkB,IAAI;MACpCR,OAAA,CAAQM,IAAA,CAAKP,IAAI;IACnB;EACF;EAEA,MAAMU,QAAA,GAAWrB,oBAAA,CAAqBW,IAAA,EAAMN,SAAA;EAC5C,MAAMiB,iBAAA,GAAoBvB,oBAAA;EAC1B,MAAMwB,kBAAA,GAAqBC,OAAA,CAAQb,IAAA,IAAQN,SAAA,KAAc;EAEzDR,yBAAA,CAA0B,MAAM;IAC9B,IAAI0B,kBAAA,EAAoB;MACtB,OAAOD,iBAAA;IACT;EACF,GAAG,CAACA,iBAAA,EAAmBC,kBAAA,CAAmB;EAE1C,OAAO;IACLE,UAAA,EAAY;MACVC,QAAA,EAAU;IACZ;IACAnB,cAAA;IACAI,IAAA;IACAN,SAAA;IACAI,OAAA,EAASE,IAAA,GAAOF,OAAA,GAAU,IAAI;IAC9BD,OAAA;IACAS,iBAAA;IACAU,aAAA,EAAe/B,KAAA,CAAM;IACrBgC,cAAA,EAAgB9B,mBAAA,CAAoBG,aAAA;IACpC4B,SAAA,EAAWR;EACb;AACF;AAEA;;;AAGA,SAASX,4BACPN,QAAyB,EACsC;EAC/D,MAAM0B,aAAA,GAAgBrC,KAAA,CAAMsC,QAAQ,CAACC,OAAO,CAAC5B,QAAA;EAC7C,IAAI6B,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC,IAAIL,aAAA,CAAcM,MAAM,KAAK,KAAKN,aAAA,CAAcM,MAAM,KAAK,GAAG;MAC5D;MACAC,OAAA,CAAQC,IAAI,CACV,+DACE;IAEN;EACF;EACA,QAAQR,aAAA,CAAcM,MAAM;IAC1B;IACA,KAAK;MACH,OAAON,aAAA;IACT;IACA,KAAK;MACH,OAAO,CAACS,SAAA,EAAWT,aAAa,CAAC,EAAE,CAAC;IACtC;IACA;MACE,OAAO,CAACS,SAAA,EAAWA,SAAA,CAAU;EAAA;AAEnC"}
@@ -9,9 +9,9 @@ export function useDialogContextValues_unstable(state) {
9
9
  requestOpenChange
10
10
  } = state;
11
11
  /**
12
- * This context is created with "@fluentui/react-context-selector",
13
- * there is no sense to memoize it
14
- */
12
+ * This context is created with "@fluentui/react-context-selector",
13
+ * there is no sense to memoize it
14
+ */
15
15
  const dialog = {
16
16
  open,
17
17
  modalType,
@@ -1 +1 @@
1
- {"version":3,"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","dialog","dialogSurface"],"sources":["../src/packages/react-components/react-dialog/src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const { modalType, open, dialogRef, dialogTitleId, isNestedDialog, inertTrapFocus, requestOpenChange } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"mappings":"AAGA,OAAM,SAAUA,+BAA+BA,CAACC,KAAkB;EAChE,MAAM;IAAEC,SAAS;IAAEC,IAAI;IAAEC,SAAS;IAAEC,aAAa;IAAEC,cAAc;IAAEC,cAAc;IAAEC;EAAiB,CAAE,GAAGP,KAAK;EAE9G;;;;EAIA,MAAMQ,MAAM,GAAuB;IACjCN,IAAI;IACJD,SAAS;IACTE,SAAS;IACTC,aAAa;IACbC,cAAc;IACdC,cAAc;IACdC;GACD;EAED,MAAME,aAAa,GAA8B,KAAK;EAEtD,OAAO;IAAED,MAAM;IAAEC;EAAa,CAAE;AAClC"}
1
+ {"version":3,"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","dialog","dialogSurface"],"sources":["../../../src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const { modalType, open, dialogRef, dialogTitleId, isNestedDialog, inertTrapFocus, requestOpenChange } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"mappings":"AAGA,OAAO,SAASA,gCAAgCC,KAAkB,EAAuB;EACvF,MAAM;IAAEC,SAAA;IAAWC,IAAA;IAAMC,SAAA;IAAWC,aAAA;IAAeC,cAAA;IAAgBC,cAAA;IAAgBC;EAAiB,CAAE,GAAGP,KAAA;EAEzG;;;;EAIA,MAAMQ,MAAA,GAA6B;IACjCN,IAAA;IACAD,SAAA;IACAE,SAAA;IACAC,aAAA;IACAC,cAAA;IACAC,cAAA;IACAC;EACF;EAEA,MAAME,aAAA,GAA2C,KAAK;EAEtD,OAAO;IAAED,MAAA;IAAQC;EAAc;AACjC"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogActions_unstable","renderDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHooks_unstable","DialogActions","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n const { useDialogActionsStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,+BAA+B,QAAQ,0BAA0B;AAG1E,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;;AAIA,OAAO,MAAMC,aAAa,gBAA4CL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGR,yBAAyB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAEnDL,+BAA+B,CAACM,KAAK,CAAC;EAEtC,MAAM;IAAEN,+BAA+B,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EAC3FM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,4BAA4B,CAACO,KAAK,CAAC;AAC5C,CAAC,CAAC;AAEFJ,aAAa,CAACM,WAAW,GAAG,eAAe"}
1
+ {"version":3,"names":["React","useDialogActions_unstable","renderDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHooks_unstable","DialogActions","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n const { useDialogActionsStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,4BAA4B,QAAQ;AAE7C;;;;AAIA,OAAO,MAAMC,aAAA,gBAAyDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQR,yBAAA,CAA0BM,KAAA,EAAOC,GAAA;EAE/CL,+BAAA,CAAgCM,KAAA;EAEhC,MAAM;IAAEN,+BAAA,EAAiCO;EAAe,CAAE,GAAGN,4BAAA;EAC7DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOP,4BAAA,CAA6BO,KAAA;AACtC;AAEAJ,aAAA,CAAcM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogActions/DialogActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogActionsSlots = {\n root: Slot<'div'>;\n};\n\nexport type DialogActionsPosition = 'start' | 'end';\n\n/**\n * DialogActions Props\n */\nexport type DialogActionsProps = ComponentProps<DialogActionsSlots> & {\n /**\n * defines the position on the dialog grid of the actions\n * @default 'end'\n */\n position?: DialogActionsPosition;\n};\n\n/**\n * State used in rendering DialogActions\n */\nexport type DialogActionsState = ComponentState<DialogActionsSlots> & {\n position: DialogActionsPosition;\n};\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogActions/DialogActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogActionsSlots = {\n root: Slot<'div'>;\n};\n\nexport type DialogActionsPosition = 'start' | 'end';\n\n/**\n * DialogActions Props\n */\nexport type DialogActionsProps = ComponentProps<DialogActionsSlots> & {\n /**\n * defines the position on the dialog grid of the actions\n * @default 'end'\n */\n position?: DialogActionsPosition;\n\n /**\n * Makes the actions expand the entire width of the DialogBody\n * @default false\n */\n fluid?: boolean;\n};\n\n/**\n * State used in rendering DialogActions\n */\nexport type DialogActionsState = ComponentState<DialogActionsSlots> &\n Pick<Required<DialogActionsProps>, 'position' | 'fluid'>;\n"],"mappings":"AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogActions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogActions/index.ts"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -9,8 +9,6 @@ export const renderDialogActions_unstable = state => {
9
9
  slotProps
10
10
  } = getSlots(state);
11
11
  // TODO Add additional slots in the appropriate place
12
- return /*#__PURE__*/React.createElement(slots.root, {
13
- ...slotProps.root
14
- });
12
+ return /*#__PURE__*/React.createElement(slots.root, slotProps.root);
15
13
  };
16
14
  //# sourceMappingURL=renderDialogActions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getSlots","renderDialogActions_unstable","state","slots","slotProps","createElement","root"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/renderDialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogActionsState, DialogActionsSlots } from './DialogActions.types';\n\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = (state: DialogActionsState) => {\n const { slots, slotProps } = getSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,4BAA4B,GAAIC,KAAyB,IAAI;EACxE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAqBE,KAAK,CAAC;EAEhE;EACA,oBAAOH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,EAAI;AAC3C,CAAC"}
1
+ {"version":3,"names":["React","getSlots","renderDialogActions_unstable","state","slots","slotProps","createElement","root"],"sources":["../../../src/components/DialogActions/renderDialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogActionsState, DialogActionsSlots } from './DialogActions.types';\n\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = (state: DialogActionsState) => {\n const { slots, slotProps } = getSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,4BAAA,GAAgCC,KAAA,IAA8B;EACzE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,QAAA,CAA6BE,KAAA;EAE1D;EACA,oBAAOH,KAAA,CAAAM,aAAA,CAACF,KAAA,CAAMG,IAAI,EAAKF,SAAA,CAAUE,IAAI;AACvC"}
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { getNativeElementProps } from '@fluentui/react-utilities';
2
3
  /**
3
4
  * Create the state required to render DialogActions.
@@ -10,7 +11,8 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
10
11
  */
11
12
  export const useDialogActions_unstable = (props, ref) => {
12
13
  const {
13
- position = 'end'
14
+ position = 'end',
15
+ fluid = false
14
16
  } = props;
15
17
  return {
16
18
  components: {
@@ -20,7 +22,8 @@ export const useDialogActions_unstable = (props, ref) => {
20
22
  ref,
21
23
  ...props
22
24
  }),
23
- position
25
+ position,
26
+ fluid
24
27
  };
25
28
  };
26
29
  //# sourceMappingURL=useDialogActions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getNativeElementProps","useDialogActions_unstable","props","ref","position","components","root"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/useDialogActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogActionsProps, DialogActionsState } from './DialogActions.types';\n\n/**\n * Create the state required to render DialogActions.\n *\n * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,\n * before being passed to renderDialogActions_unstable.\n *\n * @param props - props from this instance of DialogActions\n * @param ref - reference to root HTMLElement of DialogActions\n */\nexport const useDialogActions_unstable = (\n props: DialogActionsProps,\n ref: React.Ref<HTMLElement>,\n): DialogActionsState => {\n const { position = 'end' } = props;\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n position,\n };\n};\n"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAGjE;;;;;;;;;AASA,OAAO,MAAMC,yBAAyB,GAAGA,CACvCC,KAAyB,EACzBC,GAA2B,KACL;EACtB,MAAM;IAAEC,QAAQ,GAAG;EAAK,CAAE,GAAGF,KAAK;EAClC,OAAO;IACLG,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEN,qBAAqB,CAAC,KAAK,EAAE;MACjCG,GAAG;MACH,GAAGD;KACJ,CAAC;IACFE;GACD;AACH,CAAC"}
1
+ {"version":3,"names":["React","getNativeElementProps","useDialogActions_unstable","props","ref","position","fluid","components","root"],"sources":["../../../src/components/DialogActions/useDialogActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogActionsProps, DialogActionsState } from './DialogActions.types';\n\n/**\n * Create the state required to render DialogActions.\n *\n * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,\n * before being passed to renderDialogActions_unstable.\n *\n * @param props - props from this instance of DialogActions\n * @param ref - reference to root HTMLElement of DialogActions\n */\nexport const useDialogActions_unstable = (\n props: DialogActionsProps,\n ref: React.Ref<HTMLElement>,\n): DialogActionsState => {\n const { position = 'end', fluid = false } = props;\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n position,\n fluid,\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,QAAQ;AAGtC;;;;;;;;;AASA,OAAO,MAAMC,yBAAA,GAA4BA,CACvCC,KAAA,EACAC,GAAA,KACuB;EACvB,MAAM;IAAEC,QAAA,GAAW;IAAOC,KAAA,GAAQ;EAAK,CAAE,GAAGH,KAAA;EAC5C,OAAO;IACLI,UAAA,EAAY;MACVC,IAAA,EAAM;IACR;IACAA,IAAA,EAAMP,qBAAA,CAAsB,OAAO;MACjCG,GAAA;MACA,GAAGD;IACL;IACAE,QAAA;IACAC;EACF;AACF"}
@@ -26,6 +26,12 @@ const useStyles = /*#__PURE__*/__styles({
26
26
  Br312pm: "f14781pt",
27
27
  nk6f5a: "f13d374e",
28
28
  Bw0ie65: "f1fjo411"
29
+ },
30
+ fluidStart: {
31
+ Bw0ie65: "fiappcv"
32
+ },
33
+ fluidEnd: {
34
+ Br312pm: "f14781pt"
29
35
  }
30
36
  }, {
31
37
  d: [".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}", ".f1a7i8kp{justify-self:end;}", ".f11u0jfc{grid-row-start:actions-end;}", ".f1d6tb1o{grid-column-start:actions-end;}", ".f23awfp{grid-row-end:actions-end;}", ".fiappcv{grid-column-end:actions-end;}", ".fsxvdwy{justify-self:start;}", ".f1vnb230{grid-row-start:actions-start;}", ".f14781pt{grid-column-start:actions-start;}", ".f13d374e{grid-row-end:actions-start;}", ".f1fjo411{grid-column-end:actions-start;}"],
@@ -40,7 +46,7 @@ const useStyles = /*#__PURE__*/__styles({
40
46
  */
41
47
  export const useDialogActionsStyles_unstable = state => {
42
48
  const styles = useStyles();
43
- state.root.className = mergeClasses(dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.root.className);
49
+ state.root.className = mergeClasses(dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.fluid && state.position === 'start' && styles.fluidStart, state.fluid && state.position === 'end' && styles.fluidEnd, state.root.className);
44
50
  return state;
45
51
  };
46
52
  //# sourceMappingURL=useDialogActionsStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","ACTIONS_END_GRID_AREA","ACTIONS_START_GRID_AREA","MEDIA_QUERY_BREAKPOINT_SELECTOR","dialogActionsClassNames","root","useStyles","Bqenvij","B7ck84d","mc9l5x","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Ijaq50","Br312pm","nk6f5a","Bw0ie65","gridPositionStart","d","m","useDialogActionsStyles_unstable","state","styles","className","position"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogActions/useDialogActionsStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.root.className,\n );\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AAGrE,SACEC,UAAU,EACVC,qBAAqB,EACrBC,uBAAuB,EACvBC,+BAA+B,QAC1B,0BAA0B;AAEjC,OAAO,MAAMC,uBAAuB,GAAuC;EACzEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGT,QAAA;EAAAQ,IAAA;IAAAE,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,eAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,iBAAA;IAAAL,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAE,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,EAmBhB;AAEF;;;AAGA,OAAO,MAAMC,+BAA+B,GAAIC,KAAyB,IAAwB;EAC/F,MAAMC,MAAM,GAAGnB,SAAS,EAAE;EAC1BkB,KAAK,CAACnB,IAAI,CAACqB,SAAS,GAAG5B,YAAY,CACjCM,uBAAuB,CAACC,IAAI,EAC5BoB,MAAM,CAACpB,IAAI,EACXmB,KAAK,CAACG,QAAQ,KAAK,OAAO,IAAIF,MAAM,CAACL,iBAAiB,EACtDI,KAAK,CAACG,QAAQ,KAAK,KAAK,IAAIF,MAAM,CAACX,eAAe,EAClDU,KAAK,CAACnB,IAAI,CAACqB,SAAS,CACrB;EACD,OAAOF,KAAK;AACd,CAAC"}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","ACTIONS_END_GRID_AREA","ACTIONS_START_GRID_AREA","MEDIA_QUERY_BREAKPOINT_SELECTOR","dialogActionsClassNames","root","useStyles","Bqenvij","B7ck84d","mc9l5x","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Ijaq50","Br312pm","nk6f5a","Bw0ie65","gridPositionStart","fluidStart","fluidEnd","d","m","useDialogActionsStyles_unstable","state","styles","className","position","fluid"],"sources":["../../../src/components/DialogActions/useDialogActionsStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n fluidStart: {\n gridColumnEnd: ACTIONS_END_GRID_AREA,\n },\n fluidEnd: {\n gridColumnStart: ACTIONS_START_GRID_AREA,\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.fluid && state.position === 'start' && styles.fluidStart,\n state.fluid && state.position === 'end' && styles.fluidEnd,\n state.root.className,\n );\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SACEC,UAAU,EACVC,qBAAqB,EACrBC,uBAAuB,EACvBC,+BAA+B,QAC1B;AAEP,OAAO,MAAMC,uBAAA,GAA8D;EACzEC,IAAA,EAAM;AACR;AAEA,MAAMC,SAAA,gBAAYT,QAAA;EAAAQ,IAAA;IAAAE,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,eAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,iBAAA;IAAAL,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAE,UAAA;IAAAF,OAAA;EAAA;EAAAG,QAAA;IAAAL,OAAA;EAAA;AAAA;EAAAM,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,EAyBlB;AAEA;;;AAGA,OAAO,MAAMC,+BAAA,GAAmCC,KAAA,IAAkD;EAChG,MAAMC,MAAA,GAASrB,SAAA;EACfoB,KAAA,CAAMrB,IAAI,CAACuB,SAAS,GAAG9B,YAAA,CACrBM,uBAAA,CAAwBC,IAAI,EAC5BsB,MAAA,CAAOtB,IAAI,EACXqB,KAAA,CAAMG,QAAQ,KAAK,WAAWF,MAAA,CAAOP,iBAAiB,EACtDM,KAAA,CAAMG,QAAQ,KAAK,SAASF,MAAA,CAAOb,eAAe,EAClDY,KAAA,CAAMI,KAAK,IAAIJ,KAAA,CAAMG,QAAQ,KAAK,WAAWF,MAAA,CAAON,UAAU,EAC9DK,KAAA,CAAMI,KAAK,IAAIJ,KAAA,CAAMG,QAAQ,KAAK,SAASF,MAAA,CAAOL,QAAQ,EAC1DI,KAAA,CAAMrB,IAAI,CAACuB,SAAS;EAEtB,OAAOF,KAAA;AACT"}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogBody_unstable","renderDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyleHooks_unstable","DialogBody","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogBody/DialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n\n const { useDialogBodyStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,4BAA4B,QAAQ,uBAAuB;AAGpE,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;;AAIA,OAAO,MAAMC,UAAU,gBAAyCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGR,sBAAsB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAEhDL,4BAA4B,CAACM,KAAK,CAAC;EAEnC,MAAM;IAAEN,4BAA4B,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACxFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOP,yBAAyB,CAACO,KAAK,CAAC;AACzC,CAAC,CAAC;AAEFJ,UAAU,CAACM,WAAW,GAAG,YAAY"}
1
+ {"version":3,"names":["React","useDialogBody_unstable","renderDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyleHooks_unstable","DialogBody","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/DialogBody/DialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n\n const { useDialogBodyStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAG7C,SAASC,4BAA4B,QAAQ;AAE7C;;;;AAIA,OAAO,MAAMC,UAAA,gBAAmDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC/F,MAAMC,KAAA,GAAQR,sBAAA,CAAuBM,KAAA,EAAOC,GAAA;EAE5CL,4BAAA,CAA6BM,KAAA;EAE7B,MAAM;IAAEN,4BAAA,EAA8BO;EAAe,CAAE,GAAGN,4BAAA;EAC1DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOP,yBAAA,CAA0BO,KAAA;AACnC;AAEAJ,UAAA,CAAWM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogBody.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogBody/DialogBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogBody Props\n */\nexport type DialogBodyProps = ComponentProps<DialogBodySlots> & {};\n\n/**\n * State used in rendering DialogBody\n */\nexport type DialogBodyState = ComponentState<DialogBodySlots>;\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogBody/DialogBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogBody Props\n */\nexport type DialogBodyProps = ComponentProps<DialogBodySlots> & {};\n\n/**\n * State used in rendering DialogBody\n */\nexport type DialogBodyState = ComponentState<DialogBodySlots>;\n"],"mappings":"AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogBody/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles';\n"]}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogBody/index.ts"],"sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -9,8 +9,6 @@ export const renderDialogBody_unstable = state => {
9
9
  slotProps
10
10
  } = getSlots(state);
11
11
  // TODO Add additional slots in the appropriate place
12
- return /*#__PURE__*/React.createElement(slots.root, {
13
- ...slotProps.root
14
- });
12
+ return /*#__PURE__*/React.createElement(slots.root, slotProps.root);
15
13
  };
16
14
  //# sourceMappingURL=renderDialogBody.js.map