@fluentui/react-dialog 9.1.5 → 9.1.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 (176) hide show
  1. package/CHANGELOG.json +113 -1
  2. package/CHANGELOG.md +30 -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,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("./DialogContent"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./DialogContent.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderDialogContent"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useDialogContent"), exports);
16
-
17
11
  tslib_1.__exportStar(require("./useDialogContentStyles"), exports);
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogContent/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 './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles';\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/DialogContent/index.ts"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles';\n"]}
@@ -4,23 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderDialogContent_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 DialogContent
13
11
  */
14
-
15
-
16
12
  const renderDialogContent_unstable = state => {
17
13
  const {
18
14
  slots,
19
15
  slotProps
20
16
  } = react_utilities_1.getSlots(state);
21
- return React.createElement(slots.root, { ...slotProps.root
17
+ return React.createElement(slots.root, {
18
+ ...slotProps.root
22
19
  });
23
20
  };
24
-
25
21
  exports.renderDialogContent_unstable = renderDialogContent_unstable;
26
22
  //# sourceMappingURL=renderDialogContent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogContent/renderDialogContent.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;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\n\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = (state: DialogContentState) => {\n const { slots, slotProps } = getSlots<DialogContentSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"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,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AAJYC,oCAA4B","names":["renderDialogContent_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogContent/renderDialogContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\n\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = (state: DialogContentState) => {\n const { slots, slotProps } = getSlots<DialogContentSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialogContent_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 DialogBody.
@@ -15,11 +14,8 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
15
14
  * @param props - props from this instance of DialogBody
16
15
  * @param ref - reference to root HTMLElement of DialogBody
17
16
  */
18
-
19
-
20
17
  const useDialogContent_unstable = (props, ref) => {
21
18
  var _a;
22
-
23
19
  return {
24
20
  components: {
25
21
  root: 'div'
@@ -30,6 +26,5 @@ const useDialogContent_unstable = (props, ref) => {
30
26
  })
31
27
  };
32
28
  };
33
-
34
29
  exports.useDialogContent_unstable = useDialogContent_unstable;
35
30
  //# sourceMappingURL=useDialogContent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogContent/useDialogContent.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,yBAAyB,GAAG,CACvC,KADuC,EAEvC,GAFuC,KAGjB;;;EACtB,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,KAAlC,EAAyC;MAC7C,GAD6C;MAE7C,GAAG;IAF0C,CAAzC;EAJD,CAAP;AASD,CAbM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { DialogContentProps, DialogContentState } from './DialogContent.types';\n\n/**\n * Create the state required to render DialogBody.\n *\n * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,\n * before being passed to renderDialogBody_unstable.\n *\n * @param props - props from this instance of DialogBody\n * @param ref - reference to root HTMLElement of DialogBody\n */\nexport const useDialogContent_unstable = (\n props: DialogContentProps,\n ref: React.Ref<HTMLElement>,\n): DialogContentState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps(props.as ?? 'div', {\n ref,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAGA;;;;;;;;;AASO,MAAMA,yBAAyB,GAAG,CACvCC,KAAyB,EACzBC,GAA2B,KACL;;EACtB,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEC,uCAAqB,CAAC,WAAK,CAACC,EAAE,mCAAI,KAAK,EAAE;MAC7CJ,GAAG;MACH,GAAGD;KACJ;GACF;AACH,CAAC;AAbYM,iCAAyB","names":["useDialogContent_unstable","props","ref","components","root","react_utilities_1","as","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogContent/useDialogContent.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { DialogContentProps, DialogContentState } from './DialogContent.types';\n\n/**\n * Create the state required to render DialogBody.\n *\n * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,\n * before being passed to renderDialogBody_unstable.\n *\n * @param props - props from this instance of DialogBody\n * @param ref - reference to root HTMLElement of DialogBody\n */\nexport const useDialogContent_unstable = (\n props: DialogContentProps,\n ref: React.Ref<HTMLElement>,\n): DialogContentState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps(props.as ?? 'div', {\n ref,\n ...props,\n }),\n };\n};\n"]}
@@ -4,49 +4,41 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialogContentStyles_unstable = exports.dialogContentClassNames = 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
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
-
14
10
  exports.dialogContentClassNames = {
15
11
  root: 'fui-DialogContent'
16
12
  };
17
13
  /**
18
14
  * Styles for the root slot
19
15
  */
20
-
21
16
  const useStyles = /*#__PURE__*/react_1.__styles({
22
- "root": {
23
- "a9b677": "fly5x3f",
24
- "Bqenvij": "f1l02sjl",
25
- "Bmxbyg5": "f5zp4f",
26
- "sshi5w": "f1nxs5xn",
27
- "B7ck84d": "f1ewtqcl",
28
- "Ijaq50": "f6owso0",
29
- "Br312pm": "fupswjn",
30
- "nk6f5a": "foucsne",
31
- "Bw0ie65": "f1ka72gx",
32
- "Bahqtrf": "fk6fouc",
33
- "Be2twd7": "fkhj508",
34
- "Bhrd7zp": "figsok6",
35
- "Bg96gwp": "f1i3iumi"
17
+ root: {
18
+ a9b677: "fly5x3f",
19
+ Bqenvij: "f1l02sjl",
20
+ Bmxbyg5: "f5zp4f",
21
+ sshi5w: "f1nxs5xn",
22
+ B7ck84d: "f1ewtqcl",
23
+ Ijaq50: "f6owso0",
24
+ Br312pm: "fupswjn",
25
+ nk6f5a: "foucsne",
26
+ Bw0ie65: "f1ka72gx",
27
+ Bahqtrf: "fk6fouc",
28
+ Be2twd7: "fkhj508",
29
+ Bhrd7zp: "figsok6",
30
+ Bg96gwp: "f1i3iumi"
36
31
  }
37
32
  }, {
38
- "d": [".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f5zp4f{overflow-y:auto;}", ".f1nxs5xn{min-height:32px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f6owso0{grid-row-start:body;}", ".fupswjn{grid-column-start:body;}", ".foucsne{grid-row-end:body;}", ".f1ka72gx{grid-column-end:body;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
33
+ d: [".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f5zp4f{overflow-y:auto;}", ".f1nxs5xn{min-height:32px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f6owso0{grid-row-start:body;}", ".fupswjn{grid-column-start:body;}", ".foucsne{grid-row-end:body;}", ".f1ka72gx{grid-column-end:body;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
39
34
  });
40
35
  /**
41
36
  * Apply styling to the DialogContent slots based on the state
42
37
  */
43
-
44
-
45
38
  const useDialogContentStyles_unstable = state => {
46
39
  const styles = useStyles();
47
40
  state.root.className = react_1.mergeClasses(exports.dialogContentClassNames.root, styles.root, state.root.className);
48
41
  return state;
49
42
  };
50
-
51
43
  exports.useDialogContentStyles_unstable = useDialogContentStyles_unstable;
52
44
  //# sourceMappingURL=useDialogContentStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogContent/useDialogContentStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGA,MAAA,WAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEa,OAAA,CAAA,uBAAA,GAA8D;EACzE,IAAI,EAAE;AADmE,CAA9D;AAIb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAYA;;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,CAAa,OAAA,CAAA,uBAAA,CAAwB,IAArC,EAA2C,MAAM,CAAC,IAAlD,EAAwD,KAAK,CAAC,IAAN,CAAW,SAAnE,CAAvB;EACA,OAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.gridArea(CONTENT_GRID_AREA),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAGA;AACA;AAEaA,+BAAuB,GAAuC;EACzEC,IAAI,EAAE;CACP;AAED;;;AAGA,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAU1B;AAEF;;;AAGO,MAAMC,+BAA+B,GAAIC,KAAyB,IAAwB;EAC/F,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACJ,IAAI,CAACM,SAAS,GAAGJ,oBAAY,CAACH,+BAAuB,CAACC,IAAI,EAAEK,MAAM,CAACL,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;EACpG,OAAOF,KAAK;AACd,CAAC;AAJYL,uCAA+B","names":["exports","root","useStyles","react_1","useDialogContentStyles_unstable","state","styles","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogContent/useDialogContentStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.gridArea(CONTENT_GRID_AREA),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"]}
@@ -4,22 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DialogSurface = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useDialogSurface_1 = /*#__PURE__*/require("./useDialogSurface");
11
-
12
9
  const renderDialogSurface_1 = /*#__PURE__*/require("./renderDialogSurface");
13
-
14
10
  const useDialogSurfaceStyles_1 = /*#__PURE__*/require("./useDialogSurfaceStyles");
15
-
16
11
  const useDialogSurfaceContextValues_1 = /*#__PURE__*/require("./useDialogSurfaceContextValues");
17
12
  /**
18
13
  * DialogSurface component represents the visual part of a `Dialog` as a whole,
19
14
  * it contains everything that should be visible.
20
15
  */
21
-
22
-
23
16
  exports.DialogSurface = /*#__PURE__*/React.forwardRef((props, ref) => {
24
17
  const state = useDialogSurface_1.useDialogSurface_unstable(props, ref);
25
18
  const contextValues = useDialogSurfaceContextValues_1.useDialogSurfaceContextValues_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/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/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAGA;AAEA;;;;AAIaA,qBAAa,gBAA4CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpG,MAAMC,KAAK,GAAGC,4CAAyB,CAACH,KAAK,EAAEC,GAAG,CAAC;EACnD,MAAMG,aAAa,GAAGC,sEAAsC,CAACH,KAAK,CAAC;EAEnEI,wDAA+B,CAACJ,KAAK,CAAC;EACtC,OAAOK,kDAA4B,CAACL,KAAK,EAAEE,aAAa,CAAC;AAC3D,CAAC,CAAC;AAEFP,qBAAa,CAACW,WAAW,GAAG,eAAe","names":["exports","React","forwardRef","props","ref","state","useDialogSurface_1","contextValues","useDialogSurfaceContextValues_1","useDialogSurfaceStyles_1","renderDialogSurface_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogSurface/DialogSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\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"]}
@@ -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("./DialogSurface"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./DialogSurface.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderDialogSurface"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useDialogSurface"), exports);
16
-
17
11
  tslib_1.__exportStar(require("./useDialogSurfaceStyles"), exports);
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/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/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogSurface/index.ts"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n"]}
@@ -4,30 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderDialogSurface_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 contexts_1 = /*#__PURE__*/require("../../contexts");
13
-
14
10
  const react_portal_1 = /*#__PURE__*/require("@fluentui/react-portal");
15
11
  /**
16
12
  * Render the final JSX of DialogSurface
17
13
  */
18
-
19
-
20
14
  const renderDialogSurface_unstable = (state, contextValues) => {
21
15
  const {
22
16
  slots,
23
17
  slotProps
24
18
  } = react_utilities_1.getSlots(state);
25
- return React.createElement(react_portal_1.Portal, null, slots.backdrop && React.createElement(slots.backdrop, { ...slotProps.backdrop
19
+ return React.createElement(react_portal_1.Portal, null, slots.backdrop && React.createElement(slots.backdrop, {
20
+ ...slotProps.backdrop
26
21
  }), React.createElement(contexts_1.DialogSurfaceProvider, {
27
22
  value: contextValues.dialogSurface
28
- }, React.createElement(slots.root, { ...slotProps.root
23
+ }, React.createElement(slots.root, {
24
+ ...slotProps.root
29
25
  })));
30
26
  };
31
-
32
27
  exports.renderDialogSurface_unstable = renderDialogSurface_unstable;
33
28
  //# sourceMappingURL=renderDialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogSurface/renderDialogSurface.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,UAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAEA;;AAEG;;;AACI,MAAM,4BAA4B,GAAG,CAAC,KAAD,EAA4B,aAA5B,KAAyE;EACnH,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA6B,KAA7B,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,MAAD,EAAO,IAAP,EACG,KAAK,CAAC,QAAN,IAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;EAAf,CAAf,CADrB,EAEE,KAAA,CAAA,aAAA,CAAC,UAAA,CAAA,qBAAD,EAAsB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAtB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CAFF,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n const { slots, slotProps } = getSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal>\n {slots.backdrop && <slots.backdrop {...slotProps.backdrop} />}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <slots.root {...slotProps.root} />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAEA;;;AAGO,MAAMA,4BAA4B,GAAG,CAACC,KAAyB,EAAEC,aAAyC,KAAI;EACnH,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAqBJ,KAAK,CAAC;EAEhE,OACEK,oBAACC,qBAAM,QACJJ,KAAK,CAACK,QAAQ,IAAIF,oBAACH,KAAK,CAACK,QAAQ;IAAA,GAAKJ,SAAS,CAACI;EAAQ,EAAI,EAC7DF,oBAACG,gCAAqB;IAACC,KAAK,EAAER,aAAa,CAACS;EAAa,GACvDL,oBAACH,KAAK,CAACS,IAAI;IAAA,GAAKR,SAAS,CAACQ;EAAI,EAAI,CACZ,CACjB;AAEb,CAAC;AAXYC,oCAA4B","names":["renderDialogSurface_unstable","state","contextValues","slots","slotProps","react_utilities_1","React","react_portal_1","backdrop","contexts_1","value","dialogSurface","root","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogSurface/renderDialogSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n const { slots, slotProps } = getSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal>\n {slots.backdrop && <slots.backdrop {...slotProps.backdrop} />}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <slots.root {...slotProps.root} />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"]}
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialogSurface_unstable = void 0;
7
-
8
7
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
-
10
8
  const contexts_1 = /*#__PURE__*/require("../../contexts");
11
-
12
9
  const utils_1 = /*#__PURE__*/require("../../utils");
13
-
14
10
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
15
11
  /**
16
12
  * Create the state required to render DialogSurface.
@@ -21,8 +17,6 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
21
17
  * @param props - props from this instance of DialogSurface
22
18
  * @param ref - reference to root HTMLElement of DialogSurface
23
19
  */
24
-
25
-
26
20
  const useDialogSurface_unstable = (props, ref) => {
27
21
  const {
28
22
  backdrop,
@@ -35,11 +29,9 @@ const useDialogSurface_unstable = (props, ref) => {
35
29
  const dialogTitleID = contexts_1.useDialogContext_unstable(ctx => ctx.dialogTitleId);
36
30
  const handledBackdropClick = react_utilities_1.useEventCallback(event => {
37
31
  var _a, _b;
38
-
39
32
  if (react_utilities_1.isResolvedShorthand(props.backdrop)) {
40
33
  (_b = (_a = props.backdrop).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
41
34
  }
42
-
43
35
  if (modalType === 'modal' && !event.isDefaultPrevented()) {
44
36
  requestOpenChange({
45
37
  event,
@@ -50,17 +42,15 @@ const useDialogSurface_unstable = (props, ref) => {
50
42
  });
51
43
  const handleKeyDown = react_utilities_1.useEventCallback(event => {
52
44
  var _a;
53
-
54
45
  (_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, event);
55
-
56
46
  if (utils_1.isEscapeKeyDismiss(event, modalType)) {
57
47
  requestOpenChange({
58
48
  event,
59
49
  open: false,
60
50
  type: 'escapeKeyDown'
61
- }); // stop propagation to avoid conflicting with other elements that listen for `Escape`
51
+ });
52
+ // stop propagation to avoid conflicting with other elements that listen for `Escape`
62
53
  // e,g: nested Dialog, Popover, Menu and Tooltip
63
-
64
54
  event.stopPropagation();
65
55
  }
66
56
  });
@@ -93,6 +83,5 @@ const useDialogSurface_unstable = (props, ref) => {
93
83
  })
94
84
  };
95
85
  };
96
-
97
86
  exports.useDialogSurface_unstable = useDialogSurface_unstable;
98
87
  //# sourceMappingURL=useDialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurface.ts"],"names":[],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n resolveShorthand,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n} from '@fluentui/react-utilities';\nimport type {\n DialogSurfaceElement,\n DialogSurfaceElementIntersection,\n DialogSurfaceProps,\n DialogSurfaceState,\n} from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const { backdrop, as } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<DialogSurfaceElementIntersection>) => {\n props.onKeyDown?.(event);\n\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n const { modalAttributes } = useModalAttributes({ trapFocus: modalType !== 'non-modal' });\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick,\n },\n }),\n root: getNativeElementProps(as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAaA;AACA;AACA;AAEA;;;;;;;;;AASO,MAAMA,yBAAyB,GAAG,CACvCC,KAAyB,EACzBC,GAAoC,KACd;EACtB,MAAM;IAAEC,QAAQ;IAAEC;EAAE,CAAE,GAAGH,KAAK;EAC9B,MAAMI,SAAS,GAAGC,oCAAyB,CAACC,GAAG,IAAIA,GAAG,CAACF,SAAS,CAAC;EACjE,MAAMG,SAAS,GAAGF,oCAAyB,CAACC,GAAG,IAAIA,GAAG,CAACC,SAAS,CAAC;EACjE,MAAMC,IAAI,GAAGH,oCAAyB,CAACC,GAAG,IAAIA,GAAG,CAACE,IAAI,CAAC;EACvD,MAAMC,iBAAiB,GAAGJ,oCAAyB,CAACC,GAAG,IAAIA,GAAG,CAACG,iBAAiB,CAAC;EACjF,MAAMC,aAAa,GAAGL,oCAAyB,CAACC,GAAG,IAAIA,GAAG,CAACK,aAAa,CAAC;EAEzE,MAAMC,oBAAoB,GAAGC,kCAAgB,CAAEC,KAAuC,IAAI;;IACxF,IAAID,qCAAmB,CAACb,KAAK,CAACE,QAAQ,CAAC,EAAE;MACvC,iBAAK,CAACA,QAAQ,EAACa,OAAO,mDAAGD,KAAK,CAAC;;IAEjC,IAAIV,SAAS,KAAK,OAAO,IAAI,CAACU,KAAK,CAACE,kBAAkB,EAAE,EAAE;MACxDP,iBAAiB,CAAC;QAChBK,KAAK;QACLN,IAAI,EAAE,KAAK;QACXS,IAAI,EAAE;OACP,CAAC;;EAEN,CAAC,CAAC;EAEF,MAAMC,aAAa,GAAGL,kCAAgB,CAAEC,KAA4D,IAAI;;IACtG,WAAK,CAACK,SAAS,+CAAfnB,KAAK,EAAac,KAAK,CAAC;IAExB,IAAIM,0BAAkB,CAACN,KAAK,EAAEV,SAAS,CAAC,EAAE;MACxCK,iBAAiB,CAAC;QAChBK,KAAK;QACLN,IAAI,EAAE,KAAK;QACXS,IAAI,EAAE;OACP,CAAC;MACF;MACA;MACAH,KAAK,CAACO,eAAe,EAAE;;EAE3B,CAAC,CAAC;EAEF,MAAM;IAAEC;EAAe,CAAE,GAAGC,kCAAkB,CAAC;IAAEC,SAAS,EAAEpB,SAAS,KAAK;EAAW,CAAE,CAAC;EAExF,OAAO;IACLqB,UAAU,EAAE;MACVvB,QAAQ,EAAE,KAAK;MACfwB,IAAI,EAAE;KACP;IACDxB,QAAQ,EAAEW,kCAAgB,CAACX,QAAQ,EAAE;MACnCyB,QAAQ,EAAEnB,IAAI,IAAIJ,SAAS,KAAK,WAAW;MAC3CwB,YAAY,EAAE;QACZ,aAAa,EAAE,MAAM;QACrBb,OAAO,EAAEH;;KAEZ,CAAC;IACFc,IAAI,EAAEb,uCAAqB,CAACV,EAAE,aAAFA,EAAE,cAAFA,EAAE,GAAI,KAAK,EAAE;MACvC0B,QAAQ,EAAE,CAAC,CAAC;MACZ,YAAY,EAAEzB,SAAS,KAAK,WAAW;MACvC0B,IAAI,EAAE1B,SAAS,KAAK,OAAO,GAAG,aAAa,GAAG,QAAQ;MACtD,iBAAiB,EAAEJ,KAAK,CAAC,YAAY,CAAC,GAAG+B,SAAS,GAAGrB,aAAa;MAClE,GAAGV,KAAK;MACR,GAAGsB,eAAe;MAClBH,SAAS,EAAED,aAAa;MACxBjB,GAAG,EAAEY,+BAAa,CAACZ,GAAG,EAAEM,SAAS;KAClC;GACF;AACH,CAAC;AAhEYyB,iCAAyB","names":["useDialogSurface_unstable","props","ref","backdrop","as","modalType","contexts_1","ctx","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","react_utilities_1","event","onClick","isDefaultPrevented","type","handleKeyDown","onKeyDown","utils_1","stopPropagation","modalAttributes","react_tabster_1","trapFocus","components","root","required","defaultProps","tabIndex","role","undefined","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n resolveShorthand,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n} from '@fluentui/react-utilities';\nimport type {\n DialogSurfaceElement,\n DialogSurfaceElementIntersection,\n DialogSurfaceProps,\n DialogSurfaceState,\n} from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const { backdrop, as } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<DialogSurfaceElementIntersection>) => {\n props.onKeyDown?.(event);\n\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n const { modalAttributes } = useModalAttributes({ trapFocus: modalType !== 'non-modal' });\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick,\n },\n }),\n root: getNativeElementProps(as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n };\n};\n"]}
@@ -4,13 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useDialogSurfaceContextValues_unstable = void 0;
7
-
8
7
  function useDialogSurfaceContextValues_unstable(state) {
9
8
  const dialogSurface = true;
10
9
  return {
11
10
  dialogSurface
12
11
  };
13
12
  }
14
-
15
13
  exports.useDialogSurfaceContextValues_unstable = useDialogSurfaceContextValues_unstable;
16
14
  //# sourceMappingURL=useDialogSurfaceContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurfaceContextValues.ts"],"names":[],"mappings":";;;;;;;AAGA,SAAgB,sCAAhB,CAAuD,KAAvD,EAAgF;EAC9E,MAAM,aAAa,GAA8B,IAAjD;EAEA,OAAO;IAAE;EAAF,CAAP;AACD;;AAJD,OAAA,CAAA,sCAAA,GAAA,sCAAA","sourcesContent":["import type { DialogSurfaceContextValues, DialogSurfaceState } from './DialogSurface.types';\nimport type { DialogSurfaceContextValue } from '../../contexts';\n\nexport function useDialogSurfaceContextValues_unstable(state: DialogSurfaceState): DialogSurfaceContextValues {\n const dialogSurface: DialogSurfaceContextValue = true;\n\n return { dialogSurface };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAGA,SAAgBA,sCAAsC,CAACC,KAAyB;EAC9E,MAAMC,aAAa,GAA8B,IAAI;EAErD,OAAO;IAAEA;EAAa,CAAE;AAC1B;AAJAC","names":["useDialogSurfaceContextValues_unstable","state","dialogSurface","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/DialogSurface/useDialogSurfaceContextValues.ts"],"sourcesContent":["import type { DialogSurfaceContextValues, DialogSurfaceState } from './DialogSurface.types';\nimport type { DialogSurfaceContextValue } from '../../contexts';\n\nexport function useDialogSurfaceContextValues_unstable(state: DialogSurfaceState): DialogSurfaceContextValues {\n const dialogSurface: DialogSurfaceContextValue = true;\n\n return { dialogSurface };\n}\n"]}