@fluentui/react-dialog 9.4.0 → 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 (314) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +88 -1
  3. package/CHANGELOG.md +23 -2
  4. package/lib/Dialog.js.map +1 -1
  5. package/lib/DialogActions.js.map +1 -1
  6. package/lib/DialogBody.js.map +1 -1
  7. package/lib/DialogContent.js.map +1 -1
  8. package/lib/DialogSurface.js.map +1 -1
  9. package/lib/DialogTitle.js.map +1 -1
  10. package/lib/DialogTrigger.js.map +1 -1
  11. package/lib/components/Dialog/Dialog.js.map +1 -1
  12. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  13. package/lib/components/Dialog/index.js.map +1 -1
  14. package/lib/components/Dialog/renderDialog.js.map +1 -1
  15. package/lib/components/Dialog/useDialog.js.map +1 -1
  16. package/lib/components/Dialog/useDialogContextValues.js +3 -3
  17. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  18. package/lib/components/DialogActions/DialogActions.js.map +1 -1
  19. package/lib/components/DialogActions/DialogActions.types.js.map +1 -1
  20. package/lib/components/DialogActions/index.js.map +1 -1
  21. package/lib/components/DialogActions/renderDialogActions.js +1 -3
  22. package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
  23. package/lib/components/DialogActions/useDialogActions.js +1 -0
  24. package/lib/components/DialogActions/useDialogActions.js.map +1 -1
  25. package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  26. package/lib/components/DialogBody/DialogBody.js.map +1 -1
  27. package/lib/components/DialogBody/DialogBody.types.js.map +1 -1
  28. package/lib/components/DialogBody/index.js.map +1 -1
  29. package/lib/components/DialogBody/renderDialogBody.js +1 -3
  30. package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
  31. package/lib/components/DialogBody/useDialogBody.js +3 -2
  32. package/lib/components/DialogBody/useDialogBody.js.map +1 -1
  33. package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  34. package/lib/components/DialogContent/DialogContent.js.map +1 -1
  35. package/lib/components/DialogContent/DialogContent.types.js.map +1 -1
  36. package/lib/components/DialogContent/index.js.map +1 -1
  37. package/lib/components/DialogContent/renderDialogContent.js +1 -3
  38. package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
  39. package/lib/components/DialogContent/useDialogContent.js +3 -2
  40. package/lib/components/DialogContent/useDialogContent.js.map +1 -1
  41. package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -1
  42. package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
  43. package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
  44. package/lib/components/DialogSurface/index.js.map +1 -1
  45. package/lib/components/DialogSurface/renderDialogSurface.js +2 -6
  46. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
  47. package/lib/components/DialogSurface/useDialogSurface.js +5 -4
  48. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  49. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  50. package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  51. package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
  52. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
  53. package/lib/components/DialogTitle/index.js.map +1 -1
  54. package/lib/components/DialogTitle/renderDialogTitle.js +1 -5
  55. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
  56. package/lib/components/DialogTitle/useDialogTitle.js +2 -0
  57. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  58. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  59. package/lib/components/DialogTrigger/DialogTrigger.js +1 -0
  60. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
  61. package/lib/components/DialogTrigger/DialogTrigger.types.js +1 -1
  62. package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  63. package/lib/components/DialogTrigger/index.js.map +1 -1
  64. package/lib/components/DialogTrigger/renderDialogTrigger.js +1 -2
  65. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  66. package/lib/components/DialogTrigger/useDialogTrigger.js +3 -2
  67. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  68. package/lib/contexts/constants.js.map +1 -1
  69. package/lib/contexts/dialogContext.js +2 -2
  70. package/lib/contexts/dialogContext.js.map +1 -1
  71. package/lib/contexts/dialogSurfaceContext.js +2 -4
  72. package/lib/contexts/dialogSurfaceContext.js.map +1 -1
  73. package/lib/contexts/index.js.map +1 -1
  74. package/lib/index.js.map +1 -1
  75. package/lib/utils/index.js.map +1 -1
  76. package/lib/utils/isEscapeKeyDown.js +1 -0
  77. package/lib/utils/isEscapeKeyDown.js.map +1 -1
  78. package/lib/utils/useDisableBodyScroll.js +6 -5
  79. package/lib/utils/useDisableBodyScroll.js.map +1 -1
  80. package/lib/utils/useFocusFirstElement.js +4 -3
  81. package/lib/utils/useFocusFirstElement.js.map +1 -1
  82. package/lib-commonjs/Dialog.js +5 -4
  83. package/lib-commonjs/Dialog.js.map +1 -1
  84. package/lib-commonjs/DialogActions.js +5 -4
  85. package/lib-commonjs/DialogActions.js.map +1 -1
  86. package/lib-commonjs/DialogBody.js +5 -4
  87. package/lib-commonjs/DialogBody.js.map +1 -1
  88. package/lib-commonjs/DialogContent.js +5 -4
  89. package/lib-commonjs/DialogContent.js.map +1 -1
  90. package/lib-commonjs/DialogSurface.js +5 -4
  91. package/lib-commonjs/DialogSurface.js.map +1 -1
  92. package/lib-commonjs/DialogTitle.js +5 -4
  93. package/lib-commonjs/DialogTitle.js.map +1 -1
  94. package/lib-commonjs/DialogTrigger.js +5 -4
  95. package/lib-commonjs/DialogTrigger.js.map +1 -1
  96. package/lib-commonjs/components/Dialog/Dialog.js +16 -19
  97. package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
  98. package/lib-commonjs/components/Dialog/Dialog.types.js +3 -2
  99. package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -1
  100. package/lib-commonjs/components/Dialog/index.js +8 -7
  101. package/lib-commonjs/components/Dialog/index.js.map +1 -1
  102. package/lib-commonjs/components/Dialog/renderDialog.js +17 -20
  103. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
  104. package/lib-commonjs/components/Dialog/useDialog.js +78 -80
  105. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
  106. package/lib-commonjs/components/Dialog/useDialogContextValues.js +25 -32
  107. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
  108. package/lib-commonjs/components/DialogActions/DialogActions.js +19 -21
  109. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
  110. package/lib-commonjs/components/DialogActions/DialogActions.types.js +3 -2
  111. package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -1
  112. package/lib-commonjs/components/DialogActions/index.js +9 -8
  113. package/lib-commonjs/components/DialogActions/index.js.map +1 -1
  114. package/lib-commonjs/components/DialogActions/renderDialogActions.js +14 -19
  115. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
  116. package/lib-commonjs/components/DialogActions/useDialogActions.js +23 -31
  117. package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
  118. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +81 -52
  119. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  120. package/lib-commonjs/components/DialogBody/DialogBody.js +19 -21
  121. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
  122. package/lib-commonjs/components/DialogBody/DialogBody.types.js +3 -2
  123. package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -1
  124. package/lib-commonjs/components/DialogBody/index.js +9 -8
  125. package/lib-commonjs/components/DialogBody/index.js.map +1 -1
  126. package/lib-commonjs/components/DialogBody/renderDialogBody.js +14 -19
  127. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
  128. package/lib-commonjs/components/DialogBody/useDialogBody.js +21 -26
  129. package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
  130. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +74 -44
  131. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  132. package/lib-commonjs/components/DialogContent/DialogContent.js +19 -21
  133. package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
  134. package/lib-commonjs/components/DialogContent/DialogContent.types.js +3 -2
  135. package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -1
  136. package/lib-commonjs/components/DialogContent/index.js +9 -8
  137. package/lib-commonjs/components/DialogContent/index.js.map +1 -1
  138. package/lib-commonjs/components/DialogContent/renderDialogContent.js +13 -18
  139. package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
  140. package/lib-commonjs/components/DialogContent/useDialogContent.js +21 -26
  141. package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
  142. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +51 -35
  143. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -1
  144. package/lib-commonjs/components/DialogSurface/DialogSurface.js +21 -23
  145. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
  146. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js +3 -2
  147. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -1
  148. package/lib-commonjs/components/DialogSurface/index.js +9 -8
  149. package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
  150. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +17 -24
  151. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
  152. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +75 -85
  153. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
  154. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +11 -9
  155. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  156. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +309 -123
  157. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  158. package/lib-commonjs/components/DialogTitle/DialogTitle.js +19 -21
  159. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
  160. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js +3 -2
  161. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -1
  162. package/lib-commonjs/components/DialogTitle/index.js +9 -8
  163. package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
  164. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +13 -20
  165. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
  166. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +43 -51
  167. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
  168. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +225 -107
  169. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  170. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +15 -21
  171. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
  172. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +5 -2
  173. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  174. package/lib-commonjs/components/DialogTrigger/index.js +8 -7
  175. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
  176. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +10 -9
  177. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  178. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +45 -53
  179. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  180. package/lib-commonjs/contexts/constants.js +28 -12
  181. package/lib-commonjs/contexts/constants.js.map +1 -1
  182. package/lib-commonjs/contexts/dialogContext.js +28 -19
  183. package/lib-commonjs/contexts/dialogContext.js.map +1 -1
  184. package/lib-commonjs/contexts/dialogSurfaceContext.js +18 -11
  185. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
  186. package/lib-commonjs/contexts/index.js +7 -6
  187. package/lib-commonjs/contexts/index.js.map +1 -1
  188. package/lib-commonjs/index.js +50 -197
  189. package/lib-commonjs/index.js.map +1 -1
  190. package/lib-commonjs/utils/index.js +7 -6
  191. package/lib-commonjs/utils/index.js.map +1 -1
  192. package/lib-commonjs/utils/isEscapeKeyDown.js +11 -10
  193. package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
  194. package/lib-commonjs/utils/useDisableBodyScroll.js +45 -47
  195. package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
  196. package/lib-commonjs/utils/useFocusFirstElement.js +42 -37
  197. package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
  198. package/package.json +14 -13
  199. package/lib-amd/Dialog.js +0 -6
  200. package/lib-amd/Dialog.js.map +0 -1
  201. package/lib-amd/DialogActions.js +0 -6
  202. package/lib-amd/DialogActions.js.map +0 -1
  203. package/lib-amd/DialogBody.js +0 -6
  204. package/lib-amd/DialogBody.js.map +0 -1
  205. package/lib-amd/DialogContent.js +0 -6
  206. package/lib-amd/DialogContent.js.map +0 -1
  207. package/lib-amd/DialogSurface.js +0 -6
  208. package/lib-amd/DialogSurface.js.map +0 -1
  209. package/lib-amd/DialogTitle.js +0 -6
  210. package/lib-amd/DialogTitle.js.map +0 -1
  211. package/lib-amd/DialogTrigger.js +0 -6
  212. package/lib-amd/DialogTrigger.js.map +0 -1
  213. package/lib-amd/components/Dialog/Dialog.js +0 -19
  214. package/lib-amd/components/Dialog/Dialog.js.map +0 -1
  215. package/lib-amd/components/Dialog/Dialog.types.js +0 -5
  216. package/lib-amd/components/Dialog/Dialog.types.js.map +0 -1
  217. package/lib-amd/components/Dialog/index.js +0 -9
  218. package/lib-amd/components/Dialog/index.js.map +0 -1
  219. package/lib-amd/components/Dialog/renderDialog.js +0 -17
  220. package/lib-amd/components/Dialog/renderDialog.js.map +0 -1
  221. package/lib-amd/components/Dialog/useDialog.js +0 -78
  222. package/lib-amd/components/Dialog/useDialog.js.map +0 -1
  223. package/lib-amd/components/Dialog/useDialogContextValues.js +0 -25
  224. package/lib-amd/components/Dialog/useDialogContextValues.js.map +0 -1
  225. package/lib-amd/components/DialogActions/DialogActions.js +0 -18
  226. package/lib-amd/components/DialogActions/DialogActions.js.map +0 -1
  227. package/lib-amd/components/DialogActions/DialogActions.types.js +0 -5
  228. package/lib-amd/components/DialogActions/DialogActions.types.js.map +0 -1
  229. package/lib-amd/components/DialogActions/index.js +0 -10
  230. package/lib-amd/components/DialogActions/index.js.map +0 -1
  231. package/lib-amd/components/DialogActions/renderDialogActions.js +0 -15
  232. package/lib-amd/components/DialogActions/renderDialogActions.js.map +0 -1
  233. package/lib-amd/components/DialogActions/useDialogActions.js +0 -27
  234. package/lib-amd/components/DialogActions/useDialogActions.js.map +0 -1
  235. package/lib-amd/components/DialogActions/useDialogActionsStyles.js +0 -33
  236. package/lib-amd/components/DialogActions/useDialogActionsStyles.js.map +0 -1
  237. package/lib-amd/components/DialogBody/DialogBody.js +0 -18
  238. package/lib-amd/components/DialogBody/DialogBody.js.map +0 -1
  239. package/lib-amd/components/DialogBody/DialogBody.types.js +0 -5
  240. package/lib-amd/components/DialogBody/DialogBody.types.js.map +0 -1
  241. package/lib-amd/components/DialogBody/index.js +0 -10
  242. package/lib-amd/components/DialogBody/index.js.map +0 -1
  243. package/lib-amd/components/DialogBody/renderDialogBody.js +0 -15
  244. package/lib-amd/components/DialogBody/renderDialogBody.js.map +0 -1
  245. package/lib-amd/components/DialogBody/useDialogBody.js +0 -25
  246. package/lib-amd/components/DialogBody/useDialogBody.js.map +0 -1
  247. package/lib-amd/components/DialogBody/useDialogBodyStyles.js +0 -31
  248. package/lib-amd/components/DialogBody/useDialogBodyStyles.js.map +0 -1
  249. package/lib-amd/components/DialogContent/DialogContent.js +0 -18
  250. package/lib-amd/components/DialogContent/DialogContent.js.map +0 -1
  251. package/lib-amd/components/DialogContent/DialogContent.types.js +0 -5
  252. package/lib-amd/components/DialogContent/DialogContent.types.js.map +0 -1
  253. package/lib-amd/components/DialogContent/index.js +0 -10
  254. package/lib-amd/components/DialogContent/index.js.map +0 -1
  255. package/lib-amd/components/DialogContent/renderDialogContent.js +0 -14
  256. package/lib-amd/components/DialogContent/renderDialogContent.js.map +0 -1
  257. package/lib-amd/components/DialogContent/useDialogContent.js +0 -25
  258. package/lib-amd/components/DialogContent/useDialogContent.js.map +0 -1
  259. package/lib-amd/components/DialogContent/useDialogContentStyles.js +0 -24
  260. package/lib-amd/components/DialogContent/useDialogContentStyles.js.map +0 -1
  261. package/lib-amd/components/DialogSurface/DialogSurface.js +0 -19
  262. package/lib-amd/components/DialogSurface/DialogSurface.js.map +0 -1
  263. package/lib-amd/components/DialogSurface/DialogSurface.types.js +0 -5
  264. package/lib-amd/components/DialogSurface/DialogSurface.types.js.map +0 -1
  265. package/lib-amd/components/DialogSurface/index.js +0 -10
  266. package/lib-amd/components/DialogSurface/index.js.map +0 -1
  267. package/lib-amd/components/DialogSurface/renderDialogSurface.js +0 -17
  268. package/lib-amd/components/DialogSurface/renderDialogSurface.js.map +0 -1
  269. package/lib-amd/components/DialogSurface/useDialogSurface.js +0 -70
  270. package/lib-amd/components/DialogSurface/useDialogSurface.js.map +0 -1
  271. package/lib-amd/components/DialogSurface/useDialogSurfaceContextValues.js +0 -11
  272. package/lib-amd/components/DialogSurface/useDialogSurfaceContextValues.js.map +0 -1
  273. package/lib-amd/components/DialogSurface/useDialogSurfaceStyles.js +0 -44
  274. package/lib-amd/components/DialogSurface/useDialogSurfaceStyles.js.map +0 -1
  275. package/lib-amd/components/DialogTitle/DialogTitle.js +0 -18
  276. package/lib-amd/components/DialogTitle/DialogTitle.js.map +0 -1
  277. package/lib-amd/components/DialogTitle/DialogTitle.types.js +0 -5
  278. package/lib-amd/components/DialogTitle/DialogTitle.types.js.map +0 -1
  279. package/lib-amd/components/DialogTitle/index.js +0 -10
  280. package/lib-amd/components/DialogTitle/index.js.map +0 -1
  281. package/lib-amd/components/DialogTitle/renderDialogTitle.js +0 -16
  282. package/lib-amd/components/DialogTitle/renderDialogTitle.js.map +0 -1
  283. package/lib-amd/components/DialogTitle/useDialogTitle.js +0 -36
  284. package/lib-amd/components/DialogTitle/useDialogTitle.js.map +0 -1
  285. package/lib-amd/components/DialogTitle/useDialogTitleStyles.js +0 -37
  286. package/lib-amd/components/DialogTitle/useDialogTitleStyles.js.map +0 -1
  287. package/lib-amd/components/DialogTrigger/DialogTrigger.js +0 -24
  288. package/lib-amd/components/DialogTrigger/DialogTrigger.js.map +0 -1
  289. package/lib-amd/components/DialogTrigger/DialogTrigger.types.js +0 -5
  290. package/lib-amd/components/DialogTrigger/DialogTrigger.types.js.map +0 -1
  291. package/lib-amd/components/DialogTrigger/index.js +0 -9
  292. package/lib-amd/components/DialogTrigger/index.js.map +0 -1
  293. package/lib-amd/components/DialogTrigger/renderDialogTrigger.js +0 -13
  294. package/lib-amd/components/DialogTrigger/renderDialogTrigger.js.map +0 -1
  295. package/lib-amd/components/DialogTrigger/useDialogTrigger.js +0 -37
  296. package/lib-amd/components/DialogTrigger/useDialogTrigger.js.map +0 -1
  297. package/lib-amd/contexts/constants.js +0 -15
  298. package/lib-amd/contexts/constants.js.map +0 -1
  299. package/lib-amd/contexts/dialogContext.js +0 -26
  300. package/lib-amd/contexts/dialogContext.js.map +0 -1
  301. package/lib-amd/contexts/dialogSurfaceContext.js +0 -11
  302. package/lib-amd/contexts/dialogSurfaceContext.js.map +0 -1
  303. package/lib-amd/contexts/index.js +0 -8
  304. package/lib-amd/contexts/index.js.map +0 -1
  305. package/lib-amd/index.js +0 -37
  306. package/lib-amd/index.js.map +0 -1
  307. package/lib-amd/utils/index.js +0 -8
  308. package/lib-amd/utils/index.js.map +0 -1
  309. package/lib-amd/utils/isEscapeKeyDown.js +0 -13
  310. package/lib-amd/utils/isEscapeKeyDown.js.map +0 -1
  311. package/lib-amd/utils/useDisableBodyScroll.js +0 -52
  312. package/lib-amd/utils/useDisableBodyScroll.js.map +0 -1
  313. package/lib-amd/utils/useFocusFirstElement.js +0 -38
  314. package/lib-amd/utils/useFocusFirstElement.js.map +0 -1
