@fluentui/react-dialog 9.1.5 → 9.1.6

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 (176) hide show
  1. package/CHANGELOG.json +66 -1
  2. package/CHANGELOG.md +17 -2
  3. package/lib/components/Dialog/Dialog.js +0 -1
  4. package/lib/components/Dialog/Dialog.js.map +1 -1
  5. package/lib/components/Dialog/renderDialog.js +0 -1
  6. package/lib/components/Dialog/renderDialog.js.map +1 -1
  7. package/lib/components/Dialog/useDialog.js +2 -8
  8. package/lib/components/Dialog/useDialog.js.map +1 -1
  9. package/lib/components/Dialog/useDialogContextValues.js +0 -1
  10. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  11. package/lib/components/DialogActions/DialogActions.js +0 -1
  12. package/lib/components/DialogActions/DialogActions.js.map +1 -1
  13. package/lib/components/DialogActions/renderDialogActions.js +4 -4
  14. package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
  15. package/lib/components/DialogActions/useDialogActions.js +0 -1
  16. package/lib/components/DialogActions/useDialogActions.js.map +1 -1
  17. package/lib/components/DialogActions/useDialogActionsStyles.js +24 -27
  18. package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  19. package/lib/components/DialogBody/DialogBody.js +0 -1
  20. package/lib/components/DialogBody/DialogBody.js.map +1 -1
  21. package/lib/components/DialogBody/renderDialogBody.js +4 -4
  22. package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
  23. package/lib/components/DialogBody/useDialogBody.js +0 -2
  24. package/lib/components/DialogBody/useDialogBody.js.map +1 -1
  25. package/lib/components/DialogBody/useDialogBodyStyles.js +23 -26
  26. package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  27. package/lib/components/DialogContent/DialogContent.js +0 -1
  28. package/lib/components/DialogContent/DialogContent.js.map +1 -1
  29. package/lib/components/DialogContent/renderDialogContent.js +2 -2
  30. package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
  31. package/lib/components/DialogContent/useDialogContent.js +0 -2
  32. package/lib/components/DialogContent/useDialogContent.js.map +1 -1
  33. package/lib/components/DialogContent/useDialogContentStyles.js +15 -18
  34. package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -1
  35. package/lib/components/DialogSurface/DialogSurface.js +0 -1
  36. package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
  37. package/lib/components/DialogSurface/renderDialogSurface.js +4 -3
  38. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
  39. package/lib/components/DialogSurface/useDialogSurface.js +2 -7
  40. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  41. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  42. package/lib/components/DialogSurface/useDialogSurfaceStyles.js +92 -97
  43. package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  44. package/lib/components/DialogTitle/DialogTitle.js +0 -1
  45. package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
  46. package/lib/components/DialogTitle/renderDialogTitle.js +4 -3
  47. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
  48. package/lib/components/DialogTitle/useDialogTitle.js +0 -1
  49. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  50. package/lib/components/DialogTitle/useDialogTitleStyles.js +74 -80
  51. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  52. package/lib/components/DialogTrigger/DialogTrigger.js +2 -3
  53. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
  54. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  55. package/lib/components/DialogTrigger/useDialogTrigger.js +4 -5
  56. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  57. package/lib/contexts/dialogContext.js +2 -4
  58. package/lib/contexts/dialogContext.js.map +1 -1
  59. package/lib/contexts/dialogSurfaceContext.js +0 -1
  60. package/lib/contexts/dialogSurfaceContext.js.map +1 -1
  61. package/lib/index.js.map +1 -1
  62. package/lib/utils/isEscapeKeyDown.js +0 -1
  63. package/lib/utils/isEscapeKeyDown.js.map +1 -1
  64. package/lib/utils/useDisableBodyScroll.js +0 -9
  65. package/lib/utils/useDisableBodyScroll.js.map +1 -1
  66. package/lib/utils/useFocusFirstElement.js +0 -5
  67. package/lib/utils/useFocusFirstElement.js.map +1 -1
  68. package/lib-commonjs/Dialog.js +0 -2
  69. package/lib-commonjs/Dialog.js.map +1 -1
  70. package/lib-commonjs/DialogActions.js +0 -2
  71. package/lib-commonjs/DialogActions.js.map +1 -1
  72. package/lib-commonjs/DialogBody.js +0 -2
  73. package/lib-commonjs/DialogBody.js.map +1 -1
  74. package/lib-commonjs/DialogContent.js +0 -2
  75. package/lib-commonjs/DialogContent.js.map +1 -1
  76. package/lib-commonjs/DialogSurface.js +0 -2
  77. package/lib-commonjs/DialogSurface.js.map +1 -1
  78. package/lib-commonjs/DialogTitle.js +0 -2
  79. package/lib-commonjs/DialogTitle.js.map +1 -1
  80. package/lib-commonjs/DialogTrigger.js +0 -2
  81. package/lib-commonjs/DialogTrigger.js.map +1 -1
  82. package/lib-commonjs/components/Dialog/Dialog.js +0 -6
  83. package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
  84. package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -1
  85. package/lib-commonjs/components/Dialog/index.js +0 -5
  86. package/lib-commonjs/components/Dialog/index.js.map +1 -1
  87. package/lib-commonjs/components/Dialog/renderDialog.js +0 -5
  88. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
  89. package/lib-commonjs/components/Dialog/useDialog.js +2 -15
  90. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
  91. package/lib-commonjs/components/Dialog/useDialogContextValues.js +0 -3
  92. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
  93. package/lib-commonjs/components/DialogActions/DialogActions.js +0 -6
  94. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
  95. package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -1
  96. package/lib-commonjs/components/DialogActions/index.js +0 -6
  97. package/lib-commonjs/components/DialogActions/index.js.map +1 -1
  98. package/lib-commonjs/components/DialogActions/renderDialogActions.js +4 -8
  99. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
  100. package/lib-commonjs/components/DialogActions/useDialogActions.js +0 -4
  101. package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
  102. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +24 -31
  103. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  104. package/lib-commonjs/components/DialogBody/DialogBody.js +0 -6
  105. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
  106. package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -1
  107. package/lib-commonjs/components/DialogBody/index.js +0 -6
  108. package/lib-commonjs/components/DialogBody/index.js.map +1 -1
  109. package/lib-commonjs/components/DialogBody/renderDialogBody.js +4 -8
  110. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
  111. package/lib-commonjs/components/DialogBody/useDialogBody.js +0 -5
  112. package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
  113. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +23 -30
  114. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  115. package/lib-commonjs/components/DialogContent/DialogContent.js +0 -6
  116. package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
  117. package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -1
  118. package/lib-commonjs/components/DialogContent/index.js +0 -6
  119. package/lib-commonjs/components/DialogContent/index.js.map +1 -1
  120. package/lib-commonjs/components/DialogContent/renderDialogContent.js +2 -6
  121. package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
  122. package/lib-commonjs/components/DialogContent/useDialogContent.js +0 -5
  123. package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
  124. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +15 -23
  125. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -1
  126. package/lib-commonjs/components/DialogSurface/DialogSurface.js +0 -7
  127. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
  128. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -1
  129. package/lib-commonjs/components/DialogSurface/index.js +0 -6
  130. package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
  131. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +4 -9
  132. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
  133. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +2 -13
  134. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
  135. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +0 -2
  136. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  137. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +92 -103
  138. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  139. package/lib-commonjs/components/DialogTitle/DialogTitle.js +0 -6
  140. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
  141. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -1
  142. package/lib-commonjs/components/DialogTitle/index.js +0 -6
  143. package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
  144. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +4 -7
  145. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
  146. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +0 -10
  147. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
  148. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +74 -86
  149. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  150. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +2 -7
  151. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
  152. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  153. package/lib-commonjs/components/DialogTrigger/index.js +0 -5
  154. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
  155. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +0 -2
  156. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  157. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +4 -11
  158. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  159. package/lib-commonjs/contexts/constants.js.map +1 -1
  160. package/lib-commonjs/contexts/dialogContext.js +2 -8
  161. package/lib-commonjs/contexts/dialogContext.js.map +1 -1
  162. package/lib-commonjs/contexts/dialogSurfaceContext.js +0 -5
  163. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
  164. package/lib-commonjs/contexts/index.js +0 -4
  165. package/lib-commonjs/contexts/index.js.map +1 -1
  166. package/lib-commonjs/index.js +0 -14
  167. package/lib-commonjs/index.js.map +1 -1
  168. package/lib-commonjs/utils/index.js +0 -4
  169. package/lib-commonjs/utils/index.js.map +1 -1
  170. package/lib-commonjs/utils/isEscapeKeyDown.js +0 -4
  171. package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
  172. package/lib-commonjs/utils/useDisableBodyScroll.js +0 -14
  173. package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
  174. package/lib-commonjs/utils/useFocusFirstElement.js +0 -10
  175. package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
  176. package/package.json +9 -9
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./components/DialogActions/index"), exports);
10
8
  //# sourceMappingURL=DialogActions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/DialogActions.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/DialogActions/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogActions.ts"],"sourcesContent":["export * from './components/DialogActions/index';\n"]}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./components/DialogBody/index"), exports);
