@fluentui/react-dialog 9.5.8 → 9.5.9

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 (231) hide show
  1. package/CHANGELOG.json +58 -1
  2. package/CHANGELOG.md +18 -2
  3. package/lib/Dialog.js +0 -1
  4. package/lib/Dialog.js.map +1 -1
  5. package/lib/DialogActions.js +0 -1
  6. package/lib/DialogActions.js.map +1 -1
  7. package/lib/DialogBody.js +0 -1
  8. package/lib/DialogBody.js.map +1 -1
  9. package/lib/DialogContent.js +0 -1
  10. package/lib/DialogContent.js.map +1 -1
  11. package/lib/DialogSurface.js +0 -1
  12. package/lib/DialogSurface.js.map +1 -1
  13. package/lib/DialogTitle.js +0 -1
  14. package/lib/DialogTitle.js.map +1 -1
  15. package/lib/DialogTrigger.js +0 -1
  16. package/lib/DialogTrigger.js.map +1 -1
  17. package/lib/components/Dialog/Dialog.js +4 -6
  18. package/lib/components/Dialog/Dialog.js.map +1 -1
  19. package/lib/components/Dialog/Dialog.types.js +1 -2
  20. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  21. package/lib/components/Dialog/index.js +0 -1
  22. package/lib/components/Dialog/index.js.map +1 -1
  23. package/lib/components/Dialog/renderDialog.js +8 -13
  24. package/lib/components/Dialog/renderDialog.js.map +1 -1
  25. package/lib/components/Dialog/useDialog.js +71 -73
  26. package/lib/components/Dialog/useDialog.js.map +1 -1
  27. package/lib/components/Dialog/useDialogContextValues.js +20 -32
  28. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  29. package/lib/components/DialogActions/DialogActions.js +5 -7
  30. package/lib/components/DialogActions/DialogActions.js.map +1 -1
  31. package/lib/components/DialogActions/DialogActions.types.js +1 -2
  32. package/lib/components/DialogActions/DialogActions.types.js.map +1 -1
  33. package/lib/components/DialogActions/index.js +0 -1
  34. package/lib/components/DialogActions/index.js.map +1 -1
  35. package/lib/components/DialogActions/renderDialogActions.js +5 -10
  36. package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
  37. package/lib/components/DialogActions/useDialogActions.js +13 -18
  38. package/lib/components/DialogActions/useDialogActions.js.map +1 -1
  39. package/lib/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
  40. package/lib/components/DialogBody/DialogBody.js +5 -7
  41. package/lib/components/DialogBody/DialogBody.js.map +1 -1
  42. package/lib/components/DialogBody/DialogBody.types.js +1 -2
  43. package/lib/components/DialogBody/DialogBody.types.js.map +1 -1
  44. package/lib/components/DialogBody/index.js +0 -1
  45. package/lib/components/DialogBody/index.js.map +1 -1
  46. package/lib/components/DialogBody/renderDialogBody.js +5 -10
  47. package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
  48. package/lib/components/DialogBody/useDialogBody.js +11 -13
  49. package/lib/components/DialogBody/useDialogBody.js.map +1 -1
  50. package/lib/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
  51. package/lib/components/DialogContent/DialogContent.js +5 -7
  52. package/lib/components/DialogContent/DialogContent.js.map +1 -1
  53. package/lib/components/DialogContent/DialogContent.types.js +1 -2
  54. package/lib/components/DialogContent/DialogContent.types.js.map +1 -1
  55. package/lib/components/DialogContent/index.js +0 -1
  56. package/lib/components/DialogContent/index.js.map +1 -1
  57. package/lib/components/DialogContent/renderDialogContent.js +4 -9
  58. package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
  59. package/lib/components/DialogContent/useDialogContent.js +11 -13
  60. package/lib/components/DialogContent/useDialogContent.js.map +1 -1
  61. package/lib/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
  62. package/lib/components/DialogSurface/DialogSurface.js +6 -8
  63. package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
  64. package/lib/components/DialogSurface/DialogSurface.types.js +1 -2
  65. package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
  66. package/lib/components/DialogSurface/index.js +0 -1
  67. package/lib/components/DialogSurface/index.js.map +1 -1
  68. package/lib/components/DialogSurface/renderDialogSurface.js +6 -11
  69. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
  70. package/lib/components/DialogSurface/useDialogSurface.js +58 -63
  71. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  72. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js +4 -5
  73. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  74. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js +5 -5
  75. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
  76. package/lib/components/DialogTitle/DialogTitle.js +5 -7
  77. package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
  78. package/lib/components/DialogTitle/DialogTitle.types.js +1 -2
  79. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
  80. package/lib/components/DialogTitle/index.js +0 -1
  81. package/lib/components/DialogTitle/index.js.map +1 -1
  82. package/lib/components/DialogTitle/renderDialogTitle.js +4 -9
  83. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
  84. package/lib/components/DialogTitle/useDialogTitle.js +29 -34
  85. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  86. package/lib/components/DialogTitle/useDialogTitleStyles.styles.js +5 -5
  87. package/lib/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -1
  88. package/lib/components/DialogTrigger/DialogTrigger.js +3 -5
  89. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
  90. package/lib/components/DialogTrigger/DialogTrigger.types.js +0 -1
  91. package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  92. package/lib/components/DialogTrigger/index.js +0 -1
  93. package/lib/components/DialogTrigger/index.js.map +1 -1
  94. package/lib/components/DialogTrigger/renderDialogTrigger.js +1 -2
  95. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  96. package/lib/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -1
  97. package/lib/contexts/constants.js +0 -1
  98. package/lib/contexts/constants.js.map +1 -1
  99. package/lib/contexts/dialogContext.js +11 -12
  100. package/lib/contexts/dialogContext.js.map +1 -1
  101. package/lib/contexts/dialogSurfaceContext.js +2 -3
  102. package/lib/contexts/dialogSurfaceContext.js.map +1 -1
  103. package/lib/contexts/index.js +0 -1
  104. package/lib/contexts/index.js.map +1 -1
  105. package/lib/index.js +0 -1
  106. package/lib/index.js.map +1 -1
  107. package/lib/utils/index.js +0 -1
  108. package/lib/utils/index.js.map +1 -1
  109. package/lib/utils/isEscapeKeyDown.js +2 -4
  110. package/lib/utils/isEscapeKeyDown.js.map +1 -1
  111. package/lib/utils/useDisableBodyScroll.js +31 -36
  112. package/lib/utils/useDisableBodyScroll.js.map +1 -1
  113. package/lib/utils/useFocusFirstElement.js +29 -27
  114. package/lib/utils/useFocusFirstElement.js.map +1 -1
  115. package/lib-commonjs/Dialog.js +0 -3
  116. package/lib-commonjs/Dialog.js.map +1 -1
  117. package/lib-commonjs/DialogActions.js +0 -3
  118. package/lib-commonjs/DialogActions.js.map +1 -1
  119. package/lib-commonjs/DialogBody.js +0 -3
  120. package/lib-commonjs/DialogBody.js.map +1 -1
  121. package/lib-commonjs/DialogContent.js +0 -3
  122. package/lib-commonjs/DialogContent.js.map +1 -1
  123. package/lib-commonjs/DialogSurface.js +0 -3
  124. package/lib-commonjs/DialogSurface.js.map +1 -1
  125. package/lib-commonjs/DialogTitle.js +0 -3
  126. package/lib-commonjs/DialogTitle.js.map +1 -1
  127. package/lib-commonjs/DialogTrigger.js +0 -3
  128. package/lib-commonjs/DialogTrigger.js.map +1 -1
  129. package/lib-commonjs/components/Dialog/Dialog.js +1 -3
  130. package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
  131. package/lib-commonjs/components/Dialog/Dialog.types.js +0 -3
  132. package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -1
  133. package/lib-commonjs/components/Dialog/index.js +0 -3
  134. package/lib-commonjs/components/Dialog/index.js.map +1 -1
  135. package/lib-commonjs/components/Dialog/renderDialog.js +1 -3
  136. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
  137. package/lib-commonjs/components/Dialog/useDialog.js +1 -3
  138. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
  139. package/lib-commonjs/components/Dialog/useDialogContextValues.js +4 -6
  140. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
  141. package/lib-commonjs/components/DialogActions/DialogActions.js +1 -3
  142. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
  143. package/lib-commonjs/components/DialogActions/DialogActions.types.js +0 -3
  144. package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -1
  145. package/lib-commonjs/components/DialogActions/index.js +0 -3
  146. package/lib-commonjs/components/DialogActions/index.js.map +1 -1
  147. package/lib-commonjs/components/DialogActions/renderDialogActions.js +1 -3
  148. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
  149. package/lib-commonjs/components/DialogActions/useDialogActions.js +1 -3
  150. package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
  151. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js +0 -2
  152. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
  153. package/lib-commonjs/components/DialogBody/DialogBody.js +1 -3
  154. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
  155. package/lib-commonjs/components/DialogBody/DialogBody.types.js +0 -3
  156. package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -1
  157. package/lib-commonjs/components/DialogBody/index.js +0 -3
  158. package/lib-commonjs/components/DialogBody/index.js.map +1 -1
  159. package/lib-commonjs/components/DialogBody/renderDialogBody.js +1 -3
  160. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
  161. package/lib-commonjs/components/DialogBody/useDialogBody.js +1 -3
  162. package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
  163. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js +0 -2
  164. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
  165. package/lib-commonjs/components/DialogContent/DialogContent.js +1 -3
  166. package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
  167. package/lib-commonjs/components/DialogContent/DialogContent.types.js +0 -3
  168. package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -1
  169. package/lib-commonjs/components/DialogContent/index.js +0 -3
  170. package/lib-commonjs/components/DialogContent/index.js.map +1 -1
  171. package/lib-commonjs/components/DialogContent/renderDialogContent.js +1 -3
  172. package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
  173. package/lib-commonjs/components/DialogContent/useDialogContent.js +1 -3
  174. package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
  175. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js +0 -2
  176. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
  177. package/lib-commonjs/components/DialogSurface/DialogSurface.js +1 -3
  178. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
  179. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js +0 -3
  180. package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -1
  181. package/lib-commonjs/components/DialogSurface/index.js +0 -3
  182. package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
  183. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +1 -3
  184. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
  185. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +1 -3
  186. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
  187. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +1 -3
  188. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  189. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js +12 -14
  190. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
  191. package/lib-commonjs/components/DialogTitle/DialogTitle.js +1 -3
  192. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
  193. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js +0 -3
  194. package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -1
  195. package/lib-commonjs/components/DialogTitle/index.js +0 -3
  196. package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
  197. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +1 -3
  198. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
  199. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +1 -3
  200. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
  201. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js +12 -14
  202. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -1
  203. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +1 -3
  204. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
  205. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +0 -3
  206. package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  207. package/lib-commonjs/components/DialogTrigger/index.js +0 -3
  208. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
  209. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +1 -3
  210. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  211. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.styles.js +0 -2
  212. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -1
  213. package/lib-commonjs/contexts/constants.js +1 -3
  214. package/lib-commonjs/contexts/constants.js.map +1 -1
  215. package/lib-commonjs/contexts/dialogContext.js +2 -4
  216. package/lib-commonjs/contexts/dialogContext.js.map +1 -1
  217. package/lib-commonjs/contexts/dialogSurfaceContext.js +1 -3
  218. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
  219. package/lib-commonjs/contexts/index.js +0 -3
  220. package/lib-commonjs/contexts/index.js.map +1 -1
  221. package/lib-commonjs/index.js +0 -3
  222. package/lib-commonjs/index.js.map +1 -1
  223. package/lib-commonjs/utils/index.js +0 -3
  224. package/lib-commonjs/utils/index.js.map +1 -1
  225. package/lib-commonjs/utils/isEscapeKeyDown.js +1 -3
  226. package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
  227. package/lib-commonjs/utils/useDisableBodyScroll.js +1 -3
  228. package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
  229. package/lib-commonjs/utils/useFocusFirstElement.js +1 -3
  230. package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
  231. package/package.json +9 -9