@@ -1,44 +1,60 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ dialogContentClassNames: ()=>dialogContentClassNames,
13
+ useDialogContentStyles_unstable: ()=>useDialogContentStyles_unstable
5
14
  });
6
- exports.useDialogContentStyles_unstable = exports.dialogContentClassNames = void 0;
7
- const react_1 = /*#__PURE__*/require("@griffel/react");
8
- const constants_1 = /*#__PURE__*/require("../../contexts/constants");
9
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
10
- exports.dialogContentClassNames = {
11
- root: 'fui-DialogContent'
15
+ const _react = require("@griffel/react");
16
+ const dialogContentClassNames = {
17
+ root: 'fui-DialogContent'
12
18
  };
13
19
  /**
14
20
  * Styles for the root slot
15
- */
16
- const useStyles = /*#__PURE__*/react_1.__styles({
17
- root: {
18
- a9b677: "fly5x3f",
19
- Bqenvij: "f1l02sjl",
20
- Bmxbyg5: "f5zp4f",
21
- sshi5w: "f1nxs5xn",
22
- B7ck84d: "f1ewtqcl",
23
- Ijaq50: "f6owso0",
24
- Br312pm: "fupswjn",
25
- nk6f5a: "foucsne",
26
- Bw0ie65: "f1ka72gx",
27
- Bahqtrf: "fk6fouc",
28
- Be2twd7: "fkhj508",
29
- Bhrd7zp: "figsok6",
30
- Bg96gwp: "f1i3iumi"
31
- }
21
+ */ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
22
+ root: {
23
+ a9b677: "fly5x3f",
24
+ Bqenvij: "f1l02sjl",
25
+ Bmxbyg5: "f5zp4f",
26
+ sshi5w: "f1nxs5xn",
27
+ B7ck84d: "f1ewtqcl",
28
+ Ijaq50: "f6owso0",
29
+ Br312pm: "fupswjn",
30
+ nk6f5a: "foucsne",
31
+ Bw0ie65: "f1ka72gx",
32
+ Bahqtrf: "fk6fouc",
33
+ Be2twd7: "fkhj508",
34
+ Bhrd7zp: "figsok6",
35
+ Bg96gwp: "f1i3iumi"
36
+ }
32
37
  }, {
33
- d: [".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f5zp4f{overflow-y:auto;}", ".f1nxs5xn{min-height:32px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f6owso0{grid-row-start:body;}", ".fupswjn{grid-column-start:body;}", ".foucsne{grid-row-end:body;}", ".f1ka72gx{grid-column-end:body;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
38
+ d: [
39
+ ".fly5x3f{width:100%;}",
40
+ ".f1l02sjl{height:100%;}",
41
+ ".f5zp4f{overflow-y:auto;}",
42
+ ".f1nxs5xn{min-height:32px;}",
43
+ ".f1ewtqcl{box-sizing:border-box;}",
44
+ ".f6owso0{grid-row-start:body;}",
45
+ ".fupswjn{grid-column-start:body;}",
46
+ ".foucsne{grid-row-end:body;}",
47
+ ".f1ka72gx{grid-column-end:body;}",
48
+ ".fk6fouc{font-family:var(--fontFamilyBase);}",
49
+ ".fkhj508{font-size:var(--fontSizeBase300);}",
50
+ ".figsok6{font-weight:var(--fontWeightRegular);}",
51
+ ".f1i3iumi{line-height:var(--lineHeightBase300);}"
52
+ ]
34
53
  });
35
- /**
36
- * Apply styling to the DialogContent slots based on the state
37
- */
38
- const useDialogContentStyles_unstable = state => {
39
- const styles = useStyles();
40
- state.root.className = react_1.mergeClasses(exports.dialogContentClassNames.root, styles.root, state.root.className);
41
- return state;
42
- };
43
- exports.useDialogContentStyles_unstable = useDialogContentStyles_unstable;
54
+ const useDialogContentStyles_unstable = (state)=>{
55
+ const styles = useStyles();
56
+ state.root.className = (0, _react.mergeClasses)(dialogContentClassNames.root, styles.root, state.root.className);
57
+ return state;
58
+ }; //# sourceMappingURL=useDialogContentStyles.js.map
59
+
44
60
  //# sourceMappingURL=useDialogContentStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_1","require","constants_1","react_theme_1","exports","dialogContentClassNames","root","useStyles","__styles","a9b677","Bqenvij","Bmxbyg5","sshi5w","B7ck84d","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useDialogContentStyles_unstable","state","styles","className","mergeClasses"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogContent/useDialogContentStyles.ts"],"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"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AAGA,MAAAC,WAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AAEaG,OAAA,CAAAC,uBAAuB,GAAuC;EACzEC,IAAI,EAAE;CACP;AAED;;;AAGA,MAAMC,SAAS,gBAAGP,OAAA,CAAAQ,QAAU;EAAAF,IAAA;IAAAG,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAU1B;AAEF;;;AAGO,MAAMC,+BAA+B,GAAIC,KAAyB,IAAwB;EAC/F,MAAMC,MAAM,GAAGlB,SAAS,EAAE;EAC1BiB,KAAK,CAAClB,IAAI,CAACoB,SAAS,GAAG1B,OAAA,CAAA2B,YAAY,CAACvB,OAAA,CAAAC,uBAAuB,CAACC,IAAI,EAAEmB,MAAM,CAACnB,IAAI,EAAEkB,KAAK,CAAClB,IAAI,CAACoB,SAAS,CAAC;EACpG,OAAOF,KAAK;AACd,CAAC;AAJYpB,OAAA,CAAAmB,+BAA+B,GAAAA,+BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/DialogContent/useDialogContentStyles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { typographyStyles } from '@fluentui/react-theme';\nexport const dialogContentClassNames = {\n root: 'fui-DialogContent'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n a9b677: \"fly5x3f\",\n Bqenvij: \"f1l02sjl\",\n Bmxbyg5: \"f5zp4f\",\n sshi5w: \"f1nxs5xn\",\n B7ck84d: \"f1ewtqcl\",\n Ijaq50: \"f6owso0\",\n Br312pm: \"fupswjn\",\n nk6f5a: \"foucsne\",\n Bw0ie65: \"f1ka72gx\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n }\n}, {\n d: [\".fly5x3f{width:100%;}\", \".f1l02sjl{height:100%;}\", \".f5zp4f{overflow-y:auto;}\", \".f1nxs5xn{min-height:32px;}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f6owso0{grid-row-start:body;}\", \".fupswjn{grid-column-start:body;}\", \".foucsne{grid-row-end:body;}\", \".f1ka72gx{grid-column-end:body;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\"]\n});\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useDialogContentStyles.js.map"],"names":["dialogContentClassNames","useDialogContentStyles_unstable","root","useStyles","__styles","a9b677","Bqenvij","Bmxbyg5","sshi5w","B7ck84d","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,uBAAuB,MAAvBA;IA4BAC,+BAA+B,MAA/BA;;uBA/BsC;AAG5C,MAAMD,0BAA0B;IACrCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAyB;QAA2B;QAA6B;QAA+B;QAAqC;QAAkC;QAAqC;QAAgC;QAAoC;QAAgD;QAA+C;QAAmD;KAAmD;AAC3e;AAIO,MAAMjB,kCAAkCkB,CAAAA,QAAS;IACtD,MAAMC,SAASjB;IACfgB,MAAMjB,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,wBAAwBE,IAAI,EAAEkB,OAAOlB,IAAI,EAAEiB,MAAMjB,IAAI,CAACmB,SAAS;IACnG,OAAOF;AACT,GACA,kDAAkD"}
@@ -1,28 +1,26 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "DialogSurface", {
6
+ enumerable: true,
7
+ get: ()=>DialogSurface
5
8
  });
6
- exports.DialogSurface = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const useDialogSurface_1 = /*#__PURE__*/require("./useDialogSurface");
9
- const renderDialogSurface_1 = /*#__PURE__*/require("./renderDialogSurface");
10
- const useDialogSurfaceStyles_1 = /*#__PURE__*/require("./useDialogSurfaceStyles");
11
- const useDialogSurfaceContextValues_1 = /*#__PURE__*/require("./useDialogSurfaceContextValues");
12
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
13
- /**
14
- * DialogSurface component represents the visual part of a `Dialog` as a whole,
15
- * it contains everything that should be visible.
16
- */
17
- exports.DialogSurface = /*#__PURE__*/React.forwardRef((props, ref) => {
18
- const state = useDialogSurface_1.useDialogSurface_unstable(props, ref);
19
- const contextValues = useDialogSurfaceContextValues_1.useDialogSurfaceContextValues_unstable(state);
20
- useDialogSurfaceStyles_1.useDialogSurfaceStyles_unstable(state);
21
- const {
22
- useDialogSurfaceStyles_unstable: useCustomStyles
23
- } = react_shared_contexts_1.useCustomStyleHooks_unstable();
24
- useCustomStyles(state);
25
- return renderDialogSurface_1.renderDialogSurface_unstable(state, contextValues);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useDialogSurface = require("./useDialogSurface");
12
+ const _renderDialogSurface = require("./renderDialogSurface");
13
+ const _useDialogSurfaceStyles = require("./useDialogSurfaceStyles");
14
+ const _useDialogSurfaceContextValues = require("./useDialogSurfaceContextValues");
15
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
16
+ const DialogSurface = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ const state = (0, _useDialogSurface.useDialogSurface_unstable)(props, ref);
18
+ const contextValues = (0, _useDialogSurfaceContextValues.useDialogSurfaceContextValues_unstable)(state);
19
+ (0, _useDialogSurfaceStyles.useDialogSurfaceStyles_unstable)(state);
20
+ const { useDialogSurfaceStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
21
+ useCustomStyles(state);
22
+ return (0, _renderDialogSurface.renderDialogSurface_unstable)(state, contextValues);
26
23
  });
27
- exports.DialogSurface.displayName = 'DialogSurface';
24
+ DialogSurface.displayName = 'DialogSurface'; //# sourceMappingURL=DialogSurface.js.map
25
+
28
26
  //# sourceMappingURL=DialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","useDialogSurface_1","renderDialogSurface_1","useDialogSurfaceStyles_1","useDialogSurfaceContextValues_1","react_shared_contexts_1","exports","DialogSurface","forwardRef","props","ref","state","useDialogSurface_unstable","contextValues","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderDialogSurface_unstable","displayName"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/DialogSurface.tsx"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,kBAAA,gBAAAD,OAAA;AACA,MAAAE,qBAAA,gBAAAF,OAAA;AACA,MAAAG,wBAAA,gBAAAH,OAAA;AAGA,MAAAI,+BAAA,gBAAAJ,OAAA;AACA,MAAAK,uBAAA,gBAAAL,OAAA;AAEA;;;;AAIaM,OAAA,CAAAC,aAAa,gBAA4CR,KAAK,CAACS,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGV,kBAAA,CAAAW,yBAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EACnD,MAAMG,aAAa,GAAGT,+BAAA,CAAAU,sCAAsC,CAACH,KAAK,CAAC;EAEnER,wBAAA,CAAAY,+BAA+B,CAACJ,KAAK,CAAC;EAEtC,MAAM;IAAEI,+BAA+B,EAAEC;EAAe,CAAE,GAAGX,uBAAA,CAAAY,4BAA4B,EAAE;EAC3FD,eAAe,CAACL,KAAK,CAAC;EAEtB,OAAOT,qBAAA,CAAAgB,4BAA4B,CAACP,KAAK,EAAEE,aAAa,CAAC;AAC3D,CAAC,CAAC;AAEFP,OAAA,CAAAC,aAAa,CAACY,WAAW,GAAG,eAAe"}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/DialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\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 = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n useDialogSurfaceStyles_unstable(state);\n const {\n useDialogSurfaceStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n return renderDialogSurface_unstable(state, contextValues);\n});\nDialogSurface.displayName = 'DialogSurface';\n//# sourceMappingURL=DialogSurface.js.map"],"names":["DialogSurface","React","forwardRef","props","ref","state","useDialogSurface_unstable","contextValues","useDialogSurfaceContextValues_unstable","useDialogSurfaceStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderDialogSurface_unstable","displayName"],"mappings":";;;;+BAUaA;;aAAAA;;;6DAVU;kCACmB;qCACG;wCACG;+CACO;qCACV;AAKtC,MAAMA,gBAAgB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACzE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/C,MAAMG,gBAAgBC,IAAAA,qEAAsC,EAACH;IAC7DI,IAAAA,uDAA+B,EAACJ;IAChC,MAAM,EACJI,iCAAiCC,gBAAe,EACjD,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBL;IAChB,OAAOO,IAAAA,iDAA4B,EAACP,OAAOE;AAC7C;AACAP,cAAca,WAAW,GAAG,iBAC5B,yCAAyC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ //# sourceMappingURL=DialogSurface.types.js.map
6
+
6
7
  //# sourceMappingURL=DialogSurface.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/DialogSurface.types.ts"],"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"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/DialogSurface.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=DialogSurface.types.js.map"],"names":[],"mappings":";;;;CACA,+CAA+C"}
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./DialogSurface"), exports);
8
- tslib_1.__exportStar(require("./DialogSurface.types"), exports);
9
- tslib_1.__exportStar(require("./renderDialogSurface"), exports);
10
- tslib_1.__exportStar(require("./useDialogSurface"), exports);
11
- tslib_1.__exportStar(require("./useDialogSurfaceStyles"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./DialogSurface"), exports);
7
+ _exportStar(require("./DialogSurface.types"), exports);
8
+ _exportStar(require("./renderDialogSurface"), exports);
9
+ _exportStar(require("./useDialogSurface"), exports);
10
+ _exportStar(require("./useDialogSurfaceStyles"), exports);
11
+ //# sourceMappingURL=index.js.map
12
+
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/index.ts"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,8BAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/index.js"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,28 +1,21 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderDialogSurface_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderDialogSurface_unstable
5
8
  });
6
- exports.renderDialogSurface_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const contexts_1 = /*#__PURE__*/require("../../contexts");
10
- const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
11
- /**
12
- * Render the final JSX of DialogSurface
13
- */
14
- const renderDialogSurface_unstable = (state, contextValues) => {
15
- const {
16
- slots,
17
- slotProps
18
- } = react_utilities_1.getSlots(state);
19
- return React.createElement(react_portal_1.Portal, null, slots.backdrop && React.createElement(slots.backdrop, {
20
- ...slotProps.backdrop
21
- }), React.createElement(contexts_1.DialogSurfaceProvider, {
22
- value: contextValues.dialogSurface
23
- }, React.createElement(slots.root, {
24
- ...slotProps.root
25
- })));
26
- };
27
- exports.renderDialogSurface_unstable = renderDialogSurface_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _contexts = require("../../contexts");
13
+ const _reactPortal = require("@fluentui/react-portal");
14
+ const renderDialogSurface_unstable = (state, contextValues)=>{
15
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
16
+ return /*#__PURE__*/ _react.createElement(_reactPortal.Portal, null, slots.backdrop && /*#__PURE__*/ _react.createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/ _react.createElement(_contexts.DialogSurfaceProvider, {
17
+ value: contextValues.dialogSurface
18
+ }, /*#__PURE__*/ _react.createElement(slots.root, slotProps.root)));
19
+ }; //# sourceMappingURL=renderDialogSurface.js.map
20
+
28
21
  //# sourceMappingURL=renderDialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","contexts_1","react_portal_1","renderDialogSurface_unstable","state","contextValues","slots","slotProps","getSlots","createElement","Portal","backdrop","DialogSurfaceProvider","value","dialogSurface","root","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/renderDialogSurface.tsx"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAEA,MAAAE,UAAA,gBAAAF,OAAA;AACA,MAAAG,cAAA,gBAAAH,OAAA;AAEA;;;AAGO,MAAMI,4BAA4B,GAAGA,CAACC,KAAyB,EAAEC,aAAyC,KAAI;EACnH,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGP,iBAAA,CAAAQ,QAAQ,CAAqBJ,KAAK,CAAC;EAEhE,OACEN,KAAA,CAAAW,aAAA,CAACP,cAAA,CAAAQ,MAAM,QACJJ,KAAK,CAACK,QAAQ,IAAIb,KAAA,CAAAW,aAAA,CAACH,KAAK,CAACK,QAAQ;IAAA,GAAKJ,SAAS,CAACI;EAAQ,EAAI,EAC7Db,KAAA,CAAAW,aAAA,CAACR,UAAA,CAAAW,qBAAqB;IAACC,KAAK,EAAER,aAAa,CAACS;EAAa,GACvDhB,KAAA,CAAAW,aAAA,CAACH,KAAK,CAACS,IAAI;IAAA,GAAKR,SAAS,CAACQ;EAAI,EAAI,CACZ,CACjB;AAEb,CAAC;AAXYC,OAAA,CAAAb,4BAA4B,GAAAA,4BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/renderDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state, contextValues) => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(Portal, null, slots.backdrop && /*#__PURE__*/React.createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/React.createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, /*#__PURE__*/React.createElement(slots.root, slotProps.root)));\n};\n//# sourceMappingURL=renderDialogSurface.js.map"],"names":["renderDialogSurface_unstable","state","contextValues","slots","slotProps","getSlots","React","createElement","Portal","backdrop","DialogSurfaceProvider","value","dialogSurface","root"],"mappings":";;;;+BAOaA;;aAAAA;;;6DAPU;gCACE;0BACa;6BACf;AAIhB,MAAMA,+BAA+B,CAACC,OAAOC,gBAAkB;IACpE,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACJ;IACb,OAAO,WAAW,GAAEK,OAAMC,aAAa,CAACC,mBAAM,EAAE,IAAI,EAAEL,MAAMM,QAAQ,IAAI,WAAW,GAAEH,OAAMC,aAAa,CAACJ,MAAMM,QAAQ,EAAEL,UAAUK,QAAQ,GAAG,WAAW,GAAEH,OAAMC,aAAa,CAACG,+BAAqB,EAAE;QACpMC,OAAOT,cAAcU,aAAa;IACpC,GAAG,WAAW,GAAEN,OAAMC,aAAa,CAACJ,MAAMU,IAAI,EAAET,UAAUS,IAAI;AAChE,GACA,+CAA+C"}
@@ -1,89 +1,79 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useDialogSurface_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useDialogSurface_unstable
5
8
  });