10
8
  //# sourceMappingURL=DialogBody.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/DialogBody.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/DialogBody/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogBody.ts"],"sourcesContent":["export * from './components/DialogBody/index';\n"]}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./components/DialogContent/index"), exports);
10
8
  //# sourceMappingURL=DialogContent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/DialogContent.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/DialogContent/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogContent.ts"],"sourcesContent":["export * from './components/DialogContent/index';\n"]}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./components/DialogSurface/index"), exports);
10
8
  //# sourceMappingURL=DialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/DialogSurface.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/DialogSurface/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogSurface.ts"],"sourcesContent":["export * from './components/DialogSurface/index';\n"]}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./components/DialogTitle/index"), exports);
10
8
  //# sourceMappingURL=DialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/DialogTitle.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/DialogTitle/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogTitle.ts"],"sourcesContent":["export * from './components/DialogTitle/index';\n"]}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./components/DialogTrigger/index"), exports);
10
8
  //# sourceMappingURL=DialogTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/DialogTrigger.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/DialogTrigger/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogTrigger.ts"],"sourcesContent":["export * from './components/DialogTrigger/index';\n"]}
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Dialog = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useDialog_1 = /*#__PURE__*/require("./useDialog");
11
-
12
9
  const renderDialog_1 = /*#__PURE__*/require("./renderDialog");
