@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
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogBody.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogBody/useDialogBody.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;;OAQG;IACI,IAAM,sBAAsB,GAAG,UAAC,KAAsB,EAAE,GAA2B;;QACxF,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YACD,IAAI,EAAE,uCAAqB,CAAC,MAAA,KAAK,CAAC,EAAE,mCAAI,KAAK,qBAC3C,GAAG,KAAA,IACA,KAAK,EACR;SACH,CAAC;IACJ,CAAC,CAAC;IAVW,QAAA,sBAAsB,0BAUjC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogBodyProps, DialogBodyState } from './DialogBody.types';\n\n/**\n * Create the state required to render DialogBody.\n *\n * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,\n * before being passed to renderDialogBody_unstable.\n *\n * @param props - props from this instance of DialogBody\n * @param ref - reference to root HTMLElement of DialogBody\n */\nexport const useDialogBody_unstable = (props: DialogBodyProps, ref: React.Ref<HTMLElement>): DialogBodyState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps(props.as ?? 'div', {\n ref,\n ...props,\n }),\n };\n};\n"]}
@@ -1,31 +0,0 @@
1
- define(["require", "exports", "tslib", "@griffel/react", "../../contexts"], function (require, exports, tslib_1, react_1, contexts_1) {
2
- "use strict";
3
- var _a;
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.useDialogBodyStyles_unstable = exports.dialogBodyClassNames = void 0;
6
- exports.dialogBodyClassNames = {
7
- root: 'fui-DialogBody',
8
- };
9
- /**
10
- * Styles for the root slot
11
- */
12
- var useStyles = react_1.makeStyles({
13
- root: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ display: 'grid', '&::backdrop': {
14
- backgroundColor: 'rgba(0, 0, 0, 0.4)',
15
- }, width: "100%", height: 'fit-content', maxWidth: '600px', maxHeight: "calc(100vh - 2 * " + contexts_1.SURFACE_PADDING + ")", boxSizing: 'border-box', gridTemplateRows: 'auto 1fr auto', gridTemplateColumns: '1fr 1fr auto', gridTemplateAreas: "\n \"" + contexts_1.TITLE_GRID_AREA + " " + contexts_1.TITLE_GRID_AREA + " " + contexts_1.TITLE_ACTION_GRID_AREA + "\"\n \"" + contexts_1.CONTENT_GRID_AREA + " " + contexts_1.CONTENT_GRID_AREA + " " + contexts_1.CONTENT_GRID_AREA + "\"\n \"" + contexts_1.ACTIONS_START_GRID_AREA + " " + contexts_1.ACTIONS_END_GRID_AREA + " " + contexts_1.ACTIONS_END_GRID_AREA + "\"\n " }, react_1.shorthands.overflow('unset')), react_1.shorthands.gap(contexts_1.DIALOG_GAP)), (_a = {}, _a[contexts_1.MEDIA_QUERY_BREAKPOINT_SELECTOR] = {
16
- maxWidth: '100vw',
17
- gridTemplateRows: 'auto 1fr auto auto',
18
- gridTemplateAreas: "\n \"" + contexts_1.TITLE_GRID_AREA + " " + contexts_1.TITLE_GRID_AREA + " " + contexts_1.TITLE_ACTION_GRID_AREA + "\"\n \"" + contexts_1.CONTENT_GRID_AREA + " " + contexts_1.CONTENT_GRID_AREA + " " + contexts_1.CONTENT_GRID_AREA + "\"\n \"" + contexts_1.ACTIONS_START_GRID_AREA + " " + contexts_1.ACTIONS_START_GRID_AREA + " " + contexts_1.ACTIONS_START_GRID_AREA + "\"\n \"" + contexts_1.ACTIONS_END_GRID_AREA + " " + contexts_1.ACTIONS_END_GRID_AREA + " " + contexts_1.ACTIONS_END_GRID_AREA + "\"\n ",
19
- }, _a)),
20
- });
21
- /**
22
- * Apply styling to the DialogBody slots based on the state
23
- */
24
- var useDialogBodyStyles_unstable = function (state) {
25
- var styles = useStyles();
26
- state.root.className = react_1.mergeClasses(exports.dialogBodyClassNames.root, styles.root, state.root.className);
27
- return state;
28
- };
29
- exports.useDialogBodyStyles_unstable = useDialogBodyStyles_unstable;
30
- });
31
- //# sourceMappingURL=useDialogBodyStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogBodyStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogBody/useDialogBodyStyles.ts"],"names":[],"mappings":";;;;;IAca,QAAA,oBAAoB,GAAoC;QACnE,IAAI,EAAE,gBAAgB;KACvB,CAAC;IAEF;;OAEG;IACH,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,uDACF,OAAO,EAAE,MAAM,EACf,aAAa,EAAE;gBACb,eAAe,EAAE,oBAAoB;aACtC,EACD,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,sBAAoB,0BAAe,MAAG,EACjD,SAAS,EAAE,YAAY,EACvB,gBAAgB,EAAE,eAAe,EACjC,mBAAmB,EAAE,cAAc,EACnC,iBAAiB,EAAE,aAChB,0BAAe,SAAI,0BAAe,SAAI,iCAAsB,kBAC5D,4BAAiB,SAAI,4BAAiB,SAAI,4BAAiB,kBAC3D,kCAAuB,SAAI,gCAAqB,SAAI,gCAAqB,aAC3E,IACE,kBAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,GAC5B,kBAAU,CAAC,GAAG,CAAC,qBAAU,CAAC,gBAC5B,0CAA+B,IAAG;YACjC,QAAQ,EAAE,OAAO;YACjB,gBAAgB,EAAE,oBAAoB;YACtC,iBAAiB,EAAE,iBACd,0BAAe,SAAI,0BAAe,SAAI,iCAAsB,sBAC5D,4BAAiB,SAAI,4BAAiB,SAAI,4BAAiB,sBAC3D,kCAAuB,SAAI,kCAAuB,SAAI,kCAAuB,sBAC7E,gCAAqB,SAAI,gCAAqB,SAAI,gCAAqB,eAC3E;SACF,MACF;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,4BAA4B,GAAG,UAAC,KAAsB;QACjE,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CAAC,4BAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAElG,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IALW,QAAA,4BAA4B,gCAKvC","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogBodySlots, DialogBodyState } from './DialogBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n CONTENT_GRID_AREA,\n DIALOG_GAP,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n SURFACE_PADDING,\n TITLE_ACTION_GRID_AREA,\n TITLE_GRID_AREA,\n} from '../../contexts';\n\nexport const dialogBodyClassNames: SlotClassNames<DialogBodySlots> = {\n root: 'fui-DialogBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'grid',\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n },\n width: `100%`,\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: `calc(100vh - 2 * ${SURFACE_PADDING})`,\n boxSizing: 'border-box',\n gridTemplateRows: 'auto 1fr auto',\n gridTemplateColumns: '1fr 1fr auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n ...shorthands.overflow('unset'),\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA}\"\n \"${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n },\n },\n});\n\n/**\n * Apply styling to the DialogBody slots based on the state\n */\nexport const useDialogBodyStyles_unstable = (state: DialogBodyState): DialogBodyState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogBodyClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"]}
@@ -1,18 +0,0 @@
1
- define(["require", "exports", "react", "./useDialogContent", "./renderDialogContent", "./useDialogContentStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, useDialogContent_1, renderDialogContent_1, useDialogContentStyles_1, react_shared_contexts_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DialogContent = void 0;
5
- /**
6
- * The `DialogContent` is a container where the content of the dialog is rendered.
7
- * Apart from styling, this component does not have other behavior.
8
- */
9
- exports.DialogContent = React.forwardRef(function (props, ref) {
10
- var state = useDialogContent_1.useDialogContent_unstable(props, ref);
11
- useDialogContentStyles_1.useDialogContentStyles_unstable(state);
12
- var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useDialogContentStyles_unstable;
13
- useCustomStyles(state);
14
- return renderDialogContent_1.renderDialogContent_unstable(state);
15
- });
16
- exports.DialogContent.displayName = 'DialogContent';
17
- });
18
- //# sourceMappingURL=DialogContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DialogContent.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogContent/DialogContent.tsx"],"names":[],"mappings":";;;;IAQA;;;OAGG;IACU,QAAA,aAAa,GAA4C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAChG,IAAM,KAAK,GAAG,4CAAyB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEpD,wDAA+B,CAAC,KAAK,CAAC,CAAC;QAE/B,IAAiC,eAAe,GAAK,oDAA4B,EAAE,gCAAnC,CAAoC;QAC5F,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,kDAA4B,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import * as React from 'react';\nimport { useDialogContent_unstable } from './useDialogContent';\nimport { renderDialogContent_unstable } from './renderDialogContent';\nimport { useDialogContentStyles_unstable } from './useDialogContentStyles';\nimport type { DialogContentProps } from './DialogContent.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogContent` 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 DialogContent: ForwardRefComponent<DialogContentProps> = React.forwardRef((props, ref) => {\n const state = useDialogContent_unstable(props, ref);\n\n useDialogContentStyles_unstable(state);\n\n const { useDialogContentStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogContent_unstable(state);\n});\n\nDialogContent.displayName = 'DialogContent';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=DialogContent.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DialogContent.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogContent/DialogContent.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogContentSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogContent Props\n */\nexport type DialogContentProps = ComponentProps<DialogContentSlots>;\n\n/**\n * State used in rendering DialogContent\n */\nexport type DialogContentState = ComponentState<DialogContentSlots>;\n"]}
@@ -1,10 +0,0 @@
1
- define(["require", "exports", "tslib", "./DialogContent", "./DialogContent.types", "./renderDialogContent", "./useDialogContent", "./useDialogContentStyles"], function (require, exports, tslib_1, DialogContent_1, DialogContent_types_1, renderDialogContent_1, useDialogContent_1, useDialogContentStyles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(DialogContent_1, exports);
5
- tslib_1.__exportStar(DialogContent_types_1, exports);
6
- tslib_1.__exportStar(renderDialogContent_1, exports);
7
- tslib_1.__exportStar(useDialogContent_1, exports);
8
- tslib_1.__exportStar(useDialogContentStyles_1, exports);
9
- });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogContent/index.ts"],"names":[],"mappings":";;;IAAA,+CAAgC;IAChC,qDAAsC;IACtC,qDAAsC;IACtC,kDAAmC;IACnC,wDAAyC","sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles';\n"]}
@@ -1,14 +0,0 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.renderDialogContent_unstable = void 0;
5
- /**
6
- * Render the final JSX of DialogContent
7
- */
8
- var renderDialogContent_unstable = function (state) {
9
- var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
- return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root));
11
- };
12
- exports.renderDialogContent_unstable = renderDialogContent_unstable;
13
- });
14
- //# sourceMappingURL=renderDialogContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDialogContent.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogContent/renderDialogContent.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,4BAA4B,GAAG,UAAC,KAAyB;QAC9D,IAAA,KAAuB,0BAAQ,CAAqB,KAAK,CAAC,EAAxD,KAAK,WAAA,EAAE,SAAS,eAAwC,CAAC;QAEjE,OAAO,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CAAC;IAC5C,CAAC,CAAC;IAJW,QAAA,4BAA4B,gCAIvC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\n\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = (state: DialogContentState) => {\n const { slots, slotProps } = getSlots<DialogContentSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -1,25 +0,0 @@
1
- define(["require", "exports", "tslib", "@fluentui/react-utilities"], function (require, exports, tslib_1, react_utilities_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useDialogContent_unstable = void 0;
5
- /**
6
- * Create the state required to render DialogBody.
7
- *
8
- * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,
9
- * before being passed to renderDialogBody_unstable.
10
- *
11
- * @param props - props from this instance of DialogBody
12
- * @param ref - reference to root HTMLElement of DialogBody
13
- */
14
- var useDialogContent_unstable = function (props, ref) {
15
- var _a;
16
- return {
17
- components: {
18
- root: 'div',
19
- },
20
- root: react_utilities_1.getNativeElementProps((_a = props.as) !== null && _a !== void 0 ? _a : 'div', tslib_1.__assign({ ref: ref }, props)),
21
- };
22
- };
23
- exports.useDialogContent_unstable = useDialogContent_unstable;
24
- });
25
- //# sourceMappingURL=useDialogContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogContent.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogContent/useDialogContent.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;;OAQG;IACI,IAAM,yBAAyB,GAAG,UACvC,KAAyB,EACzB,GAA2B;;QAE3B,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YACD,IAAI,EAAE,uCAAqB,CAAC,MAAA,KAAK,CAAC,EAAE,mCAAI,KAAK,qBAC3C,GAAG,KAAA,IACA,KAAK,EACR;SACH,CAAC;IACJ,CAAC,CAAC;IAbW,QAAA,yBAAyB,6BAapC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { DialogContentProps, DialogContentState } from './DialogContent.types';\n\n/**\n * Create the state required to render DialogBody.\n *\n * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,\n * before being passed to renderDialogBody_unstable.\n *\n * @param props - props from this instance of DialogBody\n * @param ref - reference to root HTMLElement of DialogBody\n */\nexport const useDialogContent_unstable = (\n props: DialogContentProps,\n ref: React.Ref<HTMLElement>,\n): DialogContentState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps(props.as ?? 'div', {\n ref,\n ...props,\n }),\n };\n};\n"]}
@@ -1,24 +0,0 @@
1
- define(["require", "exports", "tslib", "@griffel/react", "../../contexts/constants", "@fluentui/react-theme"], function (require, exports, tslib_1, react_1, constants_1, react_theme_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useDialogContentStyles_unstable = exports.dialogContentClassNames = void 0;
5
- exports.dialogContentClassNames = {
6
- root: 'fui-DialogContent',
7
- };
8
- /**
9
- * Styles for the root slot
10
- */
11
- var useStyles = react_1.makeStyles({
12
- root: tslib_1.__assign(tslib_1.__assign({ width: '100%', height: '100%', overflowY: 'auto', minHeight: '32px', boxSizing: 'border-box' }, react_1.shorthands.gridArea(constants_1.CONTENT_GRID_AREA)), react_theme_1.typographyStyles.body1),
13
- });
14
- /**
15
- * Apply styling to the DialogContent slots based on the state
16
- */
17
- var useDialogContentStyles_unstable = function (state) {
18
- var styles = useStyles();
19
- state.root.className = react_1.mergeClasses(exports.dialogContentClassNames.root, styles.root, state.root.className);
20
- return state;
21
- };
22
- exports.useDialogContentStyles_unstable = useDialogContentStyles_unstable;
23
- });
24
- //# sourceMappingURL=useDialogContentStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogContentStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogContent/useDialogContentStyles.ts"],"names":[],"mappings":";;;;IAMa,QAAA,uBAAuB,GAAuC;QACzE,IAAI,EAAE,mBAAmB;KAC1B,CAAC;IAEF;;OAEG;IACH,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,sCACF,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,YAAY,IACpB,kBAAU,CAAC,QAAQ,CAAC,6BAAiB,CAAC,GACtC,8BAAgB,CAAC,KAAK,CAC1B;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,+BAA+B,GAAG,UAAC,KAAyB;QACvE,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CAAC,+BAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrG,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAJW,QAAA,+BAA+B,mCAI1C","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.gridArea(CONTENT_GRID_AREA),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"]}
@@ -1,19 +0,0 @@
1
- define(["require", "exports", "react", "./useDialogSurface", "./renderDialogSurface", "./useDialogSurfaceStyles", "./useDialogSurfaceContextValues", "@fluentui/react-shared-contexts"], function (require, exports, React, useDialogSurface_1, renderDialogSurface_1, useDialogSurfaceStyles_1, useDialogSurfaceContextValues_1, react_shared_contexts_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DialogSurface = void 0;
5
- /**
6
- * DialogSurface component represents the visual part of a `Dialog` as a whole,
7
- * it contains everything that should be visible.
8
- */
9
- exports.DialogSurface = React.forwardRef(function (props, ref) {
10
- var state = useDialogSurface_1.useDialogSurface_unstable(props, ref);
11
- var contextValues = useDialogSurfaceContextValues_1.useDialogSurfaceContextValues_unstable(state);
12
- useDialogSurfaceStyles_1.useDialogSurfaceStyles_unstable(state);
13
- var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useDialogSurfaceStyles_unstable;
14
- useCustomStyles(state);
15
- return renderDialogSurface_1.renderDialogSurface_unstable(state, contextValues);
16
- });
17
- exports.DialogSurface.displayName = 'DialogSurface';
18
- });
19
- //# sourceMappingURL=DialogSurface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DialogSurface.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/DialogSurface.tsx"],"names":[],"mappings":";;;;IASA;;;OAGG;IACU,QAAA,aAAa,GAA4C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAChG,IAAM,KAAK,GAAG,4CAAyB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACpD,IAAM,aAAa,GAAG,sEAAsC,CAAC,KAAK,CAAC,CAAC;QAEpE,wDAA+B,CAAC,KAAK,CAAC,CAAC;QAE/B,IAAiC,eAAe,GAAK,oDAA4B,EAAE,gCAAnC,CAAoC;QAC5F,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,kDAA4B,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface: ForwardRefComponent<DialogSurfaceProps> = React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n\n useDialogSurfaceStyles_unstable(state);\n\n const { useDialogSurfaceStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=DialogSurface.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DialogSurface.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/DialogSurface.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DialogSurfaceContextValue } from '../../contexts';\n\nexport type DialogSurfaceSlots = {\n /**\n * Dimmed background of dialog.\n * The default backdrop is rendered as a `<div>` with styling.\n * This slot expects a `<div>` element which will replace the default backdrop.\n * The backdrop should have `aria-hidden=\"true\"`.\n *\n * By default if `DialogSurface` is `<dialog>` element the backdrop is ignored,\n * since native `<dialog>` element supports [::backdrop](https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop)\n */\n backdrop?: Slot<'div'>;\n root: Slot<'div'>;\n};\n\n/**\n * Union between all possible semantic element that represent a DialogSurface\n */\nexport type DialogSurfaceElement = HTMLDialogElement | HTMLDivElement;\n\n/** @internal */\nexport type DialogSurfaceElementIntersection = HTMLDialogElement & HTMLDivElement;\n\n/**\n * DialogSurface Props\n *\n * Omits basic types from native `dialog` (`open`, `onCancel` and `onClose`)\n * to ensure `onOpenChange`, `open` and `defaultOpen` from `Dialog` is used instead\n */\nexport type DialogSurfaceProps = Omit<ComponentProps<DialogSurfaceSlots>, 'open' | 'onCancel' | 'onClose'>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots>;\n"]}
@@ -1,10 +0,0 @@
1
- define(["require", "exports", "tslib", "./DialogSurface", "./DialogSurface.types", "./renderDialogSurface", "./useDialogSurface", "./useDialogSurfaceStyles"], function (require, exports, tslib_1, DialogSurface_1, DialogSurface_types_1, renderDialogSurface_1, useDialogSurface_1, useDialogSurfaceStyles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(DialogSurface_1, exports);
5
- tslib_1.__exportStar(DialogSurface_types_1, exports);
6
- tslib_1.__exportStar(renderDialogSurface_1, exports);
7
- tslib_1.__exportStar(useDialogSurface_1, exports);
8
- tslib_1.__exportStar(useDialogSurfaceStyles_1, exports);
9
- });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/index.ts"],"names":[],"mappings":";;;IAAA,+CAAgC;IAChC,qDAAsC;IACtC,qDAAsC;IACtC,kDAAmC;IACnC,wDAAyC","sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n"]}
@@ -1,17 +0,0 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "../../contexts", "@fluentui/react-portal"], function (require, exports, tslib_1, React, react_utilities_1, contexts_1, react_portal_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.renderDialogSurface_unstable = void 0;
5
- /**
6
- * Render the final JSX of DialogSurface
7
- */
8
- var renderDialogSurface_unstable = function (state, contextValues) {
9
- var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
- return (React.createElement(react_portal_1.Portal, null,
11
- slots.backdrop && React.createElement(slots.backdrop, tslib_1.__assign({}, slotProps.backdrop)),
12
- React.createElement(contexts_1.DialogSurfaceProvider, { value: contextValues.dialogSurface },
13
- React.createElement(slots.root, tslib_1.__assign({}, slotProps.root)))));
14
- };
15
- exports.renderDialogSurface_unstable = renderDialogSurface_unstable;
16
- });
17
- //# sourceMappingURL=renderDialogSurface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDialogSurface.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/renderDialogSurface.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACI,IAAM,4BAA4B,GAAG,UAAC,KAAyB,EAAE,aAAyC;QACzG,IAAA,KAAuB,0BAAQ,CAAqB,KAAK,CAAC,EAAxD,KAAK,WAAA,EAAE,SAAS,eAAwC,CAAC;QAEjE,OAAO,CACL,oBAAC,qBAAM;YACJ,KAAK,CAAC,QAAQ,IAAI,oBAAC,KAAK,CAAC,QAAQ,uBAAK,SAAS,CAAC,QAAQ,EAAI;YAC7D,oBAAC,gCAAqB,IAAC,KAAK,EAAE,aAAa,CAAC,aAAa;gBACvD,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CACZ,CACjB,CACV,CAAC;IACJ,CAAC,CAAC;IAXW,QAAA,4BAA4B,gCAWvC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n const { slots, slotProps } = getSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal>\n {slots.backdrop && <slots.backdrop {...slotProps.backdrop} />}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <slots.root {...slotProps.root} />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"]}
@@ -1,70 +0,0 @@
1
- define(["require", "exports", "tslib", "@fluentui/react-utilities", "../../contexts", "../../utils", "@fluentui/react-tabster"], function (require, exports, tslib_1, react_utilities_1, contexts_1, utils_1, react_tabster_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useDialogSurface_unstable = void 0;
5
- /**
6
- * Create the state required to render DialogSurface.
7
- *
8
- * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,
9
- * before being passed to renderDialogSurface_unstable.
10
- *
11
- * @param props - props from this instance of DialogSurface
12
- * @param ref - reference to root HTMLElement of DialogSurface
13
- */
14
- var useDialogSurface_unstable = function (props, ref) {
15
- var backdrop = props.backdrop, as = props.as;
16
- var modalType = contexts_1.useDialogContext_unstable(function (ctx) { return ctx.modalType; });
17
- var inertTrapFocus = contexts_1.useDialogContext_unstable(function (ctx) { return ctx.inertTrapFocus; });
18
- var dialogRef = contexts_1.useDialogContext_unstable(function (ctx) { return ctx.dialogRef; });
19
- var open = contexts_1.useDialogContext_unstable(function (ctx) { return ctx.open; });
20
- var requestOpenChange = contexts_1.useDialogContext_unstable(function (ctx) { return ctx.requestOpenChange; });
21
- var dialogTitleID = contexts_1.useDialogContext_unstable(function (ctx) { return ctx.dialogTitleId; });
22
- var handledBackdropClick = react_utilities_1.useEventCallback(function (event) {
23
- var _a, _b;
24
- if (react_utilities_1.isResolvedShorthand(props.backdrop)) {
25
- (_b = (_a = props.backdrop).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
26
- }
27
- if (modalType === 'modal' && !event.isDefaultPrevented()) {
28
- requestOpenChange({
29
- event: event,
30
- open: false,
31
- type: 'backdropClick',
32
- });
33
- }
34
- });
35
- var handleKeyDown = react_utilities_1.useEventCallback(function (event) {
36
- var _a;
37
- (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, event);
38
- if (utils_1.isEscapeKeyDismiss(event, modalType)) {
39
- requestOpenChange({
40
- event: event,
41
- open: false,
42
- type: 'escapeKeyDown',
43
- });
44
- // stop propagation to avoid conflicting with other elements that listen for `Escape`
45
- // e,g: nested Dialog, Popover, Menu and Tooltip
46
- event.stopPropagation();
47
- }
48
- });
49
- var modalAttributes = react_tabster_1.useModalAttributes({
50
- trapFocus: modalType !== 'non-modal',
51
- legacyTrapFocus: !inertTrapFocus,
52
- }).modalAttributes;
53
- return {
54
- components: {
55
- backdrop: 'div',
56
- root: 'div',
57
- },
58
- backdrop: react_utilities_1.resolveShorthand(backdrop, {
59
- required: open && modalType !== 'non-modal',
60
- defaultProps: {
61
- 'aria-hidden': 'true',
62
- onClick: handledBackdropClick,
63
- },
64
- }),
65
- root: react_utilities_1.getNativeElementProps(as !== null && as !== void 0 ? as : 'div', tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ tabIndex: -1, 'aria-modal': modalType !== 'non-modal', role: modalType === 'alert' ? 'alertdialog' : 'dialog', 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID }, props), modalAttributes), { onKeyDown: handleKeyDown, ref: react_utilities_1.useMergedRefs(ref, dialogRef) })),
66
- };
67
- };
68
- exports.useDialogSurface_unstable = useDialogSurface_unstable;
69
- });
70
- //# sourceMappingURL=useDialogSurface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogSurface.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurface.ts"],"names":[],"mappings":";;;;IAkBA;;;;;;;;OAQG;IACI,IAAM,yBAAyB,GAAG,UACvC,KAAyB,EACzB,GAAoC;QAE5B,IAAA,QAAQ,GAAS,KAAK,SAAd,EAAE,EAAE,GAAK,KAAK,GAAV,CAAW;QAC/B,IAAM,SAAS,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,SAAS,EAAb,CAAa,CAAC,CAAC;QAClE,IAAM,cAAc,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,cAAc,EAAlB,CAAkB,CAAC,CAAC;QAC5E,IAAM,SAAS,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,SAAS,EAAb,CAAa,CAAC,CAAC;QAClE,IAAM,IAAI,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,IAAI,EAAR,CAAQ,CAAC,CAAC;QACxD,IAAM,iBAAiB,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,iBAAiB,EAArB,CAAqB,CAAC,CAAC;QAClF,IAAM,aAAa,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,aAAa,EAAjB,CAAiB,CAAC,CAAC;QAE1E,IAAM,oBAAoB,GAAG,kCAAgB,CAAC,UAAC,KAAuC;;YACpF,IAAI,qCAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBACvC,MAAA,MAAA,KAAK,CAAC,QAAQ,EAAC,OAAO,mDAAG,KAAK,CAAC,CAAC;aACjC;YACD,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE;gBACxD,iBAAiB,CAAC;oBAChB,KAAK,OAAA;oBACL,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,eAAe;iBACtB,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,kCAAgB,CAAC,UAAC,KAA4D;;YAClG,MAAA,KAAK,CAAC,SAAS,+CAAf,KAAK,EAAa,KAAK,CAAC,CAAC;YAEzB,IAAI,0BAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;gBACxC,iBAAiB,CAAC;oBAChB,KAAK,OAAA;oBACL,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,eAAe;iBACtB,CAAC,CAAC;gBACH,qFAAqF;gBACrF,gDAAgD;gBAChD,KAAK,CAAC,eAAe,EAAE,CAAC;aACzB;QACH,CAAC,CAAC,CAAC;QAEK,IAAA,eAAe,GAAK,kCAAkB,CAAC;YAC7C,SAAS,EAAE,SAAS,KAAK,WAAW;YACpC,eAAe,EAAE,CAAC,cAAc;SACjC,CAAC,gBAHqB,CAGpB;QAEH,OAAO;YACL,UAAU,EAAE;gBACV,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,KAAK;aACZ;YACD,QAAQ,EAAE,kCAAgB,CAAC,QAAQ,EAAE;gBACnC,QAAQ,EAAE,IAAI,IAAI,SAAS,KAAK,WAAW;gBAC3C,YAAY,EAAE;oBACZ,aAAa,EAAE,MAAM;oBACrB,OAAO,EAAE,oBAAoB;iBAC9B;aACF,CAAC;YACF,IAAI,EAAE,uCAAqB,CAAC,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,uDACrC,QAAQ,EAAE,CAAC,CAAC,EACZ,YAAY,EAAE,SAAS,KAAK,WAAW,EACvC,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,EACtD,iBAAiB,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,IAC/D,KAAK,GACL,eAAe,KAClB,SAAS,EAAE,aAAa,EACxB,GAAG,EAAE,+BAAa,CAAC,GAAG,EAAE,SAAS,CAAC,IAClC;SACH,CAAC;IACJ,CAAC,CAAC;IApEW,QAAA,yBAAyB,6BAoEpC","sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n resolveShorthand,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n} from '@fluentui/react-utilities';\nimport type {\n DialogSurfaceElement,\n DialogSurfaceElementIntersection,\n DialogSurfaceProps,\n DialogSurfaceState,\n} from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const { backdrop, as } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const inertTrapFocus = useDialogContext_unstable(ctx => ctx.inertTrapFocus);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<DialogSurfaceElementIntersection>) => {\n props.onKeyDown?.(event);\n\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n const { modalAttributes } = useModalAttributes({\n trapFocus: modalType !== 'non-modal',\n legacyTrapFocus: !inertTrapFocus,\n });\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick,\n },\n }),\n root: getNativeElementProps(as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n };\n};\n"]}
@@ -1,11 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useDialogSurfaceContextValues_unstable = void 0;
5
- function useDialogSurfaceContextValues_unstable(state) {
6
- var dialogSurface = true;
7
- return { dialogSurface: dialogSurface };
8
- }
9
- exports.useDialogSurfaceContextValues_unstable = useDialogSurfaceContextValues_unstable;
10
- });
11
- //# sourceMappingURL=useDialogSurfaceContextValues.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogSurfaceContextValues.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurfaceContextValues.ts"],"names":[],"mappings":";;;;IAGA,SAAgB,sCAAsC,CAAC,KAAyB;QAC9E,IAAM,aAAa,GAA8B,IAAI,CAAC;QAEtD,OAAO,EAAE,aAAa,eAAA,EAAE,CAAC;IAC3B,CAAC;IAJD,wFAIC","sourcesContent":["import type { DialogSurfaceContextValues, DialogSurfaceState } from './DialogSurface.types';\nimport type { DialogSurfaceContextValue } from '../../contexts';\n\nexport function useDialogSurfaceContextValues_unstable(state: DialogSurfaceState): DialogSurfaceContextValues {\n const dialogSurface: DialogSurfaceContextValue = true;\n\n return { dialogSurface };\n}\n"]}
@@ -1,44 +0,0 @@
1
- define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-theme", "@fluentui/react-tabster", "../../contexts"], function (require, exports, tslib_1, react_1, react_theme_1, react_tabster_1, contexts_1) {
2
- "use strict";
3
- var _a;
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.useDialogSurfaceStyles_unstable = exports.dialogSurfaceClassNames = void 0;
6
- exports.dialogSurfaceClassNames = {
7
- root: 'fui-DialogSurface',
8
- backdrop: 'fui-DialogSurface__backdrop',
9
- };
10
- /**
11
- * Styles for the root slot
12
- */
13
- var useStyles = react_1.makeStyles({
14
- focusOutline: react_tabster_1.createFocusOutlineStyle(),
15
- root: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ display: 'block', userSelect: 'unset', visibility: 'unset' }, react_1.shorthands.inset(0)), react_1.shorthands.padding(0)), react_1.shorthands.padding(contexts_1.SURFACE_PADDING)), react_1.shorthands.margin('auto')), react_1.shorthands.borderStyle('none')), react_1.shorthands.overflow('unset')), { '&::backdrop': {
16
- backgroundColor: 'rgba(0, 0, 0, 0.4)',
17
- }, position: 'fixed', width: '100%', height: 'fit-content', maxWidth: '600px', maxHeight: '100vh', boxSizing: 'border-box', boxShadow: react_theme_1.tokens.shadow64, backgroundColor: react_theme_1.tokens.colorNeutralBackground1, color: react_theme_1.tokens.colorNeutralForeground1 }), react_1.shorthands.border(contexts_1.SURFACE_BORDER_WIDTH, 'solid', react_theme_1.tokens.colorTransparentStroke)), react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusXLarge)), (_a = {}, _a[contexts_1.MEDIA_QUERY_BREAKPOINT_SELECTOR] = {
18
- maxWidth: '100vw',
19
- }, _a)),
20
- backdrop: tslib_1.__assign({ position: 'fixed', backgroundColor: 'rgba(0, 0, 0, 0.4)' }, react_1.shorthands.inset('0px')),
21
- nestedDialogBackdrop: {
22
- backgroundColor: 'transparent',
23
- },
24
- nestedNativeDialogBackdrop: {
25
- '&::backdrop': {
26
- backgroundColor: 'transparent',
27
- },
28
- },
29
- });
30
- /**
31
- * Apply styling to the DialogSurface slots based on the state
32
- */
33
- var useDialogSurfaceStyles_unstable = function (state) {
34
- var styles = useStyles();
35
- var isNestedDialog = contexts_1.useDialogContext_unstable(function (ctx) { return ctx.isNestedDialog; });
36
- state.root.className = react_1.mergeClasses(exports.dialogSurfaceClassNames.root, styles.root, styles.focusOutline, isNestedDialog && styles.nestedNativeDialogBackdrop, state.root.className);
37
- if (state.backdrop) {
38
- state.backdrop.className = react_1.mergeClasses(exports.dialogSurfaceClassNames.backdrop, styles.backdrop, isNestedDialog && styles.nestedDialogBackdrop, state.backdrop.className);
39
- }
40
- return state;
41
- };
42
- exports.useDialogSurfaceStyles_unstable = useDialogSurfaceStyles_unstable;
43
- });
44
- //# sourceMappingURL=useDialogSurfaceStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogSurfaceStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurfaceStyles.ts"],"names":[],"mappings":";;;;;IAYa,QAAA,uBAAuB,GAAuC;QACzE,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,6BAA6B;KACxC,CAAC;IAEF;;OAEG;IACH,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,YAAY,EAAE,uCAAuB,EAAE;QACvC,IAAI,8KACF,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,OAAO,IAChB,kBAAU,CAAC,KAAK,CAAC,CAAC,CAAC,GACnB,kBAAU,CAAC,OAAO,CAAC,CAAC,CAAC,GACrB,kBAAU,CAAC,OAAO,CAAC,0BAAe,CAAC,GACnC,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,GACzB,kBAAU,CAAC,WAAW,CAAC,MAAM,CAAC,GAC9B,kBAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,KAC/B,aAAa,EAAE;gBACb,eAAe,EAAE,oBAAoB;aACtC,EACD,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,YAAY,EACvB,SAAS,EAAE,oBAAM,CAAC,QAAQ,EAC1B,eAAe,EAAE,oBAAM,CAAC,uBAAuB,EAC/C,KAAK,EAAE,oBAAM,CAAC,uBAAuB,KAClC,kBAAU,CAAC,MAAM,CAAC,+BAAoB,EAAE,OAAO,EAAE,oBAAM,CAAC,sBAAsB,CAAC,GAC/E,kBAAU,CAAC,YAAY,CAAC,oBAAM,CAAC,kBAAkB,CAAC,gBACpD,0CAA+B,IAAG;YACjC,QAAQ,EAAE,OAAO;SAClB,MACF;QACD,QAAQ,qBACN,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,oBAAoB,IAClC,kBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAC3B;QACD,oBAAoB,EAAE;YACpB,eAAe,EAAE,aAAa;SAC/B;QACD,0BAA0B,EAAE;YAC1B,aAAa,EAAE;gBACb,eAAe,EAAE,aAAa;aAC/B;SACF;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,+BAA+B,GAAG,UAAC,KAAyB;QACvE,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,IAAM,cAAc,GAAG,oCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,cAAc,EAAlB,CAAkB,CAAC,CAAC;QAE5E,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,+BAAuB,CAAC,IAAI,EAC5B,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,YAAY,EACnB,cAAc,IAAI,MAAM,CAAC,0BAA0B,EACnD,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;QACF,IAAI,KAAK,CAAC,QAAQ,EAAE;YAClB,KAAK,CAAC,QAAQ,CAAC,SAAS,GAAG,oBAAY,CACrC,+BAAuB,CAAC,QAAQ,EAChC,MAAM,CAAC,QAAQ,EACf,cAAc,IAAI,MAAM,CAAC,oBAAoB,EAC7C,KAAK,CAAC,QAAQ,CAAC,SAAS,CACzB,CAAC;SACH;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IApBW,QAAA,+BAA+B,mCAoB1C","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport {\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n useDialogContext_unstable,\n} from '../../contexts';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\n\nexport const dialogSurfaceClassNames: SlotClassNames<DialogSurfaceSlots> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n focusOutline: createFocusOutlineStyle(),\n root: {\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n ...shorthands.inset(0),\n ...shorthands.padding(0),\n ...shorthands.padding(SURFACE_PADDING),\n ...shorthands.margin('auto'),\n ...shorthands.borderStyle('none'),\n ...shorthands.overflow('unset'),\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n },\n position: 'fixed',\n width: '100%',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: '100vh',\n boxSizing: 'border-box',\n boxShadow: tokens.shadow64,\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n ...shorthands.border(SURFACE_BORDER_WIDTH, 'solid', tokens.colorTransparentStroke),\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n },\n },\n backdrop: {\n position: 'fixed',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n ...shorthands.inset('0px'),\n },\n nestedDialogBackdrop: {\n backgroundColor: 'transparent',\n },\n nestedNativeDialogBackdrop: {\n '&::backdrop': {\n backgroundColor: 'transparent',\n },\n },\n});\n\n/**\n * Apply styling to the DialogSurface slots based on the state\n */\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n const styles = useStyles();\n const isNestedDialog = useDialogContext_unstable(ctx => ctx.isNestedDialog);\n\n state.root.className = mergeClasses(\n dialogSurfaceClassNames.root,\n styles.root,\n styles.focusOutline,\n isNestedDialog && styles.nestedNativeDialogBackdrop,\n state.root.className,\n );\n if (state.backdrop) {\n state.backdrop.className = mergeClasses(\n dialogSurfaceClassNames.backdrop,\n styles.backdrop,\n isNestedDialog && styles.nestedDialogBackdrop,\n state.backdrop.className,\n );\n }\n return state;\n};\n"]}
@@ -1,18 +0,0 @@
1
- define(["require", "exports", "react", "./useDialogTitle", "./renderDialogTitle", "./useDialogTitleStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, useDialogTitle_1, renderDialogTitle_1, useDialogTitleStyles_1, react_shared_contexts_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.DialogTitle = void 0;
5
- /**
6
- * The `DialogTitle` component expects to have a title/header
7
- * and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.
8
- */
9
- exports.DialogTitle = React.forwardRef(function (props, ref) {
10
- var state = useDialogTitle_1.useDialogTitle_unstable(props, ref);
11
- useDialogTitleStyles_1.useDialogTitleStyles_unstable(state);
12
- var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useDialogTitleStyles_unstable;
13
- useCustomStyles(state);
14
- return renderDialogTitle_1.renderDialogTitle_unstable(state);
15
- });
16
- exports.DialogTitle.displayName = 'DialogTitle';
17
- });
18
- //# sourceMappingURL=DialogTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DialogTitle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogTitle/DialogTitle.tsx"],"names":[],"mappings":";;;;IAQA;;;OAGG;IACU,QAAA,WAAW,GAA0C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC5F,IAAM,KAAK,GAAG,wCAAuB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElD,oDAA6B,CAAC,KAAK,CAAC,CAAC;QAE7B,IAA+B,eAAe,GAAK,oDAA4B,EAAE,8BAAnC,CAAoC;QAC1F,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,8CAA0B,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useDialogTitle_unstable } from './useDialogTitle';\nimport { renderDialogTitle_unstable } from './renderDialogTitle';\nimport { useDialogTitleStyles_unstable } from './useDialogTitleStyles';\nimport type { DialogTitleProps } from './DialogTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogTitle` component expects to have a title/header\n * and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.\n */\nexport const DialogTitle: ForwardRefComponent<DialogTitleProps> = React.forwardRef((props, ref) => {\n const state = useDialogTitle_unstable(props, ref);\n\n useDialogTitleStyles_unstable(state);\n\n const { useDialogTitleStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogTitle_unstable(state);\n});\n\nDialogTitle.displayName = 'DialogTitle';\n"]}
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=DialogTitle.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DialogTitle.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogTitle/DialogTitle.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogTitleSlots = {\n /**\n * By default this is a div, but can be a heading.\n */\n root: Slot<'div', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;\n /**\n * By default a Dialog with modalType='non-modal' will have a close button action\n */\n action?: Slot<'div'>;\n};\n\n/**\n * DialogTitle Props\n */\nexport type DialogTitleProps = ComponentProps<DialogTitleSlots>;\n\n/**\n * State used in rendering DialogTitle\n */\nexport type DialogTitleState = ComponentState<DialogTitleSlots>;\n"]}
@@ -1,10 +0,0 @@
1
- define(["require", "exports", "tslib", "./DialogTitle", "./DialogTitle.types", "./renderDialogTitle", "./useDialogTitle", "./useDialogTitleStyles"], function (require, exports, tslib_1, DialogTitle_1, DialogTitle_types_1, renderDialogTitle_1, useDialogTitle_1, useDialogTitleStyles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(DialogTitle_1, exports);
5
- tslib_1.__exportStar(DialogTitle_types_1, exports);
6
- tslib_1.__exportStar(renderDialogTitle_1, exports);
7
- tslib_1.__exportStar(useDialogTitle_1, exports);
8
- tslib_1.__exportStar(useDialogTitleStyles_1, exports);
9
- });
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogTitle/index.ts"],"names":[],"mappings":";;;IAAA,6CAA8B;IAC9B,mDAAoC;IACpC,mDAAoC;IACpC,gDAAiC;IACjC,sDAAuC","sourcesContent":["export * from './DialogTitle';\nexport * from './DialogTitle.types';\nexport * from './renderDialogTitle';\nexport * from './useDialogTitle';\nexport * from './useDialogTitleStyles';\n"]}
@@ -1,16 +0,0 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.renderDialogTitle_unstable = void 0;
5
- /**
6
- * Render the final JSX of DialogTitle
7
- */
8
- var renderDialogTitle_unstable = function (state) {
9
- var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
- return (React.createElement(React.Fragment, null,
11
- React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), slotProps.root.children),
12
- slots.action && React.createElement(slots.action, tslib_1.__assign({}, slotProps.action))));
13
- };
14
- exports.renderDialogTitle_unstable = renderDialogTitle_unstable;
15
- });
16
- //# sourceMappingURL=renderDialogTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderDialogTitle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogTitle/renderDialogTitle.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,0BAA0B,GAAG,UAAC,KAAuB;QAC1D,IAAA,KAAuB,0BAAQ,CAAmB,KAAK,CAAC,EAAtD,KAAK,WAAA,EAAE,SAAS,eAAsC,CAAC;QAE/D,OAAO,CACL;YACE,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAc;YACrE,KAAK,CAAC,MAAM,IAAI,oBAAC,KAAK,CAAC,MAAM,uBAAK,SAAS,CAAC,MAAM,EAAI,CACtD,CACJ,CAAC;IACJ,CAAC,CAAC;IATW,QAAA,0BAA0B,8BASrC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogTitleState, DialogTitleSlots } from './DialogTitle.types';\n\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = (state: DialogTitleState) => {\n const { slots, slotProps } = getSlots<DialogTitleSlots>(state);\n\n return (\n <>\n <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root>\n {slots.action && <slots.action {...slotProps.action} />}\n </>\n );\n};\n"]}
@@ -1,36 +0,0 @@
1
- define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "../../contexts/dialogContext", "@fluentui/react-icons", "@fluentui/react-utilities", "../DialogTrigger/DialogTrigger", "./useDialogTitleStyles"], function (require, exports, tslib_1, React, react_utilities_1, dialogContext_1, react_icons_1, react_utilities_2, DialogTrigger_1, useDialogTitleStyles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useDialogTitle_unstable = void 0;
5
- /**
6
- * Create the state required to render DialogTitle.
7
- *
8
- * The returned state can be modified with hooks such as useDialogTitleStyles_unstable,
9
- * before being passed to renderDialogTitle_unstable.
10
- *
11
- * @param props - props from this instance of DialogTitle
12
- * @param ref - reference to root HTMLElement of DialogTitle
13
- */
14
- var useDialogTitle_unstable = function (props, ref) {
15
- var as = props.as, action = props.action;
16
- var modalType = dialogContext_1.useDialogContext_unstable(function (ctx) { return ctx.modalType; });
17
- var internalStyles = useDialogTitleStyles_1.useDialogTitleInternalStyles();
18
- return {
19
- components: {
20
- root: 'div',
21
- action: 'div',
22
- },
23
- root: react_utilities_1.getNativeElementProps(as !== null && as !== void 0 ? as : 'div', tslib_1.__assign({ ref: ref, id: dialogContext_1.useDialogContext_unstable(function (ctx) { return ctx.dialogTitleId; }) }, props)),
24
- action: react_utilities_2.resolveShorthand(action, {
25
- required: modalType === 'non-modal',
26
- defaultProps: {
27
- children: (React.createElement(DialogTrigger_1.DialogTrigger, { disableButtonEnhancement: true, action: "close" },
28
- React.createElement("button", { className: internalStyles.button, "aria-label": "close" },
29
- React.createElement(react_icons_1.Dismiss24Regular, null)))),
30
- },
31
- }),
32
- };
33
- };
34
- exports.useDialogTitle_unstable = useDialogTitle_unstable;
35
- });
36
- //# sourceMappingURL=useDialogTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogTitle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogTitle/useDialogTitle.tsx"],"names":[],"mappings":";;;;IASA;;;;;;;;OAQG;IACI,IAAM,uBAAuB,GAAG,UAAC,KAAuB,EAAE,GAA2B;QAClF,IAAA,EAAE,GAAa,KAAK,GAAlB,EAAE,MAAM,GAAK,KAAK,OAAV,CAAW;QAC7B,IAAM,SAAS,GAAG,yCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,SAAS,EAAb,CAAa,CAAC,CAAC;QAClE,IAAM,cAAc,GAAG,mDAA4B,EAAE,CAAC;QAEtD,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;gBACX,MAAM,EAAE,KAAK;aACd;YACD,IAAI,EAAE,uCAAqB,CAAC,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,qBACrC,GAAG,KAAA,EACH,EAAE,EAAE,yCAAyB,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,aAAa,EAAjB,CAAiB,CAAC,IACpD,KAAK,EACR;YACF,MAAM,EAAE,kCAAgB,CAAC,MAAM,EAAE;gBAC/B,QAAQ,EAAE,SAAS,KAAK,WAAW;gBACnC,YAAY,EAAE;oBACZ,QAAQ,EAAE,CACR,oBAAC,6BAAa,IAAC,wBAAwB,QAAC,MAAM,EAAC,OAAO;wBACpD,gCACE,SAAS,EAAE,cAAc,CAAC,MAAM,gBAErB,OAAO;4BAElB,oBAAC,8BAAgB,OAAG,CACb,CACK,CACjB;iBACF;aACF,CAAC;SACH,CAAC;IACJ,CAAC,CAAC;IAhCW,QAAA,uBAAuB,2BAgClC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogTitleProps, DialogTitleState } from './DialogTitle.types';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss24Regular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { DialogTrigger } from '../DialogTrigger/DialogTrigger';\nimport { useDialogTitleInternalStyles } from './useDialogTitleStyles';\n\n/**\n * Create the state required to render DialogTitle.\n *\n * The returned state can be modified with hooks such as useDialogTitleStyles_unstable,\n * before being passed to renderDialogTitle_unstable.\n *\n * @param props - props from this instance of DialogTitle\n * @param ref - reference to root HTMLElement of DialogTitle\n */\nexport const useDialogTitle_unstable = (props: DialogTitleProps, ref: React.Ref<HTMLElement>): DialogTitleState => {\n const { as, action } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const internalStyles = useDialogTitleInternalStyles();\n\n return {\n components: {\n root: 'div',\n action: 'div',\n },\n root: getNativeElementProps(as ?? 'div', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props,\n }),\n action: resolveShorthand(action, {\n required: modalType === 'non-modal',\n defaultProps: {\n children: (\n <DialogTrigger disableButtonEnhancement action=\"close\">\n <button\n className={internalStyles.button}\n // TODO: find a better way to add internal labels\n aria-label=\"close\"\n >\n <Dismiss24Regular />\n </button>\n </DialogTrigger>\n ),\n },\n }),\n };\n};\n"]}