@@ -10,67 +10,62 @@ import { isEscapeKeyDismiss } from '../../utils';
10
10
  *
11
11
  * @param props - props from this instance of DialogSurface
12
12
  * @param ref - reference to root HTMLElement of DialogSurface
13
- */
14
- export const useDialogSurface_unstable = (props, ref) => {
15
- const {
16
- backdrop,
17
- as
18
- } = props;
19
- const modalType = useDialogContext_unstable(ctx => ctx.modalType);
20
- const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);
21
- const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);
22
- const open = useDialogContext_unstable(ctx => ctx.open);
23
- const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);
24
- const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);
25
- const handledBackdropClick = useEventCallback(event => {
26
- if (isResolvedShorthand(props.backdrop)) {
27
- var _props_backdrop, _props_backdrop_onClick;
28
- (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);
29
- }
30
- if (modalType === 'modal' && !event.isDefaultPrevented()) {
31
- requestOpenChange({
32
- event,
33
- open: false,
34
- type: 'backdropClick'
35
- });
36
- }
37
- });
38
- const handleKeyDown = useEventCallback(event => {
39
- var _props_onKeyDown;
40
- (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);
41
- if (isEscapeKeyDismiss(event, modalType)) {
42
- requestOpenChange({
43
- event,
44
- open: false,
45
- type: 'escapeKeyDown'
46
- });
47
- // stop propagation to avoid conflicting with other elements that listen for `Escape`
48
- // e,g: nested Dialog, Popover, Menu and Tooltip
49
- event.stopPropagation();
50
- }
51
- });
52
- return {
53
- components: {
54
- backdrop: 'div',
55
- root: 'div'
56
- },
57
- backdrop: resolveShorthand(backdrop, {
58
- required: open && modalType !== 'non-modal',
59
- defaultProps: {
60
- 'aria-hidden': 'true',
61
- onClick: handledBackdropClick
62
- }
63
- }),
64
- root: getNativeElementProps(as !== null && as !== void 0 ? as : 'div', {
65
- tabIndex: -1,
66
- 'aria-modal': modalType !== 'non-modal',
67
- role: modalType === 'alert' ? 'alertdialog' : 'dialog',
68
- 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,
69
- ...props,
70
- ...modalAttributes,
71
- onKeyDown: handleKeyDown,
72
- ref: useMergedRefs(ref, dialogRef)
73
- })
74
- };
13
+ */ export const useDialogSurface_unstable = (props, ref)=>{
14
+ const { backdrop , as } = props;
15
+ const modalType = useDialogContext_unstable((ctx)=>ctx.modalType);
16
+ const modalAttributes = useDialogContext_unstable((ctx)=>ctx.modalAttributes);
17
+ const dialogRef = useDialogContext_unstable((ctx)=>ctx.dialogRef);
18
+ const open = useDialogContext_unstable((ctx)=>ctx.open);
19
+ const requestOpenChange = useDialogContext_unstable((ctx)=>ctx.requestOpenChange);
20
+ const dialogTitleID = useDialogContext_unstable((ctx)=>ctx.dialogTitleId);
21
+ const handledBackdropClick = useEventCallback((event)=>{
22
+ if (isResolvedShorthand(props.backdrop)) {
23
+ var _props_backdrop, _props_backdrop_onClick;
24
+ (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);
25
+ }
26
+ if (modalType === 'modal' && !event.isDefaultPrevented()) {
27
+ requestOpenChange({
28
+ event,
29
+ open: false,
30
+ type: 'backdropClick'
31
+ });
32
+ }
33
+ });
34
+ const handleKeyDown = useEventCallback((event)=>{
35
+ var _props_onKeyDown;
36
+ (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);
37
+ if (isEscapeKeyDismiss(event, modalType)) {
38
+ requestOpenChange({
39
+ event,
40
+ open: false,
41
+ type: 'escapeKeyDown'
42
+ });
43
+ // stop propagation to avoid conflicting with other elements that listen for `Escape`
44
+ // e,g: nested Dialog, Popover, Menu and Tooltip
45
+ event.stopPropagation();
46
+ }
47
+ });
48
+ return {
49
+ components: {
50
+ backdrop: 'div',
51
+ root: 'div'
52
+ },
53
+ backdrop: resolveShorthand(backdrop, {
54
+ required: open && modalType !== 'non-modal',
55
+ defaultProps: {
56
+ 'aria-hidden': 'true',
57
+ onClick: handledBackdropClick
58
+ }
59
+ }),
60
+ root: getNativeElementProps(as !== null && as !== void 0 ? as : 'div', {
61
+ tabIndex: -1,
62
+ 'aria-modal': modalType !== 'non-modal',
63
+ role: modalType === 'alert' ? 'alertdialog' : 'dialog',
64
+ 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,
65
+ ...props,
66
+ ...modalAttributes,
67
+ onKeyDown: handleKeyDown,
68
+ ref: useMergedRefs(ref, dialogRef)
69
+ })
70
+ };
75
71
  };