13
-
14
10
  const useDialogContextValues_1 = /*#__PURE__*/require("./useDialogContextValues");
15
11
  /**
16
12
  * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.
@@ -19,8 +15,6 @@ const useDialogContextValues_1 = /*#__PURE__*/require("./useDialogContextValues"
19
15
  * and a `DialogSurface` (or some component that will eventually render one of those compound components)
20
16
  * in this specific order
21
17
  */
22
-
23
-
24
18
  exports.Dialog = /*#__PURE__*/React.memo(props => {
25
19
  const state = useDialog_1.useDialog_unstable(props);
26
20
  const contextValues = useDialogContextValues_1.useDialogContextValues_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAEA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAEA;;;;;;AAMG;;;AACU,OAAA,CAAA,MAAA,gBAAgC,KAAK,CAAC,IAAN,CAAW,KAAK,IAAG;EAC9D,MAAM,KAAK,GAAG,WAAA,CAAA,kBAAA,CAAmB,KAAnB,CAAd;EACA,MAAM,aAAa,GAAG,wBAAA,CAAA,+BAAA,CAAgC,KAAhC,CAAtB;EAEA,OAAO,cAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,aAA7B,CAAP;AACD,CAL4C,CAAhC;AAOb,OAAA,CAAA,MAAA,CAAO,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AAEA;;;;;;;AAOaA,cAAM,gBAA0BC,KAAK,CAACC,IAAI,CAACC,KAAK,IAAG;EAC9D,MAAMC,KAAK,GAAGC,8BAAkB,CAACF,KAAK,CAAC;EACvC,MAAMG,aAAa,GAAGC,wDAA+B,CAACH,KAAK,CAAC;EAE5D,OAAOI,oCAAqB,CAACJ,KAAK,EAAEE,aAAa,CAAC;AACpD,CAAC,CAAC;AAEFN,cAAM,CAACS,WAAW,GAAG,QAAQ","names":["exports","React","memo","props","state","useDialog_1","contextValues","useDialogContextValues_1","renderDialog_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/Dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -3,14 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./Dialog"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./Dialog.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderDialog"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useDialog"), exports);
16
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/index.ts"],"sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"]}
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderDialog_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const contexts_1 = /*#__PURE__*/require("../../contexts");
11
9
  /**
12
10
  * Render the final JSX of Dialog
13
11
  */
14
-
15
-
16
12
  const renderDialog_unstable = (state, contextValues) => {
17
13
  const {
18
14
  content,
@@ -24,6 +20,5 @@ const renderDialog_unstable = (state, contextValues) => {
24
20
  value: contextValues.dialogSurface
25
21
  }, trigger, content));
26
22
  };
27
-
28
23
  exports.renderDialog_unstable = renderDialog_unstable;
29
24
  //# sourceMappingURL=renderDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/renderDialog.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAqB,aAArB,KAA2D;EAC9F,MAAM;IAAE,OAAF;IAAW;EAAX,IAAuB,KAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,UAAA,CAAA,cAAD,EAAe;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAf,EACE,KAAA,CAAA,aAAA,CAAC,UAAA,CAAA,qBAAD,EAAsB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAtB,EACG,OADH,EAEG,OAFH,CADF,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,qBAAqB,GAAG,CAACC,KAAkB,EAAEC,aAAkC,KAAI;EAC9F,MAAM;IAAEC,OAAO;IAAEC;EAAO,CAAE,GAAGH,KAAK;EAElC,OACEI,oBAACC,yBAAc;IAACC,KAAK,EAAEL,aAAa,CAACM;EAAM,GACzCH,oBAACC,gCAAqB;IAACC,KAAK,EAAEL,aAAa,CAACO;EAAa,GACtDL,OAAO,EACPD,OAAO,CACc,CACT;AAErB,CAAC;AAXYO,6BAAqB","names":["renderDialog_unstable","state","contextValues","content","trigger","React","contexts_1","value","dialog","dialogSurface","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/renderDialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"]}
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialog_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
9
  const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
13
-
14
10
  const utils_1 = /*#__PURE__*/require("../../utils");
15
-
16
11
  const contexts_1 = /*#__PURE__*/require("../../contexts");
17
12
  /**
18
13
  * Create the state required to render Dialog.
@@ -22,8 +17,6 @@ const contexts_1 = /*#__PURE__*/require("../../contexts");
22
17
  *
23
18
  * @param props - props from this instance of Dialog
24
19
  */
25
-
26
-
27
20
  const useDialog_unstable = props => {
28
21
  const {
29
22
  children,
@@ -37,9 +30,9 @@ const useDialog_unstable = props => {
37
30
  initialState: false
38
31
  });
39
32
  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
33
+ onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(data.event, data);
34
+ // if user prevents default then do not change state value
41
35
  // otherwise updates state value and trigger reference to the element that caused the opening
42
-
43
36
  if (!data.event.isDefaultPrevented()) {
44
37
  setOpen(data.open);
45
38
  }
@@ -66,32 +59,26 @@ const useDialog_unstable = props => {
66
59
  dialogRef: focusRef
67
60
  };
68
61
  };
69
-
70
62
  exports.useDialog_unstable = useDialog_unstable;
71
63
  /**
72
64
  * Extracts trigger and content from children
73
65
  */
74
-
75
66
  function childrenToTriggerAndContent(children) {
76
67
  const childrenArray = React.Children.toArray(children);
77
-
78
68
  if (process.env.NODE_ENV !== 'production') {
79
69
  if (childrenArray.length !== 1 && childrenArray.length !== 2) {
80
70
  // eslint-disable-next-line no-console
81
71
  console.warn('Dialog must contain at least one child <DialogSurface/>,\n' + 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)');
82
72
  }
83
73
  }
84
-
85
74
  switch (childrenArray.length) {
86
75
  // case where there's a trigger followed by content
87
76
  case 2:
88
77
  return childrenArray;
89
78
  // case where there's only content
90
-
91
79
  case 1:
92
80
  return [undefined, childrenArray[0]];
93
81
  // unknown case
94
-
95
82
  default:
96
83
  return [undefined, undefined];
97
84
  }
@@ -1 +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;;AACA,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,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,aAAa,EAAE,iBAAA,CAAA,KAAA,CAAM,eAAN,CATV;IAUL,cAAc,EAAE,wBAAA,CAAA,mBAAA,CAAoB,UAAA,CAAA,aAApB,CAVX;IAWL,SAAS,EAAE;EAXN,CAAP;AAaD,CA5CM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB;AA8Cb;;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 { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AAQO,MAAMA,kBAAkB,GAAIC,KAAkB,IAAiB;EACpE,MAAM;IAAEC,QAAQ;IAAEC,SAAS,GAAG,OAAO;IAAEC;EAAY,CAAE,GAAGH,KAAK;EAE7D,MAAM,CAACI,OAAO,EAAEC,OAAO,CAAC,GAAGC,2BAA2B,CAACL,QAAQ,CAAC;EAEhE,MAAM,CAACM,IAAI,EAAEC,OAAO,CAAC,GAAGC,sCAAoB,CAAC;IAC3CC,KAAK,EAAEV,KAAK,CAACO,IAAI;IACjBI,YAAY,EAAEX,KAAK,CAACY,WAAW;IAC/BC,YAAY,EAAE;GACf,CAAC;EAEF,MAAMC,iBAAiB,GAAGL,kCAAgB,CAAEM,IAA0B,IAAI;IACxEZ,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGY,IAAI,CAACC,KAAK,EAAED,IAAI,CAAC;IAEhC;IACA;IACA,IAAI,CAACA,IAAI,CAACC,KAAK,CAACC,kBAAkB,EAAE,EAAE;MACpCT,OAAO,CAACO,IAAI,CAACR,IAAI,CAAC;;EAEtB,CAAC,CAAC;EAEF,MAAMW,QAAQ,GAAGC,4BAAoB,CAACZ,IAAI,EAAEL,SAAS,CAAC;EACtD,MAAMkB,iBAAiB,GAAGD,4BAAoB,EAAE;EAChD,MAAME,kBAAkB,GAAGC,OAAO,CAACf,IAAI,IAAIL,SAAS,KAAK,WAAW,CAAC;EAErEO,2CAAyB,CAAC,MAAK;IAC7B,IAAIY,kBAAkB,EAAE;MACtB,OAAOD,iBAAiB,EAAE;;EAE9B,CAAC,EAAE,CAACA,iBAAiB,EAAEC,kBAAkB,CAAC,CAAC;EAE3C,OAAO;IACLE,UAAU,EAAE;MACVC,QAAQ,EAAE;KACX;IACDjB,IAAI;IACJL,SAAS;IACTG,OAAO,EAAEE,IAAI,GAAGF,OAAO,GAAG,IAAI;IAC9BD,OAAO;IACPU,iBAAiB;IACjBW,aAAa,EAAEhB,uBAAK,CAAC,eAAe,CAAC;IACrCiB,cAAc,EAAEC,4CAAmB,CAACC,wBAAa,CAAC;IAClDC,SAAS,EAAEX;GACZ;AACH,CAAC;AA5CYY,0BAAkB;AA8C/B;;;AAGA,SAASxB,2BAA2B,CAClCL,QAAyB;EAEzB,MAAM8B,aAAa,GAAGC,KAAK,CAACC,QAAQ,CAACC,OAAO,CAACjC,QAAQ,CAAyB;EAC9E,IAAIkC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAIN,aAAa,CAACO,MAAM,KAAK,CAAC,IAAIP,aAAa,CAACO,MAAM,KAAK,CAAC,EAAE;MAC5D;MACAC,OAAO,CAACC,IAAI,CACV,4DAA4D,GAC1D,4EAA4E,CAC/E;;;EAGL,QAAQT,aAAa,CAACO,MAAM;IAC1B;IACA,KAAK,CAAC;MACJ,OAAOP,aAAqE;IAC9E;IACA,KAAK,CAAC;MACJ,OAAO,CAACU,SAAS,EAAEV,aAAa,CAAC,CAAC,CAAC,CAAC;IACtC;IACA;MACE,OAAO,CAACU,SAAS,EAAEA,SAAS,CAAC;EAAC;AAEpC","names":["useDialog_unstable","props","children","modalType","onOpenChange","trigger","content","childrenToTriggerAndContent","open","setOpen","react_utilities_1","state","defaultState","defaultOpen","initialState","requestOpenChange","data","event","isDefaultPrevented","focusRef","utils_1","disableBodyScroll","isBodyScrollLocked","Boolean","components","backdrop","dialogTitleId","isNestedDialog","react_context_selector_1","contexts_1","dialogRef","exports","childrenArray","React","Children","toArray","process","env","NODE_ENV","length","console","warn","undefined"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/useDialog.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialogContextValues_unstable = void 0;
7
-
8
7
  function useDialogContextValues_unstable(state) {
9
8
  const {
10
9
  modalType,
@@ -18,7 +17,6 @@ function useDialogContextValues_unstable(state) {
18
17
  * This context is created with "@fluentui/react-context-selector",
19
18
  * there is no sense to memoize it
20
19
  */
21
-
22
20
  const dialog = {
23
21
  open,
24
22
  modalType,
@@ -33,6 +31,5 @@ function useDialogContextValues_unstable(state) {
33
31
  dialogSurface
34
32
  };
35
33
  }
36
-
37
34
  exports.useDialogContextValues_unstable = useDialogContextValues_unstable;
38
35
  //# sourceMappingURL=useDialogContextValues.js.map
@@ -1 +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,SAAnB;IAA8B,aAA9B;IAA6C,cAA7C;IAA6D;EAA7D,IAAmF,KAAzF;EAEA;;;AAGG;;EACH,MAAM,MAAM,GAAuB;IACjC,IADiC;IAEjC,SAFiC;IAGjC,SAHiC;IAIjC,aAJiC;IAKjC,cALiC;IAMjC;EANiC,CAAnC;EASA,MAAM,aAAa,GAA8B,KAAjD;EAEA,OAAO;IAAE,MAAF;IAAU;EAAV,CAAP;AACD;;AAnBD,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, 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 dialogTitleId,\n isNestedDialog,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAGA,SAAgBA,+BAA+B,CAACC,KAAkB;EAChE,MAAM;IAAEC,SAAS;IAAEC,IAAI;IAAEC,SAAS;IAAEC,aAAa;IAAEC,cAAc;IAAEC;EAAiB,CAAE,GAAGN,KAAK;EAE9F;;;;EAIA,MAAMO,MAAM,GAAuB;IACjCL,IAAI;IACJD,SAAS;IACTE,SAAS;IACTC,aAAa;IACbC,cAAc;IACdC;GACD;EAED,MAAME,aAAa,GAA8B,KAAK;EAEtD,OAAO;IAAED,MAAM;IAAEC;EAAa,CAAE;AAClC;AAnBAC","names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","requestOpenChange","dialog","dialogSurface","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const { modalType, open, dialogRef, dialogTitleId, isNestedDialog, requestOpenChange } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"]}
@@ -4,20 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DialogActions = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useDialogActions_1 = /*#__PURE__*/require("./useDialogActions");
11
-
12
9
  const renderDialogActions_1 = /*#__PURE__*/require("./renderDialogActions");
13
-
14
10
  const useDialogActionsStyles_1 = /*#__PURE__*/require("./useDialogActionsStyles");
15
11
  /**
16
12
  * `DialogActions` is a container for the actions of the dialog.
17
13
  * Apart from styling, this component does not have other behavior.
18
14
  */
19
-
20
-
21
15
  exports.DialogActions = /*#__PURE__*/React.forwardRef((props, ref) => {
22
16
  const state = useDialogActions_1.useDialogActions_unstable(props, ref);
23
17
  useDialogActionsStyles_1.useDialogActionsStyles_unstable(state);
@@ -1 +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/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;;AAIaA,qBAAa,gBAA4CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGC,4CAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEnDG,wDAA+B,CAACF,KAAK,CAAC;EACtC,OAAOG,kDAA4B,CAACH,KAAK,CAAC;AAC5C,CAAC,CAAC;AAEFL,qBAAa,CAACS,WAAW,GAAG,eAAe","names":["exports","React","forwardRef","props","ref","state","useDialogActions_1","useDialogActionsStyles_1","renderDialogActions_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -3,16 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./DialogActions"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./DialogActions.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderDialogActions"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useDialogActions"), exports);
16
-
17
11
  tslib_1.__exportStar(require("./useDialogActionsStyles"), exports);
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +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/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogActions/index.ts"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles';\n"]}
@@ -4,24 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderDialogActions_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
9
  /**
12
10
  * Render the final JSX of DialogActions
13
11
  */
14
-
15
-
16
12
  const renderDialogActions_unstable = state => {
17
13
  const {
18
14
  slots,
19
15
  slotProps
20
- } = react_utilities_1.getSlots(state); // TODO Add additional slots in the appropriate place
21
-
22
- return React.createElement(slots.root, { ...slotProps.root
16
+ } = react_utilities_1.getSlots(state);
17
+ // TODO Add additional slots in the appropriate place
18
+ return React.createElement(slots.root, {
19
+ ...slotProps.root
23
20
  });
24
21
  };
25
-
26
22
  exports.renderDialogActions_unstable = renderDialogActions_unstable;
27
23
  //# sourceMappingURL=renderDialogActions.js.map
@@ -1 +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/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,4BAA4B,GAAIC,KAAyB,IAAI;EACxE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAqBH,KAAK,CAAC;EAEhE;EACA,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AALYC,oCAA4B","names":["renderDialogActions_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogActions/renderDialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogActionsState, DialogActionsSlots } from './DialogActions.types';\n\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = (state: DialogActionsState) => {\n const { slots, slotProps } = getSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialogActions_unstable = void 0;
7
-
8
7
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
8
  /**
10
9
  * Create the state required to render DialogActions.
@@ -15,8 +14,6 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
15
14
  * @param props - props from this instance of DialogActions
16
15
  * @param ref - reference to root HTMLElement of DialogActions
17
16
  */
18
-
19
-
20
17
  const useDialogActions_unstable = (props, ref) => {
21
18
  const {
22
19
  position = 'end'
@@ -32,6 +29,5 @@ const useDialogActions_unstable = (props, ref) => {
32
29
  position
33
30
  };
34
31
  };
35
-
36
32
  exports.useDialogActions_unstable = useDialogActions_unstable;
37
33
  //# sourceMappingURL=useDialogActions.js.map
@@ -1 +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/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAGA;;;;;;;;;AASO,MAAMA,yBAAyB,GAAG,CACvCC,KAAyB,EACzBC,GAA2B,KACL;EACtB,MAAM;IAAEC,QAAQ,GAAG;EAAK,CAAE,GAAGF,KAAK;EAClC,OAAO;IACLG,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEC,uCAAqB,CAAC,KAAK,EAAE;MACjCJ,GAAG;MACH,GAAGD;KACJ,CAAC;IACFE;GACD;AACH,CAAC;AAfYI,iCAAyB","names":["useDialogActions_unstable","props","ref","position","components","root","react_utilities_1","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogActions/useDialogActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogActionsProps, DialogActionsState } from './DialogActions.types';\n\n/**\n * Create the state required to render DialogActions.\n *\n * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,\n * before being passed to renderDialogActions_unstable.\n *\n * @param props - props from this instance of DialogActions\n * @param ref - reference to root HTMLElement of DialogActions\n */\nexport const useDialogActions_unstable = (\n props: DialogActionsProps,\n ref: React.Ref<HTMLElement>,\n): DialogActionsState => {\n const { position = 'end' } = props;\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n position,\n };\n};\n"]}
@@ -4,57 +4,50 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialogActionsStyles_unstable = exports.dialogActionsClassNames = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const constants_1 = /*#__PURE__*/require("../../contexts/constants");
11
-
12
9
  exports.dialogActionsClassNames = {
13
10
  root: 'fui-DialogActions'
14
11
  };
15
-
16
12
  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"
13
+ root: {
14
+ Bqenvij: "f3052tw",
15
+ B7ck84d: "f1ewtqcl",
16
+ mc9l5x: "f22iagw",
17
+ i8kkvl: "f4px1ci",
18
+ Belr9w4: "fn67r4l",
19
+ Bmdcpmo: "f6glcwc",
20
+ th9wkt: "f1e3st1r"
25
21
  },
26
- "gridPositionEnd": {
27
- "Bdqf98w": "f1a7i8kp",
28
- "Ijaq50": "f11u0jfc",
29
- "Br312pm": "f1d6tb1o",
30
- "nk6f5a": "f23awfp",
31
- "Bw0ie65": "fiappcv"
22
+ gridPositionEnd: {
23
+ Bdqf98w: "f1a7i8kp",
24
+ Ijaq50: "f11u0jfc",
25
+ Br312pm: "f1d6tb1o",
26
+ nk6f5a: "f23awfp",
27
+ Bw0ie65: "fiappcv"
32
28
  },
33
- "gridPositionStart": {
34
- "Bdqf98w": "fsxvdwy",
35
- "Ijaq50": "f1vnb230",
36
- "Br312pm": "f14781pt",
37
- "nk6f5a": "f13d374e",
38
- "Bw0ie65": "f1fjo411"
29
+ gridPositionStart: {
30
+ Bdqf98w: "fsxvdwy",
31
+ Ijaq50: "f1vnb230",
32
+ Br312pm: "f14781pt",
33
+ nk6f5a: "f13d374e",
34
+ Bw0ie65: "f1fjo411"
39
35
  }
40
36
  }, {
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)"
37
+ d: [".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}", ".f1a7i8kp{justify-self:end;}", ".f11u0jfc{grid-row-start:actions-end;}", ".f1d6tb1o{grid-column-start:actions-end;}", ".f23awfp{grid-row-end:actions-end;}", ".fiappcv{grid-column-end:actions-end;}", ".fsxvdwy{justify-self:start;}", ".f1vnb230{grid-row-start:actions-start;}", ".f14781pt{grid-column-start:actions-start;}", ".f13d374e{grid-row-end:actions-start;}", ".f1fjo411{grid-column-end:actions-start;}"],
38
+ m: [["@media screen and (max-width: 480px){.f6glcwc{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}}", {
39
+ m: "screen and (max-width: 480px)"
44
40
  }], ["@media screen and (max-width: 480px){.f1e3st1r{justify-self:stretch;}}", {
45
- "m": "screen and (max-width: 480px)"
41
+ m: "screen and (max-width: 480px)"
46
42
  }]]
47
43
  });
48
44
  /**
49
45
  * Apply styling to the DialogActions slots based on the state
50
46
  */
51
-
52
-
53
47
  const useDialogActionsStyles_unstable = state => {
54
48
  const styles = useStyles();
55
49
  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
50
  return state;
57
51
  };
58
-
59
52
  exports.useDialogActionsStyles_unstable = useDialogActionsStyles_unstable;
60
53
  //# sourceMappingURL=useDialogActionsStyles.js.map
@@ -1 +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/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAGA;AAOaA,+BAAuB,GAAuC;EACzEC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGC,gBAAU;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,EAmB1B;AAEF;;;AAGO,MAAMC,+BAA+B,GAAIC,KAAyB,IAAwB;EAC/F,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGJ,oBAAY,CACjCH,+BAAuB,CAACC,IAAI,EAC5BK,MAAM,CAACL,IAAI,EACXI,KAAK,CAACG,QAAQ,KAAK,OAAO,IAAIF,MAAM,CAACG,iBAAiB,EACtDJ,KAAK,CAACG,QAAQ,KAAK,KAAK,IAAIF,MAAM,CAACI,eAAe,EAClDL,KAAK,CAACJ,IAAI,CAACM,SAAS,CACrB;EACD,OAAOF,KAAK;AACd,CAAC;AAVYL,uCAA+B","names":["exports","root","useStyles","react_1","useDialogActionsStyles_unstable","state","styles","className","position","gridPositionStart","gridPositionEnd"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogActions/useDialogActionsStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.root.className,\n );\n return state;\n};\n"]}
@@ -4,20 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DialogBody = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useDialogBody_1 = /*#__PURE__*/require("./useDialogBody");
11
-
12
9
  const renderDialogBody_1 = /*#__PURE__*/require("./renderDialogBody");
13
-
14
10
  const useDialogBodyStyles_1 = /*#__PURE__*/require("./useDialogBodyStyles");
15
11
  /**
16
12
  * The `DialogBody` is a container where the content of the dialog is rendered.
17
13
  * Apart from styling, this component does not have other behavior.
18
14
  */
19
-
20
-
21
15
  exports.DialogBody = /*#__PURE__*/React.forwardRef((props, ref) => {
22
16
  const state = useDialogBody_1.useDialogBody_unstable(props, ref);
23
17
  useDialogBodyStyles_1.useDialogBodyStyles_unstable(state);