6
- exports.useDialogSurface_unstable = void 0;
7
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
8
- const contexts_1 = /*#__PURE__*/require("../../contexts");
9
- const utils_1 = /*#__PURE__*/require("../../utils");
10
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
- /**
12
- * Create the state required to render DialogSurface.
13
- *
14
- * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,
15
- * before being passed to renderDialogSurface_unstable.
16
- *
17
- * @param props - props from this instance of DialogSurface
18
- * @param ref - reference to root HTMLElement of DialogSurface
19
- */
20
- const useDialogSurface_unstable = (props, ref) => {
21
- const {
22
- backdrop,
23
- as
24
- } = props;
25
- const modalType = contexts_1.useDialogContext_unstable(ctx => ctx.modalType);
26
- const inertTrapFocus = contexts_1.useDialogContext_unstable(ctx => ctx.inertTrapFocus);
27
- const dialogRef = contexts_1.useDialogContext_unstable(ctx => ctx.dialogRef);
28
- const open = contexts_1.useDialogContext_unstable(ctx => ctx.open);
29
- const requestOpenChange = contexts_1.useDialogContext_unstable(ctx => ctx.requestOpenChange);
30
- const dialogTitleID = contexts_1.useDialogContext_unstable(ctx => ctx.dialogTitleId);
31
- const handledBackdropClick = react_utilities_1.useEventCallback(event => {
32
- var _a, _b;
33
- if (react_utilities_1.isResolvedShorthand(props.backdrop)) {
34
- (_b = (_a = props.backdrop).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
35
- }
36
- if (modalType === 'modal' && !event.isDefaultPrevented()) {
37
- requestOpenChange({
38
- event,
39
- open: false,
40
- type: 'backdropClick'
41
- });
42
- }
43
- });
44
- const handleKeyDown = react_utilities_1.useEventCallback(event => {
45
- var _a;
46
- (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, event);
47
- if (utils_1.isEscapeKeyDismiss(event, modalType)) {
48
- requestOpenChange({
49
- event,
50
- open: false,
51
- type: 'escapeKeyDown'
52
- });
53
- // stop propagation to avoid conflicting with other elements that listen for `Escape`
54
- // e,g: nested Dialog, Popover, Menu and Tooltip
55
- event.stopPropagation();
56
- }
57
- });
58
- const {
59
- modalAttributes
60
- } = react_tabster_1.useModalAttributes({
61
- trapFocus: modalType !== 'non-modal',
62
- legacyTrapFocus: !inertTrapFocus
63
- });
64
- return {
65
- components: {
66
- backdrop: 'div',
67
- root: 'div'
68
- },
69
- backdrop: react_utilities_1.resolveShorthand(backdrop, {
70
- required: open && modalType !== 'non-modal',
71
- defaultProps: {
72
- 'aria-hidden': 'true',
73
- onClick: handledBackdropClick
74
- }
75
- }),
76
- root: react_utilities_1.getNativeElementProps(as !== null && as !== void 0 ? as : 'div', {
77
- tabIndex: -1,
78
- 'aria-modal': modalType !== 'non-modal',
79
- role: modalType === 'alert' ? 'alertdialog' : 'dialog',
80
- 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,
81
- ...props,
82
- ...modalAttributes,
83
- onKeyDown: handleKeyDown,
84
- ref: react_utilities_1.useMergedRefs(ref, dialogRef)
85
- })
86
- };
87
- };
88
- exports.useDialogSurface_unstable = useDialogSurface_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _contexts = require("../../contexts");
13
+ const _utils = require("../../utils");
14
+ const _reactTabster = require("@fluentui/react-tabster");
15
+ const useDialogSurface_unstable = (props, ref)=>{
16
+ const { backdrop , as } = props;
17
+ const modalType = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.modalType);
18
+ const inertTrapFocus = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.inertTrapFocus);
19
+ const dialogRef = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.dialogRef);
20
+ const open = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.open);
21
+ const requestOpenChange = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.requestOpenChange);
22
+ const dialogTitleID = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.dialogTitleId);
23
+ const handledBackdropClick = (0, _reactUtilities.useEventCallback)((event)=>{
24
+ if ((0, _reactUtilities.isResolvedShorthand)(props.backdrop)) {
25
+ var _props_backdrop, _props_backdrop_onClick;
26
+ (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);
27
+ }
28
+ if (modalType === 'modal' && !event.isDefaultPrevented()) {
29
+ requestOpenChange({
30
+ event,
31
+ open: false,
32
+ type: 'backdropClick'
33
+ });
34
+ }
35
+ });
36
+ const handleKeyDown = (0, _reactUtilities.useEventCallback)((event)=>{
37
+ var _props_onKeyDown;
38
+ (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);
39
+ if ((0, _utils.isEscapeKeyDismiss)(event, modalType)) {
40
+ requestOpenChange({
41
+ event,
42
+ open: false,
43
+ type: 'escapeKeyDown'
44
+ });
45
+ // stop propagation to avoid conflicting with other elements that listen for `Escape`
46
+ // e,g: nested Dialog, Popover, Menu and Tooltip
47
+ event.stopPropagation();
48
+ }
49
+ });
50
+ const { modalAttributes } = (0, _reactTabster.useModalAttributes)({
51
+ trapFocus: modalType !== 'non-modal',
52
+ legacyTrapFocus: !inertTrapFocus
53
+ });
54
+ return {
55
+ components: {
56
+ backdrop: 'div',
57
+ root: 'div'
58
+ },
59
+ backdrop: (0, _reactUtilities.resolveShorthand)(backdrop, {
60
+ required: open && modalType !== 'non-modal',
61
+ defaultProps: {
62
+ 'aria-hidden': 'true',
63
+ onClick: handledBackdropClick
64
+ }
65
+ }),
66
+ root: (0, _reactUtilities.getNativeElementProps)(as !== null && as !== void 0 ? as : 'div', {
67
+ tabIndex: -1,
68
+ 'aria-modal': modalType !== 'non-modal',
69
+ role: modalType === 'alert' ? 'alertdialog' : 'dialog',
70
+ 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,
71
+ ...props,
72
+ ...modalAttributes,
73
+ onKeyDown: handleKeyDown,
74
+ ref: (0, _reactUtilities.useMergedRefs)(ref, dialogRef)
75
+ })
76
+ };
77
+ }; //# sourceMappingURL=useDialogSurface.js.map
78
+
89
79
  //# sourceMappingURL=useDialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_utilities_1","require","contexts_1","utils_1","react_tabster_1","useDialogSurface_unstable","props","ref","backdrop","as","modalType","useDialogContext_unstable","ctx","inertTrapFocus","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","_b","_a","onClick","call","isDefaultPrevented","type","handleKeyDown","onKeyDown","isEscapeKeyDismiss","stopPropagation","modalAttributes","useModalAttributes","trapFocus","legacyTrapFocus","components","root","resolveShorthand","required","defaultProps","getNativeElementProps","tabIndex","role","undefined","useMergedRefs","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurface.ts"],"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"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAaA,MAAAC,UAAA,gBAAAD,OAAA;AACA,MAAAE,OAAA,gBAAAF,OAAA;AACA,MAAAG,eAAA,gBAAAH,OAAA;AAEA;;;;;;;;;AASO,MAAMI,yBAAyB,GAAGA,CACvCC,KAAyB,EACzBC,GAAoC,KACd;EACtB,MAAM;IAAEC,QAAQ;IAAEC;EAAE,CAAE,GAAGH,KAAK;EAC9B,MAAMI,SAAS,GAAGR,UAAA,CAAAS,yBAAyB,CAACC,GAAG,IAAIA,GAAG,CAACF,SAAS,CAAC;EACjE,MAAMG,cAAc,GAAGX,UAAA,CAAAS,yBAAyB,CAACC,GAAG,IAAIA,GAAG,CAACC,cAAc,CAAC;EAC3E,MAAMC,SAAS,GAAGZ,UAAA,CAAAS,yBAAyB,CAACC,GAAG,IAAIA,GAAG,CAACE,SAAS,CAAC;EACjE,MAAMC,IAAI,GAAGb,UAAA,CAAAS,yBAAyB,CAACC,GAAG,IAAIA,GAAG,CAACG,IAAI,CAAC;EACvD,MAAMC,iBAAiB,GAAGd,UAAA,CAAAS,yBAAyB,CAACC,GAAG,IAAIA,GAAG,CAACI,iBAAiB,CAAC;EACjF,MAAMC,aAAa,GAAGf,UAAA,CAAAS,yBAAyB,CAACC,GAAG,IAAIA,GAAG,CAACM,aAAa,CAAC;EAEzE,MAAMC,oBAAoB,GAAGnB,iBAAA,CAAAoB,gBAAgB,CAAEC,KAAuC,IAAI;;IACxF,IAAIrB,iBAAA,CAAAsB,mBAAmB,CAAChB,KAAK,CAACE,QAAQ,CAAC,EAAE;MACvC,CAAAe,EAAA,IAAAC,EAAA,GAAAlB,KAAK,CAACE,QAAQ,EAACiB,OAAO,cAAAF,EAAA,uBAAAA,EAAA,CAAAG,IAAA,CAAAF,EAAA,EAAGH,KAAK,CAAC;;IAEjC,IAAIX,SAAS,KAAK,OAAO,IAAI,CAACW,KAAK,CAACM,kBAAkB,EAAE,EAAE;MACxDX,iBAAiB,CAAC;QAChBK,KAAK;QACLN,IAAI,EAAE,KAAK;QACXa,IAAI,EAAE;OACP,CAAC;;EAEN,CAAC,CAAC;EAEF,MAAMC,aAAa,GAAG7B,iBAAA,CAAAoB,gBAAgB,CAAEC,KAA4D,IAAI;;IACtG,CAAAG,EAAA,GAAAlB,KAAK,CAACwB,SAAS,cAAAN,EAAA,uBAAAA,EAAA,CAAAE,IAAA,CAAfpB,KAAK,EAAae,KAAK,CAAC;IAExB,IAAIlB,OAAA,CAAA4B,kBAAkB,CAACV,KAAK,EAAEX,SAAS,CAAC,EAAE;MACxCM,iBAAiB,CAAC;QAChBK,KAAK;QACLN,IAAI,EAAE,KAAK;QACXa,IAAI,EAAE;OACP,CAAC;MACF;MACA;MACAP,KAAK,CAACW,eAAe,EAAE;;EAE3B,CAAC,CAAC;EAEF,MAAM;IAAEC;EAAe,CAAE,GAAG7B,eAAA,CAAA8B,kBAAkB,CAAC;IAC7CC,SAAS,EAAEzB,SAAS,KAAK,WAAW;IACpC0B,eAAe,EAAE,CAACvB;GACnB,CAAC;EAEF,OAAO;IACLwB,UAAU,EAAE;MACV7B,QAAQ,EAAE,KAAK;MACf8B,IAAI,EAAE;KACP;IACD9B,QAAQ,EAAER,iBAAA,CAAAuC,gBAAgB,CAAC/B,QAAQ,EAAE;MACnCgC,QAAQ,EAAEzB,IAAI,IAAIL,SAAS,KAAK,WAAW;MAC3C+B,YAAY,EAAE;QACZ,aAAa,EAAE,MAAM;QACrBhB,OAAO,EAAEN;;KAEZ,CAAC;IACFmB,IAAI,EAAEtC,iBAAA,CAAA0C,qBAAqB,CAACjC,EAAE,aAAFA,EAAE,cAAFA,EAAE,GAAI,KAAK,EAAE;MACvCkC,QAAQ,EAAE,CAAC,CAAC;MACZ,YAAY,EAAEjC,SAAS,KAAK,WAAW;MACvCkC,IAAI,EAAElC,SAAS,KAAK,OAAO,GAAG,aAAa,GAAG,QAAQ;MACtD,iBAAiB,EAAEJ,KAAK,CAAC,YAAY,CAAC,GAAGuC,SAAS,GAAG5B,aAAa;MAClE,GAAGX,KAAK;MACR,GAAG2B,eAAe;MAClBH,SAAS,EAAED,aAAa;MACxBtB,GAAG,EAAEP,iBAAA,CAAA8C,aAAa,CAACvC,GAAG,EAAEO,SAAS;KAClC;GACF;AACH,CAAC;AApEYiC,OAAA,CAAA1C,yBAAyB,GAAAA,yBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs, isResolvedShorthand } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\nimport { useModalAttributes } from '@fluentui/react-tabster';\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 = (props, ref) => {\n const {\n backdrop,\n as\n } = 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 const handledBackdropClick = useEventCallback(event => {\n if (isResolvedShorthand(props.backdrop)) {\n var _props_backdrop, _props_backdrop_onClick;\n (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick'\n });\n }\n });\n const handleKeyDown = useEventCallback(event => {\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\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 const {\n modalAttributes\n } = useModalAttributes({\n trapFocus: modalType !== 'non-modal',\n legacyTrapFocus: !inertTrapFocus\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 !== null && as !== void 0 ? as : 'div', {\n tabIndex: -1,\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//# sourceMappingURL=useDialogSurface.js.map"],"names":["useDialogSurface_unstable","props","ref","backdrop","as","modalType","useDialogContext_unstable","ctx","inertTrapFocus","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","isEscapeKeyDismiss","stopPropagation","modalAttributes","useModalAttributes","trapFocus","legacyTrapFocus","components","root","resolveShorthand","required","defaultProps","getNativeElementProps","tabIndex","role","undefined","useMergedRefs"],"mappings":";;;;+BAcaA;;aAAAA;;;6DAdU;gCACuF;0BACpE;uBACP;8BACA;AAU5B,MAAMA,4BAA4B,CAACC,OAAOC,MAAQ;IACvD,MAAM,EACJC,SAAQ,EACRC,GAAE,EACH,GAAGH;IACJ,MAAMI,YAAYC,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIF,SAAS;IAChE,MAAMG,iBAAiBF,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIC,cAAc;IAC1E,MAAMC,YAAYH,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIE,SAAS;IAChE,MAAMC,OAAOJ,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBL,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAII,iBAAiB;IAChF,MAAMC,gBAAgBN,IAAAA,mCAAyB,EAACC,CAAAA,MAAOA,IAAIM,aAAa;IACxE,MAAMC,uBAAuBC,IAAAA,gCAAgB,EAACC,CAAAA,QAAS;QACrD,IAAIC,IAAAA,mCAAmB,EAAChB,MAAME,QAAQ,GAAG;YACvC,IAAIe,iBAAiBC;YACpBA,CAAAA,0BAA0B,AAACD,CAAAA,kBAAkBjB,MAAME,QAAQ,AAAD,EAAGiB,OAAO,AAAD,MAAO,IAAI,IAAID,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBE,IAAI,CAACH,iBAAiBF,MAAM;QACvL,CAAC;QACD,IAAIX,cAAc,WAAW,CAACW,MAAMM,kBAAkB,IAAI;YACxDX,kBAAkB;gBAChBK;gBACAN,MAAM,KAAK;gBACXa,MAAM;YACR;QACF,CAAC;IACH;IACA,MAAMC,gBAAgBT,IAAAA,gCAAgB,EAACC,CAAAA,QAAS;QAC9C,IAAIS;QACHA,CAAAA,mBAAmBxB,MAAMyB,SAAS,AAAD,MAAO,IAAI,IAAID,qBAAqB,KAAK,IAAI,KAAK,IAAIA,iBAAiBJ,IAAI,CAACpB,OAAOe,MAAM;QAC3H,IAAIW,IAAAA,yBAAkB,EAACX,OAAOX,YAAY;YACxCM,kBAAkB;gBAChBK;gBACAN,MAAM,KAAK;gBACXa,MAAM;YACR;YACA,qFAAqF;YACrF,gDAAgD;YAChDP,MAAMY,eAAe;QACvB,CAAC;IACH;IACA,MAAM,EACJC,gBAAe,EAChB,GAAGC,IAAAA,gCAAkB,EAAC;QACrBC,WAAW1B,cAAc;QACzB2B,iBAAiB,CAACxB;IACpB;IACA,OAAO;QACLyB,YAAY;YACV9B,UAAU;YACV+B,MAAM;QACR;QACA/B,UAAUgC,IAAAA,gCAAgB,EAAChC,UAAU;YACnCiC,UAAU1B,QAAQL,cAAc;YAChCgC,cAAc;gBACZ,eAAe;gBACfjB,SAASN;YACX;QACF;QACAoB,MAAMI,IAAAA,qCAAqB,EAAClC,OAAO,IAAI,IAAIA,OAAO,KAAK,IAAIA,KAAK,KAAK,EAAE;YACrEmC,UAAU,CAAC;YACX,cAAclC,cAAc;YAC5BmC,MAAMnC,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBJ,KAAK,CAAC,aAAa,GAAGwC,YAAY7B,aAAa;YAClE,GAAGX,KAAK;YACR,GAAG4B,eAAe;YAClBH,WAAWF;YACXtB,KAAKwC,IAAAA,6BAAa,EAACxC,KAAKO;QAC1B;IACF;AACF,GACA,4CAA4C"}
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useDialogSurfaceContextValues_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useDialogSurfaceContextValues_unstable
5
8
  });