76
- //# sourceMappingURL=useDialogSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getNativeElementProps","resolveShorthand","useEventCallback","useMergedRefs","isResolvedShorthand","useDialogContext_unstable","isEscapeKeyDismiss","useDialogSurface_unstable","props","ref","backdrop","as","modalType","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","event","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","stopPropagation","components","root","required","defaultProps","tabIndex","role","undefined"],"sources":["../../../src/components/DialogSurface/useDialogSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n resolveShorthand,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n} from '@fluentui/react-utilities';\nimport type { DialogSurfaceElement, DialogSurfaceProps, DialogSurfaceState } from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const { backdrop, as } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n props.onKeyDown?.(event);\n\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick,\n },\n }),\n root: getNativeElementProps(as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB,QACd;AAEP,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;;;;AASA,OAAO,MAAMC,yBAAA,GAA4BA,CACvCC,KAAA,EACAC,GAAA,KACuB;EACvB,MAAM;IAAEC,QAAA;IAAUC;EAAE,CAAE,GAAGH,KAAA;EACzB,MAAMI,SAAA,GAAYP,yBAAA,CAA0BQ,GAAA,IAAOA,GAAA,CAAID,SAAS;EAChE,MAAME,eAAA,GAAkBT,yBAAA,CAA0BQ,GAAA,IAAOA,GAAA,CAAIC,eAAe;EAC5E,MAAMC,SAAA,GAAYV,yBAAA,CAA0BQ,GAAA,IAAOA,GAAA,CAAIE,SAAS;EAChE,MAAMC,IAAA,GAAOX,yBAAA,CAA0BQ,GAAA,IAAOA,GAAA,CAAIG,IAAI;EACtD,MAAMC,iBAAA,GAAoBZ,yBAAA,CAA0BQ,GAAA,IAAOA,GAAA,CAAII,iBAAiB;EAChF,MAAMC,aAAA,GAAgBb,yBAAA,CAA0BQ,GAAA,IAAOA,GAAA,CAAIM,aAAa;EAExE,MAAMC,oBAAA,GAAuBlB,gBAAA,CAAkBmB,KAAA,IAA4C;IACzF,IAAIjB,mBAAA,CAAoBI,KAAA,CAAME,QAAQ,GAAG;UACvCY,eAAA,EAAAC,uBAAA;MAAA,CAAAA,uBAAA,IAAAD,eAAA,GAAAd,KAAA,CAAME,QAAQ,EAACc,OAAO,cAAtBD,uBAAA,uBAAAA,uBAAA,CAAAE,IAAA,CAAAH,eAAA,EAAyBD,KAAA;IAC3B;IACA,IAAIT,SAAA,KAAc,WAAW,CAACS,KAAA,CAAMK,kBAAkB,IAAI;MACxDT,iBAAA,CAAkB;QAChBI,KAAA;QACAL,IAAA,EAAM,KAAK;QACXW,IAAA,EAAM;MACR;IACF;EACF;EAEA,MAAMC,aAAA,GAAgB1B,gBAAA,CAAkBmB,KAAA,IAA+C;QACrFQ,gBAAA;IAAA,CAAAA,gBAAA,GAAArB,KAAA,CAAMsB,SAAS,cAAfD,gBAAA,uBAAAA,gBAAA,CAAAJ,IAAA,CAAAjB,KAAA,EAAkBa,KAAA;IAElB,IAAIf,kBAAA,CAAmBe,KAAA,EAAOT,SAAA,GAAY;MACxCK,iBAAA,CAAkB;QAChBI,KAAA;QACAL,IAAA,EAAM,KAAK;QACXW,IAAA,EAAM;MACR;MACA;MACA;MACAN,KAAA,CAAMU,eAAe;IACvB;EACF;EAEA,OAAO;IACLC,UAAA,EAAY;MACVtB,QAAA,EAAU;MACVuB,IAAA,EAAM;IACR;IACAvB,QAAA,EAAUT,gBAAA,CAAiBS,QAAA,EAAU;MACnCwB,QAAA,EAAUlB,IAAA,IAAQJ,SAAA,KAAc;MAChCuB,YAAA,EAAc;QACZ,eAAe;QACfX,OAAA,EAASJ;MACX;IACF;IACAa,IAAA,EAAMjC,qBAAA,CAAsBW,EAAA,aAAAA,EAAA,cAAAA,EAAA,GAAM,KAAK,EAAE;MACvCyB,QAAA,EAAU,CAAC;MACX,cAAcxB,SAAA,KAAc;MAC5ByB,IAAA,EAAMzB,SAAA,KAAc,UAAU,gBAAgB,QAAQ;MACtD,mBAAmBJ,KAAK,CAAC,aAAa,GAAG8B,SAAA,GAAYpB,aAAa;MAClE,GAAGV,KAAK;MACR,GAAGM,eAAe;MAClBgB,SAAA,EAAWF,aAAA;MACXnB,GAAA,EAAKN,aAAA,CAAcM,GAAA,EAAKM,SAAA;IAC1B;EACF;AACF"}
1
+ {"version":3,"sources":["useDialogSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n resolveShorthand,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n} from '@fluentui/react-utilities';\nimport type { DialogSurfaceElement, DialogSurfaceProps, DialogSurfaceState } from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { isEscapeKeyDismiss } from '../../utils';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const { backdrop, as } = props;\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n props.onKeyDown?.(event);\n\n if (isEscapeKeyDismiss(event, modalType)) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n return {\n components: {\n backdrop: 'div',\n root: 'div',\n },\n backdrop: resolveShorthand(backdrop, {\n required: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n onClick: handledBackdropClick,\n },\n }),\n root: getNativeElementProps(as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n };\n};\n"],"names":["React","getNativeElementProps","resolveShorthand","useEventCallback","useMergedRefs","isResolvedShorthand","useDialogContext_unstable","isEscapeKeyDismiss","useDialogSurface_unstable","props","ref","backdrop","as","modalType","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","event","onClick","isDefaultPrevented","type","handleKeyDown","onKeyDown","stopPropagation","components","root","required","defaultProps","tabIndex","role","undefined"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB,QACd,4BAA4B;AAEnC,SAASC,yBAAyB,QAAQ,iBAAiB;AAC3D,SAASC,kBAAkB,QAAQ,cAAc;AAEjD;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,MAAM,EAAEC,SAAQ,EAAEC,GAAE,EAAE,GAAGH;IACzB,MAAMI,YAAYP,0BAA0BQ,CAAAA,MAAOA,IAAID,SAAS;IAChE,MAAME,kBAAkBT,0BAA0BQ,CAAAA,MAAOA,IAAIC,eAAe;IAC5E,MAAMC,YAAYV,0BAA0BQ,CAAAA,MAAOA,IAAIE,SAAS;IAChE,MAAMC,OAAOX,0BAA0BQ,CAAAA,MAAOA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBZ,0BAA0BQ,CAAAA,MAAOA,IAAII,iBAAiB;IAChF,MAAMC,gBAAgBb,0BAA0BQ,CAAAA,MAAOA,IAAIM,aAAa;IAExE,MAAMC,uBAAuBlB,iBAAiB,CAACmB,QAA4C;QACzF,IAAIjB,oBAAoBI,MAAME,QAAQ,GAAG;gBACvCF,iBAAAA;YAAAA,CAAAA,0BAAAA,CAAAA,kBAAAA,MAAME,QAAQ,EAACY,OAAO,cAAtBd,qCAAAA,KAAAA,IAAAA,wBAAAA,KAAAA,iBAAyBa;QAC3B,CAAC;QACD,IAAIT,cAAc,WAAW,CAACS,MAAME,kBAAkB,IAAI;YACxDN,kBAAkB;gBAChBI;gBACAL,MAAM,KAAK;gBACXQ,MAAM;YACR;QACF,CAAC;IACH;IAEA,MAAMC,gBAAgBvB,iBAAiB,CAACmB,QAA+C;YACrFb;QAAAA,CAAAA,mBAAAA,MAAMkB,SAAS,cAAflB,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkBa;QAElB,IAAIf,mBAAmBe,OAAOT,YAAY;YACxCK,kBAAkB;gBAChBI;gBACAL,MAAM,KAAK;gBACXQ,MAAM;YACR;YACA,qFAAqF;YACrF,gDAAgD;YAChDH,MAAMM,eAAe;QACvB,CAAC;IACH;IAEA,OAAO;QACLC,YAAY;YACVlB,UAAU;YACVmB,MAAM;QACR;QACAnB,UAAUT,iBAAiBS,UAAU;YACnCoB,UAAUd,QAAQJ,cAAc;YAChCmB,cAAc;gBACZ,eAAe;gBACfT,SAASF;YACX;QACF;QACAS,MAAM7B,sBAAsBW,eAAAA,gBAAAA,KAAM,KAAK,EAAE;YACvCqB,UAAU,CAAC;YACX,cAAcpB,cAAc;YAC5BqB,MAAMrB,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBJ,KAAK,CAAC,aAAa,GAAG0B,YAAYhB,aAAa;YAClE,GAAGV,KAAK;YACR,GAAGM,eAAe;YAClBY,WAAWD;YACXhB,KAAKN,cAAcM,KAAKM;QAC1B;IACF;AACF,EAAE"}
@@ -1,7 +1,6 @@
1
1
  export function useDialogSurfaceContextValues_unstable(state) {
2
- const dialogSurface = true;
3
- return {
4
- dialogSurface
5
- };
2
+ const dialogSurface = true;
3
+ return {
4
+ dialogSurface
5
+ };
6
6
  }
7
- //# sourceMappingURL=useDialogSurfaceContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useDialogSurfaceContextValues_unstable","state","dialogSurface"],"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"],"mappings":"AAGA,OAAO,SAASA,uCAAuCC,KAAyB,EAA8B;EAC5G,MAAMC,aAAA,GAA2C,IAAI;EAErD,OAAO;IAAEA;EAAc;AACzB"}
1
+ {"version":3,"sources":["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":"AAGA,OAAO,SAASA,uCAAuCC,KAAyB,EAA8B;IAC5G,MAAMC,gBAA2C,IAAI;IAErD,OAAO;QAAEA;IAAc;AACzB,CAAC"}
@@ -37,10 +37,10 @@ const useStyles = /*#__PURE__*/__styles({
37
37
  i03rao: ["fd0oaoj", "f1cwg4i8"],
38
38
  Boxcth7: "fjvm52t",
39
39
  Bsom6fd: ["f1cwg4i8", "fd0oaoj"],
40
- J0r882: "fdiulkx",
41
- Bjwuhne: "f1yalx80",
42
- Ghsupd: ["fq22d5a", "f1jw7pan"],
43
- Bule8hv: ["f1jw7pan", "fq22d5a"]
40
+ J0r882: "f57olzd",
41
+ Bule8hv: ["f4stah7", "fs1por5"],
42
+ Bjwuhne: "f480a47",
43
+ Ghsupd: ["fs1por5", "f4stah7"]
44
44
  },
45
45
  root: {
46
46
  mc9l5x: "ftgm304",
@@ -104,7 +104,7 @@ const useStyles = /*#__PURE__*/__styles({
104
104
  }, {
105
105
  f: [".ftqa4ok:focus{outline-style:none;}"],
106
106
  i: [".f2hkw1w:focus-visible{outline-style:none;}"],
107
- d: [".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}", ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}", ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}", ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}", ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}", ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}", ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}", ".fd6o370[data-fui-focus-visible]::after{z-index:1;}", ".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}", ".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}", ".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}", ".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}", ".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}", ".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}", ".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}", ".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}", ".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}", ".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}", ".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}", ".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}", ".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}", ".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}", ".fdiulkx[data-fui-focus-visible]::after{top:-2px;}", ".f1yalx80[data-fui-focus-visible]::after{bottom:-2px;}", ".fq22d5a[data-fui-focus-visible]::after{left:-2px;}", ".f1jw7pan[data-fui-focus-visible]::after{right:-2px;}", ".ftgm304{display:block;}", ".f1c515w{-webkit-user-select:unset;-moz-user-select:unset;-ms-user-select:unset;user-select:unset;}", ".f1bitti{visibility:unset;}", ".f15twtuk{top:0;}", ".f1e31b4d{right:0;}", ".f1vgc2s3{left:0;}", ".f1yab3r1{bottom:0;}", ".fuq56rw{padding-top:24px;}", ".f15kemlc{padding-right:24px;}", ".fdgang7{padding-left:24px;}", ".fl2zwns{padding-bottom:24px;}", ".fgr6219{margin-top:auto;}", ".f1ujusj6{margin-right:auto;}", ".fcgxt0o{margin-left:auto;}", ".f10jk5vf{margin-bottom:auto;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1ln0qer{overflow-x:unset;}", ".fa2wlxz{overflow-y:unset;}", ".f120kxnn::backdrop{background-color:rgba(0, 0, 0, 0.4);}", ".f19dog8a{position:fixed;}", ".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".fvgz9i8{max-width:600px;}", ".f6a9g1z{max-height:100vh;}", ".f1ewtqcl{box-sizing:border-box;}", ".f10nrhrw{box-shadow:var(--shadow64);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".fnivh3a{border-bottom-right-radius:var(--borderRadiusXLarge);}", ".fc7yr5o{border-bottom-left-radius:var(--borderRadiusXLarge);}", ".f1el4m67{border-top-right-radius:var(--borderRadiusXLarge);}", ".f8yange{border-top-left-radius:var(--borderRadiusXLarge);}", ".fju19wo{background-color:rgba(0, 0, 0, 0.4);}", ".f113wtx2{top:0px;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f5gq2j6{bottom:0px;}", ".f3rmtva{background-color:transparent;}", ".foe20jx::backdrop{background-color:transparent;}"],
107
+ d: [".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}", ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}", ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}", ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}", ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}", ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}", ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}", ".fd6o370[data-fui-focus-visible]::after{z-index:1;}", ".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}", ".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}", ".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}", ".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}", ".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}", ".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}", ".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}", ".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}", ".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}", ".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}", ".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}", ".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}", ".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}", ".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}", ".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}", ".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}", ".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}", ".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}", ".ftgm304{display:block;}", ".f1c515w{-webkit-user-select:unset;-moz-user-select:unset;-ms-user-select:unset;user-select:unset;}", ".f1bitti{visibility:unset;}", ".f15twtuk{top:0;}", ".f1e31b4d{right:0;}", ".f1vgc2s3{left:0;}", ".f1yab3r1{bottom:0;}", ".fuq56rw{padding-top:24px;}", ".f15kemlc{padding-right:24px;}", ".fdgang7{padding-left:24px;}", ".fl2zwns{padding-bottom:24px;}", ".fgr6219{margin-top:auto;}", ".f1ujusj6{margin-right:auto;}", ".fcgxt0o{margin-left:auto;}", ".f10jk5vf{margin-bottom:auto;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1ln0qer{overflow-x:unset;}", ".fa2wlxz{overflow-y:unset;}", ".f120kxnn::backdrop{background-color:rgba(0, 0, 0, 0.4);}", ".f19dog8a{position:fixed;}", ".f3052tw{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;}", ".fvgz9i8{max-width:600px;}", ".f6a9g1z{max-height:100vh;}", ".f1ewtqcl{box-sizing:border-box;}", ".f10nrhrw{box-shadow:var(--shadow64);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".fnivh3a{border-bottom-right-radius:var(--borderRadiusXLarge);}", ".fc7yr5o{border-bottom-left-radius:var(--borderRadiusXLarge);}", ".f1el4m67{border-top-right-radius:var(--borderRadiusXLarge);}", ".f8yange{border-top-left-radius:var(--borderRadiusXLarge);}", ".fju19wo{background-color:rgba(0, 0, 0, 0.4);}", ".f113wtx2{top:0px;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f5gq2j6{bottom:0px;}", ".f3rmtva{background-color:transparent;}", ".foe20jx::backdrop{background-color:transparent;}"],
108
108
  m: [["@media screen and (max-width: 480px){.ff54dml{max-width:100vw;}}", {
109
109
  m: "screen and (max-width: 480px)"
110
110
  }]]
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","createFocusOutlineStyle","MEDIA_QUERY_BREAKPOINT_SELECTOR","SURFACE_BORDER_WIDTH","SURFACE_PADDING","useDialogContext_unstable","dialogSurfaceClassNames","root","backdrop","useStyles","focusOutline","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","mc9l5x","famaaq","Bcdw1i0","Bhzewxz","j35jbq","B5kzvoi","oyh7mz","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","icvyot","vrafjx","oivjwe","wvpqe5","B68tc82","Bmxbyg5","fshzfu","qhf8xq","Bqenvij","B2u0y6b","Bxyxcbc","B7ck84d","E5pizo","De3pzq","sj55zd","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B5xtmjs","nestedDialogBackdrop","nestedNativeDialogBackdrop","f","i","d","m","useDialogSurfaceStyles_unstable","state","styles","isNestedDialog","ctx","className"],"sources":["../../../src/components/DialogSurface/useDialogSurfaceStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport {\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n useDialogContext_unstable,\n} from '../../contexts';\nimport type { DialogSurfaceSlots, DialogSurfaceState } from './DialogSurface.types';\n\nexport const dialogSurfaceClassNames: SlotClassNames<DialogSurfaceSlots> = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n focusOutline: createFocusOutlineStyle(),\n root: {\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n ...shorthands.inset(0),\n ...shorthands.padding(0),\n ...shorthands.padding(SURFACE_PADDING),\n ...shorthands.margin('auto'),\n ...shorthands.borderStyle('none'),\n ...shorthands.overflow('unset'),\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n },\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: '100vh',\n boxSizing: 'border-box',\n boxShadow: tokens.shadow64,\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n ...shorthands.border(SURFACE_BORDER_WIDTH, 'solid', tokens.colorTransparentStroke),\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n },\n },\n backdrop: {\n position: 'fixed',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n ...shorthands.inset('0px'),\n },\n nestedDialogBackdrop: {\n backgroundColor: 'transparent',\n },\n nestedNativeDialogBackdrop: {\n '&::backdrop': {\n backgroundColor: 'transparent',\n },\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 styles = useStyles();\n const isNestedDialog = useDialogContext_unstable(ctx => ctx.isNestedDialog);\n\n state.root.className = mergeClasses(\n dialogSurfaceClassNames.root,\n styles.root,\n styles.focusOutline,\n isNestedDialog && styles.nestedNativeDialogBackdrop,\n state.root.className,\n );\n if (state.backdrop) {\n state.backdrop.className = mergeClasses(\n dialogSurfaceClassNames.backdrop,\n styles.backdrop,\n isNestedDialog && styles.nestedDialogBackdrop,\n state.backdrop.className,\n );\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAErD,SAASC,MAAM,QAAQ;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SACEC,+BAA+B,EAC/BC,oBAAoB,EACpBC,eAAe,EACfC,yBAAyB,QACpB;AAGP,OAAO,MAAMC,uBAAA,GAA8D;EACzEC,IAAA,EAAM;EACNC,QAAA,EAAU;AACZ;AAEA;;;AAGA,MAAMC,SAAA,gBAAYZ,QAAA;EAAAa,YAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAjC,IAAA;IAAAkC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAA3E,QAAA;IAAAuD,MAAA;IAAAM,MAAA;IAAAzB,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAqC,oBAAA;IAAAf,MAAA;EAAA;EAAAgB,0BAAA;IAAAvB,MAAA;EAAA;AAAA;EAAAwB,CAAA;EAAAC,CAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,EA0ClB;AAEA;;;AAGA,OAAO,MAAMC,+BAAA,GAAmCC,KAAA,IAAkD;EAChG,MAAMC,MAAA,GAASnF,SAAA;EACf,MAAMoF,cAAA,GAAiBxF,yBAAA,CAA0ByF,GAAA,IAAOA,GAAA,CAAID,cAAc;EAE1EF,KAAA,CAAMpF,IAAI,CAACwF,SAAS,GAAGjG,YAAA,CACrBQ,uBAAA,CAAwBC,IAAI,EAC5BqF,MAAA,CAAOrF,IAAI,EACXqF,MAAA,CAAOlF,YAAY,EACnBmF,cAAA,IAAkBD,MAAA,CAAOP,0BAA0B,EACnDM,KAAA,CAAMpF,IAAI,CAACwF,SAAS;EAEtB,IAAIJ,KAAA,CAAMnF,QAAQ,EAAE;IAClBmF,KAAA,CAAMnF,QAAQ,CAACuF,SAAS,GAAGjG,YAAA,CACzBQ,uBAAA,CAAwBE,QAAQ,EAChCoF,MAAA,CAAOpF,QAAQ,EACfqF,cAAA,IAAkBD,MAAA,CAAOR,oBAAoB,EAC7CO,KAAA,CAAMnF,QAAQ,CAACuF,SAAS;EAE5B;EACA,OAAOJ,KAAA;AACT"}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","createFocusOutlineStyle","MEDIA_QUERY_BREAKPOINT_SELECTOR","SURFACE_BORDER_WIDTH","SURFACE_PADDING","useDialogContext_unstable","dialogSurfaceClassNames","root","backdrop","useStyles","focusOutline","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bule8hv","Bjwuhne","Ghsupd","mc9l5x","famaaq","Bcdw1i0","Bhzewxz","j35jbq","B5kzvoi","oyh7mz","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","icvyot","vrafjx","oivjwe","wvpqe5","B68tc82","Bmxbyg5","fshzfu","qhf8xq","Bqenvij","B2u0y6b","Bxyxcbc","B7ck84d","E5pizo","De3pzq","sj55zd","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B5xtmjs","nestedDialogBackdrop","nestedNativeDialogBackdrop","f","i","d","m","useDialogSurfaceStyles_unstable","state","styles","isNestedDialog","ctx","className"],"sources":["useDialogSurfaceStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { MEDIA_QUERY_BREAKPOINT_SELECTOR, SURFACE_BORDER_WIDTH, SURFACE_PADDING, useDialogContext_unstable } from '../../contexts';\nexport const dialogSurfaceClassNames = {\n root: 'fui-DialogSurface',\n backdrop: 'fui-DialogSurface__backdrop'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n focusOutline: createFocusOutlineStyle(),\n root: {\n display: 'block',\n userSelect: 'unset',\n visibility: 'unset',\n ...shorthands.inset(0),\n ...shorthands.padding(0),\n ...shorthands.padding(SURFACE_PADDING),\n ...shorthands.margin('auto'),\n ...shorthands.borderStyle('none'),\n ...shorthands.overflow('unset'),\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)'\n },\n position: 'fixed',\n height: 'fit-content',\n maxWidth: '600px',\n maxHeight: '100vh',\n boxSizing: 'border-box',\n boxShadow: tokens.shadow64,\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n ...shorthands.border(SURFACE_BORDER_WIDTH, 'solid', tokens.colorTransparentStroke),\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw'\n }\n },\n backdrop: {\n position: 'fixed',\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n ...shorthands.inset('0px')\n },\n nestedDialogBackdrop: {\n backgroundColor: 'transparent'\n },\n nestedNativeDialogBackdrop: {\n '&::backdrop': {\n backgroundColor: 'transparent'\n }\n }\n});\n/**\n * Apply styling to the DialogSurface slots based on the state\n */ export const useDialogSurfaceStyles_unstable = (state)=>{\n const styles = useStyles();\n const isNestedDialog = useDialogContext_unstable((ctx)=>ctx.isNestedDialog);\n state.root.className = mergeClasses(dialogSurfaceClassNames.root, styles.root, styles.focusOutline, isNestedDialog && styles.nestedNativeDialogBackdrop, state.root.className);\n if (state.backdrop) {\n state.backdrop.className = mergeClasses(dialogSurfaceClassNames.backdrop, styles.backdrop, isNestedDialog && styles.nestedDialogBackdrop, state.backdrop.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,+BAA+B,EAAEC,oBAAoB,EAAEC,eAAe,EAAEC,yBAAyB,QAAQ,gBAAgB;AAClI,OAAO,MAAMC,uBAAuB,GAAG;EACnCC,IAAI,EAAE,mBAAmB;EACzBC,QAAQ,EAAE;AACd,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGZ,QAAA;EAAAa,YAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAjC,IAAA;IAAAkC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAA3E,QAAA;IAAAuD,MAAA;IAAAM,MAAA;IAAAzB,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAqC,oBAAA;IAAAf,MAAA;EAAA;EAAAgB,0BAAA;IAAAvB,MAAA;EAAA;AAAA;EAAAwB,CAAA;EAAAC,CAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;AAAA,CA0CrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,+BAA+B,GAAIC,KAAK,IAAG;EACxD,MAAMC,MAAM,GAAGnF,SAAS,CAAC,CAAC;EAC1B,MAAMoF,cAAc,GAAGxF,yBAAyB,CAAEyF,GAAG,IAAGA,GAAG,CAACD,cAAc,CAAC;EAC3EF,KAAK,CAACpF,IAAI,CAACwF,SAAS,GAAGjG,YAAY,CAACQ,uBAAuB,CAACC,IAAI,EAAEqF,MAAM,CAACrF,IAAI,EAAEqF,MAAM,CAAClF,YAAY,EAAEmF,cAAc,IAAID,MAAM,CAACP,0BAA0B,EAAEM,KAAK,CAACpF,IAAI,CAACwF,SAAS,CAAC;EAC9K,IAAIJ,KAAK,CAACnF,QAAQ,EAAE;IAChBmF,KAAK,CAACnF,QAAQ,CAACuF,SAAS,GAAGjG,YAAY,CAACQ,uBAAuB,CAACE,QAAQ,EAAEoF,MAAM,CAACpF,QAAQ,EAAEqF,cAAc,IAAID,MAAM,CAACR,oBAAoB,EAAEO,KAAK,CAACnF,QAAQ,CAACuF,SAAS,CAAC;EACvK;EACA,OAAOJ,KAAK;AAChB,CAAC"}
@@ -6,12 +6,10 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * The `DialogTitle` component expects to have a title/header
8
8
  * and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.
9
- */
10
- export const DialogTitle = /*#__PURE__*/React.forwardRef((props, ref) => {
11
- const state = useDialogTitle_unstable(props, ref);
12
- useDialogTitleStyles_unstable(state);
13
- useCustomStyleHook_unstable('useDialogTitleStyles_unstable')(state);
14
- return renderDialogTitle_unstable(state);
9
+ */ export const DialogTitle = /*#__PURE__*/ React.forwardRef((props, ref)=>{
10
+ const state = useDialogTitle_unstable(props, ref);
11
+ useDialogTitleStyles_unstable(state);
12
+ useCustomStyleHook_unstable('useDialogTitleStyles_unstable')(state);
13
+ return renderDialogTitle_unstable(state);
15
14
  });
16
15
  DialogTitle.displayName = 'DialogTitle';
17
- //# sourceMappingURL=DialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogTitle_unstable","renderDialogTitle_unstable","useDialogTitleStyles_unstable","useCustomStyleHook_unstable","DialogTitle","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DialogTitle/DialogTitle.tsx"],"sourcesContent":["import * 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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAG9C,SAASC,2BAA2B,QAAQ;AAE5C;;;;AAIA,OAAO,MAAMC,WAAA,gBAAqDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACjG,MAAMC,KAAA,GAAQR,uBAAA,CAAwBM,KAAA,EAAOC,GAAA;EAE7CL,6BAAA,CAA8BM,KAAA;EAE9BL,2BAAA,CAA4B,iCAAiCK,KAAA;EAE7D,OAAOP,0BAAA,CAA2BO,KAAA;AACpC;AAEAJ,WAAA,CAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DialogTitle.tsx"],"sourcesContent":["import * 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,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,4BAAqDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACjG,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=DialogTitle.types.js.map
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"names":[],"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"],"mappings":"AAAA"}
1
+ {"version":3,"sources":["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":"AAAA,WAsBgE"}
@@ -3,4 +3,3 @@ export * from './DialogTitle.types';
3
3
  export * from './renderDialogTitle';
4
4
  export * from './useDialogTitle';
5
5
  export * from './useDialogTitleStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DialogTitle/index.ts"],"sourcesContent":["export * from './DialogTitle';\nexport * from './DialogTitle.types';\nexport * from './renderDialogTitle';\nexport * from './useDialogTitle';\nexport * from './useDialogTitleStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DialogTitle';\nexport * from './DialogTitle.types';\nexport * from './renderDialogTitle';\nexport * from './useDialogTitle';\nexport * from './useDialogTitleStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,gCAAgC"}
@@ -1,13 +1,8 @@
1
- /** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */import { createElement, Fragment } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */ import { createElement, Fragment } from '@fluentui/react-jsx-runtime';
2
2
  import { getSlotsNext } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of DialogTitle
5
- */
6
- export const renderDialogTitle_unstable = state => {
7
- const {
8
- slots,
9
- slotProps
10
- } = getSlotsNext(state);
11
- return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/createElement(slots.action, slotProps.action));
5
+ */ export const renderDialogTitle_unstable = (state)=>{
6
+ const { slots , slotProps } = getSlotsNext(state);
7
+ return /*#__PURE__*/ createElement(Fragment, null, /*#__PURE__*/ createElement(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/ createElement(slots.action, slotProps.action));
12
8
  };
13
- //# sourceMappingURL=renderDialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createElement","Fragment","getSlotsNext","renderDialogTitle_unstable","state","slots","slotProps","root","children","action"],"sources":["../../../src/components/DialogTitle/renderDialogTitle.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsxFrag Fragment */\n/** @jsx createElement */\n\nimport { createElement, Fragment } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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) => {\n const { slots, slotProps } = getSlotsNext<DialogTitleSlots>(state);\n\n return (\n <>\n <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root>\n {slots.action && <slots.action {...slotProps.action} />}\n </>\n );\n};\n"],"mappings":"AAAA,2BACA,yBACA,yBAEA,SAASA,aAAa,EAAEC,QAAQ,QAAQ;AAExC,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAA4B;EACrE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAA+BE,KAAA;EAE5D,oBACEJ,aAdJ,CADAC,QAAA,qBAgBMD,aAfN,CAeOK,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI,EAAGD,SAAA,CAAUC,IAAI,CAACC,QAAQ,GACvDH,KAAA,CAAMI,MAAM,iBAAIT,aAhBvB,CAgBwBK,KAAA,CAAMI,MAAM,EAAKH,SAAA,CAAUG,MAAM;AAGzD"}
1
+ {"version":3,"sources":["renderDialogTitle.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsxFrag Fragment */\n/** @jsx createElement */\n\nimport { createElement, Fragment } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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) => {\n const { slots, slotProps } = getSlotsNext<DialogTitleSlots>(state);\n\n return (\n <>\n <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root>\n {slots.action && <slots.action {...slotProps.action} />}\n </>\n );\n};\n"],"names":["createElement","Fragment","getSlotsNext","renderDialogTitle_unstable","state","slots","slotProps","root","children","action"],"mappings":"AAAA,wBAAwB,GACxB,sBAAsB,GACtB,uBAAuB,GAEvB,SAASA,aAAa,EAAEC,QAAQ,QAAQ,8BAA8B;AAEtE,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA+BE;IAE5D,qBACE,AAdJ,cADA,8BAgBM,AAfN,cAeOC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAAGD,UAAUC,IAAI,CAACC,QAAQ,GACvDH,MAAMI,MAAM,kBAAI,AAhBvB,cAgBwBJ,MAAMI,MAAM,EAAKH,UAAUG,MAAM;AAGzD,EAAE"}
@@ -13,38 +13,33 @@ import { useDialogTitleInternalStyles } from './useDialogTitleStyles.styles';
13
13
  *
14
14
  * @param props - props from this instance of DialogTitle
15
15
  * @param ref - reference to root HTMLElement of DialogTitle
16
- */
17
- export const useDialogTitle_unstable = (props, ref) => {
18
- const {
19
- as,
20
- action
21
- } = props;
22
- const modalType = useDialogContext_unstable(ctx => ctx.modalType);
23
- const internalStyles = useDialogTitleInternalStyles();
24
- return {
25
- components: {
26
- root: 'h2',
27
- action: 'div'
28
- },
29
- root: getNativeElementProps(as !== null && as !== void 0 ? as : 'h2', {
30
- ref,
31
- id: useDialogContext_unstable(ctx => ctx.dialogTitleId),
32
- ...props
33
- }),
34
- action: resolveShorthand(action, {
35
- required: modalType === 'non-modal',
36
- defaultProps: {
37
- children: /*#__PURE__*/React.createElement(DialogTrigger, {
38
- disableButtonEnhancement: true,
39
- action: "close"
40
- }, /*#__PURE__*/React.createElement("button", {
41
- type: "button",
42
- className: internalStyles.button,
43
- // TODO: find a better way to add internal labels
44
- "aria-label": "close"
45
- }, /*#__PURE__*/React.createElement(Dismiss20Regular, null)))
46
- }
47
- })
48
- };
16
+ */ export const useDialogTitle_unstable = (props, ref)=>{
17
+ const { as , action } = props;
18
+ const modalType = useDialogContext_unstable((ctx)=>ctx.modalType);
19
+ const internalStyles = useDialogTitleInternalStyles();
20
+ return {
21
+ components: {
22
+ root: 'h2',
23
+ action: 'div'
24
+ },
25
+ root: getNativeElementProps(as !== null && as !== void 0 ? as : 'h2', {
26
+ ref,
27
+ id: useDialogContext_unstable((ctx)=>ctx.dialogTitleId),
28
+ ...props
29
+ }),
30
+ action: resolveShorthand(action, {
31
+ required: modalType === 'non-modal',
32
+ defaultProps: {
33
+ children: /*#__PURE__*/ React.createElement(DialogTrigger, {
34
+ disableButtonEnhancement: true,
35
+ action: "close"
36
+ }, /*#__PURE__*/ React.createElement("button", {
37
+ type: "button",
38
+ className: internalStyles.button,
39
+ // TODO: find a better way to add internal labels
40
+ "aria-label": "close"
41
+ }, /*#__PURE__*/ React.createElement(Dismiss20Regular, null)))
42
+ }
43
+ })
44
+ };
49
45
  };
50
- //# sourceMappingURL=useDialogTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getNativeElementProps","useDialogContext_unstable","Dismiss20Regular","resolveShorthand","DialogTrigger","useDialogTitleInternalStyles","useDialogTitle_unstable","props","ref","as","action","modalType","ctx","internalStyles","components","root","id","dialogTitleId","required","defaultProps","children","createElement","disableButtonEnhancement","type","className","button"],"sources":["../../../src/components/DialogTitle/useDialogTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogTitleProps, DialogTitleState } from './DialogTitle.types';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\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 { as, 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: getNativeElementProps(as ?? 'h2', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props,\n }),\n action: resolveShorthand(action, {\n required: modalType === 'non-modal',\n defaultProps: {\n children: (\n <DialogTrigger disableButtonEnhancement action=\"close\">\n <button\n type=\"button\"\n className={internalStyles.button}\n // TODO: find a better way to add internal labels\n aria-label=\"close\"\n >\n <Dismiss20Regular />\n </button>\n </DialogTrigger>\n ),\n },\n }),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,QAAQ;AAEtC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,gBAAgB,QAAQ;AACjC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,aAAa,QAAQ;AAC9B,SAASC,4BAA4B,QAAQ;AAE7C;;;;;;;;;AASA,OAAO,MAAMC,uBAAA,GAA0BA,CAACC,KAAA,EAAyBC,GAAA,KAAqD;EACpH,MAAM;IAAEC,EAAA;IAAIC;EAAM,CAAE,GAAGH,KAAA;EACvB,MAAMI,SAAA,GAAYV,yBAAA,CAA0BW,GAAA,IAAOA,GAAA,CAAID,SAAS;EAChE,MAAME,cAAA,GAAiBR,4BAAA;EAEvB,OAAO;IACLS,UAAA,EAAY;MACVC,IAAA,EAAM;MACNL,MAAA,EAAQ;IACV;IACAK,IAAA,EAAMf,qBAAA,CAAsBS,EAAA,aAAAA,EAAA,cAAAA,EAAA,GAAM,IAAI,EAAE;MACtCD,GAAA;MACAQ,EAAA,EAAIf,yBAAA,CAA0BW,GAAA,IAAOA,GAAA,CAAIK,aAAa;MACtD,GAAGV;IACL;IACAG,MAAA,EAAQP,gBAAA,CAAiBO,MAAA,EAAQ;MAC/BQ,QAAA,EAAUP,SAAA,KAAc;MACxBQ,YAAA,EAAc;QACZC,QAAA,eACErB,KAAA,CAAAsB,aAAA,CAACjB,aAAA;UAAckB,wBAAA,MAAwB;UAACZ,MAAA,EAAO;wBAC7CX,KAAA,CAAAsB,aAAA,CAAC;UACCE,IAAA,EAAK;UACLC,SAAA,EAAWX,cAAA,CAAeY,MAAM;UAChC;UACA,cAAW;wBAEX1B,KAAA,CAAAsB,aAAA,CAACnB,gBAAA;MAIT;IACF;EACF;AACF"}
1
+ {"version":3,"sources":["useDialogTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogTitleProps, DialogTitleState } from './DialogTitle.types';\nimport { useDialogContext_unstable } from '../../contexts/dialogContext';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\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 { as, 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: getNativeElementProps(as ?? 'h2', {\n ref,\n id: useDialogContext_unstable(ctx => ctx.dialogTitleId),\n ...props,\n }),\n action: resolveShorthand(action, {\n required: modalType === 'non-modal',\n defaultProps: {\n children: (\n <DialogTrigger disableButtonEnhancement action=\"close\">\n <button\n type=\"button\"\n className={internalStyles.button}\n // TODO: find a better way to add internal labels\n aria-label=\"close\"\n >\n <Dismiss20Regular />\n </button>\n </DialogTrigger>\n ),\n },\n }),\n };\n};\n"],"names":["React","getNativeElementProps","useDialogContext_unstable","Dismiss20Regular","resolveShorthand","DialogTrigger","useDialogTitleInternalStyles","useDialogTitle_unstable","props","ref","as","action","modalType","ctx","internalStyles","components","root","id","dialogTitleId","required","defaultProps","children","disableButtonEnhancement","button","type","className","aria-label"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,SAASC,yBAAyB,QAAQ,+BAA+B;AACzE,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,aAAa,QAAQ,iCAAiC;AAC/D,SAASC,4BAA4B,QAAQ,gCAAgC;AAE7E;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAqD;IACpH,MAAM,EAAEC,GAAE,EAAEC,OAAM,EAAE,GAAGH;IACvB,MAAMI,YAAYV,0BAA0BW,CAAAA,MAAOA,IAAID,SAAS;IAChE,MAAME,iBAAiBR;IAEvB,OAAO;QACLS,YAAY;YACVC,MAAM;YACNL,QAAQ;QACV;QACAK,MAAMf,sBAAsBS,eAAAA,gBAAAA,KAAM,IAAI,EAAE;YACtCD;YACAQ,IAAIf,0BAA0BW,CAAAA,MAAOA,IAAIK,aAAa;YACtD,GAAGV,KAAK;QACV;QACAG,QAAQP,iBAAiBO,QAAQ;YAC/BQ,UAAUP,cAAc;YACxBQ,cAAc;gBACZC,wBACE,oBAAChB;oBAAciB,0BAAAA,IAAwB;oBAACX,QAAO;iCAC7C,oBAACY;oBACCC,MAAK;oBACLC,WAAWX,eAAeS,MAAM;oBAChC,iDAAiD;oBACjDG,cAAW;iCAEX,oBAACvB;YAIT;QACF;IACF;AACF,EAAE"}
@@ -86,13 +86,13 @@ export const useDialogTitleInternalStyles = /*#__PURE__*/__styles({
86
86
  i03rao: ["fd0oaoj", "f1cwg4i8"],
87
87
  Boxcth7: "fjvm52t",
88
88
  Bsom6fd: ["f1cwg4i8", "fd0oaoj"],
89
- J0r882: "fdiulkx",
90
- Bjwuhne: "f1yalx80",
91
- Ghsupd: ["fq22d5a", "f1jw7pan"],
92
- Bule8hv: ["f1jw7pan", "fq22d5a"]
89
+ J0r882: "f57olzd",
90
+ Bule8hv: ["f4stah7", "fs1por5"],
91
+ Bjwuhne: "f480a47",
92
+ Ghsupd: ["fs1por5", "f4stah7"]
93
93
  }
94
94
  }, {
95
- d: [".f10pi13n{position:relative;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".f1k6fduh{cursor:pointer;}", ".fez10in{line-height:0;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}", ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}", ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}", ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}", ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}", ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}", ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}", ".fd6o370[data-fui-focus-visible]::after{z-index:1;}", ".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}", ".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}", ".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}", ".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}", ".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}", ".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}", ".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}", ".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}", ".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}", ".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}", ".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}", ".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}", ".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}", ".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}", ".fdiulkx[data-fui-focus-visible]::after{top:-2px;}", ".f1yalx80[data-fui-focus-visible]::after{bottom:-2px;}", ".fq22d5a[data-fui-focus-visible]::after{left:-2px;}", ".f1jw7pan[data-fui-focus-visible]::after{right:-2px;}"],
95
+ d: [".f10pi13n{position:relative;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".f1k6fduh{cursor:pointer;}", ".fez10in{line-height:0;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}", ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}", ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}", ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}", ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}", ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}", ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}", ".fd6o370[data-fui-focus-visible]::after{z-index:1;}", ".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}", ".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}", ".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}", ".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}", ".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}", ".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}", ".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}", ".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}", ".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}", ".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}", ".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}", ".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}", ".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}", ".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}", ".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}", ".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}", ".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}", ".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}"],
96
96
  f: [".ftqa4ok:focus{outline-style:none;}"],
