@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
@@ -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
- DialogTitle: function() {
12
+ get DialogTitle () {
13
13
  return _DialogTitle.DialogTitle;
14
14
  },
15
- dialogTitleClassNames: function() {
15
+ get dialogTitleClassNames () {
16
16
  return _useDialogTitleStylesstyles.dialogTitleClassNames;
17
17
  },
18
- renderDialogTitle_unstable: function() {
18
+ get renderDialogTitle_unstable () {
19
19
  return _renderDialogTitle.renderDialogTitle_unstable;
20
20
  },
21
- useDialogTitleInternalStyles: function() {
21
+ get useDialogTitleInternalStyles () {
22
22
  return _useDialogTitleStylesstyles.useDialogTitleInternalStyles;
23
23
  },
24
- useDialogTitleStyles_unstable: function() {
24
+ get useDialogTitleStyles_unstable () {
25
25
  return _useDialogTitleStylesstyles.useDialogTitleStyles_unstable;
26
26
  },
27
- useDialogTitle_unstable: function() {
27
+ get useDialogTitle_unstable () {
28
28
  return _useDialogTitle.useDialogTitle_unstable;
29
29
  }
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTitle/index.ts"],"sourcesContent":["export { DialogTitle } from './DialogTitle';\nexport type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nexport { renderDialogTitle_unstable } from './renderDialogTitle';\nexport { useDialogTitle_unstable } from './useDialogTitle';\nexport {\n dialogTitleClassNames,\n useDialogTitleInternalStyles,\n useDialogTitleStyles_unstable,\n} from './useDialogTitleStyles.styles';\n"],"names":["DialogTitle","renderDialogTitle_unstable","useDialogTitle_unstable","dialogTitleClassNames","useDialogTitleInternalStyles","useDialogTitleStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAKlBG,iDAAqB;;;eAHdF,6CAA0B;;;eAIjCG,wDAA4B;;;eAC5BC,yDAA6B;;;eAJtBH,uCAAuB;;;6BAHJ,mBAAgB;mCAED,yBAAsB;gCACzB,sBAAmB;4CAKpD,mCAAgC"}
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/index.ts"],"sourcesContent":["export { DialogTitle } from './DialogTitle';\nexport type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nexport { renderDialogTitle_unstable } from './renderDialogTitle';\nexport { useDialogTitle_unstable } from './useDialogTitle';\nexport {\n dialogTitleClassNames,\n useDialogTitleInternalStyles,\n useDialogTitleStyles_unstable,\n} from './useDialogTitleStyles.styles';\n"],"names":["DialogTitle","renderDialogTitle_unstable","useDialogTitle_unstable","dialogTitleClassNames","useDialogTitleInternalStyles","useDialogTitleStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAKlBG,iDAAqB;;;eAHdF,6CAA0B;;;eAIjCG,wDAA4B;;;eAC5BC,yDAA6B;;;eAJtBH,uCAAuB;;;6BAHJ,mBAAgB;mCAED,yBAAsB;gCACzB,sBAAmB;4CAKpD,mCAAgC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTitle/renderDialogTitle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { DialogTitleState, DialogTitleSlots } from './DialogTitle.types';\n\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = (state: DialogTitleState): JSXElement => {\n assertSlots<DialogTitleSlots>(state);\n\n return (\n <>\n <state.root>{state.root.children}</state.root>\n {state.action && <state.action />}\n </>\n );\n};\n"],"names":["assertSlots","renderDialogTitle_unstable","state","root","children","action"],"mappings":";;;;+BAUaC;;;;;;4BATb,UAAiD;gCAErB,4BAA4B;AAOjD,mCAAmC,CAACC;QACzCF,2BAAAA,EAA8BE;IAE9B,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;8BACE,eAAA,EAACA,MAAMC,IAAI,EAAA;0BAAED,MAAMC,IAAI,CAACC,QAAQ;;YAC/BF,MAAMG,MAAM,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,MAAM,EAAA,CAAA;;;AAGpC,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/renderDialogTitle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { DialogTitleState, DialogTitleSlots } from './DialogTitle.types';\n\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = (state: DialogTitleState): JSXElement => {\n assertSlots<DialogTitleSlots>(state);\n\n return (\n <>\n <state.root>{state.root.children}</state.root>\n {state.action && <state.action />}\n </>\n );\n};\n"],"names":["assertSlots","renderDialogTitle_unstable","state","root","children","action"],"mappings":";;;;+BAUaC;;;;;;;gCATb,gDAAiD,GAEjD,SAASD,WAAW,QAAQ,4BAA4B;AAOjD,mCAAmC,CAACE;QACzCF,2BAAAA,EAA8BE;IAE9B,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;8BACE,eAAA,EAACA,MAAMC,IAAI,EAAA;0BAAED,MAAMC,IAAI,CAACC,QAAQ;;YAC/BF,MAAMG,MAAM,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,MAAM,EAAA,CAAA;;;AAGpC,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTitle/useDialogTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { DialogTitleProps, DialogTitleState } from './DialogTitle.types';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { DialogTrigger } from '../DialogTrigger/DialogTrigger';\nimport { useDialogTitleInternalStyles } from './useDialogTitleStyles.styles';\n\n/**\n * Create the state required to render DialogTitle.\n *\n * The returned state can be modified with hooks such as useDialogTitleStyles_unstable,\n * before being passed to renderDialogTitle_unstable.\n *\n * @param props - props from this instance of DialogTitle\n * @param ref - reference to root HTMLElement of DialogTitle\n */\nexport const useDialogTitle_unstable = (props: DialogTitleProps, ref: React.Ref<HTMLDivElement>): DialogTitleState => {\n const { action } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const internalStyles = useDialogTitleInternalStyles();\n\n return {\n components: {\n root: 'h2',\n action: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('h2', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props,\n }),\n { elementType: 'h2' },\n ),\n action: slot.optional(action, {\n renderByDefault: modalType === 'non-modal',\n defaultProps: {\n children: (\n <DialogTrigger disableButtonEnhancement action=\"close\">\n <button\n type=\"button\"\n className={internalStyles}\n // TODO: find a better way to add internal labels\n aria-label=\"close\"\n >\n <Dismiss20Regular />\n </button>\n </DialogTrigger>\n ),\n },\n elementType: 'div',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useDialogContext_unstable","Dismiss20Regular","DialogTrigger","useDialogTitleInternalStyles","useDialogTitle_unstable","props","ref","action","modalType","ctx","internalStyles","components","root","always","id","dialogTitleId","elementType","optional","renderByDefault","defaultProps","children","disableButtonEnhancement","button","type","className","aria-label"],"mappings":"AAAA;;;;;+BAmBaO;;;;;;;iEAjBU,QAAQ;gCACgB,4BAA4B;+BAEjC,kCAA+B;4BACxC,wBAAwB;+BAC3B,oCAAiC;4CAClB,mCAAgC;AAWtE,gCAAgC,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,MAAM,EAAE,GAAGF;IACnB,MAAMG,gBAAYR,wCAAAA,EAA0BS,CAAAA,MAAOA,IAAID,SAAS;IAChE,MAAME,qBAAiBP,wDAAAA;IAEvB,OAAO;QACLQ,YAAY;YACVC,MAAM;YACNL,QAAQ;QACV;QACAK,MAAMb,oBAAAA,CAAKc,MAAM,KACff,wCAAAA,EAAyB,MAAM;YAC7BQ;YACAQ,QAAId,wCAAAA,EAA0BS,CAAAA,MAAOA,IAAIM,aAAa;YACtD,GAAGV,KAAK;QACV,IACA;YAAEW,aAAa;QAAK;QAEtBT,QAAQR,oBAAAA,CAAKkB,QAAQ,CAACV,QAAQ;YAC5BW,iBAAiBV,cAAc;YAC/BW,cAAc;gBACZC,UAAAA,WAAAA,GACE,OAAA,aAAA,CAAClB,4BAAAA,EAAAA;oBAAcmB,0BAAAA;oBAAyBd,QAAO;iCAC7C,OAAA,aAAA,CAACe,UAAAA;oBACCC,MAAK;oBACLC,WAAWd;oBACX,iDAAiD;oBACjDe,cAAW;iCAEX,OAAA,aAAA,CAACxB,4BAAAA,EAAAA;YAIT;YACAe,aAAa;QACf;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/useDialogTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { DialogTitleProps, DialogTitleState } from './DialogTitle.types';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { DialogTrigger } from '../DialogTrigger/DialogTrigger';\nimport { useDialogTitleInternalStyles } from './useDialogTitleStyles.styles';\n\n/**\n * Create the state required to render DialogTitle.\n *\n * The returned state can be modified with hooks such as useDialogTitleStyles_unstable,\n * before being passed to renderDialogTitle_unstable.\n *\n * @param props - props from this instance of DialogTitle\n * @param ref - reference to root HTMLElement of DialogTitle\n */\nexport const useDialogTitle_unstable = (props: DialogTitleProps, ref: React.Ref<HTMLDivElement>): DialogTitleState => {\n const { action } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const internalStyles = useDialogTitleInternalStyles();\n\n return {\n components: {\n root: 'h2',\n action: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('h2', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props,\n }),\n { elementType: 'h2' },\n ),\n action: slot.optional(action, {\n renderByDefault: modalType === 'non-modal',\n defaultProps: {\n children: (\n <DialogTrigger disableButtonEnhancement action=\"close\">\n <button\n type=\"button\"\n className={internalStyles}\n // TODO: find a better way to add internal labels\n aria-label=\"close\"\n >\n <Dismiss20Regular />\n </button>\n </DialogTrigger>\n ),\n },\n elementType: 'div',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useDialogContext_unstable","Dismiss20Regular","DialogTrigger","useDialogTitleInternalStyles","useDialogTitle_unstable","props","ref","action","modalType","ctx","internalStyles","components","root","always","id","dialogTitleId","elementType","optional","renderByDefault","defaultProps","children","disableButtonEnhancement","button","type","className","aria-label"],"mappings":"AAAA;;;;;+BAmBaO;;;;;;;iEAjBU,QAAQ;gCACgB,4BAA4B;+BAEjC,kCAA+B;4BACxC,wBAAwB;+BAC3B,oCAAiC;4CAClB,mCAAgC;AAWtE,gCAAgC,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,MAAM,EAAE,GAAGF;IACnB,MAAMG,gBAAYR,wCAAAA,EAA0BS,CAAAA,MAAOA,IAAID,SAAS;IAChE,MAAME,qBAAiBP,wDAAAA;IAEvB,OAAO;QACLQ,YAAY;YACVC,MAAM;YACNL,QAAQ;QACV;QACAK,MAAMb,oBAAAA,CAAKc,MAAM,KACff,wCAAAA,EAAyB,MAAM;YAC7BQ;YACAQ,QAAId,wCAAAA,EAA0BS,CAAAA,MAAOA,IAAIM,aAAa;YACtD,GAAGV,KAAK;QACV,IACA;YAAEW,aAAa;QAAK;QAEtBT,QAAQR,oBAAAA,CAAKkB,QAAQ,CAACV,QAAQ;YAC5BW,iBAAiBV,cAAc;YAC/BW,cAAc;gBACZC,UAAAA,WAAAA,GACE,OAAA,aAAA,CAAClB,4BAAAA,EAAAA;oBAAcmB,0BAAAA;oBAAyBd,QAAO;iCAC7C,OAAA,aAAA,CAACe,UAAAA;oBACCC,MAAK;oBACLC,WAAWd;oBACX,iDAAiD;oBACjDe,cAAW;iCAEX,OAAA,aAAA,CAACxB,4BAAAA,EAAAA;YAIT;YACAe,aAAa;QACf;IACF;AACF,EAAE"}
@@ -6,17 +6,17 @@ 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
- dialogTitleClassNames: function() {
13
+ get dialogTitleClassNames () {
14
14
  return dialogTitleClassNames;
15
15
  },
16
- useDialogTitleInternalStyles: function() {
16
+ get useDialogTitleInternalStyles () {
17
17
  return useDialogTitleInternalStyles;
18
18
  },
19
- useDialogTitleStyles_unstable: function() {
19
+ get useDialogTitleStyles_unstable () {
20
20
  return useDialogTitleStyles_unstable;
21
21
  }
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["useDialogTitleStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { typographyStyles } from \"@fluentui/react-theme\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nexport const dialogTitleClassNames = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action'\n};\n/**\n * Styles for the root slot\n */ const useRootResetStyles = makeResetStyles({\n ...typographyStyles.subtitle1,\n margin: 0,\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3\n});\nconst useStyles = makeStyles({\n rootWithoutAction: {\n gridColumnEnd: 4\n }\n});\n/**\n * Styles for the action slot\n */ const useActionResetStyles = makeResetStyles({\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start'\n});\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */ export const useDialogTitleInternalStyles = makeResetStyles({\n ...createFocusOutlineStyle(),\n overflow: 'visible',\n padding: 0,\n borderStyle: 'none',\n position: 'relative',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n cursor: 'pointer',\n lineHeight: 0,\n WebkitAppearance: 'button',\n textAlign: 'unset'\n});\n/**\n * Apply styling to the DialogTitle slots based on the state\n */ export const useDialogTitleStyles_unstable = (state)=>{\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","typographyStyles","createFocusOutlineStyle","dialogTitleClassNames","root","action","useRootResetStyles","useStyles","rootWithoutAction","Bw0ie65","d","useActionResetStyles","useDialogTitleInternalStyles","r","s","useDialogTitleStyles_unstable","state","rootResetStyles","actionResetStyles","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,qBAAqB;;;IA+BjBS,4BAA4B;;;iCAkBC;eAA7BG;;;uBApDyC,gBAAgB;AAGnE,8BAA8B;IACjCX,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE;AACZ,CAAC;AACD;;CAEA,GAAI,MAAMC,kBAAkB,GAAA,WAAA,OAAGR,oBAAA,EAAA,WAAA,MAAA;IAAA;CAO9B,CAAC;AACF,MAAMS,SAAS,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAS,iBAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;KAAA;AAAA,CAIjB,CAAC;AACF;;CAEA,GAAI,MAAMC,oBAAoB,GAAA,WAAA,OAAGb,oBAAA,EAAA,YAAA,MAAA;IAAA;CAMhC,CAAC;AAIS,qCAAkC,WAAA,OAAGA,oBAAA,EAAA,WAAA,WAAA;IAAAe,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAe/C,CAAC;AAGS,uCAAuCE,KAAK,IAAG;IACtD,MAAMC,eAAe,GAAGX,kBAAkB,CAAC,CAAC;IAC5C,MAAMY,iBAAiB,GAAGP,oBAAoB,CAAC,CAAC;IAChD,MAAMQ,MAAM,GAAGZ,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAS,KAAK,CAACZ,IAAI,CAACgB,SAAS,OAAGpB,mBAAY,EAACG,qBAAqB,CAACC,IAAI,EAAEa,eAAe,EAAE,CAACD,KAAK,CAACX,MAAM,IAAIc,MAAM,CAACX,iBAAiB,EAAEQ,KAAK,CAACZ,IAAI,CAACgB,SAAS,CAAC;IACjJ,IAAIJ,KAAK,CAACX,MAAM,EAAE;QACd,oDAAA;QACAW,KAAK,CAACX,MAAM,CAACe,SAAS,OAAGpB,mBAAY,EAACG,qBAAqB,CAACE,MAAM,EAAEa,iBAAiB,EAAEF,KAAK,CAACX,MAAM,CAACe,SAAS,CAAC;IAClH;IACA,OAAOJ,KAAK;AAChB,CAAC"}
1
+ {"version":3,"sources":["useDialogTitleStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { typographyStyles } from \"@fluentui/react-theme\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nexport const dialogTitleClassNames = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action'\n};\n/**\n * Styles for the root slot\n */ const useRootResetStyles = makeResetStyles({\n ...typographyStyles.subtitle1,\n margin: 0,\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3\n});\nconst useStyles = makeStyles({\n rootWithoutAction: {\n gridColumnEnd: 4\n }\n});\n/**\n * Styles for the action slot\n */ const useActionResetStyles = makeResetStyles({\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start'\n});\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */ export const useDialogTitleInternalStyles = makeResetStyles({\n ...createFocusOutlineStyle(),\n overflow: 'visible',\n padding: 0,\n borderStyle: 'none',\n position: 'relative',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n cursor: 'pointer',\n lineHeight: 0,\n WebkitAppearance: 'button',\n textAlign: 'unset'\n});\n/**\n * Apply styling to the DialogTitle slots based on the state\n */ export const useDialogTitleStyles_unstable = (state)=>{\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(dialogTitleClassNames.root, rootResetStyles, !state.action && styles.rootWithoutAction, state.root.className);\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","typographyStyles","createFocusOutlineStyle","dialogTitleClassNames","root","action","useRootResetStyles","useStyles","rootWithoutAction","Bw0ie65","d","useActionResetStyles","useDialogTitleInternalStyles","r","s","useDialogTitleStyles_unstable","state","rootResetStyles","actionResetStyles","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;QAICK,qBAAqB;;;;eA+BjBS,4BAA4B;;QAkB5BG,6BAA6B;;;;uBApDY,gBAAgB;AAGnE,8BAA8B;IACjCX,IAAI,EAAE,iBAAiB;IACvBC,MAAM,EAAE;AACZ,CAAC;AACD;;CAEA,GAAI,MAAMC,kBAAkB,GAAA,WAAA,OAAGR,oBAAA,EAAA,WAAA,MAAA;IAAA;CAO9B,CAAC;AACF,MAAMS,SAAS,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAS,iBAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;KAAA;AAAA,CAIjB,CAAC;AACF;;CAEA,GAAI,MAAMC,oBAAoB,GAAA,WAAA,OAAGb,oBAAA,EAAA,YAAA,MAAA;IAAA;CAMhC,CAAC;AAIS,qCAAkC,WAAA,GAAGA,wBAAA,EAAA,WAAA,WAAA;IAAAe,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAe/C,CAAC;AAGS,uCAAuCE,KAAK,IAAG;IACtD,MAAMC,eAAe,GAAGX,kBAAkB,CAAC,CAAC;IAC5C,MAAMY,iBAAiB,GAAGP,oBAAoB,CAAC,CAAC;IAChD,MAAMQ,MAAM,GAAGZ,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAS,KAAK,CAACZ,IAAI,CAACgB,SAAS,OAAGpB,mBAAY,EAACG,qBAAqB,CAACC,IAAI,EAAEa,eAAe,EAAE,CAACD,KAAK,CAACX,MAAM,IAAIc,MAAM,CAACX,iBAAiB,EAAEQ,KAAK,CAACZ,IAAI,CAACgB,SAAS,CAAC;IACjJ,IAAIJ,KAAK,CAACX,MAAM,EAAE;QACd,oDAAA;QACAW,KAAK,CAACX,MAAM,CAACe,SAAS,OAAGpB,mBAAY,EAACG,qBAAqB,CAACE,MAAM,EAAEa,iBAAiB,EAAEF,KAAK,CAACX,MAAM,CAACe,SAAS,CAAC;IAClH;IACA,OAAOJ,KAAK;AAChB,CAAC"}
@@ -0,0 +1,36 @@
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 dialogTitleClassNames () {
13
+ return dialogTitleClassNames;
14
+ },
15
+ get useDialogTitleInternalStyles () {
16
+ return useDialogTitleInternalStyles;
17
+ },
18
+ get useDialogTitleStyles_unstable () {
19
+ return useDialogTitleStyles_unstable;
20
+ }
21
+ });
22
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
23
+ const _clsx = require("clsx");
24
+ const _DialogTitlemodulecss = /*#__PURE__*/ _interop_require_default._(require("./DialogTitle.module.css"));
25
+ const dialogTitleClassNames = {
26
+ root: 'fui-DialogTitle',
27
+ action: 'fui-DialogTitle__action'
28
+ };
29
+ const useDialogTitleInternalStyles = ()=>_DialogTitlemodulecss.default.internalAction;
30
+ const useDialogTitleStyles_unstable = (state)=>{
31
+ state.root.className = (0, _clsx.clsx)(dialogTitleClassNames.root, _DialogTitlemodulecss.default.root, !state.action && _DialogTitlemodulecss.default.withoutAction, state.root.className);
32
+ if (state.action) {
33
+ state.action.className = (0, _clsx.clsx)(dialogTitleClassNames.action, _DialogTitlemodulecss.default.action, state.action.className);
34
+ }
35
+ return state;
36
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/useDialogTitleStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { DialogTitleState, DialogTitleSlots } from './DialogTitle.types';\nimport styles from './DialogTitle.module.css';\n\nexport const dialogTitleClassNames: SlotClassNames<DialogTitleSlots> = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action',\n};\n\nexport const useDialogTitleInternalStyles = (): string => styles.internalAction;\n\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n state.root.className = clsx(\n dialogTitleClassNames.root,\n styles.root,\n !state.action && styles.withoutAction,\n state.root.className,\n );\n if (state.action) {\n state.action.className = clsx(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"names":["clsx","styles","dialogTitleClassNames","root","action","useDialogTitleInternalStyles","internalAction","useDialogTitleStyles_unstable","state","className","withoutAction"],"mappings":";;;;;;;;;;;QAKaE;;;;;;QAOAK;;;;;sBAZQ,OAAO;+EAGT,2BAA2B;AAEvC,8BAAgE;IACrEJ,MAAM;IACNC,QAAQ;AACV,EAAE;AAEK,MAAMC,+BAA+B,IAAcJ,6BAAAA,CAAOK,cAAc,CAAC;AAEzE,sCAAsC,CAACE;IAC5CA,MAAML,IAAI,CAACM,SAAS,OAAGT,UAAAA,EACrBE,sBAAsBC,IAAI,EAC1BF,6BAAAA,CAAOE,IAAI,EACX,CAACK,MAAMJ,MAAM,IAAIH,6BAAAA,CAAOS,aAAa,EACrCF,MAAML,IAAI,CAACM,SAAS;IAEtB,IAAID,MAAMJ,MAAM,EAAE;QAChBI,MAAMJ,MAAM,CAACK,SAAS,OAAGT,UAAAA,EAAKE,sBAAsBE,MAAM,EAAEH,6BAAAA,CAAOG,MAAM,EAAEI,MAAMJ,MAAM,CAACK,SAAS;IACnG;IACA,OAAOD;AACT,EAAE"}
@@ -6,17 +6,17 @@ 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
- dialogTitleClassNames: function() {
13
+ get dialogTitleClassNames () {
14
14
  return dialogTitleClassNames;
15
15
  },
16
- useDialogTitleInternalStyles: function() {
16
+ get useDialogTitleInternalStyles () {
17
17
  return useDialogTitleInternalStyles;
18
18
  },
19
- useDialogTitleStyles_unstable: function() {
19
+ get useDialogTitleStyles_unstable () {
20
20
  return useDialogTitleStyles_unstable;
21
21
  }
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTitle/useDialogTitleStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nexport const dialogTitleClassNames: SlotClassNames<DialogTitleSlots> = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootResetStyles = makeResetStyles({\n ...typographyStyles.subtitle1,\n margin: 0,\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3,\n});\n\nconst useStyles = makeStyles({\n rootWithoutAction: {\n gridColumnEnd: 4,\n },\n});\n\n/**\n * Styles for the action slot\n */\nconst useActionResetStyles = makeResetStyles({\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start',\n});\n\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = makeResetStyles({\n ...createFocusOutlineStyle(),\n overflow: 'visible',\n padding: 0,\n borderStyle: 'none',\n position: 'relative',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n cursor: 'pointer',\n lineHeight: 0,\n WebkitAppearance: 'button',\n textAlign: 'unset',\n});\n\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n rootResetStyles,\n !state.action && styles.rootWithoutAction,\n state.root.className,\n );\n\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","typographyStyles","createFocusOutlineStyle","dialogTitleClassNames","root","action","useRootResetStyles","subtitle1","margin","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","useStyles","rootWithoutAction","useActionResetStyles","justifySelf","alignSelf","useDialogTitleInternalStyles","overflow","padding","borderStyle","position","boxSizing","backgroundColor","color","fontFamily","fontSize","cursor","lineHeight","WebkitAppearance","textAlign","useDialogTitleStyles_unstable","state","rootResetStyles","actionResetStyles","styles","className"],"mappings":"AAAA;;;;;;;;;;;;IAQaK,qBAAAA;;;gCAsCAe;;;IAoBAc,6BAAAA;;;;uBAhE6C,iBAAiB;4BAG1C,wBAAwB;8BACjB,0BAA0B;AAE3D,8BAAgE;IACrE5B,MAAM;IACNC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,yBAAqBR,sBAAAA,EAAgB;IACzC,GAAGG,4BAAAA,CAAiBM,SAAS;IAC7BC,QAAQ;IACRC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;AACjB;AAEA,MAAMC,gBAAYd,iBAAAA,EAAW;IAC3Be,mBAAmB;QACjBF,eAAe;IACjB;AACF;AAEA;;CAEC,GACD,MAAMG,2BAAuBjB,sBAAAA,EAAgB;IAC3CW,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBK,aAAa;IACbC,WAAW;AACb;AAMO,MAAMC,mCAA+BpB,sBAAAA,EAAgB;IAC1D,OAAGI,qCAAAA,GAAyB;IAC5BiB,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,WAAW;IACXC,iBAAiB;IACjBC,OAAO;IACPC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,YAAY;IACZC,kBAAkB;IAClBC,WAAW;AACb,GAAG;AAKI,sCAAsC,CAACE;IAC5C,MAAMC,kBAAkB5B;IACxB,MAAM6B,oBAAoBpB;IAC1B,MAAMqB,SAASvB;IAEf,oDAAoD;IACpDoB,MAAM7B,IAAI,CAACiC,SAAS,OAAGrC,mBAAAA,EACrBG,sBAAsBC,IAAI,EAC1B8B,iBACA,CAACD,MAAM5B,MAAM,IAAI+B,OAAOtB,iBAAiB,EACzCmB,MAAM7B,IAAI,CAACiC,SAAS;IAGtB,IAAIJ,MAAM5B,MAAM,EAAE;QAChB,oDAAoD;QACpD4B,MAAM5B,MAAM,CAACgC,SAAS,OAAGrC,mBAAAA,EAAaG,sBAAsBE,MAAM,EAAE8B,mBAAmBF,MAAM5B,MAAM,CAACgC,SAAS;IAC/G;IAEA,OAAOJ;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/useDialogTitleStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { DialogTitleSlots, DialogTitleState } from './DialogTitle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\nexport const dialogTitleClassNames: SlotClassNames<DialogTitleSlots> = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootResetStyles = makeResetStyles({\n ...typographyStyles.subtitle1,\n margin: 0,\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3,\n});\n\nconst useStyles = makeStyles({\n rootWithoutAction: {\n gridColumnEnd: 4,\n },\n});\n\n/**\n * Styles for the action slot\n */\nconst useActionResetStyles = makeResetStyles({\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start',\n});\n\n/**\n * Styles to be applied on internal elements used by default action on non-modal Dialog\n * @internal\n */\nexport const useDialogTitleInternalStyles = makeResetStyles({\n ...createFocusOutlineStyle(),\n overflow: 'visible',\n padding: 0,\n borderStyle: 'none',\n position: 'relative',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n cursor: 'pointer',\n lineHeight: 0,\n WebkitAppearance: 'button',\n textAlign: 'unset',\n});\n\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n const rootResetStyles = useRootResetStyles();\n const actionResetStyles = useActionResetStyles();\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n rootResetStyles,\n !state.action && styles.rootWithoutAction,\n state.root.className,\n );\n\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(dialogTitleClassNames.action, actionResetStyles, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","typographyStyles","createFocusOutlineStyle","dialogTitleClassNames","root","action","useRootResetStyles","subtitle1","margin","gridRowStart","gridRowEnd","gridColumnStart","gridColumnEnd","useStyles","rootWithoutAction","useActionResetStyles","justifySelf","alignSelf","useDialogTitleInternalStyles","overflow","padding","borderStyle","position","boxSizing","backgroundColor","color","fontFamily","fontSize","cursor","lineHeight","WebkitAppearance","textAlign","useDialogTitleStyles_unstable","state","rootResetStyles","actionResetStyles","styles","className"],"mappings":"AAAA;;;;;;;;;;;;QAQaK;;;;eAsCAe;;QAoBAc;;;;uBAhE6C,iBAAiB;4BAG1C,wBAAwB;8BACjB,0BAA0B;AAE3D,8BAAgE;IACrE5B,MAAM;IACNC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,yBAAqBR,sBAAAA,EAAgB;IACzC,GAAGG,4BAAAA,CAAiBM,SAAS;IAC7BC,QAAQ;IACRC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;AACjB;AAEA,MAAMC,gBAAYd,iBAAAA,EAAW;IAC3Be,mBAAmB;QACjBF,eAAe;IACjB;AACF;AAEA;;CAEC,GACD,MAAMG,2BAAuBjB,sBAAAA,EAAgB;IAC3CW,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBK,aAAa;IACbC,WAAW;AACb;AAMO,yCAAqCnB,sBAAAA,EAAgB;IAC1D,OAAGI,qCAAAA,GAAyB;IAC5BiB,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,WAAW;IACXC,iBAAiB;IACjBC,OAAO;IACPC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC,YAAY;IACZC,kBAAkB;IAClBC,WAAW;AACb,GAAG;AAKI,sCAAsC,CAACE;IAC5C,MAAMC,kBAAkB5B;IACxB,MAAM6B,oBAAoBpB;IAC1B,MAAMqB,SAASvB;IAEf,oDAAoD;IACpDoB,MAAM7B,IAAI,CAACiC,SAAS,OAAGrC,mBAAAA,EACrBG,sBAAsBC,IAAI,EAC1B8B,iBACA,CAACD,MAAM5B,MAAM,IAAI+B,OAAOtB,iBAAiB,EACzCmB,MAAM7B,IAAI,CAACiC,SAAS;IAGtB,IAAIJ,MAAM5B,MAAM,EAAE;QAChB,oDAAoD;QACpD4B,MAAM5B,MAAM,CAACgC,SAAS,OAAGrC,mBAAAA,EAAaG,sBAAsBE,MAAM,EAAE8B,mBAAmBF,MAAM5B,MAAM,CAACgC,SAAS;IAC/G;IAEA,OAAOJ;AACT,EAAE"}
@@ -0,0 +1,36 @@
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 dialogTitleClassNames () {
13
+ return dialogTitleClassNames;
14
+ },
15
+ get useDialogTitleInternalStyles () {
16
+ return useDialogTitleInternalStyles;
17
+ },
18
+ get useDialogTitleStyles_unstable () {
19
+ return useDialogTitleStyles_unstable;
20
+ }
21
+ });
22
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
23
+ const _clsx = require("clsx");
24
+ const _DialogTitlemodulecss = /*#__PURE__*/ _interop_require_default._(require("./DialogTitle.module.css"));
25
+ const dialogTitleClassNames = {
26
+ root: 'fui-DialogTitle',
27
+ action: 'fui-DialogTitle__action'
28
+ };
29
+ const useDialogTitleInternalStyles = ()=>_DialogTitlemodulecss.default.internalAction;
30
+ const useDialogTitleStyles_unstable = (state)=>{
31
+ state.root.className = (0, _clsx.clsx)(dialogTitleClassNames.root, _DialogTitlemodulecss.default.root, !state.action && _DialogTitlemodulecss.default.withoutAction, state.root.className);
32
+ if (state.action) {
33
+ state.action.className = (0, _clsx.clsx)(dialogTitleClassNames.action, _DialogTitlemodulecss.default.action, state.action.className);
34
+ }
35
+ return state;
36
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/DialogTitle/useDialogTitleStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { DialogTitleState, DialogTitleSlots } from './DialogTitle.types';\nimport styles from './DialogTitle.module.css';\n\nexport const dialogTitleClassNames: SlotClassNames<DialogTitleSlots> = {\n root: 'fui-DialogTitle',\n action: 'fui-DialogTitle__action',\n};\n\nexport const useDialogTitleInternalStyles = (): string => styles.internalAction;\n\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n state.root.className = clsx(\n dialogTitleClassNames.root,\n styles.root,\n !state.action && styles.withoutAction,\n state.root.className,\n );\n if (state.action) {\n state.action.className = clsx(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"names":["clsx","styles","dialogTitleClassNames","root","action","useDialogTitleInternalStyles","internalAction","useDialogTitleStyles_unstable","state","className","withoutAction"],"mappings":";;;;;;;;;;;QAKaE;;;;;;QAOAK;;;;;sBAZQ,OAAO;+EAGT,2BAA2B;AAEvC,8BAAgE;IACrEJ,MAAM;IACNC,QAAQ;AACV,EAAE;AAEK,MAAMC,+BAA+B,IAAcJ,6BAAAA,CAAOK,cAAc,CAAC;AAEzE,sCAAsC,CAACE;IAC5CA,MAAML,IAAI,CAACM,SAAS,OAAGT,UAAAA,EACrBE,sBAAsBC,IAAI,EAC1BF,6BAAAA,CAAOE,IAAI,EACX,CAACK,MAAMJ,MAAM,IAAIH,6BAAAA,CAAOS,aAAa,EACrCF,MAAML,IAAI,CAACM,SAAS;IAEtB,IAAID,MAAMJ,MAAM,EAAE;QAChBI,MAAMJ,MAAM,CAACK,SAAS,OAAGT,UAAAA,EAAKE,sBAAsBE,MAAM,EAAEH,6BAAAA,CAAOG,MAAM,EAAEI,MAAMJ,MAAM,CAACK,SAAS;IACnG;IACA,OAAOD;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTrigger/DialogTrigger.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useDialogTrigger_unstable } from './useDialogTrigger';\nimport { renderDialogTrigger_unstable } from './renderDialogTrigger';\nimport type { DialogTriggerProps } from './DialogTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will open or close a `Dialog`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Dialog`\n * Besides being a trigger that opens/close a dialog through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of the `Dialog` component.\n */\nexport const DialogTrigger: React.FC<DialogTriggerProps> = props => {\n const state = useDialogTrigger_unstable(props);\n\n return renderDialogTrigger_unstable(state);\n};\n\nDialogTrigger.displayName = 'DialogTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(DialogTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"names":["useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogTrigger","props","state","displayName","isFluentTriggerComponent"],"mappings":"AAAA;;;;;;;;;;;kCAG0C,wBAAqB;qCAClB,2BAAwB;AAa9D,MAAME,gBAA8CC,CAAAA;IACzD,MAAMC,YAAQJ,2CAAAA,EAA0BG;IAExC,WAAOF,iDAAAA,EAA6BG;AACtC,EAAE;AAEFF,cAAcG,WAAW,GAAG;AAC5B,6FAA6F;AAC5FH,cAAyCI,wBAAwB,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/DialogTrigger/DialogTrigger.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useDialogTrigger_unstable } from './useDialogTrigger';\nimport { renderDialogTrigger_unstable } from './renderDialogTrigger';\nimport type { DialogTriggerProps } from './DialogTrigger.types';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\n\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will open or close a `Dialog`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Dialog`\n * Besides being a trigger that opens/close a dialog through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of the `Dialog` component.\n */\nexport const DialogTrigger: React.FC<DialogTriggerProps> = props => {\n const state = useDialogTrigger_unstable(props);\n\n return renderDialogTrigger_unstable(state);\n};\n\nDialogTrigger.displayName = 'DialogTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(DialogTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"names":["useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogTrigger","props","state","displayName","isFluentTriggerComponent"],"mappings":"AAAA;;;;;;;;;;;kCAG0C,wBAAqB;qCAClB,2BAAwB;AAa9D,MAAME,gBAA8CC,CAAAA;IACzD,MAAMC,YAAQJ,2CAAAA,EAA0BG;IAExC,WAAOF,iDAAAA,EAA6BG;AACtC,EAAE;AAEFF,cAAcG,WAAW,GAAG;AAC5B,6FAA6F;AAC5FH,cAAyCI,wBAAwB,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTrigger/DialogTrigger.types.ts"],"sourcesContent":["import type { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nexport type DialogTriggerAction = 'open' | 'close';\n\nexport type DialogTriggerProps = TriggerProps<DialogTriggerChildProps> & {\n /**\n * Explicitly declare if the trigger is responsible for opening or\n * closing a Dialog visibility state.\n *\n * If `DialogTrigger` is outside `DialogSurface` then it'll be `open` by default\n *\n * If `DialogTrigger` is inside `DialogSurface` then it'll be `close` by default\n */\n action?: DialogTriggerAction;\n /**\n * Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.\n * @default false\n */\n disableButtonEnhancement?: boolean;\n};\n\n/**\n * Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog\n */\nexport type DialogTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<\n Type,\n Props & {\n 'aria-haspopup'?: 'dialog';\n }\n>;\n\nexport type DialogTriggerState = {\n children: React.ReactElement | null;\n};\n"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../../../src/components/DialogTrigger/DialogTrigger.types.ts"],"sourcesContent":["import type { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport type * as React from 'react';\n\nexport type DialogTriggerAction = 'open' | 'close';\n\nexport type DialogTriggerProps = TriggerProps<DialogTriggerChildProps> & {\n /**\n * Explicitly declare if the trigger is responsible for opening or\n * closing a Dialog visibility state.\n *\n * If `DialogTrigger` is outside `DialogSurface` then it'll be `open` by default\n *\n * If `DialogTrigger` is inside `DialogSurface` then it'll be `close` by default\n */\n action?: DialogTriggerAction;\n /**\n * Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.\n * @default false\n */\n disableButtonEnhancement?: boolean;\n};\n\n/**\n * Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog\n */\nexport type DialogTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<\n Type,\n Props & {\n 'aria-haspopup'?: 'dialog';\n }\n>;\n\nexport type DialogTriggerState = {\n children: React.ReactElement | null;\n};\n"],"names":[],"mappings":""}
@@ -5,17 +5,17 @@ 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
- DialogTrigger: function() {
12
+ get DialogTrigger () {
13
13
  return _DialogTrigger.DialogTrigger;
14
14
  },
15
- renderDialogTrigger_unstable: function() {
15
+ get renderDialogTrigger_unstable () {
16
16
  return _renderDialogTrigger.renderDialogTrigger_unstable;
17
17
  },
18
- useDialogTrigger_unstable: function() {
18
+ get useDialogTrigger_unstable () {
19
19
  return _useDialogTrigger.useDialogTrigger_unstable;
20
20
  }
21
21
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTrigger/index.ts"],"sourcesContent":["export { DialogTrigger } from './DialogTrigger';\nexport type {\n DialogTriggerAction,\n DialogTriggerChildProps,\n DialogTriggerProps,\n DialogTriggerState,\n} from './DialogTrigger.types';\nexport { renderDialogTrigger_unstable } from './renderDialogTrigger';\nexport { useDialogTrigger_unstable } from './useDialogTrigger';\n"],"names":["DialogTrigger","renderDialogTrigger_unstable","useDialogTrigger_unstable"],"mappings":";;;;;;;;;;;;eAASA,4BAAa;;;eAObC,iDAA4B;;;eAC5BC,2CAAyB;;;+BARJ,qBAAkB;qCAOH,2BAAwB;kCAC3B,wBAAqB"}
1
+ {"version":3,"sources":["../../../src/components/DialogTrigger/index.ts"],"sourcesContent":["export { DialogTrigger } from './DialogTrigger';\nexport type {\n DialogTriggerAction,\n DialogTriggerChildProps,\n DialogTriggerProps,\n DialogTriggerState,\n} from './DialogTrigger.types';\nexport { renderDialogTrigger_unstable } from './renderDialogTrigger';\nexport { useDialogTrigger_unstable } from './useDialogTrigger';\n"],"names":["DialogTrigger","renderDialogTrigger_unstable","useDialogTrigger_unstable"],"mappings":";;;;;;;;;;;;eAASA,4BAAa;;;eAObC,iDAA4B;;;eAC5BC,2CAAyB;;;+BARJ,qBAAkB;qCAOH,2BAAwB;kCAC3B,wBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTrigger/renderDialogTrigger.tsx"],"sourcesContent":["import type { DialogTriggerState } from './DialogTrigger.types';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of MenuTrigger\n *\n * Only renders children\n */\nexport const renderDialogTrigger_unstable = (state: DialogTriggerState): JSXElement | null => state.children;\n"],"names":["renderDialogTrigger_unstable","state","children"],"mappings":"AAGA;;;;CAIC,GACD;;;;;;;;;;AAAO,MAAMA,+BAA+B,CAACC,QAAiDA,MAAMC,QAAQ,CAAC"}
1
+ {"version":3,"sources":["../../../src/components/DialogTrigger/renderDialogTrigger.tsx"],"sourcesContent":["import type { DialogTriggerState } from './DialogTrigger.types';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of MenuTrigger\n *\n * Only renders children\n */\nexport const renderDialogTrigger_unstable = (state: DialogTriggerState): JSXElement | null => state.children;\n"],"names":["renderDialogTrigger_unstable","state","children"],"mappings":"AAGA;;;;CAIC,GACD;;;;;;;;;;AAAO,MAAMA,+BAA+B,CAACC,QAAiDA,MAAMC,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/DialogTrigger/useDialogTrigger.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n getReactElementRef,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport type { DialogTriggerProps, DialogTriggerState } from './DialogTrigger.types';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */\nexport const useDialogTrigger_unstable = (props: DialogTriggerProps): DialogTriggerState => {\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n\n const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;\n\n const child = getTriggerChild(children);\n\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const { triggerAttributes } = useModalAttributes();\n\n const handleClick = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open',\n });\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: getReactElementRef<HTMLAnchorElement>(child),\n onClick: handleClick,\n ...triggerAttributes,\n } as const;\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"names":["applyTriggerPropsToChildren","getTriggerChild","getReactElementRef","useEventCallback","useDialogContext_unstable","useDialogSurfaceContext_unstable","useARIAButtonProps","useModalAttributes","useDialogTrigger_unstable","props","isInsideSurfaceDialog","children","disableButtonEnhancement","action","child","requestOpenChange","ctx","triggerAttributes","handleClick","event","onClick","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps"],"mappings":"AAAA;;;;;+BAoBaQ;;;;;;gCAZN,4BAA4B;uBAEyC,0BAAiB;2BAC1D,uBAAuB;8BACvB,0BAA0B;AAQtD,kCAAkC,CAACC;IACxC,MAAMC,4BAAwBL,uCAAAA;IAE9B,MAAM,EAAEM,QAAQ,EAAEC,2BAA2B,KAAK,EAAEC,SAASH,wBAAwB,UAAU,MAAM,EAAE,GAAGD;IAE1G,MAAMK,QAAQb,mCAAAA,EAAgBU;IAE9B,MAAMI,wBAAoBX,gCAAAA,EAA0BY,CAAAA,MAAOA,IAAID,iBAAiB;IAChF,MAAM,EAAEE,iBAAiB,EAAE,OAAGV,gCAAAA;IAE9B,MAAMW,cAAcf,oCAAAA,EAClB,CAACgB;YACCL,sBAAAA;QAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,uBAAAA,CAAAA,eAAAA,MAAOL,KAAAA,AAAK,EAACW,OAAO,AAAPA,MAAO,QAApBN,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAAA,IAAAA,CAAAA,cAAuBK;QACvB,IAAI,CAACA,MAAME,kBAAkB,IAAI;YAC/BN,kBAAkB;gBAChBI;gBACAG,MAAM;gBACNC,MAAMV,WAAW;YACnB;QACF;IACF;IAGF,MAAMW,oBAAoB;WACrBV,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOL,KAAV;QACAgB,SAAKvB,kCAAAA,EAAsCY;QAC3CM,SAASF;QACT,GAAGD,iBAAiB;IACtB;IAEA,MAAMS,kCAA8BpB,6BAAAA,EAClCQ,CAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,YAAYR,CAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,MAAMR,MAAMQ,IAAI,GAAG,OAC/D;QACE,GAAGE,iBAAiB;QACpBF,MAAM;IACR;IAGF,OAAO;QACLX,cAAUX,2CAAAA,EACRW,UACAC,2BAA2BY,oBAAoBE;IAEnD;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/DialogTrigger/useDialogTrigger.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n getReactElementRef,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport type { DialogTriggerProps, DialogTriggerState } from './DialogTrigger.types';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */\nexport const useDialogTrigger_unstable = (props: DialogTriggerProps): DialogTriggerState => {\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n\n const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;\n\n const child = getTriggerChild(children);\n\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const { triggerAttributes } = useModalAttributes();\n\n const handleClick = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open',\n });\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: getReactElementRef<HTMLAnchorElement>(child),\n onClick: handleClick,\n ...triggerAttributes,\n } as const;\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"names":["applyTriggerPropsToChildren","getTriggerChild","getReactElementRef","useEventCallback","useDialogContext_unstable","useDialogSurfaceContext_unstable","useARIAButtonProps","useModalAttributes","useDialogTrigger_unstable","props","isInsideSurfaceDialog","children","disableButtonEnhancement","action","child","requestOpenChange","ctx","triggerAttributes","handleClick","event","onClick","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps"],"mappings":"AAAA;;;;;+BAoBaQ;;;;;;gCAZN,4BAA4B;uBAEyC,0BAAiB;2BAC1D,uBAAuB;8BACvB,0BAA0B;AAQtD,kCAAkC,CAACC;IACxC,MAAMC,4BAAwBL,uCAAAA;IAE9B,MAAM,EAAEM,QAAQ,EAAEC,2BAA2B,KAAK,EAAEC,SAASH,wBAAwB,UAAU,MAAM,EAAE,GAAGD;IAE1G,MAAMK,QAAQb,mCAAAA,EAAgBU;IAE9B,MAAMI,wBAAoBX,gCAAAA,EAA0BY,CAAAA,MAAOA,IAAID,iBAAiB;IAChF,MAAM,EAAEE,iBAAiB,EAAE,OAAGV,gCAAAA;IAE9B,MAAMW,cAAcf,oCAAAA,EAClB,CAACgB;YACCL,sBAAAA;QAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,uBAAAA,CAAAA,eAAAA,MAAOL,KAAAA,AAAK,EAACW,OAAO,AAAPA,MAAO,QAApBN,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAAA,IAAAA,CAAAA,cAAuBK;QACvB,IAAI,CAACA,MAAME,kBAAkB,IAAI;YAC/BN,kBAAkB;gBAChBI;gBACAG,MAAM;gBACNC,MAAMV,WAAW;YACnB;QACF;IACF;IAGF,MAAMW,oBAAoB;WACrBV,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOL,KAAV;QACAgB,SAAKvB,kCAAAA,EAAsCY;QAC3CM,SAASF;QACT,GAAGD,iBAAiB;IACtB;IAEA,MAAMS,kCAA8BpB,6BAAAA,EAClCQ,CAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,YAAYR,CAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,MAAMR,MAAMQ,IAAI,GAAG,OAC/D;QACE,GAAGE,iBAAiB;QACpBF,MAAM;IACR;IAGF,OAAO;QACLX,cAAUX,2CAAAA,EACRW,UACAC,2BAA2BY,oBAAoBE;IAEnD;AACF,EAAE"}
@@ -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
- DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
12
+ get DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET () {
13
13
  return DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
14
14
  },
15
- DIALOG_GAP: function() {
15
+ get DIALOG_GAP () {
16
16
  return DIALOG_GAP;
17
17
  },
18
- DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
18
+ get DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR () {
19
19
  return DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR;
20
20
  },
21
- DIALOG_MEDIA_QUERY_SHORT_SCREEN: function() {
21
+ get DIALOG_MEDIA_QUERY_SHORT_SCREEN () {
22
22
  return DIALOG_MEDIA_QUERY_SHORT_SCREEN;
23
23
  },
24
- SURFACE_BORDER_WIDTH: function() {
24
+ get SURFACE_BORDER_WIDTH () {
25
25
  return SURFACE_BORDER_WIDTH;
26
26
  },
27
- SURFACE_PADDING: function() {
27
+ get SURFACE_PADDING () {
28
28
  return SURFACE_PADDING;
29
29
  }
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/constants.ts"],"sourcesContent":["export const DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR = '@media screen and (max-width: 480px)';\nexport const DIALOG_MEDIA_QUERY_SHORT_SCREEN = '@media screen and (max-height: 359px)';\nexport const SURFACE_PADDING = '24px';\nexport const DIALOG_GAP = '8px';\nexport const SURFACE_BORDER_WIDTH = '1px';\nexport const DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET = '4px';\n"],"names":["DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_PADDING","DIALOG_GAP","SURFACE_BORDER_WIDTH","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET"],"mappings":";;;;;;;;;;;6CAKaK;;;IAFAF,UAAAA;;;0CAHAH;;;mCACAC;;;wBAGAG;;;mBAFAF;;;;AAFN,MAAMF,yCAAyC,uCAAuC;AACtF,MAAMC,kCAAkC,wCAAwC;AAChF,MAAMC,kBAAkB,OAAO;AAC/B,mBAAmB,MAAM;AACzB,MAAME,uBAAuB,MAAM;AACnC,MAAMC,4CAA4C,MAAM"}
1
+ {"version":3,"sources":["../../src/contexts/constants.ts"],"sourcesContent":["export const DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR = '@media screen and (max-width: 480px)';\nexport const DIALOG_MEDIA_QUERY_SHORT_SCREEN = '@media screen and (max-height: 359px)';\nexport const SURFACE_PADDING = '24px';\nexport const DIALOG_GAP = '8px';\nexport const SURFACE_BORDER_WIDTH = '1px';\nexport const DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET = '4px';\n"],"names":["DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_PADDING","DIALOG_GAP","SURFACE_BORDER_WIDTH","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,yCAAyC,uCAAuC;AACtF,MAAMC,kCAAkC,wCAAwC;AAChF,MAAMC,kBAAkB,OAAO;AAC/B,MAAMC,aAAa,MAAM;AACzB,MAAMC,uBAAuB,MAAM;AACnC,MAAMC,4CAA4C,MAAM"}
@@ -6,17 +6,17 @@ 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
- DialogBackdropContext: function() {
13
+ get DialogBackdropContext () {
14
14
  return DialogBackdropContext;
15
15
  },
16
- DialogBackdropProvider: function() {
16
+ get DialogBackdropProvider () {
17
17
  return DialogBackdropProvider;
18
18
  },
19
- useDialogBackdropContext_unstable: function() {
19
+ get useDialogBackdropContext_unstable () {
20
20
  return useDialogBackdropContext_unstable;
21
21
  }
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/dialogBackdropContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type DialogBackdropContextValue = boolean;\n\nexport const DialogBackdropContext = React.createContext<DialogBackdropContextValue | undefined>(undefined);\n\nexport const DialogBackdropProvider = DialogBackdropContext.Provider;\n\nexport const useDialogBackdropContext_unstable = (): DialogBackdropContextValue | undefined => {\n return React.useContext(DialogBackdropContext);\n};\n"],"names":["React","DialogBackdropContext","createContext","undefined","DialogBackdropProvider","Provider","useDialogBackdropContext_unstable","useContext"],"mappings":"AAAA;;;;;;;;;;;;yBAMaC;;;0BAEAG;;;qCAEAE;;;;;iEARU,QAAQ;AAIxB,MAAML,sCAAwBD,OAAME,aAAa,CAAyCC,WAAW;AAErG,MAAMC,yBAAyBH,sBAAsBI,QAAQ,CAAC;AAE9D,MAAMC,oCAAoC;IAC/C,OAAON,OAAMO,UAAU,CAACN;AAC1B,EAAE"}
1
+ {"version":3,"sources":["../../src/contexts/dialogBackdropContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type DialogBackdropContextValue = boolean;\n\nexport const DialogBackdropContext = React.createContext<DialogBackdropContextValue | undefined>(undefined);\n\nexport const DialogBackdropProvider = DialogBackdropContext.Provider;\n\nexport const useDialogBackdropContext_unstable = (): DialogBackdropContextValue | undefined => {\n return React.useContext(DialogBackdropContext);\n};\n"],"names":["React","DialogBackdropContext","createContext","undefined","DialogBackdropProvider","Provider","useDialogBackdropContext_unstable","useContext"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;iEAEuB,QAAQ;AAIxB,MAAMC,sCAAwBD,OAAME,aAAa,CAAyCC,WAAW;AAErG,MAAMC,yBAAyBH,sBAAsBI,QAAQ,CAAC;AAE9D,MAAMC,oCAAoC;IAC/C,OAAON,OAAMO,UAAU,CAACN;AAC1B,EAAE"}
@@ -6,17 +6,17 @@ 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
- DialogContext: function() {
13
+ get DialogContext () {
14
14
  return DialogContext;
15
15
  },
16
- DialogProvider: function() {
16
+ get DialogProvider () {
17
17
  return DialogProvider;
18
18
  },
19
- useDialogContext_unstable: function() {
19
+ get useDialogContext_unstable () {
20
20
  return useDialogContext_unstable;
21
21
  }
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/dialogContext.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\nimport type { useModalAttributes } from '@fluentui/react-tabster';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement | null>;\n unmountOnClose?: boolean;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n} & Partial<ReturnType<typeof useModalAttributes>>;\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n unmountOnClose: true,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","defaultContextValue","open","inertTrapFocus","modalType","isNestedDialog","unmountOnClose","dialogRef","current","requestOpenChange","DialogContext","undefined","DialogProvider","Provider","useDialogContext_unstable","selector","ctx"],"mappings":"AAAA;;;;;;;;;;;;iBAoCaW;;;kBAIAE;;;6BACAE;;;;sCAtCqC,mCAAmC;AAoBrF,MAAMb,sBAA0C;IAC9CC,MAAM;IACNC,gBAAgB;IAChBC,WAAW;IACXC,gBAAgB;IAChBC,gBAAgB;IAChBC,WAAW;QAAEC,SAAS;IAAK;IAC3BC;IACE,QAAQ,GACV;AACF;AAGO,MAAMC,oBAAyDX,mCAAAA,EACpEY,WACA;AAEK,MAAMC,iBAAiBF,cAAcG,QAAQ,CAAC;AAC9C,MAAMC,4BAA4B,CAAIC,eAC3Cf,wCAAAA,EAAmBU,eAAe,CAACM,MAAMf,mBAAmB,GAAKc,SAASC,MAAM"}
1
+ {"version":3,"sources":["../../src/contexts/dialogContext.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\nimport type { useModalAttributes } from '@fluentui/react-tabster';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement | null>;\n unmountOnClose?: boolean;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n} & Partial<ReturnType<typeof useModalAttributes>>;\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n unmountOnClose: true,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","defaultContextValue","open","inertTrapFocus","modalType","isNestedDialog","unmountOnClose","dialogRef","current","requestOpenChange","DialogContext","undefined","DialogProvider","Provider","useDialogContext_unstable","selector","ctx"],"mappings":"AAAA;;;;;;;;;;;;QAoCaW;;;;;;;;;;sCAjCqC,mCAAmC;AAoBrF,MAAMT,sBAA0C;IAC9CC,MAAM;IACNC,gBAAgB;IAChBC,WAAW;IACXC,gBAAgB;IAChBC,gBAAgB;IAChBC,WAAW;QAAEC,SAAS;IAAK;IAC3BC;IACE,QAAQ,GACV;AACF;AAGO,0BAA+DV,mCAAAA,EACpEY,WACA;AAEK,MAAMC,iBAAiBF,cAAcG,QAAQ,CAAC;AAC9C,MAAMC,4BAA4B,CAAIC,eAC3Cf,wCAAAA,EAAmBU,eAAe,CAACM,MAAMf,mBAAmB,GAAKc,SAASC,MAAM"}
@@ -6,17 +6,17 @@ 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
- DialogSurfaceContext: function() {
13
+ get DialogSurfaceContext () {
14
14
  return DialogSurfaceContext;
15
15
  },
16
- DialogSurfaceProvider: function() {
16
+ get DialogSurfaceProvider () {
17
17
  return DialogSurfaceProvider;
18
18
  },
19
- useDialogSurfaceContext_unstable: function() {
19
+ get useDialogSurfaceContext_unstable () {
20
20
  return useDialogSurfaceContext_unstable;
21
21
  }
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/dialogSurfaceContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type DialogSurfaceContextValue = boolean;\n\nconst defaultContextValue: DialogSurfaceContextValue = false;\n\nexport const DialogSurfaceContext = React.createContext<DialogSurfaceContextValue | undefined>(undefined);\n\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\n\nexport const useDialogSurfaceContext_unstable = (): DialogSurfaceContextValue =>\n React.useContext(DialogSurfaceContext) ?? defaultContextValue;\n"],"names":["React","defaultContextValue","DialogSurfaceContext","createContext","undefined","DialogSurfaceProvider","Provider","useDialogSurfaceContext_unstable","useContext"],"mappings":"AAAA;;;;;;;;;;;;wBAQaE;;;yBAEAG;;;oCAEAE;;;;;iEAVU,QAAQ;AAI/B,MAAMN,sBAAiD;AAEhD,MAAMC,qCAAuBF,OAAMG,aAAa,CAAwCC,WAAW;AAEnG,MAAMC,wBAAwBH,qBAAqBI,QAAQ,CAAC;AAE5D,MAAMC,mCAAmC;QAC9CP;WAAAA,CAAAA,oBAAAA,OAAMQ,UAAU,CAACN,qBAAAA,MAAAA,QAAjBF,sBAAAA,KAAAA,IAAAA,oBAA0CC;EAAoB"}
1
+ {"version":3,"sources":["../../src/contexts/dialogSurfaceContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type DialogSurfaceContextValue = boolean;\n\nconst defaultContextValue: DialogSurfaceContextValue = false;\n\nexport const DialogSurfaceContext = React.createContext<DialogSurfaceContextValue | undefined>(undefined);\n\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\n\nexport const useDialogSurfaceContext_unstable = (): DialogSurfaceContextValue =>\n React.useContext(DialogSurfaceContext) ?? defaultContextValue;\n"],"names":["React","defaultContextValue","DialogSurfaceContext","createContext","undefined","DialogSurfaceProvider","Provider","useDialogSurfaceContext_unstable","useContext"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;iEAEuB,QAAQ;AAI/B,MAAMC,sBAAiD;AAEhD,MAAMC,qCAAuBF,OAAMG,aAAa,CAAwCC,WAAW;AAEnG,MAAMC,wBAAwBH,qBAAqBI,QAAQ,CAAC;AAE5D,MAAMC,mCAAmC;QAC9CP;YAAAA,oBAAAA,OAAMQ,UAAU,CAACN,qBAAAA,MAAAA,QAAjBF,sBAAAA,KAAAA,IAAAA,oBAA0CC;EAAoB"}
@@ -5,53 +5,53 @@ 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
- DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
12
+ get DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET () {
13
13
  return _constants.DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
14
14
  },
15
- DIALOG_GAP: function() {
15
+ get DIALOG_GAP () {
16
16
  return _constants.DIALOG_GAP;
17
17
  },
18
- DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
18
+ get DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR () {
19
19
  return _constants.DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR;
20
20
  },
21
- DIALOG_MEDIA_QUERY_SHORT_SCREEN: function() {
21
+ get DIALOG_MEDIA_QUERY_SHORT_SCREEN () {
22
22
  return _constants.DIALOG_MEDIA_QUERY_SHORT_SCREEN;
23
23
  },
24
- DialogBackdropContext: function() {
24
+ get DialogBackdropContext () {
25
25
  return _dialogBackdropContext.DialogBackdropContext;
26
26
  },
27
- DialogBackdropProvider: function() {
27
+ get DialogBackdropProvider () {
28
28
  return _dialogBackdropContext.DialogBackdropProvider;
29
29
  },
30
- DialogContext: function() {
30
+ get DialogContext () {
31
31
  return _dialogContext.DialogContext;
32
32
  },
33
- DialogProvider: function() {
33
+ get DialogProvider () {
34
34
  return _dialogContext.DialogProvider;
35
35
  },
36
- DialogSurfaceContext: function() {
36
+ get DialogSurfaceContext () {
37
37
  return _dialogSurfaceContext.DialogSurfaceContext;
38
38
  },
39
- DialogSurfaceProvider: function() {
39
+ get DialogSurfaceProvider () {
40
40
  return _dialogSurfaceContext.DialogSurfaceProvider;
41
41
  },
42
- SURFACE_BORDER_WIDTH: function() {
42
+ get SURFACE_BORDER_WIDTH () {
43
43
  return _constants.SURFACE_BORDER_WIDTH;
44
44
  },
45
- SURFACE_PADDING: function() {
45
+ get SURFACE_PADDING () {
46
46
  return _constants.SURFACE_PADDING;
47
47
  },
48
- useDialogBackdropContext_unstable: function() {
48
+ get useDialogBackdropContext_unstable () {
49
49
  return _dialogBackdropContext.useDialogBackdropContext_unstable;
50
50
  },
51
- useDialogContext_unstable: function() {
51
+ get useDialogContext_unstable () {
52
52
  return _dialogContext.useDialogContext_unstable;
53
53
  },
54
- useDialogSurfaceContext_unstable: function() {
54
+ get useDialogSurfaceContext_unstable () {
55
55
  return _dialogSurfaceContext.useDialogSurfaceContext_unstable;
56
56
  }
57
57
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export {\n DIALOG_GAP,\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 './constants';\nexport type { DialogContextValue } from './dialogContext';\nexport { DialogContext, DialogProvider, useDialogContext_unstable } from './dialogContext';\nexport type { DialogSurfaceContextValue } from './dialogSurfaceContext';\nexport type { DialogBackdropContextValue } from './dialogBackdropContext';\nexport { DialogSurfaceContext, DialogSurfaceProvider, useDialogSurfaceContext_unstable } from './dialogSurfaceContext';\nexport {\n DialogBackdropContext,\n DialogBackdropProvider,\n useDialogBackdropContext_unstable,\n} from './dialogBackdropContext';\n"],"names":["DIALOG_GAP","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","DialogContext","DialogProvider","useDialogContext_unstable","DialogSurfaceContext","DialogSurfaceProvider","useDialogSurfaceContext_unstable","DialogBackdropContext","DialogBackdropProvider","useDialogBackdropContext_unstable"],"mappings":";;;;;;;;;;;IAEEC,yCAAyC;;;;eADzCD,qBAAU;;;eAEVE,iDAAsC;;;eACtCC,0CAA+B;;;eAU/BS,4CAAqB;;;eACrBC,6CAAsB;;;eANfP,4BAAa;;;eAAEC,6BAAc;;;eAG7BE,0CAAoB;;;eAAEC,2CAAqB;;;eAPlDN,+BAAoB;;mBACL;eAAfC;;;eAUAS,wDAAiC;;;eAPKN,wCAAyB;;;eAGXG,sDAAgC;;;2BAL/E,iBAAc;+BAEoD,qBAAkB;sCAGG,4BAAyB;uCAKhH,6BAA0B"}
1
+ {"version":3,"sources":["../../src/contexts/index.ts"],"sourcesContent":["export {\n DIALOG_GAP,\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 './constants';\nexport type { DialogContextValue } from './dialogContext';\nexport { DialogContext, DialogProvider, useDialogContext_unstable } from './dialogContext';\nexport type { DialogSurfaceContextValue } from './dialogSurfaceContext';\nexport type { DialogBackdropContextValue } from './dialogBackdropContext';\nexport { DialogSurfaceContext, DialogSurfaceProvider, useDialogSurfaceContext_unstable } from './dialogSurfaceContext';\nexport {\n DialogBackdropContext,\n DialogBackdropProvider,\n useDialogBackdropContext_unstable,\n} from './dialogBackdropContext';\n"],"names":["DIALOG_GAP","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","DialogContext","DialogProvider","useDialogContext_unstable","DialogSurfaceContext","DialogSurfaceProvider","useDialogSurfaceContext_unstable","DialogBackdropContext","DialogBackdropProvider","useDialogBackdropContext_unstable"],"mappings":";;;;;;;;;;;QAEEC;mEAAyC;;;eADzCD,qBAAU;;;eAEVE,iDAAsC;;;eACtCC,0CAA+B;;QAU/BS;2DAAqB;;;eACrBC,6CAAsB;;;eANfP,4BAAa;;;eAAEC,6BAAc;;;eAG7BE,0CAAoB;;;eAAEC,2CAAqB;;;eAPlDN,+BAAoB;;;eACpBC,0BAAe;;;eAUfS,wDAAiC;;;eAPKN,wCAAyB;;;eAGXG,sDAAgC;;;2BAL/E,iBAAc;+BAEoD,qBAAkB;sCAGG,4BAAyB;uCAKhH,6BAA0B"}