6
- exports.useDialogSurfaceContextValues_unstable = void 0;
7
9
  function useDialogSurfaceContextValues_unstable(state) {
8
- const dialogSurface = true;
9
- return {
10
- dialogSurface
11
- };
12
- }
13
- exports.useDialogSurfaceContextValues_unstable = useDialogSurfaceContextValues_unstable;
10
+ const dialogSurface = true;
11
+ return {
12
+ dialogSurface
13
+ };
14
+ } //# sourceMappingURL=useDialogSurfaceContextValues.js.map
15
+
14
16
  //# sourceMappingURL=useDialogSurfaceContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useDialogSurfaceContextValues_unstable","state","dialogSurface","exports"],"sources":["../src/packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurfaceContextValues.ts"],"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"],"mappings":";;;;;;AAGA,SAAgBA,sCAAsCA,CAACC,KAAyB;EAC9E,MAAMC,aAAa,GAA8B,IAAI;EAErD,OAAO;IAAEA;EAAa,CAAE;AAC1B;AAJAC,OAAA,CAAAH,sCAAA,GAAAA,sCAAA"}
1
+ {"version":3,"sources":["../../../lib/components/DialogSurface/useDialogSurfaceContextValues.js"],"sourcesContent":["export function useDialogSurfaceContextValues_unstable(state) {\n const dialogSurface = true;\n return {\n dialogSurface\n };\n}\n//# sourceMappingURL=useDialogSurfaceContextValues.js.map"],"names":["useDialogSurfaceContextValues_unstable","state","dialogSurface"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,uCAAuCC,KAAK,EAAE;IAC5D,MAAMC,gBAAgB,IAAI;IAC1B,OAAO;QACLA;IACF;AACF,EACA,yDAAyD"}