97
97
  i: [".f2hkw1w:focus-visible{outline-style:none;}"]
98
98
  });
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","dialogTitleClassNames","root","action","useStyles","Ijaq50","nk6f5a","Br312pm","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","B6of3ja","t21cq0","jrapky","Frg6f3","rootWithoutAction","Bdqf98w","qb2dma","d","useDialogTitleInternalStyles","button","qhf8xq","B7ck84d","De3pzq","sj55zd","Bceei9c","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","icvyot","vrafjx","oivjwe","wvpqe5","Bv0vk6g","fsow6f","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bjwuhne","Ghsupd","Bule8hv","f","i","useDialogTitleStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogTitle/useDialogTitleStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } 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 useStyles = makeStyles({\n root: {\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3,\n ...typographyStyles.subtitle1,\n ...shorthands.margin(0),\n },\n rootWithoutAction: {},\n action: {\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 3,\n justifySelf: 'end',\n alignSelf: 'start',\n },\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 = makeStyles({\n button: {\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 ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n ...createFocusOutlineStyle(),\n },\n});\n\n/**\n * Apply styling to the DialogTitle slots based on the state\n */\nexport const useDialogTitleStyles_unstable = (state: DialogTitleState): DialogTitleState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogTitleClassNames.root,\n styles.root,\n !state.action && styles.rootWithoutAction,\n state.root.className,\n );\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SAASC,gBAAgB,QAAQ;AACjC,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;EACNC,MAAA,EAAQ;AACV;AAEA;;;AAGA,MAAMC,SAAA,gBAAYR,QAAA;EAAAM,IAAA;IAAAG,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,iBAAA;EAAAd,MAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAW,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAiBlB;AAEA;;;;AAIA,OAAO,MAAMC,4BAAA,gBAA+BzB,QAAA;EAAA0B,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAjB,OAAA;IAAAC,OAAA;IAAAiB,OAAA;IAAAf,OAAA;IAAAgB,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAjD,CAAA;EAAAkD,CAAA;EAAAC,CAAA;AAAA,EAiB5C;AAEA;;;AAGA,OAAO,MAAMC,6BAAA,GAAiCC,KAAA,IAA8C;EAC1F,MAAMC,MAAA,GAAStE,SAAA;EACfqE,KAAA,CAAMvE,IAAI,CAACyE,SAAS,GAAG9E,YAAA,CACrBI,qBAAA,CAAsBC,IAAI,EAC1BwE,MAAA,CAAOxE,IAAI,EACX,CAACuE,KAAA,CAAMtE,MAAM,IAAIuE,MAAA,CAAOzD,iBAAiB,EACzCwD,KAAA,CAAMvE,IAAI,CAACyE,SAAS;EAEtB,IAAIF,KAAA,CAAMtE,MAAM,EAAE;IAChBsE,KAAA,CAAMtE,MAAM,CAACwE,SAAS,GAAG9E,YAAA,CAAaI,qBAAA,CAAsBE,MAAM,EAAEuE,MAAA,CAAOvE,MAAM,EAAEsE,KAAA,CAAMtE,MAAM,CAACwE,SAAS;EAC3G;EACA,OAAOF,KAAA;AACT"}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","typographyStyles","createFocusOutlineStyle","dialogTitleClassNames","root","action","useStyles","Ijaq50","nk6f5a","Br312pm","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","B6of3ja","t21cq0","jrapky","Frg6f3","rootWithoutAction","Bdqf98w","qb2dma","d","useDialogTitleInternalStyles","button","qhf8xq","B7ck84d","De3pzq","sj55zd","Bceei9c","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","icvyot","vrafjx","oivjwe","wvpqe5","Bv0vk6g","fsow6f","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","Bm4h7ae","B7ys5i9","Busjfv9","Bhk32uz","Bf4ptjt","kclons","Bhdgwq3","Blkhhs4","Bqtpl0w","clg4pj","hgwjuy","Bonggc9","B1tsrr9","Dah5zi","Bkh64rk","qqdqy8","B6dhp37","i03rao","Boxcth7","Bsom6fd","J0r882","Bule8hv","Bjwuhne","Ghsupd","f","i","useDialogTitleStyles_unstable","state","styles","className"],"sources":["useDialogTitleStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } 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 useStyles = makeStyles({\n root: {\n gridRowStart: 1,\n gridRowEnd: 1,\n gridColumnStart: 1,\n gridColumnEnd: 3,\n ...typographyStyles.subtitle1,\n ...shorthands.margin(0)\n },\n rootWithoutAction: {},\n action: {\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 */ export const useDialogTitleInternalStyles = makeStyles({\n button: {\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 ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n ...createFocusOutlineStyle()\n }\n});\n/**\n * Apply styling to the DialogTitle slots based on the state\n */ export const useDialogTitleStyles_unstable = (state)=>{\n const styles = useStyles();\n state.root.className = mergeClasses(dialogTitleClassNames.root, styles.root, !state.action && styles.rootWithoutAction, state.root.className);\n if (state.action) {\n state.action.className = mergeClasses(dialogTitleClassNames.action, styles.action, state.action.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,IAAI,EAAE,iBAAiB;EACvBC,MAAM,EAAE;AACZ,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGR,QAAA;EAAAM,IAAA;IAAAG,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,iBAAA;EAAAd,MAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAW,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAiBrB,CAAC;AACF;AACA;AACA;AACA;AAAI,OAAO,MAAMC,4BAA4B,gBAAGzB,QAAA;EAAA0B,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAjB,OAAA;IAAAC,OAAA;IAAAiB,OAAA;IAAAf,OAAA;IAAAgB,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAjD,CAAA;EAAAkD,CAAA;EAAAC,CAAA;AAAA,CAiB/C,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,6BAA6B,GAAIC,KAAK,IAAG;EACtD,MAAMC,MAAM,GAAGtE,SAAS,CAAC,CAAC;EAC1BqE,KAAK,CAACvE,IAAI,CAACyE,SAAS,GAAG9E,YAAY,CAACI,qBAAqB,CAACC,IAAI,EAAEwE,MAAM,CAACxE,IAAI,EAAE,CAACuE,KAAK,CAACtE,MAAM,IAAIuE,MAAM,CAACzD,iBAAiB,EAAEwD,KAAK,CAACvE,IAAI,CAACyE,SAAS,CAAC;EAC7I,IAAIF,KAAK,CAACtE,MAAM,EAAE;IACdsE,KAAK,CAACtE,MAAM,CAACwE,SAAS,GAAG9E,YAAY,CAACI,qBAAqB,CAACE,MAAM,EAAEuE,MAAM,CAACvE,MAAM,EAAEsE,KAAK,CAACtE,MAAM,CAACwE,SAAS,CAAC;EAC9G;EACA,OAAOF,KAAK;AAChB,CAAC"}
@@ -9,12 +9,10 @@ import { renderDialogTrigger_unstable } from './renderDialogTrigger';
9
9
  * This component sole purpose is to avoid opting out of the internal controlled open state of a `Dialog`
