@fluentui/react-dialog 9.0.0-beta.7

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 (226) hide show
  1. package/CHANGELOG.json +328 -0
  2. package/CHANGELOG.md +152 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/Spec.md +518 -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 +406 -0
  13. package/dist/tsdoc-metadata.json +11 -0
  14. package/lib/Dialog.js +2 -0
  15. package/lib/Dialog.js.map +1 -0
  16. package/lib/DialogActions.js +2 -0
  17. package/lib/DialogActions.js.map +1 -0
  18. package/lib/DialogBody.js +2 -0
  19. package/lib/DialogBody.js.map +1 -0
  20. package/lib/DialogSurface.js +2 -0
  21. package/lib/DialogSurface.js.map +1 -0
  22. package/lib/DialogTitle.js +2 -0
  23. package/lib/DialogTitle.js.map +1 -0
  24. package/lib/DialogTrigger.js +2 -0
  25. package/lib/DialogTrigger.js.map +1 -0
  26. package/lib/components/Dialog/Dialog.js +21 -0
  27. package/lib/components/Dialog/Dialog.js.map +1 -0
  28. package/lib/components/Dialog/Dialog.types.js +2 -0
  29. package/lib/components/Dialog/Dialog.types.js.map +1 -0
  30. package/lib/components/Dialog/index.js +6 -0
  31. package/lib/components/Dialog/index.js.map +1 -0
  32. package/lib/components/Dialog/renderDialog.js +26 -0
  33. package/lib/components/Dialog/renderDialog.js.map +1 -0
  34. package/lib/components/Dialog/useDialog.js +197 -0
  35. package/lib/components/Dialog/useDialog.js.map +1 -0
  36. package/lib/components/Dialog/useDialogContextValues.js +31 -0
  37. package/lib/components/Dialog/useDialogContextValues.js.map +1 -0
  38. package/lib/components/Dialog/useDialogStyles.js +41 -0
  39. package/lib/components/Dialog/useDialogStyles.js.map +1 -0
  40. package/lib/components/DialogActions/DialogActions.js +16 -0
  41. package/lib/components/DialogActions/DialogActions.js.map +1 -0
  42. package/lib/components/DialogActions/DialogActions.types.js +2 -0
  43. package/lib/components/DialogActions/DialogActions.types.js.map +1 -0
  44. package/lib/components/DialogActions/index.js +6 -0
  45. package/lib/components/DialogActions/index.js.map +1 -0
  46. package/lib/components/DialogActions/renderDialogActions.js +16 -0
  47. package/lib/components/DialogActions/renderDialogActions.js.map +1 -0
  48. package/lib/components/DialogActions/useDialogActions.js +27 -0
  49. package/lib/components/DialogActions/useDialogActions.js.map +1 -0
  50. package/lib/components/DialogActions/useDialogActionsStyles.js +51 -0
  51. package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -0
  52. package/lib/components/DialogBody/DialogBody.js +16 -0
  53. package/lib/components/DialogBody/DialogBody.js.map +1 -0
  54. package/lib/components/DialogBody/DialogBody.types.js +2 -0
  55. package/lib/components/DialogBody/DialogBody.types.js.map +1 -0
  56. package/lib/components/DialogBody/index.js +6 -0
  57. package/lib/components/DialogBody/index.js.map +1 -0
  58. package/lib/components/DialogBody/renderDialogBody.js +16 -0
  59. package/lib/components/DialogBody/renderDialogBody.js.map +1 -0
  60. package/lib/components/DialogBody/useDialogBody.js +25 -0
  61. package/lib/components/DialogBody/useDialogBody.js.map +1 -0
  62. package/lib/components/DialogBody/useDialogBodyStyles.js +42 -0
  63. package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -0
  64. package/lib/components/DialogSurface/DialogSurface.js +18 -0
  65. package/lib/components/DialogSurface/DialogSurface.js.map +1 -0
  66. package/lib/components/DialogSurface/DialogSurface.types.js +2 -0
  67. package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -0
  68. package/lib/components/DialogSurface/index.js +6 -0
  69. package/lib/components/DialogSurface/index.js.map +1 -0
  70. package/lib/components/DialogSurface/renderDialogSurface.js +18 -0
  71. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -0
  72. package/lib/components/DialogSurface/useDialogSurface.js +59 -0
  73. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -0
  74. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js +7 -0
  75. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -0
  76. package/lib/components/DialogSurface/useDialogSurfaceStyles.js +78 -0
  77. package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -0
  78. package/lib/components/DialogTitle/DialogTitle.js +17 -0
  79. package/lib/components/DialogTitle/DialogTitle.js.map +1 -0
  80. package/lib/components/DialogTitle/DialogTitle.types.js +2 -0
  81. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -0
  82. package/lib/components/DialogTitle/index.js +6 -0
  83. package/lib/components/DialogTitle/index.js.map +1 -0
  84. package/lib/components/DialogTitle/renderDialogTitle.js +19 -0
  85. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -0
  86. package/lib/components/DialogTitle/useDialogTitle.js +42 -0
  87. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -0
  88. package/lib/components/DialogTitle/useDialogTitleStyles.js +109 -0
  89. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -0
  90. package/lib/components/DialogTrigger/DialogTrigger.js +20 -0
  91. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -0
  92. package/lib/components/DialogTrigger/DialogTrigger.types.js +2 -0
  93. package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -0
  94. package/lib/components/DialogTrigger/index.js +5 -0
  95. package/lib/components/DialogTrigger/index.js.map +1 -0
  96. package/lib/components/DialogTrigger/renderDialogTrigger.js +7 -0
  97. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -0
  98. package/lib/components/DialogTrigger/useDialogTrigger.js +65 -0
  99. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -0
  100. package/lib/contexts/constants.js +11 -0
  101. package/lib/contexts/constants.js.map +1 -0
  102. package/lib/contexts/dialogContext.js +21 -0
  103. package/lib/contexts/dialogContext.js.map +1 -0
  104. package/lib/contexts/dialogSurfaceContext.js +10 -0
  105. package/lib/contexts/dialogSurfaceContext.js.map +1 -0
  106. package/lib/contexts/index.js +4 -0
  107. package/lib/contexts/index.js.map +1 -0
  108. package/lib/index.js +7 -0
  109. package/lib/index.js.map +1 -0
  110. package/lib/utils/index.js +5 -0
  111. package/lib/utils/index.js.map +1 -0
  112. package/lib/utils/isEscapeKeyDown.js +11 -0
  113. package/lib/utils/isEscapeKeyDown.js.map +1 -0
  114. package/lib/utils/isTargetDisabled.js +14 -0
  115. package/lib/utils/isTargetDisabled.js.map +1 -0
  116. package/lib/utils/localShorthands.js +9 -0
  117. package/lib/utils/localShorthands.js.map +1 -0
  118. package/lib/utils/normalizeDefaultPrevented.js +11 -0
  119. package/lib/utils/normalizeDefaultPrevented.js.map +1 -0
  120. package/lib-commonjs/Dialog.js +10 -0
  121. package/lib-commonjs/Dialog.js.map +1 -0
  122. package/lib-commonjs/DialogActions.js +10 -0
  123. package/lib-commonjs/DialogActions.js.map +1 -0
  124. package/lib-commonjs/DialogBody.js +10 -0
  125. package/lib-commonjs/DialogBody.js.map +1 -0
  126. package/lib-commonjs/DialogSurface.js +10 -0
  127. package/lib-commonjs/DialogSurface.js.map +1 -0
  128. package/lib-commonjs/DialogTitle.js +10 -0
  129. package/lib-commonjs/DialogTitle.js.map +1 -0
  130. package/lib-commonjs/DialogTrigger.js +10 -0
  131. package/lib-commonjs/DialogTrigger.js.map +1 -0
  132. package/lib-commonjs/components/Dialog/Dialog.js +33 -0
  133. package/lib-commonjs/components/Dialog/Dialog.js.map +1 -0
  134. package/lib-commonjs/components/Dialog/Dialog.types.js +6 -0
  135. package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -0
  136. package/lib-commonjs/components/Dialog/index.js +18 -0
  137. package/lib-commonjs/components/Dialog/index.js.map +1 -0
  138. package/lib-commonjs/components/Dialog/renderDialog.js +39 -0
  139. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -0
  140. package/lib-commonjs/components/Dialog/useDialog.js +211 -0
  141. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -0
  142. package/lib-commonjs/components/Dialog/useDialogContextValues.js +40 -0
  143. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -0
  144. package/lib-commonjs/components/Dialog/useDialogStyles.js +53 -0
  145. package/lib-commonjs/components/Dialog/useDialogStyles.js.map +1 -0
  146. package/lib-commonjs/components/DialogActions/DialogActions.js +27 -0
  147. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -0
  148. package/lib-commonjs/components/DialogActions/DialogActions.types.js +6 -0
  149. package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -0
  150. package/lib-commonjs/components/DialogActions/index.js +18 -0
  151. package/lib-commonjs/components/DialogActions/index.js.map +1 -0
  152. package/lib-commonjs/components/DialogActions/renderDialogActions.js +27 -0
  153. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -0
  154. package/lib-commonjs/components/DialogActions/useDialogActions.js +37 -0
  155. package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -0
  156. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +63 -0
  157. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -0
  158. package/lib-commonjs/components/DialogBody/DialogBody.js +27 -0
  159. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -0
  160. package/lib-commonjs/components/DialogBody/DialogBody.types.js +6 -0
  161. package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -0
  162. package/lib-commonjs/components/DialogBody/index.js +18 -0
  163. package/lib-commonjs/components/DialogBody/index.js.map +1 -0
  164. package/lib-commonjs/components/DialogBody/renderDialogBody.js +27 -0
  165. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -0
  166. package/lib-commonjs/components/DialogBody/useDialogBody.js +36 -0
  167. package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -0
  168. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +55 -0
  169. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -0
  170. package/lib-commonjs/components/DialogSurface/DialogSurface.js +30 -0
  171. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -0
  172. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js +6 -0
  173. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -0
  174. package/lib-commonjs/components/DialogSurface/index.js +18 -0
  175. package/lib-commonjs/components/DialogSurface/index.js.map +1 -0
  176. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +30 -0
  177. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -0
  178. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +72 -0
  179. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -0
  180. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +16 -0
  181. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -0
  182. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +90 -0
  183. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -0
  184. package/lib-commonjs/components/DialogTitle/DialogTitle.js +28 -0
  185. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -0
  186. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js +6 -0
  187. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -0
  188. package/lib-commonjs/components/DialogTitle/index.js +18 -0
  189. package/lib-commonjs/components/DialogTitle/index.js.map +1 -0
  190. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +31 -0
  191. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -0
  192. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +56 -0
  193. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -0
  194. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +123 -0
  195. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -0
  196. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +31 -0
  197. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -0
  198. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +6 -0
  199. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -0
  200. package/lib-commonjs/components/DialogTrigger/index.js +16 -0
  201. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -0
  202. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +16 -0
  203. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -0
  204. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +80 -0
  205. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -0
  206. package/lib-commonjs/contexts/constants.js +17 -0
  207. package/lib-commonjs/contexts/constants.js.map +1 -0
  208. package/lib-commonjs/contexts/dialogContext.js +32 -0
  209. package/lib-commonjs/contexts/dialogContext.js.map +1 -0
  210. package/lib-commonjs/contexts/dialogSurfaceContext.js +21 -0
  211. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -0
  212. package/lib-commonjs/contexts/index.js +14 -0
  213. package/lib-commonjs/contexts/index.js.map +1 -0
  214. package/lib-commonjs/index.js +193 -0
  215. package/lib-commonjs/index.js.map +1 -0
  216. package/lib-commonjs/utils/index.js +16 -0
  217. package/lib-commonjs/utils/index.js.map +1 -0
  218. package/lib-commonjs/utils/isEscapeKeyDown.js +22 -0
  219. package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -0
  220. package/lib-commonjs/utils/isTargetDisabled.js +23 -0
  221. package/lib-commonjs/utils/isTargetDisabled.js.map +1 -0
  222. package/lib-commonjs/utils/localShorthands.js +18 -0
  223. package/lib-commonjs/utils/localShorthands.js.map +1 -0
  224. package/lib-commonjs/utils/normalizeDefaultPrevented.js +20 -0
  225. package/lib-commonjs/utils/normalizeDefaultPrevented.js.map +1 -0
  226. package/package.json +69 -0
