@fluentui/react-dialog 9.0.0-beta.10

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 (253) hide show
  1. package/CHANGELOG.json +527 -0
  2. package/CHANGELOG.md +199 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/Spec.md +537 -0
  6. package/assets/AlertDialogKeyboardInteraction.png +0 -0
  7. package/assets/AlertDialogMouseInteraction.png +0 -0
  8. package/assets/ModalDialogKeyboardInteraction.png +0 -0
  9. package/assets/ModalDialogMouseInteraction.png +0 -0
  10. package/assets/NonModalDialogKeyboardInteraction.png +0 -0
  11. package/assets/NonModalDialogMouseInteraction.png +0 -0
  12. package/dist/index.d.ts +451 -0
  13. package/lib/Dialog.js +2 -0
  14. package/lib/Dialog.js.map +1 -0
  15. package/lib/DialogActions.js +2 -0
  16. package/lib/DialogActions.js.map +1 -0
  17. package/lib/DialogBody.js +2 -0
  18. package/lib/DialogBody.js.map +1 -0
  19. package/lib/DialogContent.js +2 -0
  20. package/lib/DialogContent.js.map +1 -0
  21. package/lib/DialogSurface.js +2 -0
  22. package/lib/DialogSurface.js.map +1 -0
  23. package/lib/DialogTitle.js +2 -0
  24. package/lib/DialogTitle.js.map +1 -0
  25. package/lib/DialogTrigger.js +2 -0
  26. package/lib/DialogTrigger.js.map +1 -0
  27. package/lib/components/Dialog/Dialog.js +19 -0
  28. package/lib/components/Dialog/Dialog.js.map +1 -0
  29. package/lib/components/Dialog/Dialog.types.js +2 -0
  30. package/lib/components/Dialog/Dialog.types.js.map +1 -0
  31. package/lib/components/Dialog/index.js +5 -0
  32. package/lib/components/Dialog/index.js.map +1 -0
  33. package/lib/components/Dialog/renderDialog.js +18 -0
  34. package/lib/components/Dialog/renderDialog.js.map +1 -0
  35. package/lib/components/Dialog/useDialog.js +87 -0
  36. package/lib/components/Dialog/useDialog.js.map +1 -0
  37. package/lib/components/Dialog/useDialogContextValues.js +31 -0
  38. package/lib/components/Dialog/useDialogContextValues.js.map +1 -0
  39. package/lib/components/DialogActions/DialogActions.js +16 -0
  40. package/lib/components/DialogActions/DialogActions.js.map +1 -0
  41. package/lib/components/DialogActions/DialogActions.types.js +2 -0
  42. package/lib/components/DialogActions/DialogActions.types.js.map +1 -0
  43. package/lib/components/DialogActions/index.js +6 -0
  44. package/lib/components/DialogActions/index.js.map +1 -0
  45. package/lib/components/DialogActions/renderDialogActions.js +16 -0
  46. package/lib/components/DialogActions/renderDialogActions.js.map +1 -0
  47. package/lib/components/DialogActions/useDialogActions.js +27 -0
  48. package/lib/components/DialogActions/useDialogActions.js.map +1 -0
  49. package/lib/components/DialogActions/useDialogActionsStyles.js +49 -0
  50. package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -0
  51. package/lib/components/DialogBody/DialogBody.js +16 -0
  52. package/lib/components/DialogBody/DialogBody.js.map +1 -0
  53. package/lib/components/DialogBody/DialogBody.types.js +2 -0
  54. package/lib/components/DialogBody/DialogBody.types.js.map +1 -0
  55. package/lib/components/DialogBody/index.js +6 -0
  56. package/lib/components/DialogBody/index.js.map +1 -0
  57. package/lib/components/DialogBody/renderDialogBody.js +16 -0
  58. package/lib/components/DialogBody/renderDialogBody.js.map +1 -0
  59. package/lib/components/DialogBody/useDialogBody.js +25 -0
  60. package/lib/components/DialogBody/useDialogBody.js.map +1 -0
  61. package/lib/components/DialogBody/useDialogBodyStyles.js +50 -0
  62. package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -0
  63. package/lib/components/DialogContent/DialogContent.js +16 -0
  64. package/lib/components/DialogContent/DialogContent.js.map +1 -0
  65. package/lib/components/DialogContent/DialogContent.types.js +2 -0
  66. package/lib/components/DialogContent/DialogContent.types.js.map +1 -0
  67. package/lib/components/DialogContent/index.js +6 -0
  68. package/lib/components/DialogContent/index.js.map +1 -0
  69. package/lib/components/DialogContent/renderDialogContent.js +15 -0
  70. package/lib/components/DialogContent/renderDialogContent.js.map +1 -0
  71. package/lib/components/DialogContent/useDialogContent.js +28 -0
  72. package/lib/components/DialogContent/useDialogContent.js.map +1 -0
  73. package/lib/components/DialogContent/useDialogContentStyles.js +40 -0
  74. package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -0
  75. package/lib/components/DialogSurface/DialogSurface.js +18 -0
  76. package/lib/components/DialogSurface/DialogSurface.js.map +1 -0
  77. package/lib/components/DialogSurface/DialogSurface.types.js +2 -0
  78. package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -0
  79. package/lib/components/DialogSurface/index.js +6 -0
  80. package/lib/components/DialogSurface/index.js.map +1 -0
  81. package/lib/components/DialogSurface/renderDialogSurface.js +20 -0
  82. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -0
  83. package/lib/components/DialogSurface/useDialogSurface.js +158 -0
  84. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -0
  85. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js +7 -0
  86. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -0
  87. package/lib/components/DialogSurface/useDialogSurfaceStyles.js +95 -0
  88. package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -0
  89. package/lib/components/DialogTitle/DialogTitle.js +16 -0
  90. package/lib/components/DialogTitle/DialogTitle.js.map +1 -0
  91. package/lib/components/DialogTitle/DialogTitle.types.js +2 -0
  92. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -0
  93. package/lib/components/DialogTitle/index.js +6 -0
  94. package/lib/components/DialogTitle/index.js.map +1 -0
  95. package/lib/components/DialogTitle/renderDialogTitle.js +16 -0
  96. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -0
  97. package/lib/components/DialogTitle/useDialogTitle.js +48 -0
  98. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -0
  99. package/lib/components/DialogTitle/useDialogTitleStyles.js +116 -0
  100. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -0
  101. package/lib/components/DialogTrigger/DialogTrigger.js +20 -0
  102. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -0
  103. package/lib/components/DialogTrigger/DialogTrigger.types.js +2 -0
  104. package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -0
  105. package/lib/components/DialogTrigger/index.js +5 -0
  106. package/lib/components/DialogTrigger/index.js.map +1 -0
  107. package/lib/components/DialogTrigger/renderDialogTrigger.js +7 -0
  108. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -0
  109. package/lib/components/DialogTrigger/useDialogTrigger.js +48 -0
  110. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -0
  111. package/lib/contexts/constants.js +11 -0
  112. package/lib/contexts/constants.js.map +1 -0
  113. package/lib/contexts/dialogContext.js +19 -0
  114. package/lib/contexts/dialogContext.js.map +1 -0
  115. package/lib/contexts/dialogSurfaceContext.js +10 -0
  116. package/lib/contexts/dialogSurfaceContext.js.map +1 -0
  117. package/lib/contexts/index.js +4 -0
  118. package/lib/contexts/index.js.map +1 -0
  119. package/lib/index.js +8 -0
  120. package/lib/index.js.map +1 -0
  121. package/lib/utils/index.js +6 -0
  122. package/lib/utils/index.js.map +1 -0
  123. package/lib/utils/isEscapeKeyDown.js +12 -0
  124. package/lib/utils/isEscapeKeyDown.js.map +1 -0
  125. package/lib/utils/isHTMLDialogElement.js +4 -0
  126. package/lib/utils/isHTMLDialogElement.js.map +1 -0
  127. package/lib/utils/useControlNativeDialogOpenState.js +20 -0
  128. package/lib/utils/useControlNativeDialogOpenState.js.map +1 -0
  129. package/lib/utils/useDisableBodyScroll.js +60 -0
  130. package/lib/utils/useDisableBodyScroll.js.map +1 -0
  131. package/lib/utils/useFocusFirstElement.js +41 -0
  132. package/lib/utils/useFocusFirstElement.js.map +1 -0
  133. package/lib-commonjs/Dialog.js +10 -0
  134. package/lib-commonjs/Dialog.js.map +1 -0
  135. package/lib-commonjs/DialogActions.js +10 -0
  136. package/lib-commonjs/DialogActions.js.map +1 -0
  137. package/lib-commonjs/DialogBody.js +10 -0
  138. package/lib-commonjs/DialogBody.js.map +1 -0
  139. package/lib-commonjs/DialogContent.js +10 -0
  140. package/lib-commonjs/DialogContent.js.map +1 -0
  141. package/lib-commonjs/DialogSurface.js +10 -0
  142. package/lib-commonjs/DialogSurface.js.map +1 -0
  143. package/lib-commonjs/DialogTitle.js +10 -0
  144. package/lib-commonjs/DialogTitle.js.map +1 -0
  145. package/lib-commonjs/DialogTrigger.js +10 -0
  146. package/lib-commonjs/DialogTrigger.js.map +1 -0
  147. package/lib-commonjs/components/Dialog/Dialog.js +30 -0
  148. package/lib-commonjs/components/Dialog/Dialog.js.map +1 -0
  149. package/lib-commonjs/components/Dialog/Dialog.types.js +6 -0
  150. package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -0
  151. package/lib-commonjs/components/Dialog/index.js +16 -0
  152. package/lib-commonjs/components/Dialog/index.js.map +1 -0
  153. package/lib-commonjs/components/Dialog/renderDialog.js +29 -0
  154. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -0
  155. package/lib-commonjs/components/Dialog/useDialog.js +101 -0
  156. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -0
  157. package/lib-commonjs/components/Dialog/useDialogContextValues.js +40 -0
  158. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -0
  159. package/lib-commonjs/components/DialogActions/DialogActions.js +27 -0
  160. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -0
  161. package/lib-commonjs/components/DialogActions/DialogActions.types.js +6 -0
  162. package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -0
  163. package/lib-commonjs/components/DialogActions/index.js +18 -0
  164. package/lib-commonjs/components/DialogActions/index.js.map +1 -0
  165. package/lib-commonjs/components/DialogActions/renderDialogActions.js +27 -0
  166. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -0
  167. package/lib-commonjs/components/DialogActions/useDialogActions.js +37 -0
  168. package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -0
  169. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +60 -0
  170. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -0
  171. package/lib-commonjs/components/DialogBody/DialogBody.js +27 -0
  172. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -0
  173. package/lib-commonjs/components/DialogBody/DialogBody.types.js +6 -0
  174. package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -0
  175. package/lib-commonjs/components/DialogBody/index.js +18 -0
  176. package/lib-commonjs/components/DialogBody/index.js.map +1 -0
  177. package/lib-commonjs/components/DialogBody/renderDialogBody.js +27 -0
  178. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -0
  179. package/lib-commonjs/components/DialogBody/useDialogBody.js +35 -0
  180. package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -0
  181. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +61 -0
  182. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -0
  183. package/lib-commonjs/components/DialogContent/DialogContent.js +27 -0
  184. package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -0
  185. package/lib-commonjs/components/DialogContent/DialogContent.types.js +6 -0
  186. package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -0
  187. package/lib-commonjs/components/DialogContent/index.js +18 -0
  188. package/lib-commonjs/components/DialogContent/index.js.map +1 -0
  189. package/lib-commonjs/components/DialogContent/renderDialogContent.js +26 -0
  190. package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -0
  191. package/lib-commonjs/components/DialogContent/useDialogContent.js +39 -0
  192. package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -0
  193. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +52 -0
  194. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -0
  195. package/lib-commonjs/components/DialogSurface/DialogSurface.js +30 -0
  196. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -0
  197. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js +6 -0
  198. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -0
  199. package/lib-commonjs/components/DialogSurface/index.js +18 -0
  200. package/lib-commonjs/components/DialogSurface/index.js.map +1 -0
  201. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +33 -0
  202. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -0
  203. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +171 -0
  204. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -0
  205. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +16 -0
  206. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -0
  207. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +107 -0
  208. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -0
  209. package/lib-commonjs/components/DialogTitle/DialogTitle.js +27 -0
  210. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -0
  211. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js +6 -0
  212. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -0
  213. package/lib-commonjs/components/DialogTitle/index.js +18 -0
  214. package/lib-commonjs/components/DialogTitle/index.js.map +1 -0
  215. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +27 -0
  216. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -0
  217. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +64 -0
  218. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -0
  219. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +129 -0
  220. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -0
  221. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +31 -0
  222. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -0
  223. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +6 -0
  224. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -0
  225. package/lib-commonjs/components/DialogTrigger/index.js +16 -0
  226. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -0
  227. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +16 -0
  228. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -0
  229. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +62 -0
  230. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -0
  231. package/lib-commonjs/contexts/constants.js +17 -0
  232. package/lib-commonjs/contexts/constants.js.map +1 -0
  233. package/lib-commonjs/contexts/dialogContext.js +30 -0
  234. package/lib-commonjs/contexts/dialogContext.js.map +1 -0
  235. package/lib-commonjs/contexts/dialogSurfaceContext.js +21 -0
  236. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -0
  237. package/lib-commonjs/contexts/index.js +14 -0
  238. package/lib-commonjs/contexts/index.js.map +1 -0
  239. package/lib-commonjs/index.js +214 -0
  240. package/lib-commonjs/index.js.map +1 -0
  241. package/lib-commonjs/utils/index.js +18 -0
  242. package/lib-commonjs/utils/index.js.map +1 -0
  243. package/lib-commonjs/utils/isEscapeKeyDown.js +23 -0
  244. package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -0
  245. package/lib-commonjs/utils/isHTMLDialogElement.js +13 -0
  246. package/lib-commonjs/utils/isHTMLDialogElement.js.map +1 -0
  247. package/lib-commonjs/utils/useControlNativeDialogOpenState.js +31 -0
  248. package/lib-commonjs/utils/useControlNativeDialogOpenState.js.map +1 -0
  249. package/lib-commonjs/utils/useDisableBodyScroll.js +73 -0
  250. package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -0
  251. package/lib-commonjs/utils/useFocusFirstElement.js +54 -0
  252. package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -0
  253. package/package.json +68 -0
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialog_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
13
+
14
+ const utils_1 = /*#__PURE__*/require("../../utils");
15
+
16
+ const contexts_1 = /*#__PURE__*/require("../../contexts");
17
+ /**
18
+ * Create the state required to render Dialog.
19
+ *
20
+ * The returned state can be modified with hooks such as useDialogStyles_unstable,
21
+ * before being passed to renderDialog_unstable.
22
+ *
23
+ * @param props - props from this instance of Dialog
24
+ */
25
+
26
+
27
+ const useDialog_unstable = props => {
28
+ const {
29
+ children,
30
+ modalType = 'modal',
31
+ onOpenChange
32
+ } = props;
33
+ const [trigger, content] = childrenToTriggerAndContent(children);
34
+ const [open, setOpen] = react_utilities_1.useControllableState({
35
+ state: props.open,
36
+ defaultState: props.defaultOpen,
37
+ initialState: false
38
+ });
39
+ const requestOpenChange = react_utilities_1.useEventCallback(data => {
40
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(data.event, data); // if user prevents default then do not change state value
41
+ // otherwise updates state value and trigger reference to the element that caused the opening
42
+
43
+ if (!data.event.isDefaultPrevented()) {
44
+ setOpen(data.open);
45
+ }
46
+ });
47
+ const focusRef = utils_1.useFocusFirstElement(open, modalType);
48
+ const nativeControlRef = utils_1.useControlNativeDialogOpenState(open, modalType);
49
+ const disableBodyScroll = utils_1.useDisableBodyScroll();
50
+ const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');
51
+ react_utilities_1.useIsomorphicLayoutEffect(() => {
52
+ if (isBodyScrollLocked) {
53
+ return disableBodyScroll();
54
+ }
55
+ }, [disableBodyScroll, isBodyScrollLocked]);
56
+ return {
57
+ components: {
58
+ backdrop: 'div'
59
+ },
60
+ open,
61
+ modalType,
62
+ content: open ? content : null,
63
+ trigger,
64
+ requestOpenChange,
65
+ dialogContentId: react_utilities_1.useId('dialog-content-'),
66
+ dialogTitleId: react_utilities_1.useId('dialog-title-'),
67
+ isNestedDialog: react_context_selector_1.useHasParentContext(contexts_1.DialogContext),
68
+ dialogRef: react_utilities_1.useMergedRefs(focusRef, nativeControlRef)
69
+ };
70
+ };
71
+
72
+ exports.useDialog_unstable = useDialog_unstable;
73
+ /**
74
+ * Extracts trigger and content from children
75
+ */
76
+
77
+ function childrenToTriggerAndContent(children) {
78
+ const childrenArray = React.Children.toArray(children);
79
+
80
+ if (process.env.NODE_ENV !== 'production') {
81
+ if (childrenArray.length !== 1 && childrenArray.length !== 2) {
82
+ // eslint-disable-next-line no-console
83
+ console.warn('Dialog must contain at least one child <DialogSurface/>,\n' + 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)');
84
+ }
85
+ }
86
+
87
+ switch (childrenArray.length) {
88
+ // case where there's a trigger followed by content
89
+ case 2:
90
+ return childrenArray;
91
+ // case where there's only content
92
+
93
+ case 1:
94
+ return [undefined, childrenArray[0]];
95
+ // unknown case
96
+
97
+ default:
98
+ return [undefined, undefined];
99
+ }
100
+ }
101
+ //# sourceMappingURL=useDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/useDialog.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAOA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAIA;;;;;;;AAOG;;;AACI,MAAM,kBAAkB,GAAI,KAAD,IAAoC;EACpE,MAAM;IAAE,QAAF;IAAY,SAAS,GAAG,OAAxB;IAAiC;EAAjC,IAAkD,KAAxD;EAEA,MAAM,CAAC,OAAD,EAAU,OAAV,IAAqB,2BAA2B,CAAC,QAAD,CAAtD;EAEA,MAAM,CAAC,IAAD,EAAO,OAAP,IAAkB,iBAAA,CAAA,oBAAA,CAAqB;IAC3C,KAAK,EAAE,KAAK,CAAC,IAD8B;IAE3C,YAAY,EAAE,KAAK,CAAC,WAFuB;IAG3C,YAAY,EAAE;EAH6B,CAArB,CAAxB;EAMA,MAAM,iBAAiB,GAAG,iBAAA,CAAA,gBAAA,CAAkB,IAAD,IAA+B;IACxE,YAAY,KAAA,IAAZ,IAAA,YAAY,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAA,YAAY,CAAG,IAAI,CAAC,KAAR,EAAe,IAAf,CAAZ,CADwE,CAGxE;IACA;;IACA,IAAI,CAAC,IAAI,CAAC,KAAL,CAAW,kBAAX,EAAL,EAAsC;MACpC,OAAO,CAAC,IAAI,CAAC,IAAN,CAAP;IACD;EACF,CARyB,CAA1B;EAUA,MAAM,QAAQ,GAAG,OAAA,CAAA,oBAAA,CAAqB,IAArB,EAA2B,SAA3B,CAAjB;EACA,MAAM,gBAAgB,GAAG,OAAA,CAAA,+BAAA,CAAgC,IAAhC,EAAsC,SAAtC,CAAzB;EACA,MAAM,iBAAiB,GAAG,OAAA,CAAA,oBAAA,EAA1B;EACA,MAAM,kBAAkB,GAAG,OAAO,CAAC,IAAI,IAAI,SAAS,KAAK,WAAvB,CAAlC;EAEA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;IAC7B,IAAI,kBAAJ,EAAwB;MACtB,OAAO,iBAAiB,EAAxB;IACD;EACF,CAJD,EAIG,CAAC,iBAAD,EAAoB,kBAApB,CAJH;EAMA,OAAO;IACL,UAAU,EAAE;MACV,QAAQ,EAAE;IADA,CADP;IAIL,IAJK;IAKL,SALK;IAML,OAAO,EAAE,IAAI,GAAG,OAAH,GAAa,IANrB;IAOL,OAPK;IAQL,iBARK;IASL,eAAe,EAAE,iBAAA,CAAA,KAAA,CAAM,iBAAN,CATZ;IAUL,aAAa,EAAE,iBAAA,CAAA,KAAA,CAAM,eAAN,CAVV;IAWL,cAAc,EAAE,wBAAA,CAAA,mBAAA,CAAoB,UAAA,CAAA,aAApB,CAXX;IAYL,SAAS,EAAE,iBAAA,CAAA,aAAA,CAAc,QAAd,EAAwB,gBAAxB;EAZN,CAAP;AAcD,CA9CM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB;AAgDb;;AAEG;;AACH,SAAS,2BAAT,CACE,QADF,EAC2B;EAEzB,MAAM,aAAa,GAAG,KAAK,CAAC,QAAN,CAAe,OAAf,CAAuB,QAAvB,CAAtB;;EACA,IAAI,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA7B,EAA2C;IACzC,IAAI,aAAa,CAAC,MAAd,KAAyB,CAAzB,IAA8B,aAAa,CAAC,MAAd,KAAyB,CAA3D,EAA8D;MAC5D;MACA,OAAO,CAAC,IAAR,CACE,+DACE,4EAFJ;IAID;EACF;;EACD,QAAQ,aAAa,CAAC,MAAtB;IACE;IACA,KAAK,CAAL;MACE,OAAO,aAAP;IACF;;IACA,KAAK,CAAL;MACE,OAAO,CAAC,SAAD,EAAY,aAAa,CAAC,CAAD,CAAzB,CAAP;IACF;;IACA;MACE,OAAO,CAAC,SAAD,EAAY,SAAZ,CAAP;EATJ;AAWD","sourcesContent":["import * as React from 'react';\nimport {\n useControllableState,\n useEventCallback,\n useId,\n useIsomorphicLayoutEffect,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useControlNativeDialogOpenState, useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const nativeControlRef = useControlNativeDialogOpenState(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogContentId: useId('dialog-content-'),\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: useMergedRefs(focusRef, nativeControlRef),\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogContextValues_unstable = void 0;
7
+
8
+ function useDialogContextValues_unstable(state) {
9
+ const {
10
+ modalType,
11
+ open,
12
+ dialogContentId,
13
+ dialogRef,
14
+ dialogTitleId,
15
+ isNestedDialog,
16
+ requestOpenChange
17
+ } = state;
18
+ /**
19
+ * This context is created with "@fluentui/react-context-selector",
20
+ * there is no sense to memoize it
21
+ */
22
+
23
+ const dialog = {
24
+ open,
25
+ modalType,
26
+ dialogRef,
27
+ dialogContentId,
28
+ dialogTitleId,
29
+ isNestedDialog,
30
+ requestOpenChange
31
+ };
32
+ const dialogSurface = false;
33
+ return {
34
+ dialog,
35
+ dialogSurface
36
+ };
37
+ }
38
+
39
+ exports.useDialogContextValues_unstable = useDialogContextValues_unstable;
40
+ //# sourceMappingURL=useDialogContextValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/useDialogContextValues.ts"],"names":[],"mappings":";;;;;;;AAGA,SAAgB,+BAAhB,CAAgD,KAAhD,EAAkE;EAChE,MAAM;IAAE,SAAF;IAAa,IAAb;IAAmB,eAAnB;IAAoC,SAApC;IAA+C,aAA/C;IAA8D,cAA9D;IAA8E;EAA9E,IAAoG,KAA1G;EAEA;;;AAGG;;EACH,MAAM,MAAM,GAAuB;IACjC,IADiC;IAEjC,SAFiC;IAGjC,SAHiC;IAIjC,eAJiC;IAKjC,aALiC;IAMjC,cANiC;IAOjC;EAPiC,CAAnC;EAUA,MAAM,aAAa,GAA8B,KAAjD;EAEA,OAAO;IAAE,MAAF;IAAU;EAAV,CAAP;AACD;;AApBD,OAAA,CAAA,+BAAA,GAAA,+BAAA","sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const { modalType, open, dialogContentId, dialogRef, dialogTitleId, isNestedDialog, requestOpenChange } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogContentId,\n dialogTitleId,\n isNestedDialog,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DialogActions = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useDialogActions_1 = /*#__PURE__*/require("./useDialogActions");
11
+
12
+ const renderDialogActions_1 = /*#__PURE__*/require("./renderDialogActions");
13
+
14
+ const useDialogActionsStyles_1 = /*#__PURE__*/require("./useDialogActionsStyles");
15
+ /**
16
+ * `DialogActions` is a container for the actions of the dialog.
17
+ * Apart from styling, this component does not have other behavior.
18
+ */
19
+
20
+
21
+ exports.DialogActions = /*#__PURE__*/React.forwardRef((props, ref) => {
22
+ const state = useDialogActions_1.useDialogActions_unstable(props, ref);
23
+ useDialogActionsStyles_1.useDialogActionsStyles_unstable(state);
24
+ return renderDialogActions_1.renderDialogActions_unstable(state);
25
+ });
26
+ exports.DialogActions.displayName = 'DialogActions';
27
+ //# sourceMappingURL=DialogActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogActions/DialogActions.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAIA;;;AAGG;;;AACU,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM,KAAK,GAAG,kBAAA,CAAA,yBAAA,CAA0B,KAA1B,EAAiC,GAAjC,CAAd;EAEA,wBAAA,CAAA,+BAAA,CAAgC,KAAhC;EACA,OAAO,qBAAA,CAAA,4BAAA,CAA6B,KAA7B,CAAP;AACD,CALqE,CAAzD;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=DialogActions.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./DialogActions"), exports);
10
+
11
+ tslib_1.__exportStar(require("./DialogActions.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderDialogActions"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useDialogActions"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useDialogActionsStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogActions/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderDialogActions_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+ /**
12
+ * Render the final JSX of DialogActions
13
+ */
14
+
15
+
16
+ const renderDialogActions_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state); // TODO Add additional slots in the appropriate place
21
+
22
+ return React.createElement(slots.root, { ...slotProps.root
23
+ });
24
+ };
25
+
26
+ exports.renderDialogActions_unstable = renderDialogActions_unstable;
27
+ //# sourceMappingURL=renderDialogActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogActions/renderDialogActions.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,4BAA4B,GAAI,KAAD,IAA8B;EACxE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA6B,KAA7B,CAA7B,CADwE,CAGxE;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogActionsState, DialogActionsSlots } from './DialogActions.types';\n\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = (state: DialogActionsState) => {\n const { slots, slotProps } = getSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogActions_unstable = void 0;
7
+
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ /**
10
+ * Create the state required to render DialogActions.
11
+ *
12
+ * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,
13
+ * before being passed to renderDialogActions_unstable.
14
+ *
15
+ * @param props - props from this instance of DialogActions
16
+ * @param ref - reference to root HTMLElement of DialogActions
17
+ */
18
+
19
+
20
+ const useDialogActions_unstable = (props, ref) => {
21
+ const {
22
+ position = 'end'
23
+ } = props;
24
+ return {
25
+ components: {
26
+ root: 'div'
27
+ },
28
+ root: react_utilities_1.getNativeElementProps('div', {
29
+ ref,
30
+ ...props
31
+ }),
32
+ position
33
+ };
34
+ };
35
+
36
+ exports.useDialogActions_unstable = useDialogActions_unstable;
37
+ //# sourceMappingURL=useDialogActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogActions/useDialogActions.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,yBAAyB,GAAG,CACvC,KADuC,EAEvC,GAFuC,KAGjB;EACtB,MAAM;IAAE,QAAQ,GAAG;EAAb,IAAuB,KAA7B;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GADiC;MAEjC,GAAG;IAF8B,CAA7B,CAJD;IAQL;EARK,CAAP;AAUD,CAfM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogActionsProps, DialogActionsState } from './DialogActions.types';\n\n/**\n * Create the state required to render DialogActions.\n *\n * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,\n * before being passed to renderDialogActions_unstable.\n *\n * @param props - props from this instance of DialogActions\n * @param ref - reference to root HTMLElement of DialogActions\n */\nexport const useDialogActions_unstable = (\n props: DialogActionsProps,\n ref: React.Ref<HTMLElement>,\n): DialogActionsState => {\n const { position = 'end' } = props;\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n position,\n };\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogActionsStyles_unstable = exports.dialogActionsClassNames = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const constants_1 = /*#__PURE__*/require("../../contexts/constants");
11
+
12
+ exports.dialogActionsClassNames = {
13
+ root: 'fui-DialogActions'
14
+ };
15
+
16
+ const useStyles = /*#__PURE__*/react_1.__styles({
17
+ "root": {
18
+ "Bqenvij": "f3052tw",
19
+ "B7ck84d": "f1ewtqcl",
20
+ "mc9l5x": "f22iagw",
21
+ "i8kkvl": "f4px1ci",
22
+ "Belr9w4": "fn67r4l",
23
+ "Bmdcpmo": "f6glcwc",
24
+ "th9wkt": "f1e3st1r"
25
+ },
26
+ "gridPositionEnd": {
27
+ "Bdqf98w": "f1a7i8kp",
28
+ "Ijaq50": "f11u0jfc",
29
+ "Br312pm": "f1d6tb1o",
30
+ "nk6f5a": "f23awfp",
31
+ "Bw0ie65": "fiappcv"
32
+ },
33
+ "gridPositionStart": {
34
+ "Bdqf98w": "fsxvdwy",
35
+ "Ijaq50": "f1vnb230",
36
+ "Br312pm": "f14781pt",
37
+ "nk6f5a": "f13d374e",
38
+ "Bw0ie65": "f1fjo411"
39
+ }
40
+ }, {
41
+ "d": [".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}", ".f1a7i8kp{justify-self:end;}", ".f11u0jfc{grid-row-start:actions-end;}", ".f1d6tb1o{grid-column-start:actions-end;}", ".f23awfp{grid-row-end:actions-end;}", ".fiappcv{grid-column-end:actions-end;}", ".fsxvdwy{justify-self:start;}", ".f1vnb230{grid-row-start:actions-start;}", ".f14781pt{grid-column-start:actions-start;}", ".f13d374e{grid-row-end:actions-start;}", ".f1fjo411{grid-column-end:actions-start;}"],
42
+ "m": [["@media screen and (max-width: 480px){.f6glcwc{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}}", {
43
+ "m": "screen and (max-width: 480px)"
44
+ }], ["@media screen and (max-width: 480px){.f1e3st1r{justify-self:stretch;}}", {
45
+ "m": "screen and (max-width: 480px)"
46
+ }]]
47
+ });
48
+ /**
49
+ * Apply styling to the DialogActions slots based on the state
50
+ */
51
+
52
+
53
+ const useDialogActionsStyles_unstable = state => {
54
+ const styles = useStyles();
55
+ state.root.className = react_1.mergeClasses(exports.dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.root.className);
56
+ return state;
57
+ };
58
+
59
+ exports.useDialogActionsStyles_unstable = useDialogActionsStyles_unstable;
60
+ //# sourceMappingURL=useDialogActionsStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogActions/useDialogActionsStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGA,MAAA,WAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAOa,OAAA,CAAA,uBAAA,GAA8D;EACzE,IAAI,EAAE;AADmE,CAA9D;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAAlB;AAqBA;;AAEG;;;AACI,MAAM,+BAA+B,GAAI,KAAD,IAAkD;EAC/F,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,uBAAA,CAAwB,IADH,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,QAAN,KAAmB,OAAnB,IAA8B,MAAM,CAAC,iBAHhB,EAIrB,KAAK,CAAC,QAAN,KAAmB,KAAnB,IAA4B,MAAM,CAAC,eAJd,EAKrB,KAAK,CAAC,IAAN,CAAW,SALU,CAAvB;EAOA,OAAO,KAAP;AACD,CAVM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.root.className,\n );\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DialogBody = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useDialogBody_1 = /*#__PURE__*/require("./useDialogBody");
11
+
12
+ const renderDialogBody_1 = /*#__PURE__*/require("./renderDialogBody");
13
+
14
+ const useDialogBodyStyles_1 = /*#__PURE__*/require("./useDialogBodyStyles");
15
+ /**
16
+ * The `DialogBody` is a container where the content of the dialog is rendered.
17
+ * Apart from styling, this component does not have other behavior.
18
+ */
19
+
20
+
21
+ exports.DialogBody = /*#__PURE__*/React.forwardRef((props, ref) => {
22
+ const state = useDialogBody_1.useDialogBody_unstable(props, ref);
23
+ useDialogBodyStyles_1.useDialogBodyStyles_unstable(state);
24
+ return renderDialogBody_1.renderDialogBody_unstable(state);
25
+ });
26
+ exports.DialogBody.displayName = 'DialogBody';
27
+ //# sourceMappingURL=DialogBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogBody/DialogBody.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAIA;;;AAGG;;;AACU,OAAA,CAAA,UAAA,gBAAmD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,eAAA,CAAA,sBAAA,CAAuB,KAAvB,EAA8B,GAA9B,CAAd;EAEA,qBAAA,CAAA,4BAAA,CAA6B,KAA7B;EACA,OAAO,kBAAA,CAAA,yBAAA,CAA0B,KAA1B,CAAP;AACD,CAL+D,CAAnD;AAOb,OAAA,CAAA,UAAA,CAAW,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=DialogBody.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./DialogBody"), exports);
10
+
11
+ tslib_1.__exportStar(require("./DialogBody.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderDialogBody"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useDialogBody"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useDialogBodyStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogBody/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderDialogBody_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+ /**
12
+ * Render the final JSX of DialogBody
13
+ */
14
+
15
+
16
+ const renderDialogBody_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state); // TODO Add additional slots in the appropriate place
21
+
22
+ return React.createElement(slots.root, { ...slotProps.root
23
+ });
24
+ };
25
+
26
+ exports.renderDialogBody_unstable = renderDialogBody_unstable;
27
+ //# sourceMappingURL=renderDialogBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogBody/renderDialogBody.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,yBAAyB,GAAI,KAAD,IAA2B;EAClE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA0B,KAA1B,CAA7B,CADkE,CAGlE;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogBodyState, DialogBodySlots } from './DialogBody.types';\n\n/**\n * Render the final JSX of DialogBody\n */\nexport const renderDialogBody_unstable = (state: DialogBodyState) => {\n const { slots, slotProps } = getSlots<DialogBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogBody_unstable = void 0;
7
+
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ /**
10
+ * Create the state required to render DialogBody.
11
+ *
12
+ * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,
13
+ * before being passed to renderDialogBody_unstable.
14
+ *
15
+ * @param props - props from this instance of DialogBody
16
+ * @param ref - reference to root HTMLElement of DialogBody
17
+ */
18
+
19
+
20
+ const useDialogBody_unstable = (props, ref) => {
21
+ var _a;
22
+
23
+ return {
24
+ components: {
25
+ root: 'div'
26
+ },
27
+ root: react_utilities_1.getNativeElementProps((_a = props.as) !== null && _a !== void 0 ? _a : 'div', {
28
+ ref,
29
+ ...props
30
+ })
31
+ };
32
+ };
33
+
34
+ exports.useDialogBody_unstable = useDialogBody_unstable;
35
+ //# sourceMappingURL=useDialogBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogBody/useDialogBody.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;;;EAC7G,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,KAAlC,EAAyC;MAC7C,GAD6C;MAE7C,GAAG;IAF0C,CAAzC;EAJD,CAAP;AASD,CAVM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","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"],"sourceRoot":"../src/"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogBodyStyles_unstable = exports.dialogBodyClassNames = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const contexts_1 = /*#__PURE__*/require("../../contexts");
11
+
12
+ exports.dialogBodyClassNames = {
13
+ root: 'fui-DialogBody'
14
+ };
15
+ /**
16
+ * Styles for the root slot
17
+ */
18
+
19
+ const useStyles = /*#__PURE__*/react_1.__styles({
20
+ "root": {
21
+ "mc9l5x": "f13qh94s",
22
+ "fshzfu": "f120kxnn",
23
+ "a9b677": "fly5x3f",
24
+ "Bqenvij": "f3052tw",
25
+ "B2u0y6b": "fvgz9i8",
26
+ "Bxyxcbc": "flnwrvu",
27
+ "B7ck84d": "f1ewtqcl",
28
+ "wkccdc": "f874eam",
29
+ "Budl1dq": "fjj47a5",
30
+ "zoa1oz": "fe34spp",
31
+ "B68tc82": "f1ln0qer",
32
+ "Bmxbyg5": "fa2wlxz",
33
+ "i8kkvl": "f4px1ci",
34
+ "Belr9w4": "fn67r4l",
35
+ "B5xtmjs": "ff54dml",
36
+ "Bqu9lor": "f52bj20",
37
+ "B06wobe": "f1dangjo"
38
+ }
39
+ }, {
40
+ "d": [".f13qh94s{display:grid;}", ".f120kxnn::backdrop{background-color:rgba(0, 0, 0, 0.4);}", ".fly5x3f{width:100%;}", ".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".fvgz9i8{max-width:600px;}", ".flnwrvu{max-height:calc(100vh - 2 * 24px);}", ".f1ewtqcl{box-sizing:border-box;}", ".f874eam{grid-template-rows:auto 1fr auto;}", ".fjj47a5{grid-template-columns:1fr 1fr auto;}", ".fe34spp{grid-template-areas:\"title title close-button\" \"body body body\" \"actions-start actions-end actions-end\";}", ".f1ln0qer{overflow-x:unset;}", ".fa2wlxz{overflow-y:unset;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}"],
41
+ "m": [["@media screen and (max-width: 480px){.ff54dml{max-width:100vw;}}", {
42
+ "m": "screen and (max-width: 480px)"
43
+ }], ["@media screen and (max-width: 480px){.f52bj20{grid-template-rows:auto 1fr auto auto;}}", {
44
+ "m": "screen and (max-width: 480px)"
45
+ }], ["@media screen and (max-width: 480px){.f1dangjo{grid-template-areas:\"title title close-button\" \"body body body\" \"actions-start actions-start actions-start\" \"actions-end actions-end actions-end\";}}", {
46
+ "m": "screen and (max-width: 480px)"
47
+ }]]
48
+ });
49
+ /**
50
+ * Apply styling to the DialogBody slots based on the state
51
+ */
52
+
53
+
54
+ const useDialogBodyStyles_unstable = state => {
55
+ const styles = useStyles();
56
+ state.root.className = react_1.mergeClasses(exports.dialogBodyClassNames.root, styles.root, state.root.className);
57
+ return state;
58
+ };
59
+
60
+ exports.useDialogBodyStyles_unstable = useDialogBodyStyles_unstable;
61
+ //# sourceMappingURL=useDialogBodyStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogBody/useDialogBodyStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGA,MAAA,UAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAWa,OAAA,CAAA,oBAAA,GAAwD;EACnE,IAAI,EAAE;AAD6D,CAAxD;AAIb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAAlB;AAiCA;;AAEG;;;AACI,MAAM,4BAA4B,GAAI,KAAD,IAA4C;EACtF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAA,CAAqB,IAAlC,EAAwC,MAAM,CAAC,IAA/C,EAAqD,KAAK,CAAC,IAAN,CAAW,SAAhE,CAAvB;EAEA,OAAO,KAAP;AACD,CALM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","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"],"sourceRoot":"../src/"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DialogContent = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useDialogContent_1 = /*#__PURE__*/require("./useDialogContent");
11
+
12
+ const renderDialogContent_1 = /*#__PURE__*/require("./renderDialogContent");
13
+
14
+ const useDialogContentStyles_1 = /*#__PURE__*/require("./useDialogContentStyles");
15
+ /**
16
+ * The `DialogContent` is a container where the content of the dialog is rendered.
17
+ * Apart from styling, this component does not have other behavior.
18
+ */
19
+
20
+
21
+ exports.DialogContent = /*#__PURE__*/React.forwardRef((props, ref) => {
22
+ const state = useDialogContent_1.useDialogContent_unstable(props, ref);
23
+ useDialogContentStyles_1.useDialogContentStyles_unstable(state);
24
+ return renderDialogContent_1.renderDialogContent_unstable(state);
25
+ });
26
+ exports.DialogContent.displayName = 'DialogContent';
27
+ //# sourceMappingURL=DialogContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogContent/DialogContent.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAIA;;;AAGG;;;AACU,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpG,MAAM,KAAK,GAAG,kBAAA,CAAA,yBAAA,CAA0B,KAA1B,EAAiC,GAAjC,CAAd;EAEA,wBAAA,CAAA,+BAAA,CAAgC,KAAhC;EACA,OAAO,qBAAA,CAAA,4BAAA,CAA6B,KAA7B,CAAP;AACD,CALqE,CAAzD;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","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';\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 return renderDialogContent_unstable(state);\n});\n\nDialogContent.displayName = 'DialogContent';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=DialogContent.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}