10
10
  * Besides being a trigger that opens/close a dialog through context this component doesn't do much,
11
11
  * making it basically unnecessary in cases where the trigger is outside of the `Dialog` component.
12
- */
13
- export const DialogTrigger = props => {
14
- const state = useDialogTrigger_unstable(props);
15
- return renderDialogTrigger_unstable(state);
12
+ */ export const DialogTrigger = (props)=>{
13
+ const state = useDialogTrigger_unstable(props);
14
+ return renderDialogTrigger_unstable(state);
16
15
  };
17
16
  DialogTrigger.displayName = 'DialogTrigger';
18
17
  // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
19
18
  DialogTrigger.isFluentTriggerComponent = true;
20
- //# sourceMappingURL=DialogTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogTrigger","props","state","displayName","isFluentTriggerComponent"],"sources":["../../../src/components/DialogTrigger/DialogTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTrigger_unstable } from './useDialogTrigger.styles';\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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAI7C;;;;;;;;;AASA,OAAO,MAAMC,aAAA,GAA8CC,KAAA,IAAS;EAClE,MAAMC,KAAA,GAAQJ,yBAAA,CAA0BG,KAAA;EAExC,OAAOF,4BAAA,CAA6BG,KAAA;AACtC;AAEAF,aAAA,CAAcG,WAAW,GAAG;AAC5B;AACCH,aAAA,CAAyCI,wBAAwB,GAAG,IAAI"}
1
+ {"version":3,"sources":["DialogTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogTrigger_unstable } from './useDialogTrigger.styles';\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":["React","useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogTrigger","props","state","displayName","isFluentTriggerComponent"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,4BAA4B;AACtE,SAASC,4BAA4B,QAAQ,wBAAwB;AAIrE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gBAA8CC,CAAAA,QAAS;IAClE,MAAMC,QAAQJ,0BAA0BG;IAExC,OAAOF,6BAA6BG;AACtC,EAAE;AAEFF,cAAcG,WAAW,GAAG;AAC5B,6FAA6F;AAC5FH,cAAyCI,wBAAwB,GAAG,IAAI"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=DialogTrigger.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../../src/components/DialogTrigger/DialogTrigger.types.ts"],"sourcesContent":["import { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport * 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"],"mappings":"AAEA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["DialogTrigger.types.ts"],"sourcesContent":["import { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport * 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":["React"],"mappings":"AAEA,YAAYA,WAAW,QAAQ"}
@@ -2,4 +2,3 @@ export * from './DialogTrigger';
2
2
  export * from './DialogTrigger.types';
3
3
  export * from './renderDialogTrigger';
4
4
  export * from './useDialogTrigger.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DialogTrigger/index.ts"],"sourcesContent":["export * from './DialogTrigger';\nexport * from './DialogTrigger.types';\nexport * from './renderDialogTrigger';\nexport * from './useDialogTrigger.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DialogTrigger';\nexport * from './DialogTrigger.types';\nexport * from './renderDialogTrigger';\nexport * from './useDialogTrigger.styles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,4BAA4B"}