@@ -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
+ triggerRef,
13
+ contentRef,
14
+ dialogBodyID,
15
+ dialogTitleID,
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
+ triggerRef,
27
+ contentRef,
28
+ dialogBodyID,
29
+ dialogTitleID,
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":["components/Dialog/useDialogContextValues.ts"],"names":[],"mappings":";;;;;;;AAGA,SAAgB,+BAAhB,CAAgD,KAAhD,EAAkE;EAChE,MAAM;IAAE,SAAF;IAAa,IAAb;IAAmB,UAAnB;IAA+B,UAA/B;IAA2C,YAA3C;IAAyD,aAAzD;IAAwE;EAAxE,IAA8F,KAApG;EAEA;;;AAGG;;EACH,MAAM,MAAM,GAAuB;IACjC,IADiC;IAEjC,SAFiC;IAGjC,UAHiC;IAIjC,UAJiC;IAKjC,YALiC;IAMjC,aANiC;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, triggerRef, contentRef, dialogBodyID, dialogTitleID, 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 triggerRef,\n contentRef,\n dialogBodyID,\n dialogTitleID,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogStyles_unstable = exports.dialogClassNames = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
11
+
12
+ const dialogContext_1 = /*#__PURE__*/require("../../contexts/dialogContext");
13
+
14
+ exports.dialogClassNames = {
15
+ overlay: 'fui-Dialog__overlay'
16
+ };
17
+ /**
18
+ * Styles for the root slot
19
+ */
20
+
21
+ const useStyles = /*#__PURE__*/react_1.__styles({
22
+ "overlay": {
23
+ "qhf8xq": "f19dog8a",
24
+ "De3pzq": "fju19wo",
25
+ "Bhzewxz": "f113wtx2",
26
+ "j35jbq": ["f10k790i", "f1xynx9j"],
27
+ "B5kzvoi": "f5gq2j6",
28
+ "oyh7mz": ["f1xynx9j", "f10k790i"]
29
+ },
30
+ "nestedDialogOverlay": {
31
+ "De3pzq": "f3rmtva"
32
+ }
33
+ }, {
34
+ "d": [".f19dog8a{position:fixed;}", ".fju19wo{background-color:rgba(0, 0, 0, 0.4);}", ".f113wtx2{top:0px;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f5gq2j6{bottom:0px;}", ".f3rmtva{background-color:transparent;}"]
35
+ });
36
+ /**
37
+ * Apply styling to the Dialog slots based on the state
38
+ */
39
+
40
+
41
+ const useDialogStyles_unstable = state => {
42
+ const styles = useStyles();
43
+ const isNestedDialog = react_context_selector_1.useHasParentContext(dialogContext_1.DialogContext);
44
+
45
+ if (state.overlay) {
46
+ state.overlay.className = react_1.mergeClasses(exports.dialogClassNames.overlay, styles.overlay, isNestedDialog && styles.nestedDialogOverlay, state.overlay.className);
47
+ }
48
+
49
+ return state;
50
+ };
51
+
52
+ exports.useDialogStyles_unstable = useDialogStyles_unstable;
53
+ //# sourceMappingURL=useDialogStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/Dialog/useDialogStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,8BAAA,CAAA;;AAGa,OAAA,CAAA,gBAAA,GAAgD;EAC3D,OAAO,EAAE;AADkD,CAAhD;AAGb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACI,MAAM,wBAAwB,GAAI,KAAD,IAAoC;EAC1E,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,cAAc,GAAG,wBAAA,CAAA,mBAAA,CAAoB,eAAA,CAAA,aAApB,CAAvB;;EAEA,IAAI,KAAK,CAAC,OAAV,EAAmB;IACjB,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CACxB,OAAA,CAAA,gBAAA,CAAiB,OADO,EAExB,MAAM,CAAC,OAFiB,EAGxB,cAAc,IAAI,MAAM,CAAC,mBAHD,EAIxB,KAAK,CAAC,OAAN,CAAc,SAJU,CAA1B;EAMD;;EAED,OAAO,KAAP;AACD,CAdM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { DialogContext } from '../../contexts/dialogContext';\nimport type { DialogSlots, DialogState } from './Dialog.types';\n\nexport const dialogClassNames: SlotClassNames<DialogSlots> = {\n overlay: 'fui-Dialog__overlay',\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n overlay: {\n position: 'fixed',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n ...shorthands.inset('0px'),\n },\n nestedDialogOverlay: {\n backgroundColor: 'transparent',\n },\n});\n\n/**\n * Apply styling to the Dialog slots based on the state\n */\nexport const useDialogStyles_unstable = (state: DialogState): DialogState => {\n const styles = useStyles();\n const isNestedDialog = useHasParentContext(DialogContext);\n\n if (state.overlay) {\n state.overlay.className = mergeClasses(\n dialogClassNames.overlay,\n styles.overlay,\n isNestedDialog && styles.nestedDialogOverlay,\n state.overlay.className,\n );\n }\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.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":["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":["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":["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":["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,63 @@
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
+ const localShorthands = /*#__PURE__*/require("../../utils/localShorthands");
13
+
14
+ exports.dialogActionsClassNames = {
15
+ root: 'fui-DialogActions'
16
+ };
17
+
18
+ const useStyles = /*#__PURE__*/react_1.__styles({
19
+ "root": {
20
+ "Bqenvij": "f3052tw",
21
+ "B7ck84d": "f1ewtqcl",
22
+ "mc9l5x": "f22iagw",
23
+ "i8kkvl": "f4px1ci",
24
+ "Belr9w4": "fn67r4l",
25
+ "Bnr8eeb": "f12ep7o",
26
+ "Bmdcpmo": "f6glcwc",
27
+ "th9wkt": "f1e3st1r"
28
+ },
29
+ "gridPositionEnd": {
30
+ "Bdqf98w": "f1a7i8kp",
31
+ "Ijaq50": "f11u0jfc",
32
+ "nk6f5a": "f23awfp",
33
+ "Br312pm": "f1d6tb1o",
34
+ "Bw0ie65": "fiappcv"
35
+ },
36
+ "gridPositionStart": {
37
+ "Bdqf98w": "fsxvdwy",
38
+ "Ijaq50": "f1vnb230",
39
+ "nk6f5a": "f13d374e",
40
+ "Br312pm": "f14781pt",
41
+ "Bw0ie65": "f1fjo411"
42
+ }
43
+ }, {
44
+ "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;}", ".f12ep7o>.fui-Button{max-width:100%;}", ".f1a7i8kp{justify-self:end;}", ".f11u0jfc{grid-row-start:actions-end;}", ".f23awfp{grid-row-end:actions-end;}", ".f1d6tb1o{grid-column-start:actions-end;}", ".fiappcv{grid-column-end:actions-end;}", ".fsxvdwy{justify-self:start;}", ".f1vnb230{grid-row-start:actions-start;}", ".f13d374e{grid-row-end:actions-start;}", ".f14781pt{grid-column-start:actions-start;}", ".f1fjo411{grid-column-end:actions-start;}"],
45
+ "m": [["@media screen and (max-width: 480px){.f6glcwc{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}}", {
46
+ "m": "screen and (max-width: 480px)"
47
+ }], ["@media screen and (max-width: 480px){.f1e3st1r{justify-self:stretch;}}", {
48
+ "m": "screen and (max-width: 480px)"
49
+ }]]
50
+ });
51
+ /**
52
+ * Apply styling to the DialogActions slots based on the state
53
+ */
54
+
55
+
56
+ const useDialogActionsStyles_unstable = state => {
57
+ const styles = useStyles();
58
+ state.root.className = react_1.mergeClasses(exports.dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.root.className);
59
+ return state;
60
+ };
61
+
62
+ exports.useDialogActionsStyles_unstable = useDialogActionsStyles_unstable;
63
+ //# sourceMappingURL=useDialogActionsStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/DialogActions/useDialogActionsStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGA,MAAA,WAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAMA,MAAA,eAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEa,OAAA,CAAA,uBAAA,GAA8D;EACzE,IAAI,EAAE;AADmE,CAA9D;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;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;AAwBA;;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';\nimport * as localShorthands from '../../utils/localShorthands';\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 '> .fui-Button': {\n maxWidth: '100%',\n },\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...localShorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...localShorthands.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":["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":["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":["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,36 @@
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
+ const contexts_1 = /*#__PURE__*/require("../../contexts");
11
+ /**
12
+ * Create the state required to render DialogBody.
13
+ *
14
+ * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,
15
+ * before being passed to renderDialogBody_unstable.
16
+ *
17
+ * @param props - props from this instance of DialogBody
18
+ * @param ref - reference to root HTMLElement of DialogBody
19
+ */
20
+
21
+
22
+ const useDialogBody_unstable = (props, ref) => {
23
+ return {
24
+ components: {
25
+ root: 'div'
26
+ },
27
+ root: react_utilities_1.getNativeElementProps('div', {
28
+ ref,
29
+ id: contexts_1.useDialogContext_unstable(ctx => ctx.dialogBodyID),
30
+ ...props
31
+ })
32
+ };
33
+ };
34
+
35
+ exports.useDialogBody_unstable = useDialogBody_unstable;
36
+ //# sourceMappingURL=useDialogBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/DialogBody/useDialogBody.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,UAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAEA;;;;;;;;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,KAAtB,EAA6B;MACjC,GADiC;MAEjC,EAAE,EAAE,UAAA,CAAA,yBAAA,CAA0B,GAAG,IAAI,GAAG,CAAC,YAArC,CAF6B;MAGjC,GAAG;IAH8B,CAA7B;EAJD,CAAP;AAUD,CAXM;;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';\nimport { useDialogContext_unstable } from '../../contexts';\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('div', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogBodyID),\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,55 @@
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 react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+
12
+ const localShorthands = /*#__PURE__*/require("../../utils/localShorthands");
13
+
14
+ const constants_1 = /*#__PURE__*/require("../../contexts/constants");
15
+
16
+ exports.dialogBodyClassNames = {
17
+ root: 'fui-DialogBody'
18
+ };
19
+ /**
20
+ * Styles for the root slot
21
+ */
22
+
23
+ const useStyles = /*#__PURE__*/react_1.__styles({
24
+ "root": {
25
+ "a9b677": "fly5x3f",
26
+ "Bqenvij": "f3052tw",
27
+ "sshi5w": "f1nxs5xn",
28
+ "B7ck84d": "f1ewtqcl",
29
+ "Ijaq50": "f6owso0",
30
+ "nk6f5a": "foucsne",
31
+ "Br312pm": "fupswjn",
32
+ "Bw0ie65": "f1ka72gx",
33
+ "Bahqtrf": "fk6fouc",
34
+ "Be2twd7": "fkhj508",
35
+ "Bhrd7zp": "figsok6",
36
+ "Bg96gwp": "f1i3iumi"
37
+ }
38
+ }, {
39
+ "d": [".fly5x3f{width:100%;}", ".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".f1nxs5xn{min-height:32px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f6owso0{grid-row-start:body;}", ".foucsne{grid-row-end:body;}", ".fupswjn{grid-column-start: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);}"]
40
+ });
41
+ /**
42
+ * Apply styling to the DialogBody slots based on the state
43
+ */
44
+
45
+
46
+ const useDialogBodyStyles_unstable = state => {
47
+ const styles = useStyles();
48
+ state.root.className = react_1.mergeClasses(exports.dialogBodyClassNames.root, styles.root, state.root.className); // TODO Add class names to slots, for example:
49
+ // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
50
+
51
+ return state;
52
+ };
53
+
54
+ exports.useDialogBodyStyles_unstable = useDialogBodyStyles_unstable;
55
+ //# sourceMappingURL=useDialogBodyStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/DialogBody/useDialogBodyStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AAEa,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;EAAA;AAAA;EAAA;AAAA,EAAlB;AAWA;;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,CAFsF,CAItF;EACA;;EAEA,OAAO,KAAP;AACD,CARM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { DialogBodySlots, DialogBodyState } from './DialogBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport * as localShorthands from '../../utils/localShorthands';\nimport { BODY_GRID_AREA } from '../../contexts/constants';\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 width: '100%',\n height: 'fit-content',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...localShorthands.gridArea(BODY_GRID_AREA),\n ...typographyStyles.body1,\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 // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DialogSurface = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useDialogSurface_1 = /*#__PURE__*/require("./useDialogSurface");
11
+
12
+ const renderDialogSurface_1 = /*#__PURE__*/require("./renderDialogSurface");
13
+
14
+ const useDialogSurfaceStyles_1 = /*#__PURE__*/require("./useDialogSurfaceStyles");
15
+
16
+ const useDialogSurfaceContextValues_1 = /*#__PURE__*/require("./useDialogSurfaceContextValues");
17
+ /**
18
+ * DialogSurface component represents the visual part of a `Dialog` as a whole,
19
+ * it contains everything that should be visible.
20
+ */
21
+
22
+
23
+ exports.DialogSurface = /*#__PURE__*/React.forwardRef((props, ref) => {
24
+ const state = useDialogSurface_1.useDialogSurface_unstable(props, ref);
25
+ const contextValues = useDialogSurfaceContextValues_1.useDialogSurfaceContextValues_unstable(state);
26
+ useDialogSurfaceStyles_1.useDialogSurfaceStyles_unstable(state);
27
+ return renderDialogSurface_1.renderDialogSurface_unstable(state, contextValues);
28
+ });
29
+ exports.DialogSurface.displayName = 'DialogSurface';
30
+ //# sourceMappingURL=DialogSurface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/DialogSurface/DialogSurface.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;;AAGA,MAAA,+BAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;AAEA;;;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;EACA,MAAM,aAAa,GAAG,+BAAA,CAAA,sCAAA,CAAuC,KAAvC,CAAtB;EAEA,wBAAA,CAAA,+BAAA,CAAgC,KAAhC;EACA,OAAO,qBAAA,CAAA,4BAAA,CAA6B,KAA7B,EAAoC,aAApC,CAAP;AACD,CANqE,CAAzD;AAQb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","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';\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 return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=DialogSurface.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("./DialogSurface"), exports);
10
+
11
+ tslib_1.__exportStar(require("./DialogSurface.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderDialogSurface"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useDialogSurface"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useDialogSurfaceStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/DialogSurface/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 './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderDialogSurface_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ const contexts_1 = /*#__PURE__*/require("../../contexts");
13
+ /**
14
+ * Render the final JSX of DialogSurface
15
+ */
16
+
17
+
18
+ const renderDialogSurface_unstable = (state, contextValues) => {
19
+ const {
20
+ slots,
21
+ slotProps
22
+ } = react_utilities_1.getSlots(state);
23
+ return React.createElement(contexts_1.DialogSurfaceProvider, {
24
+ value: contextValues.dialogSurface
25
+ }, React.createElement(slots.root, { ...slotProps.root
26
+ }));
27
+ };
28
+
29
+ exports.renderDialogSurface_unstable = renderDialogSurface_unstable;
30
+ //# sourceMappingURL=renderDialogSurface.js.map