@fluentui/react-dialog 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0

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 (219) hide show
  1. package/CHANGELOG.md +48 -16
  2. package/README.md +12 -0
  3. package/lib/components/Dialog/Dialog.js.map +1 -1
  4. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  5. package/lib/components/Dialog/index.js.map +1 -1
  6. package/lib/components/Dialog/renderDialog.js +2 -2
  7. package/lib/components/Dialog/renderDialog.js.map +1 -1
  8. package/lib/components/Dialog/useDialog.js.map +1 -1
  9. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  10. package/lib/components/DialogActions/DialogActions.js.map +1 -1
  11. package/lib/components/DialogActions/DialogActions.module.css +47 -0
  12. package/lib/components/DialogActions/DialogActions.types.js.map +1 -1
  13. package/lib/components/DialogActions/index.js.map +1 -1
  14. package/lib/components/DialogActions/renderDialogActions.js +2 -2
  15. package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
  16. package/lib/components/DialogActions/useDialogActions.js.map +1 -1
  17. package/lib/components/DialogActions/useDialogActionsStyles.styles.css.js +9 -0
  18. package/lib/components/DialogActions/useDialogActionsStyles.styles.css.js.map +1 -0
  19. package/lib/components/DialogActions/useDialogActionsStyles.styles.raw.css.js +9 -0
  20. package/lib/components/DialogActions/useDialogActionsStyles.styles.raw.css.js.map +1 -0
  21. package/lib/components/DialogActions/useDialogActionsStyles.styles.raw.js.map +1 -1
  22. package/lib/components/DialogBackdropMotion.js.map +1 -1
  23. package/lib/components/DialogBody/DialogBody.js.map +1 -1
  24. package/lib/components/DialogBody/DialogBody.module.css +19 -0
  25. package/lib/components/DialogBody/DialogBody.types.js.map +1 -1
  26. package/lib/components/DialogBody/index.js.map +1 -1
  27. package/lib/components/DialogBody/renderDialogBody.js +2 -2
  28. package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
  29. package/lib/components/DialogBody/useDialogBody.js.map +1 -1
  30. package/lib/components/DialogBody/useDialogBodyStyles.styles.css.js +9 -0
  31. package/lib/components/DialogBody/useDialogBodyStyles.styles.css.js.map +1 -0
  32. package/lib/components/DialogBody/useDialogBodyStyles.styles.raw.css.js +9 -0
  33. package/lib/components/DialogBody/useDialogBodyStyles.styles.raw.css.js.map +1 -0
  34. package/lib/components/DialogBody/useDialogBodyStyles.styles.raw.js.map +1 -1
  35. package/lib/components/DialogContent/DialogContent.js.map +1 -1
  36. package/lib/components/DialogContent/DialogContent.module.css +20 -0
  37. package/lib/components/DialogContent/DialogContent.types.js.map +1 -1
  38. package/lib/components/DialogContent/index.js.map +1 -1
  39. package/lib/components/DialogContent/renderDialogContent.js +2 -2
  40. package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
  41. package/lib/components/DialogContent/useDialogContent.js.map +1 -1
  42. package/lib/components/DialogContent/useDialogContentStyles.styles.css.js +9 -0
  43. package/lib/components/DialogContent/useDialogContentStyles.styles.css.js.map +1 -0
  44. package/lib/components/DialogContent/useDialogContentStyles.styles.raw.css.js +9 -0
  45. package/lib/components/DialogContent/useDialogContentStyles.styles.raw.css.js.map +1 -0
  46. package/lib/components/DialogContent/useDialogContentStyles.styles.raw.js.map +1 -1
  47. package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
  48. package/lib/components/DialogSurface/DialogSurface.module.css +70 -0
  49. package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
  50. package/lib/components/DialogSurface/index.js.map +1 -1
  51. package/lib/components/DialogSurface/renderDialogSurface.js +2 -2
  52. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
  53. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  54. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  55. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.css.js +15 -0
  56. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.css.js.map +1 -0
  57. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.raw.css.js +15 -0
  58. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.raw.css.js.map +1 -0
  59. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js.map +1 -1
  60. package/lib/components/DialogSurfaceMotion.js.map +1 -1
  61. package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
  62. package/lib/components/DialogTitle/DialogTitle.module.css +64 -0
  63. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
  64. package/lib/components/DialogTitle/index.js.map +1 -1
  65. package/lib/components/DialogTitle/renderDialogTitle.js +2 -2
  66. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
  67. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  68. package/lib/components/DialogTitle/useDialogTitleStyles.styles.css.js +14 -0
  69. package/lib/components/DialogTitle/useDialogTitleStyles.styles.css.js.map +1 -0
  70. package/lib/components/DialogTitle/useDialogTitleStyles.styles.raw.css.js +14 -0
  71. package/lib/components/DialogTitle/useDialogTitleStyles.styles.raw.css.js.map +1 -0
  72. package/lib/components/DialogTitle/useDialogTitleStyles.styles.raw.js.map +1 -1
  73. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
  74. package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  75. package/lib/components/DialogTrigger/index.js.map +1 -1
  76. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  77. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  78. package/lib/contexts/constants.js.map +1 -1
  79. package/lib/contexts/dialogBackdropContext.js.map +1 -1
  80. package/lib/contexts/dialogContext.js.map +1 -1
  81. package/lib/contexts/dialogSurfaceContext.js.map +1 -1
  82. package/lib/contexts/index.js.map +1 -1
  83. package/lib/utils/index.js.map +1 -1
  84. package/lib/utils/useDisableBodyScroll.js +2 -2
  85. package/lib/utils/useDisableBodyScroll.js.map +1 -1
  86. package/lib/utils/useDisableBodyScroll.module.css +11 -0
  87. package/lib/utils/useDisableBodyScroll.styles.css.js +3 -0
  88. package/lib/utils/useDisableBodyScroll.styles.css.js.map +1 -0
  89. package/lib/utils/useDisableBodyScroll.styles.raw.css.js +3 -0
  90. package/lib/utils/useDisableBodyScroll.styles.raw.css.js.map +1 -0
  91. package/lib/utils/useDisableBodyScroll.styles.raw.js.map +1 -1
  92. package/lib/utils/useFocusFirstElement.js.map +1 -1
  93. package/lib-commonjs/Dialog.cjs +5 -5
  94. package/lib-commonjs/DialogActions.cjs +6 -6
  95. package/lib-commonjs/DialogBody.cjs +6 -6
  96. package/lib-commonjs/DialogContent.cjs +6 -6
  97. package/lib-commonjs/DialogSurface.cjs +7 -7
  98. package/lib-commonjs/DialogTitle.cjs +7 -7
  99. package/lib-commonjs/DialogTrigger.cjs +4 -4
  100. package/lib-commonjs/components/Dialog/Dialog.cjs.map +1 -1
  101. package/lib-commonjs/components/Dialog/Dialog.types.cjs.map +1 -1
  102. package/lib-commonjs/components/Dialog/index.cjs +5 -5
  103. package/lib-commonjs/components/Dialog/index.cjs.map +1 -1
  104. package/lib-commonjs/components/Dialog/renderDialog.cjs.map +1 -1
  105. package/lib-commonjs/components/Dialog/useDialog.cjs.map +1 -1
  106. package/lib-commonjs/components/Dialog/useDialogContextValues.cjs.map +1 -1
  107. package/lib-commonjs/components/DialogActions/DialogActions.cjs.map +1 -1
  108. package/lib-commonjs/components/DialogActions/DialogActions.module.css +47 -0
  109. package/lib-commonjs/components/DialogActions/DialogActions.types.cjs.map +1 -1
  110. package/lib-commonjs/components/DialogActions/index.cjs +6 -6
  111. package/lib-commonjs/components/DialogActions/index.cjs.map +1 -1
  112. package/lib-commonjs/components/DialogActions/renderDialogActions.cjs.map +1 -1
  113. package/lib-commonjs/components/DialogActions/useDialogActions.cjs.map +1 -1
  114. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.cjs +3 -3
  115. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.cjs.map +1 -1
  116. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.css.cjs +28 -0
  117. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.css.cjs.map +1 -0
  118. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.cjs +3 -3
  119. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.cjs.map +1 -1
  120. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.css.cjs +28 -0
  121. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.css.cjs.map +1 -0
  122. package/lib-commonjs/components/DialogBackdropMotion.cjs.map +1 -1
  123. package/lib-commonjs/components/DialogBody/DialogBody.cjs.map +1 -1
  124. package/lib-commonjs/components/DialogBody/DialogBody.module.css +19 -0
  125. package/lib-commonjs/components/DialogBody/DialogBody.types.cjs.map +1 -1
  126. package/lib-commonjs/components/DialogBody/index.cjs +6 -6
  127. package/lib-commonjs/components/DialogBody/index.cjs.map +1 -1
  128. package/lib-commonjs/components/DialogBody/renderDialogBody.cjs.map +1 -1
  129. package/lib-commonjs/components/DialogBody/useDialogBody.cjs.map +1 -1
  130. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.cjs +3 -3
  131. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.cjs.map +1 -1
  132. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.css.cjs +28 -0
  133. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.css.cjs.map +1 -0
  134. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.cjs +3 -3
  135. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.cjs.map +1 -1
  136. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.css.cjs +28 -0
  137. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.css.cjs.map +1 -0
  138. package/lib-commonjs/components/DialogContent/DialogContent.cjs.map +1 -1
  139. package/lib-commonjs/components/DialogContent/DialogContent.module.css +20 -0
  140. package/lib-commonjs/components/DialogContent/DialogContent.types.cjs.map +1 -1
  141. package/lib-commonjs/components/DialogContent/index.cjs +6 -6
  142. package/lib-commonjs/components/DialogContent/index.cjs.map +1 -1
  143. package/lib-commonjs/components/DialogContent/renderDialogContent.cjs.map +1 -1
  144. package/lib-commonjs/components/DialogContent/useDialogContent.cjs.map +1 -1
  145. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.cjs +3 -3
  146. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.cjs.map +1 -1
  147. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.css.cjs +28 -0
  148. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.css.cjs.map +1 -0
  149. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.cjs +3 -3
  150. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.cjs.map +1 -1
  151. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.css.cjs +28 -0
  152. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.css.cjs.map +1 -0
  153. package/lib-commonjs/components/DialogSurface/DialogSurface.cjs.map +1 -1
  154. package/lib-commonjs/components/DialogSurface/DialogSurface.module.css +70 -0
  155. package/lib-commonjs/components/DialogSurface/DialogSurface.types.cjs.map +1 -1
  156. package/lib-commonjs/components/DialogSurface/index.cjs +7 -7
  157. package/lib-commonjs/components/DialogSurface/index.cjs.map +1 -1
  158. package/lib-commonjs/components/DialogSurface/renderDialogSurface.cjs.map +1 -1
  159. package/lib-commonjs/components/DialogSurface/useDialogSurface.cjs.map +1 -1
  160. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.cjs.map +1 -1
  161. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.cjs +3 -3
  162. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.cjs.map +1 -1
  163. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.css.cjs +34 -0
  164. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.css.cjs.map +1 -0
  165. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.cjs +3 -3
  166. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.cjs.map +1 -1
  167. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.css.cjs +34 -0
  168. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.css.cjs.map +1 -0
  169. package/lib-commonjs/components/DialogSurfaceMotion.cjs.map +1 -1
  170. package/lib-commonjs/components/DialogTitle/DialogTitle.cjs.map +1 -1
  171. package/lib-commonjs/components/DialogTitle/DialogTitle.module.css +64 -0
  172. package/lib-commonjs/components/DialogTitle/DialogTitle.types.cjs.map +1 -1
  173. package/lib-commonjs/components/DialogTitle/index.cjs +7 -7
  174. package/lib-commonjs/components/DialogTitle/index.cjs.map +1 -1
  175. package/lib-commonjs/components/DialogTitle/renderDialogTitle.cjs.map +1 -1
  176. package/lib-commonjs/components/DialogTitle/useDialogTitle.cjs.map +1 -1
  177. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.cjs +4 -4
  178. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.cjs.map +1 -1
  179. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.css.cjs +36 -0
  180. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.css.cjs.map +1 -0
  181. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.raw.cjs +4 -4
  182. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.raw.cjs.map +1 -1
  183. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.raw.css.cjs +36 -0
  184. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.raw.css.cjs.map +1 -0
  185. package/lib-commonjs/components/DialogTrigger/DialogTrigger.cjs.map +1 -1
  186. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.cjs.map +1 -1
  187. package/lib-commonjs/components/DialogTrigger/index.cjs +4 -4
  188. package/lib-commonjs/components/DialogTrigger/index.cjs.map +1 -1
  189. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.cjs.map +1 -1
  190. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.cjs.map +1 -1
  191. package/lib-commonjs/contexts/constants.cjs +7 -7
  192. package/lib-commonjs/contexts/constants.cjs.map +1 -1
  193. package/lib-commonjs/contexts/dialogBackdropContext.cjs +4 -4
  194. package/lib-commonjs/contexts/dialogBackdropContext.cjs.map +1 -1
  195. package/lib-commonjs/contexts/dialogContext.cjs +4 -4
  196. package/lib-commonjs/contexts/dialogContext.cjs.map +1 -1
  197. package/lib-commonjs/contexts/dialogSurfaceContext.cjs +4 -4
  198. package/lib-commonjs/contexts/dialogSurfaceContext.cjs.map +1 -1
  199. package/lib-commonjs/contexts/index.cjs +16 -16
  200. package/lib-commonjs/contexts/index.cjs.map +1 -1
  201. package/lib-commonjs/index.cjs +43 -43
  202. package/lib-commonjs/index.cjs.map +1 -1
  203. package/lib-commonjs/utils/index.cjs +3 -3
  204. package/lib-commonjs/utils/index.cjs.map +1 -1
  205. package/lib-commonjs/utils/useDisableBodyScroll.cjs +2 -2
  206. package/lib-commonjs/utils/useDisableBodyScroll.cjs.map +1 -1
  207. package/lib-commonjs/utils/useDisableBodyScroll.module.css +11 -0
  208. package/lib-commonjs/utils/useDisableBodyScroll.styles.cjs +3 -3
  209. package/lib-commonjs/utils/useDisableBodyScroll.styles.cjs.map +1 -1
  210. package/lib-commonjs/utils/useDisableBodyScroll.styles.css.cjs +22 -0
  211. package/lib-commonjs/utils/useDisableBodyScroll.styles.css.cjs.map +1 -0
  212. package/lib-commonjs/utils/useDisableBodyScroll.styles.raw.cjs +3 -3
  213. package/lib-commonjs/utils/useDisableBodyScroll.styles.raw.cjs.map +1 -1
  214. package/lib-commonjs/utils/useDisableBodyScroll.styles.raw.css.cjs +22 -0
  215. package/lib-commonjs/utils/useDisableBodyScroll.styles.raw.css.cjs.map +1 -0
  216. package/lib-commonjs/utils/useFocusFirstElement.cjs.map +1 -1
  217. package/package.json +19 -19
  218. package/dist/metadata/api/api-root.json +0 -1
  219. package/dist/metadata/index.json +0 -1
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get dialogContentClassNames () {
13
+ return dialogContentClassNames;
14
+ },
15
+ get useDialogContentStyles_unstable () {
16
+ return useDialogContentStyles_unstable;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _clsx = require("clsx");
21
+ const _DialogContentmodulecss = /*#__PURE__*/ _interop_require_default._(require("./DialogContent.module.css"));
22
+ const dialogContentClassNames = {
23
+ root: 'fui-DialogContent'
24
+ };
25
+ const useDialogContentStyles_unstable = (state)=>{
26
+ state.root.className = (0, _clsx.clsx)(dialogContentClassNames.root, _DialogContentmodulecss.default.root, state.root.className);
27
+ return state;
28
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/DialogContent/useDialogContentStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\nimport styles from './DialogContent.module.css';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n state.root.className = clsx(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"names":["clsx","styles","dialogContentClassNames","root","useDialogContentStyles_unstable","state","className"],"mappings":";;;;;;;;;;;QAKaE;;;;;;;;sBALQ,OAAO;iFAGT,6BAA6B;AAEzC,gCAAoE;IACzEC,MAAM;AACR,EAAE;AAEK,MAAMC,kCAAkC,CAACC;IAC9CA,MAAMF,IAAI,CAACG,SAAS,OAAGN,UAAAA,EAAKE,wBAAwBC,IAAI,EAAEF,+BAAAA,CAAOE,IAAI,EAAEE,MAAMF,IAAI,CAACG,SAAS;IAC3F,OAAOD;AACT,EAAE"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- dialogContentClassNames: function() {
13
+ get dialogContentClassNames () {
14
14
  return dialogContentClassNames;
15
15
  },
16
- useDialogContentStyles_unstable: function() {
16
+ get useDialogContentStyles_unstable () {
17
17
  return useDialogContentStyles_unstable;
18
18
  }
19
19
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogContent/useDialogContentStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { DIALOG_MEDIA_QUERY_SHORT_SCREEN } from '../../contexts';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n padding: tokens.strokeWidthThick,\n margin: `calc(${tokens.strokeWidthThick} * -1)`,\n ...typographyStyles.body1,\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n gridRowStart: 2,\n gridRowEnd: 2,\n gridColumnStart: 1,\n gridColumnEnd: 4,\n\n [DIALOG_MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'unset',\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 // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(dialogContentClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","typographyStyles","DIALOG_MEDIA_QUERY_SHORT_SCREEN","dialogContentClassNames","root","useStyles","padding","strokeWidthThick","margin","body1","overflowY","minHeight","boxSizing","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","useDialogContentStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;IAQaK,uBAAAA;;;mCA2BAc;;;;uBAjCiC,iBAAiB;4BAGtB,wBAAwB;uBACjB,0BAAiB;AAE1D,gCAAoE;IACzEb,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYP,sBAAAA,EAAgB;IAChCQ,SAASN,kBAAAA,CAAOO,gBAAgB;IAChCC,QAAQ,CAAC,KAAK,EAAER,kBAAAA,CAAOO,gBAAgB,CAAC,MAAM,CAAC;IAC/C,GAAGN,4BAAAA,CAAiBQ,KAAK;IACzBC,WAAW;IACXC,WAAW;IACXC,WAAW;IACXC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;IAEf,CAACd,sCAAAA,CAAgC,EAAE;QACjCQ,WAAW;IACb;AACF;AAKO,MAAMO,kCAAkC,CAACC;IAC9C,MAAMC,SAASd;IACf,oDAAoD;IACpDa,MAAMd,IAAI,CAACgB,SAAS,OAAGrB,mBAAAA,EAAaI,wBAAwBC,IAAI,EAAEe,QAAQD,MAAMd,IAAI,CAACgB,SAAS;IAC9F,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogContent/useDialogContentStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { DIALOG_MEDIA_QUERY_SHORT_SCREEN } from '../../contexts';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeResetStyles({\n padding: tokens.strokeWidthThick,\n margin: `calc(${tokens.strokeWidthThick} * -1)`,\n ...typographyStyles.body1,\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n gridRowStart: 2,\n gridRowEnd: 2,\n gridColumnStart: 1,\n gridColumnEnd: 4,\n\n [DIALOG_MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'unset',\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 // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(dialogContentClassNames.root, styles, state.root.className);\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","typographyStyles","DIALOG_MEDIA_QUERY_SHORT_SCREEN","dialogContentClassNames","root","useStyles","padding","strokeWidthThick","margin","body1","overflowY","minHeight","boxSizing","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","useDialogContentStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;QAQaK;;;QA2BAc;;;;uBAjCiC,iBAAiB;4BAGtB,wBAAwB;uBACjB,0BAAiB;AAE1D,gCAAoE;IACzEb,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYP,sBAAAA,EAAgB;IAChCQ,SAASN,kBAAAA,CAAOO,gBAAgB;IAChCC,QAAQ,CAAC,KAAK,EAAER,kBAAAA,CAAOO,gBAAgB,CAAC,MAAM,CAAC;IAC/C,GAAGN,4BAAAA,CAAiBQ,KAAK;IACzBC,WAAW;IACXC,WAAW;IACXC,WAAW;IACXC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;IAEf,CAACd,sCAAAA,CAAgC,EAAE;QACjCQ,WAAW;IACb;AACF;AAKO,wCAAwC,CAACQ;IAC9C,MAAMC,SAASd;IACf,oDAAoD;IACpDa,MAAMd,IAAI,CAACgB,SAAS,OAAGrB,mBAAAA,EAAaI,wBAAwBC,IAAI,EAAEe,QAAQD,MAAMd,IAAI,CAACgB,SAAS;IAC9F,OAAOF;AACT,EAAE"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get dialogContentClassNames () {
13
+ return dialogContentClassNames;
14
+ },
15
+ get useDialogContentStyles_unstable () {
16
+ return useDialogContentStyles_unstable;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _clsx = require("clsx");
21
+ const _DialogContentmodulecss = /*#__PURE__*/ _interop_require_default._(require("./DialogContent.module.css"));
22
+ const dialogContentClassNames = {
23
+ root: 'fui-DialogContent'
24
+ };
25
+ const useDialogContentStyles_unstable = (state)=>{
26
+ state.root.className = (0, _clsx.clsx)(dialogContentClassNames.root, _DialogContentmodulecss.default.root, state.root.className);
27
+ return state;
28
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/DialogContent/useDialogContentStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\nimport styles from './DialogContent.module.css';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n state.root.className = clsx(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"names":["clsx","styles","dialogContentClassNames","root","useDialogContentStyles_unstable","state","className"],"mappings":";;;;;;;;;;;QAKaE;;;;;;;;sBALQ,OAAO;iFAGT,6BAA6B;AAEzC,gCAAoE;IACzEC,MAAM;AACR,EAAE;AAEK,MAAMC,kCAAkC,CAACC;IAC9CA,MAAMF,IAAI,CAACG,SAAS,OAAGN,UAAAA,EAAKE,wBAAwBC,IAAI,EAAEF,+BAAAA,CAAOE,IAAI,EAAEE,MAAMF,IAAI,CAACG,SAAS;IAC3F,OAAOD;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurface/DialogSurface.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface: ForwardRefComponent<DialogSurfaceProps> = React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n\n useDialogSurfaceStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);\n\n return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"],"names":["React","useDialogSurface_unstable","renderDialogSurface_unstable","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable","useCustomStyleHook_unstable","DialogSurface","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;kCACW,wBAAqB;qCAClB,2BAAwB;8CACrB,qCAAkC;+CAG3B,qCAAkC;qCAC7C,kCAAkC;AAMvE,MAAMM,gBAAAA,WAAAA,GAAyDN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,YAAQT,2CAAAA,EAA0BO,OAAOC;IAC/C,MAAME,oBAAgBP,qEAAAA,EAAuCM;QAE7DP,6DAAAA,EAAgCO;QAEhCL,gDAAAA,EAA4B,mCAAmCK;IAE/D,WAAOR,iDAAAA,EAA6BQ,OAAOC;AAC7C,GAAG;AAEHL,cAAcM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/DialogSurface.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface: ForwardRefComponent<DialogSurfaceProps> = React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n\n useDialogSurfaceStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);\n\n return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"],"names":["React","useDialogSurface_unstable","renderDialogSurface_unstable","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable","useCustomStyleHook_unstable","DialogSurface","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;kCACW,wBAAqB;qCAClB,2BAAwB;8CACrB,qCAAkC;+CAG3B,qCAAkC;qCAC7C,kCAAkC;AAMvE,MAAMM,gBAAAA,WAAAA,GAAyDN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,YAAQT,2CAAAA,EAA0BO,OAAOC;IAC/C,MAAME,oBAAgBP,qEAAAA,EAAuCM;QAE7DP,6DAAAA,EAAgCO;QAEhCL,gDAAAA,EAA4B,mCAAmCK;IAE/D,WAAOR,iDAAAA,EAA6BQ,OAAOC;AAC7C,GAAG;AAEHL,cAAcM,WAAW,GAAG"}
@@ -0,0 +1,70 @@
1
+ @layer fluentui {
2
+ .root {
3
+ &:focus {
4
+ outline-style: none;
5
+ }
6
+ &:focus-visible {
7
+ outline-style: none;
8
+ }
9
+ &[data-fui-focus-visible] {
10
+ border-color: transparent;
11
+ &::after {
12
+ content: '';
13
+ position: absolute;
14
+ pointer-events: none;
15
+ z-index: 1;
16
+ border: 2px solid var(--colorStrokeFocus2);
17
+ border-radius: var(--borderRadiusMedium);
18
+ inset: -2px;
19
+ }
20
+ @media (forced-colors: active) {
21
+ &::after {
22
+ border-color: Highlight;
23
+ }
24
+ }
25
+ }
26
+ inset: 0;
27
+ padding: var(--spacingHorizontalXXL);
28
+ margin: auto;
29
+ border-style: none;
30
+ overflow: unset;
31
+ border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
32
+ border-radius: var(--borderRadiusXLarge);
33
+ display: block;
34
+ user-select: unset;
35
+ visibility: unset;
36
+ position: fixed;
37
+ height: fit-content;
38
+ max-width: 600px;
39
+ max-height: 100vh;
40
+ max-height: 100dvh;
41
+ box-sizing: border-box;
42
+ background-color: var(--colorNeutralBackground1);
43
+ color: var(--colorNeutralForeground1);
44
+ box-shadow: var(--shadow64);
45
+ @media screen and (max-width: 480px) {
46
+ max-width: 100vw;
47
+ }
48
+ @media screen and (max-height: 359px) {
49
+ overflow-y: auto;
50
+ padding-inline-end: calc(var(--spacingHorizontalXXL) - var(--spacingHorizontalXS));
51
+ border-inline-end-width: var(--spacingHorizontalXS);
52
+ border-top-width: var(--spacingHorizontalXS);
53
+ border-bottom-width: var(--spacingHorizontalXS);
54
+ }
55
+ }
56
+
57
+ .backdrop {
58
+ inset: 0px;
59
+ background-color: var(--colorBackgroundOverlay);
60
+ position: fixed;
61
+ }
62
+
63
+ .transparent {
64
+ background-color: var(--colorTransparentBackground);
65
+ }
66
+
67
+ .hidden {
68
+ pointer-events: none;
69
+ }
70
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurface/DialogSurface.types.ts"],"sourcesContent":["import type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { FadeParams } from '@fluentui/react-motion-components-preview';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, Slot, ExtractSlotProps } from '@fluentui/react-utilities';\n\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\n\n/**\n * Custom slot props for the backdrop slot.\n */\nexport type DialogBackdropSlotProps = ExtractSlotProps<\n Slot<'div'> & {\n /**\n * Controls the backdrop appearance.\n * - 'dimmed': Shows a dimmed backdrop (default for standalone dialogs)\n * - 'transparent': Shows a transparent backdrop (default for nested dialogs)\n */\n appearance?: 'dimmed' | 'transparent';\n }\n>;\n\nexport type DialogSurfaceSlots = {\n /**\n * Dimmed background of dialog.\n * The default backdrop is rendered as a `<div>` with styling.\n * This slot expects a `<div>` element which will replace the default backdrop.\n * The backdrop should have `aria-hidden=\"true\"`.\n *\n * Accepts an `appearance` prop to control backdrop visibility:\n * - `'dimmed'`: Always shows a dimmed backdrop, regardless of nesting.\n * - `'transparent'`: Always shows a transparent backdrop.\n *\n * @example\n * ```tsx\n * <DialogSurface backdrop={{ appearance: 'dimmed' }} />\n * ```\n */\n backdrop?: Slot<DialogBackdropSlotProps>;\n root: Slot<'div'>;\n /**\n * For more information refer to the [Motion docs page](https://react.fluentui.dev/?path=/docs/motion-motion-slot--docs).\n *\n */\n backdropMotion: Slot<PresenceMotionSlotProps<FadeParams>>;\n};\n\n/**\n * Union between all possible semantic element that represent a DialogSurface\n */\nexport type DialogSurfaceElement = HTMLElement;\n\n/**\n * DialogSurface Props\n */\nexport type DialogSurfaceProps = ComponentProps<Partial<DialogSurfaceSlots>> & Pick<PortalProps, 'mountNode'>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots> &\n // This is only partial to avoid breaking changes, it should be mandatory and in fact it is always defined internally.\n Pick<DialogContextValue, 'isNestedDialog'> &\n Pick<PortalProps, 'mountNode'> & {\n open?: boolean;\n unmountOnClose?: boolean;\n /**\n * Whether the backdrop should be treated as nested (transparent).\n * When inside an OverlayDrawer, this is `false` even though `isNestedDialog` may be `true`,\n * preventing the false-positive transparent backdrop.\n */\n treatBackdropAsNested: boolean;\n /**\n * Transition status for animation.\n * In test environment, this is always `undefined`.\n *\n * @deprecated Will be always `undefined`.\n */\n transitionStatus?: 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted';\n backdropAppearance?: DialogBackdropSlotProps['appearance'];\n };\n"],"names":[],"mappings":"AA4DA;;CAEC,GACD,WAoBI"}
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/DialogSurface.types.ts"],"sourcesContent":["import type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nimport type { FadeParams } from '@fluentui/react-motion-components-preview';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { ComponentProps, ComponentState, Slot, ExtractSlotProps } from '@fluentui/react-utilities';\n\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\n\n/**\n * Custom slot props for the backdrop slot.\n */\nexport type DialogBackdropSlotProps = ExtractSlotProps<\n Slot<'div'> & {\n /**\n * Controls the backdrop appearance.\n * - 'dimmed': Shows a dimmed backdrop (default for standalone dialogs)\n * - 'transparent': Shows a transparent backdrop (default for nested dialogs)\n */\n appearance?: 'dimmed' | 'transparent';\n }\n>;\n\nexport type DialogSurfaceSlots = {\n /**\n * Dimmed background of dialog.\n * The default backdrop is rendered as a `<div>` with styling.\n * This slot expects a `<div>` element which will replace the default backdrop.\n * The backdrop should have `aria-hidden=\"true\"`.\n *\n * Accepts an `appearance` prop to control backdrop visibility:\n * - `'dimmed'`: Always shows a dimmed backdrop, regardless of nesting.\n * - `'transparent'`: Always shows a transparent backdrop.\n *\n * @example\n * ```tsx\n * <DialogSurface backdrop={{ appearance: 'dimmed' }} />\n * ```\n */\n backdrop?: Slot<DialogBackdropSlotProps>;\n root: Slot<'div'>;\n /**\n * For more information refer to the [Motion docs page](https://react.fluentui.dev/?path=/docs/motion-motion-slot--docs).\n *\n */\n backdropMotion: Slot<PresenceMotionSlotProps<FadeParams>>;\n};\n\n/**\n * Union between all possible semantic element that represent a DialogSurface\n */\nexport type DialogSurfaceElement = HTMLElement;\n\n/**\n * DialogSurface Props\n */\nexport type DialogSurfaceProps = ComponentProps<Partial<DialogSurfaceSlots>> & Pick<PortalProps, 'mountNode'>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots> &\n // This is only partial to avoid breaking changes, it should be mandatory and in fact it is always defined internally.\n Pick<DialogContextValue, 'isNestedDialog'> &\n Pick<PortalProps, 'mountNode'> & {\n open?: boolean;\n unmountOnClose?: boolean;\n /**\n * Whether the backdrop should be treated as nested (transparent).\n * When inside an OverlayDrawer, this is `false` even though `isNestedDialog` may be `true`,\n * preventing the false-positive transparent backdrop.\n */\n treatBackdropAsNested: boolean;\n /**\n * Transition status for animation.\n * In test environment, this is always `undefined`.\n *\n * @deprecated Will be always `undefined`.\n */\n transitionStatus?: 'entering' | 'entered' | 'idle' | 'exiting' | 'exited' | 'unmounted';\n backdropAppearance?: DialogBackdropSlotProps['appearance'];\n };\n"],"names":[],"mappings":"AA4DA;;CAEC,GACD,WAoBI"}
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- DialogSurface: function() {
12
+ get DialogSurface () {
13
13
  return _DialogSurface.DialogSurface;
14
14
  },
15
- dialogSurfaceClassNames: function() {
15
+ get dialogSurfaceClassNames () {
16
16
  return _useDialogSurfaceStylesstyles.dialogSurfaceClassNames;
17
17
  },
18
- renderDialogSurface_unstable: function() {
18
+ get renderDialogSurface_unstable () {
19
19
  return _renderDialogSurface.renderDialogSurface_unstable;
20
20
  },
21
- useDialogSurfaceContextValues_unstable: function() {
21
+ get useDialogSurfaceContextValues_unstable () {
22
22
  return _useDialogSurfaceContextValues.useDialogSurfaceContextValues_unstable;
23
23
  },
24
- useDialogSurfaceStyles_unstable: function() {
24
+ get useDialogSurfaceStyles_unstable () {
25
25
  return _useDialogSurfaceStylesstyles.useDialogSurfaceStyles_unstable;
26
26
  },
27
- useDialogSurface_unstable: function() {
27
+ get useDialogSurface_unstable () {
28
28
  return _useDialogSurface.useDialogSurface_unstable;
29
29
  }
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurface/index.ts"],"sourcesContent":["export { DialogSurface } from './DialogSurface';\nexport type {\n DialogBackdropSlotProps,\n DialogSurfaceContextValues,\n DialogSurfaceElement,\n DialogSurfaceProps,\n DialogSurfaceSlots,\n DialogSurfaceState,\n} from './DialogSurface.types';\nexport { renderDialogSurface_unstable } from './renderDialogSurface';\nexport { useDialogSurface_unstable } from './useDialogSurface';\nexport { dialogSurfaceClassNames, useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nexport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\n"],"names":["DialogSurface","renderDialogSurface_unstable","useDialogSurface_unstable","dialogSurfaceClassNames","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable"],"mappings":";;;;;;;;;;;;eAASA,4BAAa;;;eAWbG,qDAAuB;;;eAFvBF,iDAA4B;;;eAG5BI,qEAAsC;;;eADbD,6DAA+B;;;eADxDF,2CAAyB;;;+BAVJ,qBAAkB;qCASH,2BAAwB;kCAC3B,wBAAqB;8CACU,qCAAkC;+CACpD,qCAAkC"}
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/index.ts"],"sourcesContent":["export { DialogSurface } from './DialogSurface';\nexport type {\n DialogBackdropSlotProps,\n DialogSurfaceContextValues,\n DialogSurfaceElement,\n DialogSurfaceProps,\n DialogSurfaceSlots,\n DialogSurfaceState,\n} from './DialogSurface.types';\nexport { renderDialogSurface_unstable } from './renderDialogSurface';\nexport { useDialogSurface_unstable } from './useDialogSurface';\nexport { dialogSurfaceClassNames, useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nexport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\n"],"names":["DialogSurface","renderDialogSurface_unstable","useDialogSurface_unstable","dialogSurfaceClassNames","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable"],"mappings":";;;;;;;;;;;;eAASA,4BAAa;;;eAWbG,qDAAuB;;;eAFvBF,iDAA4B;;;eAG5BI,qEAAsC;;;eADbD,6DAA+B;;;eADxDF,2CAAyB;;;+BAVJ,qBAAkB;qCASH,2BAAwB;kCAC3B,wBAAqB;8CACU,qCAAkC;+CACpD,qCAAkC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurface/renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MotionRefForwarderReset } from '@fluentui/react-motion';\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport { DialogSurfaceProvider } from '../../contexts';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (\n state: DialogSurfaceState,\n contextValues: DialogSurfaceContextValues,\n): JSXElement => {\n assertSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal mountNode={state.mountNode}>\n {state.backdrop &&\n // TODO: state.backdropMotion is non nullable, but assertSlots asserts it as nullable\n // FIXME: this should be resolved by properly splitting props and state slots declaration\n state.backdropMotion && (\n <state.backdropMotion>\n <state.backdrop />\n </state.backdropMotion>\n )}\n <MotionRefForwarderReset>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <state.root />\n </DialogSurfaceProvider>\n </MotionRefForwarderReset>\n </Portal>\n );\n};\n"],"names":["MotionRefForwarderReset","Portal","assertSlots","DialogSurfaceProvider","renderDialogSurface_unstable","state","contextValues","mountNode","backdrop","backdropMotion","value","dialogSurface","root"],"mappings":";;;;+BAcaI;;;;;;4BAbb,iCAAiD;6BAET,yBAAyB;6BAC1C,yBAAyB;gCACpB,4BAA4B;uBAGlB,0BAAiB;AAMhD,qCAAqC,CAC1CC,OACAC;QAEAJ,2BAAAA,EAAgCG;IAEhC,OAAA,WAAA,OACE,gBAAA,EAACJ,mBAAAA,EAAAA;QAAOM,WAAWF,MAAME,SAAS;;YAC/BF,MAAMG,QAAQ,IACb,qFAAqF;YACrF,yFAAyF;YACzFH,MAAMI,cAAc,IAAA,WAAA,OAClB,eAAA,EAACJ,MAAMI,cAAc,EAAA;0BACnB,WAAA,GAAA,mBAAA,EAACJ,MAAMG,QAAQ,EAAA,CAAA;;8BAGrB,eAAA,EAACR,oCAAAA,EAAAA;0BACC,WAAA,OAAA,eAAA,EAACG,4BAAAA,EAAAA;oBAAsBO,OAAOJ,cAAcK,aAAa;8BACvD,WAAA,OAAA,eAAA,EAACN,MAAMO,IAAI,EAAA,CAAA;;;;;AAKrB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MotionRefForwarderReset } from '@fluentui/react-motion';\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport { DialogSurfaceProvider } from '../../contexts';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (\n state: DialogSurfaceState,\n contextValues: DialogSurfaceContextValues,\n): JSXElement => {\n assertSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal mountNode={state.mountNode}>\n {state.backdrop &&\n // TODO: state.backdropMotion is non nullable, but assertSlots asserts it as nullable\n // FIXME: this should be resolved by properly splitting props and state slots declaration\n state.backdropMotion && (\n <state.backdropMotion>\n <state.backdrop />\n </state.backdropMotion>\n )}\n <MotionRefForwarderReset>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <state.root />\n </DialogSurfaceProvider>\n </MotionRefForwarderReset>\n </Portal>\n );\n};\n"],"names":["MotionRefForwarderReset","Portal","assertSlots","DialogSurfaceProvider","renderDialogSurface_unstable","state","contextValues","mountNode","backdrop","backdropMotion","value","dialogSurface","root"],"mappings":";;;;+BAcaI;;;;;;;6BAbb,oCAAiD,GAEjD,SAASJ,uBAAuB,QAAQ,yBAAyB;6BAC1C,yBAAyB;gCACpB,4BAA4B;uBAGlB,0BAAiB;AAMhD,qCAAqC,CAC1CK,OACAC;QAEAJ,2BAAAA,EAAgCG;IAEhC,OAAA,WAAA,OACE,gBAAA,EAACJ,mBAAAA,EAAAA;QAAOM,WAAWF,MAAME,SAAS;;YAC/BF,MAAMG,QAAQ,IACb,qFAAqF;YACrF,yFAAyF;YACzFH,MAAMI,cAAc,IAAA,WAAA,OAClB,eAAA,EAACJ,MAAMI,cAAc,EAAA;0BACnB,WAAA,GAAA,mBAAA,EAACJ,MAAMG,QAAQ,EAAA,CAAA;;8BAGrB,eAAA,EAACR,oCAAAA,EAAAA;0BACC,WAAA,OAAA,eAAA,EAACG,4BAAAA,EAAAA;oBAAsBO,OAAOJ,cAAcK,aAAa;8BACvD,WAAA,OAAA,eAAA,EAACN,MAAMO,IAAI,EAAA,CAAA;;;;;AAKrB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurface/useDialogSurface.ts"],"sourcesContent":["'use client';\n\nimport { Escape } from '@fluentui/keyboard-keys';\nimport { presenceMotionSlot } from '@fluentui/react-motion';\nimport {\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n slot,\n getIntrinsicElementProps,\n useIsomorphicLayoutEffect,\n} from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nimport { useDialogContext_unstable, useDialogBackdropContext_unstable } from '../../contexts';\nimport { useDisableBodyScroll } from '../../utils/useDisableBodyScroll';\nimport { DialogBackdropMotion } from '../DialogBackdropMotion';\nimport { useMotionForwardedRef } from '@fluentui/react-motion';\nimport type { DialogSurfaceElement, DialogSurfaceProps, DialogSurfaceState } from './DialogSurface.types';\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 contextRef = useMotionForwardedRef();\n\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const isNestedDialog = useDialogContext_unstable(ctx => ctx.isNestedDialog);\n const backdropOverride = useDialogBackdropContext_unstable();\n const treatBackdropAsNested = backdropOverride ?? isNestedDialog;\n\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const unmountOnClose = useDialogContext_unstable(ctx => ctx.unmountOnClose);\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<HTMLDivElement>) => {\n props.onKeyDown?.(event);\n\n if (event.key === Escape && !event.isDefaultPrevented()) {\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.preventDefault();\n }\n });\n\n const backdrop = slot.optional(props.backdrop, {\n renderByDefault: modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n },\n elementType: 'div',\n });\n\n const backdropAppearance = backdrop?.appearance;\n\n if (backdrop) {\n backdrop.onClick = handledBackdropClick;\n // remove backdrop.appearance so it is not passed to the DOM\n delete backdrop.appearance;\n }\n\n const { disableBodyScroll, enableBodyScroll } = useDisableBodyScroll();\n\n useIsomorphicLayoutEffect(() => {\n if (!open) {\n enableBodyScroll();\n return;\n }\n\n if (isNestedDialog || modalType === 'non-modal') {\n return;\n }\n\n disableBodyScroll();\n\n return () => enableBodyScroll();\n }, [open, modalType, isNestedDialog, disableBodyScroll, enableBodyScroll]);\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n backdropMotion: DialogBackdropMotion,\n },\n open,\n backdrop,\n isNestedDialog,\n treatBackdropAsNested,\n backdropAppearance,\n unmountOnClose,\n mountNode: props.mountNode,\n root: slot.always(\n getIntrinsicElementProps('div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-modal': modalType !== 'non-modal',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n 'aria-hidden': !unmountOnClose && !open ? true : undefined,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n // FIXME:\n // `DialogSurfaceElement` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, contextRef, dialogRef) as React.Ref<HTMLDivElement>,\n }),\n { elementType: 'div' },\n ),\n backdropMotion: presenceMotionSlot(props.backdropMotion, {\n elementType: DialogBackdropMotion,\n defaultProps: {\n appear: unmountOnClose,\n visible: open,\n },\n }),\n\n // Deprecated properties\n transitionStatus: undefined,\n };\n};\n"],"names":["Escape","presenceMotionSlot","useEventCallback","useMergedRefs","isResolvedShorthand","slot","getIntrinsicElementProps","useIsomorphicLayoutEffect","useDialogContext_unstable","useDialogBackdropContext_unstable","useDisableBodyScroll","DialogBackdropMotion","useMotionForwardedRef","useDialogSurface_unstable","props","ref","contextRef","modalType","ctx","isNestedDialog","backdropOverride","treatBackdropAsNested","modalAttributes","dialogRef","requestOpenChange","dialogTitleID","dialogTitleId","open","unmountOnClose","handledBackdropClick","event","backdrop","onClick","isDefaultPrevented","type","handleKeyDown","onKeyDown","key","preventDefault","optional","renderByDefault","defaultProps","elementType","backdropAppearance","appearance","disableBodyScroll","enableBodyScroll","components","root","backdropMotion","mountNode","always","tabIndex","role","undefined","appear","visible","transitionStatus"],"mappings":"AAAA;;;;;+BA6Baa;;;;;;8BA3BU,0BAA0B;6BACd,yBAAyB;gCAQrD,4BAA4B;uBAG0C,0BAAiB;sCACzD,sCAAmC;sCACnC,6BAA0B;AAaxD,kCAAkC,CACvCC,OACAC;IAEA,MAAMC,iBAAaJ,kCAAAA;IAEnB,MAAM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AS;YACT,6FAA6F;YAC7F,4FAA4F;YAC5FpB,SAAKZ,6BAAAA,EAAcY,KAAKC,YAAYO;QACtC,IACA;YAAEmB,aAAa;QAAM;QAEvBO,gBAAgBhD,mCAAAA,EAAmBa,MAAMmC,cAAc,EAAE;YACvDP,aAAa/B,0CAAAA;YACb8B,cAAc;gBACZc,QAAQ3B;gBACR4B,SAAS7B;YACX;QACF;QAEA,wBAAwB;QACxB8B,kBAAkBH;IACpB;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/useDialogSurface.ts"],"sourcesContent":["'use client';\n\nimport { Escape } from '@fluentui/keyboard-keys';\nimport { presenceMotionSlot } from '@fluentui/react-motion';\nimport {\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n slot,\n getIntrinsicElementProps,\n useIsomorphicLayoutEffect,\n} from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nimport { useDialogContext_unstable, useDialogBackdropContext_unstable } from '../../contexts';\nimport { useDisableBodyScroll } from '../../utils/useDisableBodyScroll';\nimport { DialogBackdropMotion } from '../DialogBackdropMotion';\nimport { useMotionForwardedRef } from '@fluentui/react-motion';\nimport type { DialogSurfaceElement, DialogSurfaceProps, DialogSurfaceState } from './DialogSurface.types';\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 contextRef = useMotionForwardedRef();\n\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const isNestedDialog = useDialogContext_unstable(ctx => ctx.isNestedDialog);\n const backdropOverride = useDialogBackdropContext_unstable();\n const treatBackdropAsNested = backdropOverride ?? isNestedDialog;\n\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const unmountOnClose = useDialogContext_unstable(ctx => ctx.unmountOnClose);\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<HTMLDivElement>) => {\n props.onKeyDown?.(event);\n\n if (event.key === Escape && !event.isDefaultPrevented()) {\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.preventDefault();\n }\n });\n\n const backdrop = slot.optional(props.backdrop, {\n renderByDefault: modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n },\n elementType: 'div',\n });\n\n const backdropAppearance = backdrop?.appearance;\n\n if (backdrop) {\n backdrop.onClick = handledBackdropClick;\n // remove backdrop.appearance so it is not passed to the DOM\n delete backdrop.appearance;\n }\n\n const { disableBodyScroll, enableBodyScroll } = useDisableBodyScroll();\n\n useIsomorphicLayoutEffect(() => {\n if (!open) {\n enableBodyScroll();\n return;\n }\n\n if (isNestedDialog || modalType === 'non-modal') {\n return;\n }\n\n disableBodyScroll();\n\n return () => enableBodyScroll();\n }, [open, modalType, isNestedDialog, disableBodyScroll, enableBodyScroll]);\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n backdropMotion: DialogBackdropMotion,\n },\n open,\n backdrop,\n isNestedDialog,\n treatBackdropAsNested,\n backdropAppearance,\n unmountOnClose,\n mountNode: props.mountNode,\n root: slot.always(\n getIntrinsicElementProps('div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-modal': modalType !== 'non-modal',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n 'aria-hidden': !unmountOnClose && !open ? true : undefined,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n // FIXME:\n // `DialogSurfaceElement` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, contextRef, dialogRef) as React.Ref<HTMLDivElement>,\n }),\n { elementType: 'div' },\n ),\n backdropMotion: presenceMotionSlot(props.backdropMotion, {\n elementType: DialogBackdropMotion,\n defaultProps: {\n appear: unmountOnClose,\n visible: open,\n },\n }),\n\n // Deprecated properties\n transitionStatus: undefined,\n };\n};\n"],"names":["Escape","presenceMotionSlot","useEventCallback","useMergedRefs","isResolvedShorthand","slot","getIntrinsicElementProps","useIsomorphicLayoutEffect","useDialogContext_unstable","useDialogBackdropContext_unstable","useDisableBodyScroll","DialogBackdropMotion","useMotionForwardedRef","useDialogSurface_unstable","props","ref","contextRef","modalType","ctx","isNestedDialog","backdropOverride","treatBackdropAsNested","modalAttributes","dialogRef","requestOpenChange","dialogTitleID","dialogTitleId","open","unmountOnClose","handledBackdropClick","event","backdrop","onClick","isDefaultPrevented","type","handleKeyDown","onKeyDown","key","preventDefault","optional","renderByDefault","defaultProps","elementType","backdropAppearance","appearance","disableBodyScroll","enableBodyScroll","components","root","backdropMotion","mountNode","always","tabIndex","role","undefined","appear","visible","transitionStatus"],"mappings":"AAAA;;;;;+BA6Baa;;;;;;8BA3BU,0BAA0B;6BACd,yBAAyB;gCAQrD,4BAA4B;uBAG0C,0BAAiB;sCACzD,sCAAmC;sCACnC,6BAA0B;AAaxD,kCAAkC,CACvCC,OACAC;IAEA,MAAMC,iBAAaJ,kCAAAA;IAEnB,MAAMK,g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YACT,6FAA6F;YAC7F,4FAA4F;YAC5FpB,SAAKZ,6BAAAA,EAAcY,KAAKC,YAAYO;QACtC,IACA;YAAEmB,aAAa;QAAM;QAEvBO,gBAAgBhD,mCAAAA,EAAmBa,MAAMmC,cAAc,EAAE;YACvDP,aAAa/B,0CAAAA;YACb8B,cAAc;gBACZc,QAAQ3B;gBACR4B,SAAS7B;YACX;QACF;QAEA,wBAAwB;QACxB8B,kBAAkBH;IACpB;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../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"],"names":["useDialogSurfaceContextValues_unstable","state","dialogSurface"],"mappings":";;;;;;;;;;AAGO,SAASA,uCAAuCC,KAAyB;IAC9E,MAAMC,gBAA2C;IAEjD,OAAO;QAAEA;IAAc;AACzB"}
1
+ {"version":3,"sources":["../../../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"],"names":["useDialogSurfaceContextValues_unstable","state","dialogSurface"],"mappings":";;;;;;;;;;AAGO,SAASA,uCAAuCC,KAAyB;IAC9E,MAAMC,gBAA2C;IAEjD,OAAO;QAAEA;IAAc;AACzB"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- dialogSurfaceClassNames: function() {
13
+ get dialogSurfaceClassNames () {
14
14
  return dialogSurfaceClassNames;
15
15
  },
16
- useDialogSurfaceStyles_unstable: function() {
16
+ get useDialogSurfaceStyles_unstable () {
17
17
  return useDialogSurfaceStyles_unstable;
18
18
  }
19
19
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["useDialogSurfaceStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nimport { DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET, DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR, DIALOG_MEDIA_QUERY_SHORT_SCREEN, SURFACE_BORDER_WIDTH, SURFACE_PADDING } from \"../../contexts/index.js\";\nexport const dialogSurfaceClassNames = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseStyle = makeResetStyles({\n ...createFocusOutlineStyle(),\n inset: 0,\n padding: SURFACE_PADDING,\n margin: 'auto',\n borderStyle: 'none',\n overflow: 'unset',\n border: `${SURFACE_BORDER_WIDTH} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusXLarge,\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: [\n '100vh',\n '100dvh'\n ],\n boxSizing: 'border-box',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n // Same styles as DialogSurfaceMotion last keyframe,\n // to ensure dialog will be properly styled when surfaceMotion is opted-out\n boxShadow: tokens.shadow64,\n [DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw'\n },\n [DIALOG_MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'auto',\n // We need to offset the scrollbar by adding transparent borders otherwise\n // it conflicts with the border radius.\n paddingRight: `calc(${SURFACE_PADDING} - ${DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET})`,\n borderRightWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderTopWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderBottomWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET\n }\n});\nconst useBackdropBaseStyle = makeResetStyles({\n inset: '0px',\n backgroundColor: tokens.colorBackgroundOverlay,\n position: 'fixed'\n});\nconst useStyles = makeStyles({\n nestedDialogBackdrop: {\n backgroundColor: tokens.colorTransparentBackground\n },\n dialogHidden: {\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the DialogSurface slots based on the state\n */ export const useDialogSurfaceStyles_unstable = (state)=>{\n const { root, backdrop, open, unmountOnClose, treatBackdropAsNested, backdropAppearance } = state;\n const rootBaseStyle = useRootBaseStyle();\n const backdropBaseStyle = useBackdropBaseStyle();\n const styles = useStyles();\n const isBackdropTransparent = backdropAppearance ? backdropAppearance === 'transparent' : treatBackdropAsNested;\n const mountedAndClosed = !unmountOnClose && !open;\n // eslint-disable-next-line react-hooks/immutability\n root.className = mergeClasses(dialogSurfaceClassNames.root, rootBaseStyle, mountedAndClosed && styles.dialogHidden, root.className);\n if (backdrop) {\n // eslint-disable-next-line react-hooks/immutability\n backdrop.className = mergeClasses(dialogSurfaceClassNames.backdrop, backdropBaseStyle, mountedAndClosed && styles.dialogHidden, isBackdropTransparent && styles.nestedDialogBackdrop, backdrop.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","createFocusOutlineStyle","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","dialogSurfaceClassNames","root","backdrop","useRootBaseStyle","r","s","useBackdropBaseStyle","useStyles","nestedDialogBackdrop","De3pzq","dialogHidden","Bkecrkj","d","useDialogSurfaceStyles_unstable","state","open","unmountOnClose","treatBackdropAsNested","backdropAppearance","rootBaseStyle","backdropBaseStyle","styles","isBackdropTransparent","mountedAndClosed","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAKCU,uBAAuB;;;mCA2DY;eAA/Ba;;;uBA/DyC,gBAAgB;AAInE,gCAAgC;IACnCZ,IAAI,EAAE,mBAAmB;IACzBC,QAAQ,EAAE;AACd,CAAC;AACD;;CAEA,GAAI,MAAMC,gBAAgB,GAAA,WAAA,OAAGb,oBAAA,EAAA,YAAA,WAAA;IAAAc,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAqC5B,CAAC;AACF,MAAMC,oBAAoB,GAAA,WAAA,OAAGhB,oBAAA,EAAA,YAAA,MAAA;IAAA;CAI5B,CAAC;AACF,MAAMiB,SAAS,GAAA,WAAA,OAAGhB,eAAA,EAAA;IAAAiB,oBAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,YAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAOjB,CAAC;AAGS,yCAAyCE,KAAK,IAAG;IACxD,MAAM,EAAEb,IAAI,EAAEC,QAAQ,EAAEa,IAAI,EAAEC,cAAc,EAAEC,qBAAqB,EAAEC,kBAAAA,EAAoB,GAAGJ,KAAK;IACjG,MAAMK,aAAa,GAAGhB,gBAAgB,CAAC,CAAC;IACxC,MAAMiB,iBAAiB,GAAGd,oBAAoB,CAAC,CAAC;IAChD,MAAMe,MAAM,GAAGd,SAAS,CAAC,CAAC;IAC1B,MAAMe,qBAAqB,GAAGJ,kBAAkB,GAAGA,kBAAkB,KAAK,aAAa,GAAGD,qBAAqB;IAC/G,MAAMM,gBAAgB,GAAG,CAACP,cAAc,IAAI,CAACD,IAAI;IACjD,oDAAA;IACAd,IAAI,CAACuB,SAAS,OAAGhC,mBAAY,EAACQ,uBAAuB,CAACC,IAAI,EAAEkB,aAAa,EAAEI,gBAAgB,IAAIF,MAAM,CAACX,YAAY,EAAET,IAAI,CAACuB,SAAS,CAAC;IACnI,IAAItB,QAAQ,EAAE;QACV,oDAAA;QACAA,QAAQ,CAACsB,SAAS,GAAGhC,uBAAY,EAACQ,uBAAuB,CAACE,QAAQ,EAAEkB,iBAAiB,EAAEG,gBAAgB,IAAIF,MAAM,CAACX,YAAY,EAAEY,qBAAqB,IAAID,MAAM,CAACb,oBAAoB,EAAEN,QAAQ,CAACsB,SAAS,CAAC;IAC7M;IACA,OAAOV,KAAK;AAChB,CAAC"}
1
+ {"version":3,"sources":["useDialogSurfaceStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nimport { DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET, DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR, DIALOG_MEDIA_QUERY_SHORT_SCREEN, SURFACE_BORDER_WIDTH, SURFACE_PADDING } from \"../../contexts/index.js\";\nexport const dialogSurfaceClassNames = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseStyle = makeResetStyles({\n ...createFocusOutlineStyle(),\n inset: 0,\n padding: SURFACE_PADDING,\n margin: 'auto',\n borderStyle: 'none',\n overflow: 'unset',\n border: `${SURFACE_BORDER_WIDTH} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusXLarge,\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: [\n '100vh',\n '100dvh'\n ],\n boxSizing: 'border-box',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n // Same styles as DialogSurfaceMotion last keyframe,\n // to ensure dialog will be properly styled when surfaceMotion is opted-out\n boxShadow: tokens.shadow64,\n [DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw'\n },\n [DIALOG_MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'auto',\n // We need to offset the scrollbar by adding transparent borders otherwise\n // it conflicts with the border radius.\n paddingRight: `calc(${SURFACE_PADDING} - ${DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET})`,\n borderRightWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderTopWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderBottomWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET\n }\n});\nconst useBackdropBaseStyle = makeResetStyles({\n inset: '0px',\n backgroundColor: tokens.colorBackgroundOverlay,\n position: 'fixed'\n});\nconst useStyles = makeStyles({\n nestedDialogBackdrop: {\n backgroundColor: tokens.colorTransparentBackground\n },\n dialogHidden: {\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the DialogSurface slots based on the state\n */ export const useDialogSurfaceStyles_unstable = (state)=>{\n const { root, backdrop, open, unmountOnClose, treatBackdropAsNested, backdropAppearance } = state;\n const rootBaseStyle = useRootBaseStyle();\n const backdropBaseStyle = useBackdropBaseStyle();\n const styles = useStyles();\n const isBackdropTransparent = backdropAppearance ? backdropAppearance === 'transparent' : treatBackdropAsNested;\n const mountedAndClosed = !unmountOnClose && !open;\n // eslint-disable-next-line react-hooks/immutability\n root.className = mergeClasses(dialogSurfaceClassNames.root, rootBaseStyle, mountedAndClosed && styles.dialogHidden, root.className);\n if (backdrop) {\n // eslint-disable-next-line react-hooks/immutability\n backdrop.className = mergeClasses(dialogSurfaceClassNames.backdrop, backdropBaseStyle, mountedAndClosed && styles.dialogHidden, isBackdropTransparent && styles.nestedDialogBackdrop, backdrop.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","createFocusOutlineStyle","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","dialogSurfaceClassNames","root","backdrop","useRootBaseStyle","r","s","useBackdropBaseStyle","useStyles","nestedDialogBackdrop","De3pzq","dialogHidden","Bkecrkj","d","useDialogSurfaceStyles_unstable","state","open","unmountOnClose","treatBackdropAsNested","backdropAppearance","rootBaseStyle","backdropBaseStyle","styles","isBackdropTransparent","mountedAndClosed","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;QAKCU,uBAAuB;;;;eA2DnBa,+BAA+B;;;uBA/DU,gBAAgB;AAInE,gCAAgC;IACnCZ,IAAI,EAAE,mBAAmB;IACzBC,QAAQ,EAAE;AACd,CAAC;AACD;;CAEA,GAAI,MAAMC,gBAAgB,GAAA,WAAA,OAAGb,oBAAA,EAAA,YAAA,WAAA;IAAAc,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAqC5B,CAAC;AACF,MAAMC,oBAAoB,GAAA,WAAA,OAAGhB,oBAAA,EAAA,YAAA,MAAA;IAAA;CAI5B,CAAC;AACF,MAAMiB,SAAS,GAAA,WAAA,OAAGhB,eAAA,EAAA;IAAAiB,oBAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,YAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAOjB,CAAC;AAGS,yCAAyCE,KAAK,IAAG;IACxD,MAAM,EAAEb,IAAI,EAAEC,QAAQ,EAAEa,IAAI,EAAEC,cAAc,EAAEC,qBAAqB,EAAEC,kBAAAA,EAAoB,GAAGJ,KAAK;IACjG,MAAMK,aAAa,GAAGhB,gBAAgB,CAAC,CAAC;IACxC,MAAMiB,iBAAiB,GAAGd,oBAAoB,CAAC,CAAC;IAChD,MAAMe,MAAM,GAAGd,SAAS,CAAC,CAAC;IAC1B,MAAMe,qBAAqB,GAAGJ,kBAAkB,GAAGA,kBAAkB,KAAK,aAAa,GAAGD,qBAAqB;IAC/G,MAAMM,gBAAgB,GAAG,CAACP,cAAc,IAAI,CAACD,IAAI;IACjD,oDAAA;IACAd,IAAI,CAACuB,SAAS,OAAGhC,mBAAY,EAACQ,uBAAuB,CAACC,IAAI,EAAEkB,aAAa,EAAEI,gBAAgB,IAAIF,MAAM,CAACX,YAAY,EAAET,IAAI,CAACuB,SAAS,CAAC;IACnI,IAAItB,QAAQ,EAAE;QACV,oDAAA;QACAA,QAAQ,CAACsB,SAAS,OAAGhC,mBAAY,EAACQ,uBAAuB,CAACE,QAAQ,EAAEkB,iBAAiB,EAAEG,gBAAgB,IAAIF,MAAM,CAACX,YAAY,EAAEY,qBAAqB,IAAID,MAAM,CAACb,oBAAoB,EAAEN,QAAQ,CAACsB,SAAS,CAAC;IAC7M;IACA,OAAOV,KAAK;AAChB,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get dialogSurfaceClassNames () {
13
+ return dialogSurfaceClassNames;
14
+ },
15
+ get useDialogSurfaceStyles_unstable () {
16
+ return useDialogSurfaceStyles_unstable;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _clsx = require("clsx");
21
+ const _DialogSurfacemodulecss = /*#__PURE__*/ _interop_require_default._(require("./DialogSurface.module.css"));
22
+ const dialogSurfaceClassNames = {
23
+ root: 'fui-DialogSurface',
24
+ backdrop: 'fui-DialogSurface__backdrop'
25
+ };
26
+ const useDialogSurfaceStyles_unstable = (state)=>{
27
+ const mountedAndClosed = !state.unmountOnClose && !state.open;
28
+ const transparent = state.backdropAppearance ? state.backdropAppearance === 'transparent' : state.treatBackdropAsNested;
29
+ state.root.className = (0, _clsx.clsx)(dialogSurfaceClassNames.root, _DialogSurfacemodulecss.default.root, mountedAndClosed && _DialogSurfacemodulecss.default.hidden, state.root.className);
30
+ if (state.backdrop) {
31
+ state.backdrop.className = (0, _clsx.clsx)(dialogSurfaceClassNames.backdrop, _DialogSurfacemodulecss.default.backdrop, mountedAndClosed && _DialogSurfacemodulecss.default.hidden, transparent && _DialogSurfacemodulecss.default.transparent, state.backdrop.className);
32
+ }
33
+ return state;
34
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/useDialogSurfaceStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots } from './DialogSurface.types';\nimport styles from './DialogSurface.module.css';\n\nexport const dialogSurfaceClassNames: SlotClassNames<Omit<DialogSurfaceSlots, 'backdropMotion'>> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n const mountedAndClosed = !state.unmountOnClose && !state.open;\n const transparent = state.backdropAppearance\n ? state.backdropAppearance === 'transparent'\n : state.treatBackdropAsNested;\n state.root.className = clsx(\n dialogSurfaceClassNames.root,\n styles.root,\n mountedAndClosed && styles.hidden,\n state.root.className,\n );\n if (state.backdrop) {\n state.backdrop.className = clsx(\n dialogSurfaceClassNames.backdrop,\n styles.backdrop,\n mountedAndClosed && styles.hidden,\n transparent && styles.transparent,\n state.backdrop.className,\n );\n }\n return state;\n};\n"],"names":["clsx","styles","dialogSurfaceClassNames","root","backdrop","useDialogSurfaceStyles_unstable","state","mountedAndClosed","unmountOnClose","open","transparent","backdropAppearance","treatBackdropAsNested","className","hidden"],"mappings":";;;;;;;;;;;QAKaE;;;;;;;;sBALQ,OAAO;iFAGT,6BAA6B;AAEzC,gCAA4F;IACjGC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEK,MAAMC,kCAAkC,CAACC;IAC9C,MAAMC,mBAAmB,CAACD,MAAME,cAAc,IAAI,CAACF,MAAMG,IAAI;IAC7D,MAAMC,cAAcJ,MAAMK,kBAAkB,GACxCL,MAAMK,kBAAkB,KAAK,gBAC7BL,MAAMM,qBAAqB;IAC/BN,MAAMH,IAAI,CAACU,SAAS,OAAGb,UAAAA,EACrBE,wBAAwBC,IAAI,EAC5BF,+BAAAA,CAAOE,IAAI,EACXI,oBAAoBN,+BAAAA,CAAOa,MAAM,EACjCR,MAAMH,IAAI,CAACU,SAAS;IAEtB,IAAIP,MAAMF,QAAQ,EAAE;QAClBE,MAAMF,QAAQ,CAACS,SAAS,OAAGb,UAAAA,EACzBE,wBAAwBE,QAAQ,EAChCH,+BAAAA,CAAOG,QAAQ,EACfG,oBAAoBN,+BAAAA,CAAOa,MAAM,EACjCJ,eAAeT,+BAAAA,CAAOS,WAAW,EACjCJ,MAAMF,QAAQ,CAACS,SAAS;IAE5B;IACA,OAAOP;AACT,EAAE"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- dialogSurfaceClassNames: function() {
13
+ get dialogSurfaceClassNames () {
14
14
  return dialogSurfaceClassNames;
15
15
  },
16
- useDialogSurfaceStyles_unstable: function() {
16
+ get useDialogSurfaceStyles_unstable () {
17
17
  return useDialogSurfaceStyles_unstable;
18
18
  }
19
19
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurface/useDialogSurfaceStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport {\n DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR,\n DIALOG_MEDIA_QUERY_SHORT_SCREEN,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n} from '../../contexts';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const dialogSurfaceClassNames: SlotClassNames<Omit<DialogSurfaceSlots, 'backdropMotion'>> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseStyle = makeResetStyles({\n ...createFocusOutlineStyle(),\n inset: 0,\n padding: SURFACE_PADDING,\n margin: 'auto',\n borderStyle: 'none',\n overflow: 'unset',\n border: `${SURFACE_BORDER_WIDTH} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusXLarge,\n\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: ['100vh', '100dvh'],\n boxSizing: 'border-box',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n // Same styles as DialogSurfaceMotion last keyframe,\n // to ensure dialog will be properly styled when surfaceMotion is opted-out\n boxShadow: tokens.shadow64,\n\n [DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n },\n\n [DIALOG_MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'auto',\n // We need to offset the scrollbar by adding transparent borders otherwise\n // it conflicts with the border radius.\n paddingRight: `calc(${SURFACE_PADDING} - ${DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET})`,\n borderRightWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderTopWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderBottomWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n },\n});\n\nconst useBackdropBaseStyle = makeResetStyles({\n inset: '0px',\n backgroundColor: tokens.colorBackgroundOverlay,\n position: 'fixed',\n});\n\nconst useStyles = makeStyles({\n nestedDialogBackdrop: {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n dialogHidden: {\n pointerEvents: 'none',\n },\n});\n\n/**\n * Apply styling to the DialogSurface slots based on the state\n */\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n const { root, backdrop, open, unmountOnClose, treatBackdropAsNested, backdropAppearance } = state;\n\n const rootBaseStyle = useRootBaseStyle();\n const backdropBaseStyle = useBackdropBaseStyle();\n const styles = useStyles();\n const isBackdropTransparent = backdropAppearance ? backdropAppearance === 'transparent' : treatBackdropAsNested;\n\n const mountedAndClosed = !unmountOnClose && !open;\n\n // eslint-disable-next-line react-hooks/immutability\n root.className = mergeClasses(\n dialogSurfaceClassNames.root,\n rootBaseStyle,\n mountedAndClosed && styles.dialogHidden,\n root.className,\n );\n\n if (backdrop) {\n // eslint-disable-next-line react-hooks/immutability\n backdrop.className = mergeClasses(\n dialogSurfaceClassNames.backdrop,\n backdropBaseStyle,\n mountedAndClosed && styles.dialogHidden,\n isBackdropTransparent && styles.nestedDialogBackdrop,\n backdrop.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","createFocusOutlineStyle","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","dialogSurfaceClassNames","root","backdrop","useRootBaseStyle","inset","padding","margin","borderStyle","overflow","border","colorTransparentStroke","borderRadius","borderRadiusXLarge","display","userSelect","visibility","position","height","maxWidth","maxHeight","boxSizing","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","boxShadow","shadow64","overflowY","paddingRight","borderRightWidth","borderTopWidth","borderBottomWidth","useBackdropBaseStyle","colorBackgroundOverlay","useStyles","nestedDialogBackdrop","colorTransparentBackground","dialogHidden","pointerEvents","useDialogSurfaceStyles_unstable","state","open","unmountOnClose","treatBackdropAsNested","backdropAppearance","rootBaseStyle","backdropBaseStyle","styles","isBackdropTransparent","mountedAndClosed","className"],"mappings":"AAAA;;;;;;;;;;;;IAeaU,uBAAAA;;;mCAkEAuC;eAAAA;;;uBA/E6C,iBAAiB;4BACpD,wBAAwB;8BACP,0BAA0B;uBAO3D,0BAAiB;AAIjB,gCAA4F;IACjGtC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF;;CAEC,GACD,MAAMC,uBAAmBb,sBAAAA,EAAgB;IACvC,OAAGI,qCAAAA,GAAyB;IAC5BU,OAAO;IACPC,SAASN,sBAAAA;IACTO,QAAQ;IACRC,aAAa;IACbC,UAAU;IACVC,QAAQ,GAAGX,2BAAAA,CAAqB,OAAO,EAAEL,kBAAAA,CAAOiB,sBAAsB,EAAE;IACxEC,cAAclB,kBAAAA,CAAOmB,kBAAkB;IAEvCC,SAAS;IACTC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,WAAW;QAAC;QAAS;KAAS;IAC9BC,WAAW;IACXC,iBAAiB5B,kBAA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nBQ,wBAAwBE,QAAQ,EAChC4C,mBACAG,oBAAoBF,OAAOV,YAAY,EACvCW,yBAAyBD,OAAOZ,oBAAoB,EACpDjC,SAASgD,SAAS;IAEtB;IAEA,OAAOV;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/useDialogSurfaceStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport {\n DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR,\n DIALOG_MEDIA_QUERY_SHORT_SCREEN,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n} from '../../contexts';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const dialogSurfaceClassNames: SlotClassNames<Omit<DialogSurfaceSlots, 'backdropMotion'>> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseStyle = makeResetStyles({\n ...createFocusOutlineStyle(),\n inset: 0,\n padding: SURFACE_PADDING,\n margin: 'auto',\n borderStyle: 'none',\n overflow: 'unset',\n border: `${SURFACE_BORDER_WIDTH} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusXLarge,\n\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: ['100vh', '100dvh'],\n boxSizing: 'border-box',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n // Same styles as DialogSurfaceMotion last keyframe,\n // to ensure dialog will be properly styled when surfaceMotion is opted-out\n boxShadow: tokens.shadow64,\n\n [DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n },\n\n [DIALOG_MEDIA_QUERY_SHORT_SCREEN]: {\n overflowY: 'auto',\n // We need to offset the scrollbar by adding transparent borders otherwise\n // it conflicts with the border radius.\n paddingRight: `calc(${SURFACE_PADDING} - ${DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET})`,\n borderRightWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderTopWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n borderBottomWidth: DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n },\n});\n\nconst useBackdropBaseStyle = makeResetStyles({\n inset: '0px',\n backgroundColor: tokens.colorBackgroundOverlay,\n position: 'fixed',\n});\n\nconst useStyles = makeStyles({\n nestedDialogBackdrop: {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n dialogHidden: {\n pointerEvents: 'none',\n },\n});\n\n/**\n * Apply styling to the DialogSurface slots based on the state\n */\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n const { root, backdrop, open, unmountOnClose, treatBackdropAsNested, backdropAppearance } = state;\n\n const rootBaseStyle = useRootBaseStyle();\n const backdropBaseStyle = useBackdropBaseStyle();\n const styles = useStyles();\n const isBackdropTransparent = backdropAppearance ? backdropAppearance === 'transparent' : treatBackdropAsNested;\n\n const mountedAndClosed = !unmountOnClose && !open;\n\n // eslint-disable-next-line react-hooks/immutability\n root.className = mergeClasses(\n dialogSurfaceClassNames.root,\n rootBaseStyle,\n mountedAndClosed && styles.dialogHidden,\n root.className,\n );\n\n if (backdrop) {\n // eslint-disable-next-line react-hooks/immutability\n backdrop.className = mergeClasses(\n dialogSurfaceClassNames.backdrop,\n backdropBaseStyle,\n mountedAndClosed && styles.dialogHidden,\n isBackdropTransparent && styles.nestedDialogBackdrop,\n backdrop.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","createFocusOutlineStyle","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","dialogSurfaceClassNames","root","backdrop","useRootBaseStyle","inset","padding","margin","borderStyle","overflow","border","colorTransparentStroke","borderRadius","borderRadiusXLarge","display","userSelect","visibility","position","height","maxWidth","maxHeight","boxSizing","backgroundColor","colorNeutralBackground1","color","colorNeutralForeground1","boxShadow","shadow64","overflowY","paddingRight","borderRightWidth","borderTopWidth","borderBottomWidth","useBackdropBaseStyle","colorBackgroundOverlay","useStyles","nestedDialogBackdrop","colorTransparentBackground","dialogHidden","pointerEvents","useDialogSurfaceStyles_unstable","state","open","unmountOnClose","treatBackdropAsNested","backdropAppearance","rootBaseStyle","backdropBaseStyle","styles","isBackdropTransparent","mountedAndClosed","className"],"mappings":"AAAA;;;;;;;;;;;;QAeaU;;;QAkEAuC;;;;uBA/E6C,iBAAiB;4BACpD,wBAAwB;8BACP,0BAA0B;uBAO3D,0BAAiB;AAIjB,gCAA4F;IACjGtC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF;;CAEC,GACD,MAAMC,uBAAmBb,sBAAAA,EAAgB;IACvC,OAAGI,qCAAAA,GAAyB;IAC5BU,OAAO;IACPC,SAASN,sBAAAA;IACTO,QAAQ;IACRC,aAAa;IACbC,UAAU;IACVC,QAAQ,GAAGX,2BAAAA,CAAqB,OAAO,EAAEL,kBAAAA,CAAOiB,sBAAsB,EAAE;IACxEC,cAAclB,kBAAAA,CAAOmB,kBAAkB;IAEvCC,SAAS;IACTC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,WAAW;QAAC;QAAS;KAAS;IAC9BC,WAAW;IACXC,iBAAiB5B,kBAAAA,CAAO6B,uBAAuB;IAC/CC,OAAO9B,kBAAAA,CAAO+B,uBAAuB;IACrC,oDAA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yBD,OAAOZ,oBAAoB,EACpDjC,SAASgD,SAAS;IAEtB;IAEA,OAAOV;AACT,EAAE"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get dialogSurfaceClassNames () {
13
+ return dialogSurfaceClassNames;
14
+ },
15
+ get useDialogSurfaceStyles_unstable () {
16
+ return useDialogSurfaceStyles_unstable;
17
+ }
18
+ });
19
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
20
+ const _clsx = require("clsx");
21
+ const _DialogSurfacemodulecss = /*#__PURE__*/ _interop_require_default._(require("./DialogSurface.module.css"));
22
+ const dialogSurfaceClassNames = {
23
+ root: 'fui-DialogSurface',
24
+ backdrop: 'fui-DialogSurface__backdrop'
25
+ };
26
+ const useDialogSurfaceStyles_unstable = (state)=>{
27
+ const mountedAndClosed = !state.unmountOnClose && !state.open;
28
+ const transparent = state.backdropAppearance ? state.backdropAppearance === 'transparent' : state.treatBackdropAsNested;
29
+ state.root.className = (0, _clsx.clsx)(dialogSurfaceClassNames.root, _DialogSurfacemodulecss.default.root, mountedAndClosed && _DialogSurfacemodulecss.default.hidden, state.root.className);
30
+ if (state.backdrop) {
31
+ state.backdrop.className = (0, _clsx.clsx)(dialogSurfaceClassNames.backdrop, _DialogSurfacemodulecss.default.backdrop, mountedAndClosed && _DialogSurfacemodulecss.default.hidden, transparent && _DialogSurfacemodulecss.default.transparent, state.backdrop.className);
32
+ }
33
+ return state;
34
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/DialogSurface/useDialogSurfaceStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots } from './DialogSurface.types';\nimport styles from './DialogSurface.module.css';\n\nexport const dialogSurfaceClassNames: SlotClassNames<Omit<DialogSurfaceSlots, 'backdropMotion'>> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\nexport const useDialogSurfaceStyles_unstable = (state: DialogSurfaceState): DialogSurfaceState => {\n const mountedAndClosed = !state.unmountOnClose && !state.open;\n const transparent = state.backdropAppearance\n ? state.backdropAppearance === 'transparent'\n : state.treatBackdropAsNested;\n state.root.className = clsx(\n dialogSurfaceClassNames.root,\n styles.root,\n mountedAndClosed && styles.hidden,\n state.root.className,\n );\n if (state.backdrop) {\n state.backdrop.className = clsx(\n dialogSurfaceClassNames.backdrop,\n styles.backdrop,\n mountedAndClosed && styles.hidden,\n transparent && styles.transparent,\n state.backdrop.className,\n );\n }\n return state;\n};\n"],"names":["clsx","styles","dialogSurfaceClassNames","root","backdrop","useDialogSurfaceStyles_unstable","state","mountedAndClosed","unmountOnClose","open","transparent","backdropAppearance","treatBackdropAsNested","className","hidden"],"mappings":";;;;;;;;;;;QAKaE;;;;;;;;sBALQ,OAAO;iFAGT,6BAA6B;AAEzC,gCAA4F;IACjGC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEK,MAAMC,kCAAkC,CAACC;IAC9C,MAAMC,mBAAmB,CAACD,MAAME,cAAc,IAAI,CAACF,MAAMG,IAAI;IAC7D,MAAMC,cAAcJ,MAAMK,kBAAkB,GACxCL,MAAMK,kBAAkB,KAAK,gBAC7BL,MAAMM,qBAAqB;IAC/BN,MAAMH,IAAI,CAACU,SAAS,OAAGb,UAAAA,EACrBE,wBAAwBC,IAAI,EAC5BF,+BAAAA,CAAOE,IAAI,EACXI,oBAAoBN,+BAAAA,CAAOa,MAAM,EACjCR,MAAMH,IAAI,CAACU,SAAS;IAEtB,IAAIP,MAAMF,QAAQ,EAAE;QAClBE,MAAMF,QAAQ,CAACS,SAAS,OAAGb,UAAAA,EACzBE,wBAAwBE,QAAQ,EAChCH,+BAAAA,CAAOG,QAAQ,EACfG,oBAAoBN,+BAAAA,CAAOa,MAAM,EACjCJ,eAAeT,+BAAAA,CAAOS,WAAW,EACjCJ,MAAMF,QAAQ,CAACS,SAAS;IAE5B;IACA,OAAOP;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogSurfaceMotion.ts"],"sourcesContent":["import { createPresenceComponentVariant, motionTokens } from '@fluentui/react-motion';\nimport { Scale } from '@fluentui/react-motion-components-preview';\n\nexport const DialogSurfaceMotion = createPresenceComponentVariant(Scale, {\n outScale: 0.85,\n easing: motionTokens.curveDecelerateMid,\n duration: motionTokens.durationGentle,\n exitEasing: motionTokens.curveAccelerateMin,\n exitDuration: motionTokens.durationGentle,\n});\n"],"names":["createPresenceComponentVariant","motionTokens","Scale","DialogSurfaceMotion","outScale","easing","curveDecelerateMid","duration","durationGentle","exitEasing","curveAccelerateMin","exitDuration"],"mappings":";;;;+BAGaG;;;;;;6BAHgD,yBAAyB;8CAChE,4CAA4C;AAE3D,gCAA4BH,2CAAAA,EAA+BE,mCAAAA,EAAO;IACvEE,UAAU;IACVC,QAAQJ,yBAAAA,CAAaK,kBAAkB;IACvCC,UAAUN,yBAAAA,CAAaO,cAAc;IACrCC,YAAYR,yBAAAA,CAAaS,kBAAkB;IAC3CC,cAAcV,yBAAAA,CAAaO,cAAc;AAC3C,GAAG"}
1
+ {"version":3,"sources":["../../src/components/DialogSurfaceMotion.ts"],"sourcesContent":["import { createPresenceComponentVariant, motionTokens } from '@fluentui/react-motion';\nimport { Scale } from '@fluentui/react-motion-components-preview';\n\nexport const DialogSurfaceMotion = createPresenceComponentVariant(Scale, {\n outScale: 0.85,\n easing: motionTokens.curveDecelerateMid,\n duration: motionTokens.durationGentle,\n exitEasing: motionTokens.curveAccelerateMin,\n exitDuration: motionTokens.durationGentle,\n});\n"],"names":["createPresenceComponentVariant","motionTokens","Scale","DialogSurfaceMotion","outScale","easing","curveDecelerateMid","duration","durationGentle","exitEasing","curveAccelerateMin","exitDuration"],"mappings":";;;;+BAGaG;;;;;;6BAHgD,yBAAyB;8CAChE,4CAA4C;AAE3D,gCAA4BH,2CAAAA,EAA+BE,mCAAAA,EAAO;IACvEE,UAAU;IACVC,QAAQJ,yBAAAA,CAAaK,kBAAkB;IACvCC,UAAUN,yBAAAA,CAAaO,cAAc;IACrCC,YAAYR,yBAAAA,CAAaS,kBAAkB;IAC3CC,cAAcV,yBAAAA,CAAaO,cAAc;AAC3C,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTitle/DialogTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useDialogTitle_unstable } from './useDialogTitle';\nimport { renderDialogTitle_unstable } from './renderDialogTitle';\nimport { useDialogTitleStyles_unstable } from './useDialogTitleStyles.styles';\nimport type { DialogTitleProps } from './DialogTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogTitle` component expects to have a title/header\n * and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.\n */\nexport const DialogTitle: ForwardRefComponent<DialogTitleProps> = React.forwardRef((props, ref) => {\n const state = useDialogTitle_unstable(props, ref);\n\n useDialogTitleStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogTitleStyles_unstable')(state);\n\n return renderDialogTitle_unstable(state);\n});\n\nDialogTitle.displayName = 'DialogTitle';\n"],"names":["React","useDialogTitle_unstable","renderDialogTitle_unstable","useDialogTitleStyles_unstable","useCustomStyleHook_unstable","DialogTitle","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,sBAAmB;mCAChB,yBAAsB;4CACnB,mCAAgC;qCAGlC,kCAAkC;AAMvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,YAAQR,uCAAAA,EAAwBM,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAE9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOP,6CAAAA,EAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/DialogTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useDialogTitle_unstable } from './useDialogTitle';\nimport { renderDialogTitle_unstable } from './renderDialogTitle';\nimport { useDialogTitleStyles_unstable } from './useDialogTitleStyles.styles';\nimport type { DialogTitleProps } from './DialogTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogTitle` component expects to have a title/header\n * and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.\n */\nexport const DialogTitle: ForwardRefComponent<DialogTitleProps> = React.forwardRef((props, ref) => {\n const state = useDialogTitle_unstable(props, ref);\n\n useDialogTitleStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogTitleStyles_unstable')(state);\n\n return renderDialogTitle_unstable(state);\n});\n\nDialogTitle.displayName = 'DialogTitle';\n"],"names":["React","useDialogTitle_unstable","renderDialogTitle_unstable","useDialogTitleStyles_unstable","useCustomStyleHook_unstable","DialogTitle","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,sBAAmB;mCAChB,yBAAsB;4CACnB,mCAAgC;qCAGlC,kCAAkC;AAMvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,YAAQR,uCAAAA,EAAwBM,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAE9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOP,6CAAAA,EAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -0,0 +1,64 @@
1
+ @layer fluentui {
2
+ .root {
3
+ font-family: var(--fontFamilyBase);
4
+ font-size: var(--fontSizeBase500);
5
+ font-weight: var(--fontWeightSemibold);
6
+ line-height: var(--lineHeightBase500);
7
+ margin: 0;
8
+ grid-row-start: 1;
9
+ grid-row-end: 1;
10
+ grid-column-start: 1;
11
+ grid-column-end: 3;
12
+ }
13
+
14
+ .withoutAction {
15
+ grid-column-end: 4;
16
+ }
17
+
18
+ .action {
19
+ grid-row-start: 1;
20
+ grid-row-end: 1;
21
+ grid-column-start: 3;
22
+ justify-self: end;
23
+ align-self: start;
24
+ }
25
+
26
+ .internalAction {
27
+ &:focus {
28
+ outline-style: none;
29
+ }
30
+ &:focus-visible {
31
+ outline-style: none;
32
+ }
33
+ &[data-fui-focus-visible] {
34
+ border-color: transparent;
35
+ &::after {
36
+ content: '';
37
+ position: absolute;
38
+ pointer-events: none;
39
+ z-index: 1;
40
+ border: 2px solid var(--colorStrokeFocus2);
41
+ border-radius: var(--borderRadiusMedium);
42
+ inset: -2px;
43
+ }
44
+ @media (forced-colors: active) {
45
+ &::after {
46
+ border-color: Highlight;
47
+ }
48
+ }
49
+ }
50
+ overflow: visible;
51
+ padding: 0;
52
+ border-style: none;
53
+ position: relative;
54
+ box-sizing: content-box;
55
+ background-color: inherit;
56
+ color: inherit;
57
+ font-family: inherit;
58
+ font-size: inherit;
59
+ cursor: pointer;
60
+ line-height: 0;
61
+ -webkit-appearance: button;
62
+ text-align: unset;
63
+ }
64
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTitle/DialogTitle.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogTitleSlots = {\n /**\n * By default this is a h2, but can be any heading or div,\n * if `div` is provided do not forget to also provide proper `role=\"heading\"` and `aria-level` attributes\n */\n root: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;\n /**\n * By default a Dialog with modalType='non-modal' will have a close button action\n */\n action?: Slot<'div'>;\n};\n\n/**\n * DialogTitle Props\n */\nexport type DialogTitleProps = ComponentProps<DialogTitleSlots>;\n\n/**\n * State used in rendering DialogTitle\n */\nexport type DialogTitleState = ComponentState<DialogTitleSlots>;\n"],"names":[],"mappings":"AAmBA;;CAEC,GACD,WAAgE"}
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/DialogTitle.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogTitleSlots = {\n /**\n * By default this is a h2, but can be any heading or div,\n * if `div` is provided do not forget to also provide proper `role=\"heading\"` and `aria-level` attributes\n */\n root: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;\n /**\n * By default a Dialog with modalType='non-modal' will have a close button action\n */\n action?: Slot<'div'>;\n};\n\n/**\n * DialogTitle Props\n */\nexport type DialogTitleProps = ComponentProps<DialogTitleSlots>;\n\n/**\n * State used in rendering DialogTitle\n */\nexport type DialogTitleState = ComponentState<DialogTitleSlots>;\n"],"names":[],"mappings":"AAmBA;;CAEC,GACD,WAAgE"}