@fluentui/react-dialog 9.5.2 → 9.5.4

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 (107) hide show
  1. package/CHANGELOG.json +135 -1
  2. package/CHANGELOG.md +36 -2
  3. package/dist/index.d.ts +5 -3
  4. package/lib/components/Dialog/useDialog.js +11 -1
  5. package/lib/components/Dialog/useDialog.js.map +1 -1
  6. package/lib/components/Dialog/useDialogContextValues.js +5 -1
  7. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  8. package/lib/components/DialogActions/DialogActions.js +3 -6
  9. package/lib/components/DialogActions/DialogActions.js.map +1 -1
  10. package/lib/components/DialogActions/index.js +1 -1
  11. package/lib/components/DialogActions/index.js.map +1 -1
  12. package/lib/components/DialogActions/{useDialogActionsStyles.js → useDialogActionsStyles.styles.js} +1 -1
  13. package/lib/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -0
  14. package/lib/components/DialogBody/DialogBody.js +3 -6
  15. package/lib/components/DialogBody/DialogBody.js.map +1 -1
  16. package/lib/components/DialogBody/index.js +1 -1
  17. package/lib/components/DialogBody/index.js.map +1 -1
  18. package/lib/components/DialogBody/{useDialogBodyStyles.js → useDialogBodyStyles.styles.js} +1 -1
  19. package/lib/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -0
  20. package/lib/components/DialogContent/DialogContent.js +3 -6
  21. package/lib/components/DialogContent/DialogContent.js.map +1 -1
  22. package/lib/components/DialogContent/index.js +1 -1
  23. package/lib/components/DialogContent/index.js.map +1 -1
  24. package/lib/components/DialogContent/{useDialogContentStyles.js → useDialogContentStyles.styles.js} +1 -1
  25. package/lib/components/DialogContent/useDialogContentStyles.styles.js.map +1 -0
  26. package/lib/components/DialogSurface/DialogSurface.js +3 -6
  27. package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
  28. package/lib/components/DialogSurface/index.js +1 -1
  29. package/lib/components/DialogSurface/index.js.map +1 -1
  30. package/lib/components/DialogSurface/useDialogSurface.js +1 -8
  31. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  32. package/lib/components/DialogSurface/{useDialogSurfaceStyles.js → useDialogSurfaceStyles.styles.js} +1 -1
  33. package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -0
  34. package/lib/components/DialogTitle/DialogTitle.js +3 -6
  35. package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
  36. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
  37. package/lib/components/DialogTitle/index.js +1 -1
  38. package/lib/components/DialogTitle/index.js.map +1 -1
  39. package/lib/components/DialogTitle/useDialogTitle.js +5 -5
  40. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  41. package/lib/components/DialogTitle/{useDialogTitleStyles.js → useDialogTitleStyles.styles.js} +7 -3
  42. package/lib/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -0
  43. package/lib/components/DialogTrigger/DialogTrigger.js +1 -1
  44. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
  45. package/lib/components/DialogTrigger/index.js +1 -1
  46. package/lib/components/DialogTrigger/index.js.map +1 -1
  47. package/lib/components/DialogTrigger/{useDialogTrigger.js → useDialogTrigger.styles.js} +2 -5
  48. package/lib/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -0
  49. package/lib/contexts/dialogContext.js.map +1 -1
  50. package/lib-commonjs/components/Dialog/useDialog.js +8 -1
  51. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
  52. package/lib-commonjs/components/Dialog/useDialogContextValues.js +3 -1
  53. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
  54. package/lib-commonjs/components/DialogActions/DialogActions.js +3 -4
  55. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
  56. package/lib-commonjs/components/DialogActions/index.js +1 -1
  57. package/lib-commonjs/components/DialogActions/index.js.map +1 -1
  58. package/lib-commonjs/components/DialogActions/{useDialogActionsStyles.js → useDialogActionsStyles.styles.js} +2 -2
  59. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -0
  60. package/lib-commonjs/components/DialogBody/DialogBody.js +3 -4
  61. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
  62. package/lib-commonjs/components/DialogBody/index.js +1 -1
  63. package/lib-commonjs/components/DialogBody/index.js.map +1 -1
  64. package/lib-commonjs/components/DialogBody/{useDialogBodyStyles.js → useDialogBodyStyles.styles.js} +2 -2
  65. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -0
  66. package/lib-commonjs/components/DialogContent/DialogContent.js +3 -4
  67. package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
  68. package/lib-commonjs/components/DialogContent/index.js +1 -1
  69. package/lib-commonjs/components/DialogContent/index.js.map +1 -1
  70. package/lib-commonjs/components/DialogContent/{useDialogContentStyles.js → useDialogContentStyles.styles.js} +2 -2
  71. package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js.map +1 -0
  72. package/lib-commonjs/components/DialogSurface/DialogSurface.js +3 -4
  73. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
  74. package/lib-commonjs/components/DialogSurface/index.js +1 -1
  75. package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
  76. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +1 -6
  77. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
  78. package/lib-commonjs/components/DialogSurface/{useDialogSurfaceStyles.js → useDialogSurfaceStyles.styles.js} +2 -2
  79. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -0
  80. package/lib-commonjs/components/DialogTitle/DialogTitle.js +3 -4
  81. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
  82. package/lib-commonjs/components/DialogTitle/index.js +1 -1
  83. package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
  84. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +5 -5
  85. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
  86. package/lib-commonjs/components/DialogTitle/{useDialogTitleStyles.js → useDialogTitleStyles.styles.js} +17 -3
  87. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -0
  88. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +2 -2
  89. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
  90. package/lib-commonjs/components/DialogTrigger/index.js +1 -1
  91. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
  92. package/lib-commonjs/components/DialogTrigger/{useDialogTrigger.js → useDialogTrigger.styles.js} +3 -4
  93. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.styles.js.map +1 -0
  94. package/package.json +11 -11
  95. package/.swcrc +0 -30
  96. package/lib/components/DialogActions/useDialogActionsStyles.js.map +0 -1
  97. package/lib/components/DialogBody/useDialogBodyStyles.js.map +0 -1
  98. package/lib/components/DialogContent/useDialogContentStyles.js.map +0 -1
  99. package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +0 -1
  100. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +0 -1
  101. package/lib/components/DialogTrigger/useDialogTrigger.js.map +0 -1
  102. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +0 -1
  103. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +0 -1
  104. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +0 -1
  105. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +0 -1
  106. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +0 -1
  107. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,141 @@
2
2
  "name": "@fluentui/react-dialog",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 17 Apr 2023 17:50:00 GMT",
5
+ "date": "Fri, 12 May 2023 20:21:46 GMT",
6
+ "tag": "@fluentui/react-dialog_v9.5.4",
7
+ "version": "9.5.4",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "bernardo.sunderhus@gmail.com",
12
+ "package": "@fluentui/react-dialog",
13
+ "commit": "2f28bd181dfa3114b544f2500d2b653ab31ceecc",
14
+ "comment": "bugfix: change DialogTitle default action icon from 24x24 to 20x20"
15
+ },
16
+ {
17
+ "author": "olfedias@microsoft.com",
18
+ "package": "@fluentui/react-dialog",
19
+ "commit": "c28decb23d191a0daaaf6d5d1832429715102129",
20
+ "comment": "chore: exclude .swcrc from being published"
21
+ },
22
+ {
23
+ "author": "olfedias@microsoft.com",
24
+ "package": "@fluentui/react-dialog",
25
+ "commit": "9d6394b6c751092fd1d4e26ccc618b5ba05086ec",
26
+ "comment": "chore: move makeStyles() calls to .styles.ts files"
27
+ },
28
+ {
29
+ "author": "gcox@microsoft.com",
30
+ "package": "@fluentui/react-dialog",
31
+ "commit": "ee977e20d359922798949a4f18af7a036ca36ca3",
32
+ "comment": "Update to use single hook selector"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-dialog",
37
+ "comment": "Bump @fluentui/react-utilities to v9.8.1",
38
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-dialog",
43
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3",
44
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-dialog",
49
+ "comment": "Bump @fluentui/keyboard-keys to v9.0.3",
50
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-dialog",
55
+ "comment": "Bump @fluentui/react-context-selector to v9.1.19",
56
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/react-dialog",
61
+ "comment": "Bump @fluentui/react-shared-contexts to v9.4.0",
62
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui/react-dialog",
67
+ "comment": "Bump @fluentui/react-aria to v9.3.19",
68
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@fluentui/react-dialog",
73
+ "comment": "Bump @fluentui/react-tabster to v9.7.0",
74
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@fluentui/react-dialog",
79
+ "comment": "Bump @fluentui/react-theme to v9.1.8",
80
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@fluentui/react-dialog",
85
+ "comment": "Bump @fluentui/react-portal to v9.2.7",
86
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@fluentui/react-dialog",
91
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21",
92
+ "commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
93
+ }
94
+ ],
95
+ "none": [
96
+ {
97
+ "author": "martinhochel@microsoft.com",
98
+ "package": "@fluentui/react-dialog",
99
+ "commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
100
+ "comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
101
+ }
102
+ ]
103
+ }
104
+ },
105
+ {
106
+ "date": "Mon, 24 Apr 2023 08:12:35 GMT",
107
+ "tag": "@fluentui/react-dialog_v9.5.3",
108
+ "version": "9.5.3",
109
+ "comments": {
110
+ "patch": [
111
+ {
112
+ "author": "bernardo.sunderhus@gmail.com",
113
+ "package": "@fluentui/react-dialog",
114
+ "commit": "b287dc6426477a8ec03b6a845ea0ee3ba0bfb726",
115
+ "comment": "bugfix: DialogTitle root as h2 by default"
116
+ },
117
+ {
118
+ "author": "bernardo.sunderhus@gmail.com",
119
+ "package": "@fluentui/react-dialog",
120
+ "commit": "85c36e249b33b0bad79be4edd1a943dfc5233b11",
121
+ "comment": "bugfix: remove caret from react-jsx-runtime prerelease dependency"
122
+ },
123
+ {
124
+ "author": "bernardo.sunderhus@gmail.com",
125
+ "package": "@fluentui/react-dialog",
126
+ "commit": "1227882a7a3813f21c45df6eb27aa65a89a5c45c",
127
+ "comment": "chore: hoist tabster modal attributes to Dialog component"
128
+ },
129
+ {
130
+ "author": "beachball",
131
+ "package": "@fluentui/react-dialog",
132
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2",
133
+ "commit": "505433ac64f144c9cca456097413d6af4582e5ee"
134
+ }
135
+ ]
136
+ }
137
+ },
138
+ {
139
+ "date": "Mon, 17 Apr 2023 17:53:49 GMT",
6
140
  "tag": "@fluentui/react-dialog_v9.5.2",
7
141
  "version": "9.5.2",
8
142
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,46 @@
1
1
  # Change Log - @fluentui/react-dialog
2
2
 
3
- This log was last generated on Mon, 17 Apr 2023 17:50:00 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 12 May 2023 20:21:46 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.5.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.4)
8
+
9
+ Fri, 12 May 2023 20:21:46 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.3..@fluentui/react-dialog_v9.5.4)
11
+
12
+ ### Patches
13
+
14
+ - bugfix: change DialogTitle default action icon from 24x24 to 20x20 ([PR #27815](https://github.com/microsoft/fluentui/pull/27815) by bernardo.sunderhus@gmail.com)
15
+ - chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
16
+ - chore: move makeStyles() calls to .styles.ts files ([PR #27698](https://github.com/microsoft/fluentui/pull/27698) by olfedias@microsoft.com)
17
+ - Update to use single hook selector ([PR #27491](https://github.com/microsoft/fluentui/pull/27491) by gcox@microsoft.com)
18
+ - Bump @fluentui/react-utilities to v9.8.1 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
19
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
20
+ - Bump @fluentui/keyboard-keys to v9.0.3 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
21
+ - Bump @fluentui/react-context-selector to v9.1.19 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
22
+ - Bump @fluentui/react-shared-contexts to v9.4.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
23
+ - Bump @fluentui/react-aria to v9.3.19 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
24
+ - Bump @fluentui/react-tabster to v9.7.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
25
+ - Bump @fluentui/react-theme to v9.1.8 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
26
+ - Bump @fluentui/react-portal to v9.2.7 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
27
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
28
+
29
+ ## [9.5.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.3)
30
+
31
+ Mon, 24 Apr 2023 08:12:35 GMT
32
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.2..@fluentui/react-dialog_v9.5.3)
33
+
34
+ ### Patches
35
+
36
+ - bugfix: DialogTitle root as h2 by default ([PR #27555](https://github.com/microsoft/fluentui/pull/27555) by bernardo.sunderhus@gmail.com)
37
+ - bugfix: remove caret from react-jsx-runtime prerelease dependency ([PR #27588](https://github.com/microsoft/fluentui/pull/27588) by bernardo.sunderhus@gmail.com)
38
+ - chore: hoist tabster modal attributes to Dialog component ([PR #27541](https://github.com/microsoft/fluentui/pull/27541) by bernardo.sunderhus@gmail.com)
39
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
40
+
7
41
  ## [9.5.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.2)
8
42
 
9
- Mon, 17 Apr 2023 17:50:00 GMT
43
+ Mon, 17 Apr 2023 17:53:49 GMT
10
44
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.1..@fluentui/react-dialog_v9.5.2)
11
45
 
12
46
  ### Patches
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { ReactElement } from 'react';
11
11
  import type { Slot } from '@fluentui/react-utilities';
12
12
  import type { SlotClassNames } from '@fluentui/react-utilities';
13
13
  import type { TriggerProps } from '@fluentui/react-utilities';
14
+ import { useModalAttributes } from '@fluentui/react-tabster';
14
15
 
15
16
  /**
16
17
  * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.
@@ -111,7 +112,7 @@ declare type DialogContextValue = {
111
112
  * Requests dialog main component to update it's internal open state
112
113
  */
113
114
  requestOpenChange: (data: DialogOpenChangeData) => void;
114
- };
115
+ } & Partial<ReturnType<typeof useModalAttributes>>;
115
116
 
116
117
  declare type DialogContextValues = {
117
118
  dialog: DialogContextValue;
@@ -264,9 +265,10 @@ export declare type DialogTitleProps = ComponentProps<DialogTitleSlots>;
264
265
 
265
266
  export declare type DialogTitleSlots = {
266
267
  /**
267
- * By default this is a div, but can be a heading.
268
+ * By default this is a h2, but can be any heading or div,
269
+ * if `div` is provided do not forget to also provide proper `role="heading"` and `aria-level` attributes
268
270
  */
269
- root: Slot<'div', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
271
+ root: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;
270
272
  /**
271
273
  * By default a Dialog with modalType='non-modal' will have a close button action
272
274
  */
@@ -3,6 +3,7 @@ import { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffec
3
3
  import { useHasParentContext } from '@fluentui/react-context-selector';
4
4
  import { useDisableBodyScroll, useFocusFirstElement } from '../../utils';
5
5
  import { DialogContext } from '../../contexts';
6
+ import { useModalAttributes } from '@fluentui/react-tabster';
6
7
  /**
7
8
  * Create the state required to render Dialog.
8
9
  *
@@ -40,6 +41,13 @@ export const useDialog_unstable = props => {
40
41
  return disableBodyScroll();
41
42
  }
42
43
  }, [disableBodyScroll, isBodyScrollLocked]);
44
+ const {
45
+ modalAttributes,
46
+ triggerAttributes
47
+ } = useModalAttributes({
48
+ trapFocus: modalType !== 'non-modal',
49
+ legacyTrapFocus: !inertTrapFocus
50
+ });
43
51
  return {
44
52
  components: {
45
53
  backdrop: 'div'
@@ -52,7 +60,9 @@ export const useDialog_unstable = props => {
52
60
  requestOpenChange,
53
61
  dialogTitleId: useId('dialog-title-'),
54
62
  isNestedDialog: useHasParentContext(DialogContext),
55
- dialogRef: focusRef
63
+ dialogRef: focusRef,
64
+ modalAttributes: modalType !== 'non-modal' ? modalAttributes : undefined,
65
+ triggerAttributes
56
66
  };
57
67
  };
58
68
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["React","useControllableState","useEventCallback","useId","useIsomorphicLayoutEffect","useHasParentContext","useDisableBodyScroll","useFocusFirstElement","DialogContext","useDialog_unstable","props","children","modalType","onOpenChange","inertTrapFocus","trigger","content","childrenToTriggerAndContent","open","setOpen","state","defaultState","defaultOpen","initialState","requestOpenChange","data","event","isDefaultPrevented","focusRef","disableBodyScroll","isBodyScrollLocked","Boolean","components","backdrop","dialogTitleId","isNestedDialog","dialogRef","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn","undefined"],"sources":["../../../src/components/Dialog/useDialog.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange, inertTrapFocus = false } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,yBAAyB,QAAQ;AACzF,SAASC,mBAAmB,QAAQ;AACpC,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ;AAC3D,SAASC,aAAa,QAAQ;AAI9B;;;;;;;;AAQA,OAAO,MAAMC,kBAAA,GAAsBC,KAAA,IAAoC;EACrE,MAAM;IAAEC,QAAA;IAAUC,SAAA,GAAY;IAASC,YAAA;IAAcC,cAAA,GAAiB;EAAK,CAAE,GAAGJ,KAAA;EAEhF,MAAM,CAACK,OAAA,EAASC,OAAA,CAAQ,GAAGC,2BAAA,CAA4BN,QAAA;EAEvD,MAAM,CAACO,IAAA,EAAMC,OAAA,CAAQ,GAAGlB,oBAAA,CAAqB;IAC3CmB,KAAA,EAAOV,KAAA,CAAMQ,IAAI;IACjBG,YAAA,EAAcX,KAAA,CAAMY,WAAW;IAC/BC,YAAA,EAAc;EAChB;EAEA,MAAMC,iBAAA,GAAoBtB,gBAAA,CAAkBuB,IAAA,IAA+B;IACzEZ,YAAA,aAAAA,YAAA,uBAAAA,YAAA,CAAeY,IAAA,CAAKC,KAAK,EAAED,IAAA;IAE3B;IACA;IACA,IAAI,CAACA,IAAA,CAAKC,KAAK,CAACC,kBAAkB,IAAI;MACpCR,OAAA,CAAQM,IAAA,CAAKP,IAAI;IACnB;EACF;EAEA,MAAMU,QAAA,GAAWrB,oBAAA,CAAqBW,IAAA,EAAMN,SAAA;EAC5C,MAAMiB,iBAAA,GAAoBvB,oBAAA;EAC1B,MAAMwB,kBAAA,GAAqBC,OAAA,CAAQb,IAAA,IAAQN,SAAA,KAAc;EAEzDR,yBAAA,CAA0B,MAAM;IAC9B,IAAI0B,kBAAA,EAAoB;MACtB,OAAOD,iBAAA;IACT;EACF,GAAG,CAACA,iBAAA,EAAmBC,kBAAA,CAAmB;EAE1C,OAAO;IACLE,UAAA,EAAY;MACVC,QAAA,EAAU;IACZ;IACAnB,cAAA;IACAI,IAAA;IACAN,SAAA;IACAI,OAAA,EAASE,IAAA,GAAOF,OAAA,GAAU,IAAI;IAC9BD,OAAA;IACAS,iBAAA;IACAU,aAAA,EAAe/B,KAAA,CAAM;IACrBgC,cAAA,EAAgB9B,mBAAA,CAAoBG,aAAA;IACpC4B,SAAA,EAAWR;EACb;AACF;AAEA;;;AAGA,SAASX,4BACPN,QAAyB,EACsC;EAC/D,MAAM0B,aAAA,GAAgBrC,KAAA,CAAMsC,QAAQ,CAACC,OAAO,CAAC5B,QAAA;EAC7C,IAAI6B,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC,IAAIL,aAAA,CAAcM,MAAM,KAAK,KAAKN,aAAA,CAAcM,MAAM,KAAK,GAAG;MAC5D;MACAC,OAAA,CAAQC,IAAI,CACV,+DACE;IAEN;EACF;EACA,QAAQR,aAAA,CAAcM,MAAM;IAC1B;IACA,KAAK;MACH,OAAON,aAAA;IACT;IACA,KAAK;MACH,OAAO,CAACS,SAAA,EAAWT,aAAa,CAAC,EAAE,CAAC;IACtC;IACA;MACE,OAAO,CAACS,SAAA,EAAWA,SAAA,CAAU;EAAA;AAEnC"}
1
+ {"version":3,"names":["React","useControllableState","useEventCallback","useId","useIsomorphicLayoutEffect","useHasParentContext","useDisableBodyScroll","useFocusFirstElement","DialogContext","useModalAttributes","useDialog_unstable","props","children","modalType","onOpenChange","inertTrapFocus","trigger","content","childrenToTriggerAndContent","open","setOpen","state","defaultState","defaultOpen","initialState","requestOpenChange","data","event","isDefaultPrevented","focusRef","disableBodyScroll","isBodyScrollLocked","Boolean","modalAttributes","triggerAttributes","trapFocus","legacyTrapFocus","components","backdrop","dialogTitleId","isNestedDialog","dialogRef","undefined","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn"],"sources":["../../../src/components/Dialog/useDialog.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange, inertTrapFocus = false } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n const { modalAttributes, triggerAttributes } = useModalAttributes({\n trapFocus: modalType !== 'non-modal',\n legacyTrapFocus: !inertTrapFocus,\n });\n\n return {\n components: {\n backdrop: 'div',\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n modalAttributes: modalType !== 'non-modal' ? modalAttributes : undefined,\n triggerAttributes,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,yBAAyB,QAAQ;AACzF,SAASC,mBAAmB,QAAQ;AACpC,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ;AAC3D,SAASC,aAAa,QAAQ;AAG9B,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;;;AAQA,OAAO,MAAMC,kBAAA,GAAsBC,KAAA,IAAoC;EACrE,MAAM;IAAEC,QAAA;IAAUC,SAAA,GAAY;IAASC,YAAA;IAAcC,cAAA,GAAiB;EAAK,CAAE,GAAGJ,KAAA;EAEhF,MAAM,CAACK,OAAA,EAASC,OAAA,CAAQ,GAAGC,2BAAA,CAA4BN,QAAA;EAEvD,MAAM,CAACO,IAAA,EAAMC,OAAA,CAAQ,GAAGnB,oBAAA,CAAqB;IAC3CoB,KAAA,EAAOV,KAAA,CAAMQ,IAAI;IACjBG,YAAA,EAAcX,KAAA,CAAMY,WAAW;IAC/BC,YAAA,EAAc;EAChB;EAEA,MAAMC,iBAAA,GAAoBvB,gBAAA,CAAkBwB,IAAA,IAA+B;IACzEZ,YAAA,aAAAA,YAAA,uBAAAA,YAAA,CAAeY,IAAA,CAAKC,KAAK,EAAED,IAAA;IAE3B;IACA;IACA,IAAI,CAACA,IAAA,CAAKC,KAAK,CAACC,kBAAkB,IAAI;MACpCR,OAAA,CAAQM,IAAA,CAAKP,IAAI;IACnB;EACF;EAEA,MAAMU,QAAA,GAAWtB,oBAAA,CAAqBY,IAAA,EAAMN,SAAA;EAC5C,MAAMiB,iBAAA,GAAoBxB,oBAAA;EAC1B,MAAMyB,kBAAA,GAAqBC,OAAA,CAAQb,IAAA,IAAQN,SAAA,KAAc;EAEzDT,yBAAA,CAA0B,MAAM;IAC9B,IAAI2B,kBAAA,EAAoB;MACtB,OAAOD,iBAAA;IACT;EACF,GAAG,CAACA,iBAAA,EAAmBC,kBAAA,CAAmB;EAE1C,MAAM;IAAEE,eAAA;IAAiBC;EAAiB,CAAE,GAAGzB,kBAAA,CAAmB;IAChE0B,SAAA,EAAWtB,SAAA,KAAc;IACzBuB,eAAA,EAAiB,CAACrB;EACpB;EAEA,OAAO;IACLsB,UAAA,EAAY;MACVC,QAAA,EAAU;IACZ;IACAvB,cAAA;IACAI,IAAA;IACAN,SAAA;IACAI,OAAA,EAASE,IAAA,GAAOF,OAAA,GAAU,IAAI;IAC9BD,OAAA;IACAS,iBAAA;IACAc,aAAA,EAAepC,KAAA,CAAM;IACrBqC,cAAA,EAAgBnC,mBAAA,CAAoBG,aAAA;IACpCiC,SAAA,EAAWZ,QAAA;IACXI,eAAA,EAAiBpB,SAAA,KAAc,cAAcoB,eAAA,GAAkBS,SAAS;IACxER;EACF;AACF;AAEA;;;AAGA,SAAShB,4BACPN,QAAyB,EACsC;EAC/D,MAAM+B,aAAA,GAAgB3C,KAAA,CAAM4C,QAAQ,CAACC,OAAO,CAACjC,QAAA;EAC7C,IAAIkC,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC,IAAIL,aAAA,CAAcM,MAAM,KAAK,KAAKN,aAAA,CAAcM,MAAM,KAAK,GAAG;MAC5D;MACAC,OAAA,CAAQC,IAAI,CACV,+DACE;IAEN;EACF;EACA,QAAQR,aAAA,CAAcM,MAAM;IAC1B;IACA,KAAK;MACH,OAAON,aAAA;IACT;IACA,KAAK;MACH,OAAO,CAACD,SAAA,EAAWC,aAAa,CAAC,EAAE,CAAC;IACtC;IACA;MACE,OAAO,CAACD,SAAA,EAAWA,SAAA,CAAU;EAAA;AAEnC"}
@@ -6,7 +6,9 @@ export function useDialogContextValues_unstable(state) {
6
6
  dialogTitleId,
7
7
  isNestedDialog,
8
8
  inertTrapFocus,
9
- requestOpenChange
9
+ requestOpenChange,
10
+ modalAttributes,
11
+ triggerAttributes
10
12
  } = state;
11
13
  /**
12
14
  * This context is created with "@fluentui/react-context-selector",
@@ -19,6 +21,8 @@ export function useDialogContextValues_unstable(state) {
19
21
  dialogTitleId,
20
22
  isNestedDialog,
21
23
  inertTrapFocus,
24
+ modalAttributes,
25
+ triggerAttributes,
22
26
  requestOpenChange
23
27
  };
24
28
  const dialogSurface = false;
@@ -1 +1 @@
1
- {"version":3,"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","dialog","dialogSurface"],"sources":["../../../src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const { modalType, open, dialogRef, dialogTitleId, isNestedDialog, inertTrapFocus, requestOpenChange } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"mappings":"AAGA,OAAO,SAASA,gCAAgCC,KAAkB,EAAuB;EACvF,MAAM;IAAEC,SAAA;IAAWC,IAAA;IAAMC,SAAA;IAAWC,aAAA;IAAeC,cAAA;IAAgBC,cAAA;IAAgBC;EAAiB,CAAE,GAAGP,KAAA;EAEzG;;;;EAIA,MAAMQ,MAAA,GAA6B;IACjCN,IAAA;IACAD,SAAA;IACAE,SAAA;IACAC,aAAA;IACAC,cAAA;IACAC,cAAA;IACAC;EACF;EAEA,MAAME,aAAA,GAA2C,KAAK;EAEtD,OAAO;IAAED,MAAA;IAAQC;EAAc;AACjC"}
1
+ {"version":3,"names":["useDialogContextValues_unstable","state","modalType","open","dialogRef","dialogTitleId","isNestedDialog","inertTrapFocus","requestOpenChange","modalAttributes","triggerAttributes","dialog","dialogSurface"],"sources":["../../../src/components/Dialog/useDialogContextValues.ts"],"sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const {\n modalType,\n open,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n modalAttributes,\n triggerAttributes,\n } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n modalAttributes,\n triggerAttributes,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"mappings":"AAGA,OAAO,SAASA,gCAAgCC,KAAkB,EAAuB;EACvF,MAAM;IACJC,SAAA;IACAC,IAAA;IACAC,SAAA;IACAC,aAAA;IACAC,cAAA;IACAC,cAAA;IACAC,iBAAA;IACAC,eAAA;IACAC;EAAiB,CAClB,GAAGT,KAAA;EAEJ;;;;EAIA,MAAMU,MAAA,GAA6B;IACjCR,IAAA;IACAD,SAAA;IACAE,SAAA;IACAC,aAAA;IACAC,cAAA;IACAC,cAAA;IACAE,eAAA;IACAC,iBAAA;IACAF;EACF;EAEA,MAAMI,aAAA,GAA2C,KAAK;EAEtD,OAAO;IAAED,MAAA;IAAQC;EAAc;AACjC"}
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { useDialogActions_unstable } from './useDialogActions';
3
3
  import { renderDialogActions_unstable } from './renderDialogActions';
4
- import { useDialogActionsStyles_unstable } from './useDialogActionsStyles';
5
- import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
4
+ import { useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';
5
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * `DialogActions` is a container for the actions of the dialog.
8
8
  * Apart from styling, this component does not have other behavior.
@@ -10,10 +10,7 @@ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
10
10
  export const DialogActions = /*#__PURE__*/React.forwardRef((props, ref) => {
11
11
  const state = useDialogActions_unstable(props, ref);
12
12
  useDialogActionsStyles_unstable(state);
13
- const {
14
- useDialogActionsStyles_unstable: useCustomStyles
15
- } = useCustomStyleHooks_unstable();
16
- useCustomStyles(state);
13
+ useCustomStyleHook_unstable('useDialogActionsStyles_unstable')(state);
17
14
  return renderDialogActions_unstable(state);
18
15
  });
19
16
  DialogActions.displayName = 'DialogActions';
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogActions_unstable","renderDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHooks_unstable","DialogActions","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n const { useDialogActionsStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,4BAA4B,QAAQ;AAE7C;;;;AAIA,OAAO,MAAMC,aAAA,gBAAyDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQR,yBAAA,CAA0BM,KAAA,EAAOC,GAAA;EAE/CL,+BAAA,CAAgCM,KAAA;EAEhC,MAAM;IAAEN,+BAAA,EAAiCO;EAAe,CAAE,GAAGN,4BAAA;EAC7DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOP,4BAAA,CAA6BO,KAAA;AACtC;AAEAJ,aAAA,CAAcM,WAAW,GAAG"}
1
+ {"version":3,"names":["React","useDialogActions_unstable","renderDialogActions_unstable","useDialogActionsStyles_unstable","useCustomStyleHook_unstable","DialogActions","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DialogActions/DialogActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles.styles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogActionsStyles_unstable')(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,2BAA2B,QAAQ;AAE5C;;;;AAIA,OAAO,MAAMC,aAAA,gBAAyDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQR,yBAAA,CAA0BM,KAAA,EAAOC,GAAA;EAE/CL,+BAAA,CAAgCM,KAAA;EAEhCL,2BAAA,CAA4B,mCAAmCK,KAAA;EAE/D,OAAOP,4BAAA,CAA6BO,KAAA;AACtC;AAEAJ,aAAA,CAAcK,WAAW,GAAG"}
@@ -2,5 +2,5 @@ export * from './DialogActions';
2
2
  export * from './DialogActions.types';
3
3
  export * from './renderDialogActions';
4
4
  export * from './useDialogActions';
5
- export * from './useDialogActionsStyles';
5
+ export * from './useDialogActionsStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DialogActions/index.ts"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogActions/index.ts"],"sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -49,4 +49,4 @@ export const useDialogActionsStyles_unstable = state => {
49
49
  state.root.className = mergeClasses(dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.fluid && state.position === 'start' && styles.fluidStart, state.fluid && state.position === 'end' && styles.fluidEnd, state.root.className);
50
50
  return state;
51
51
  };
52
- //# sourceMappingURL=useDialogActionsStyles.js.map
52
+ //# sourceMappingURL=useDialogActionsStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","DIALOG_GAP","ACTIONS_END_GRID_AREA","ACTIONS_START_GRID_AREA","MEDIA_QUERY_BREAKPOINT_SELECTOR","dialogActionsClassNames","root","useStyles","Bqenvij","B7ck84d","mc9l5x","i8kkvl","Belr9w4","Bmdcpmo","th9wkt","gridPositionEnd","Bdqf98w","Ijaq50","Br312pm","nk6f5a","Bw0ie65","gridPositionStart","fluidStart","fluidEnd","d","m","useDialogActionsStyles_unstable","state","styles","className","position","fluid"],"sources":["../../../src/components/DialogActions/useDialogActionsStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n fluidStart: {\n gridColumnEnd: ACTIONS_END_GRID_AREA,\n },\n fluidEnd: {\n gridColumnStart: ACTIONS_START_GRID_AREA,\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.fluid && state.position === 'start' && styles.fluidStart,\n state.fluid && state.position === 'end' && styles.fluidEnd,\n state.root.className,\n );\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SACEC,UAAU,EACVC,qBAAqB,EACrBC,uBAAuB,EACvBC,+BAA+B,QAC1B;AAEP,OAAO,MAAMC,uBAAA,GAA8D;EACzEC,IAAA,EAAM;AACR;AAEA,MAAMC,SAAA,gBAAYT,QAAA;EAAAQ,IAAA;IAAAE,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,eAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,iBAAA;IAAAL,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAE,UAAA;IAAAF,OAAA;EAAA;EAAAG,QAAA;IAAAL,OAAA;EAAA;AAAA;EAAAM,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,EAyBlB;AAEA;;;AAGA,OAAO,MAAMC,+BAAA,GAAmCC,KAAA,IAAkD;EAChG,MAAMC,MAAA,GAASrB,SAAA;EACfoB,KAAA,CAAMrB,IAAI,CAACuB,SAAS,GAAG9B,YAAA,CACrBM,uBAAA,CAAwBC,IAAI,EAC5BsB,MAAA,CAAOtB,IAAI,EACXqB,KAAA,CAAMG,QAAQ,KAAK,WAAWF,MAAA,CAAOP,iBAAiB,EACtDM,KAAA,CAAMG,QAAQ,KAAK,SAASF,MAAA,CAAOb,eAAe,EAClDY,KAAA,CAAMI,KAAK,IAAIJ,KAAA,CAAMG,QAAQ,KAAK,WAAWF,MAAA,CAAON,UAAU,EAC9DK,KAAA,CAAMI,KAAK,IAAIJ,KAAA,CAAMG,QAAQ,KAAK,SAASF,MAAA,CAAOL,QAAQ,EAC1DI,KAAA,CAAMrB,IAAI,CAACuB,SAAS;EAEtB,OAAOF,KAAA;AACT"}
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { useDialogBody_unstable } from './useDialogBody';
3
3
  import { renderDialogBody_unstable } from './renderDialogBody';
4
- import { useDialogBodyStyles_unstable } from './useDialogBodyStyles';
5
- import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
4
+ import { useDialogBodyStyles_unstable } from './useDialogBodyStyles.styles';
5
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * The `DialogBody` is a container where the content of the dialog is rendered.
8
8
  * Apart from styling, this component does not have other behavior.
@@ -10,10 +10,7 @@ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
10
10
  export const DialogBody = /*#__PURE__*/React.forwardRef((props, ref) => {
11
11
  const state = useDialogBody_unstable(props, ref);
12
12
  useDialogBodyStyles_unstable(state);
13
- const {
14
- useDialogBodyStyles_unstable: useCustomStyles
15
- } = useCustomStyleHooks_unstable();
16
- useCustomStyles(state);
13
+ useCustomStyleHook_unstable('useDialogBodyStyles_unstable')(state);
17
14
  return renderDialogBody_unstable(state);
18
15
  });
19
16
  DialogBody.displayName = 'DialogBody';
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogBody_unstable","renderDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyleHooks_unstable","DialogBody","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/DialogBody/DialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n\n const { useDialogBodyStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAG7C,SAASC,4BAA4B,QAAQ;AAE7C;;;;AAIA,OAAO,MAAMC,UAAA,gBAAmDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC/F,MAAMC,KAAA,GAAQR,sBAAA,CAAuBM,KAAA,EAAOC,GAAA;EAE5CL,4BAAA,CAA6BM,KAAA;EAE7B,MAAM;IAAEN,4BAAA,EAA8BO;EAAe,CAAE,GAAGN,4BAAA;EAC1DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOP,yBAAA,CAA0BO,KAAA;AACnC;AAEAJ,UAAA,CAAWM,WAAW,GAAG"}
1
+ {"version":3,"names":["React","useDialogBody_unstable","renderDialogBody_unstable","useDialogBodyStyles_unstable","useCustomStyleHook_unstable","DialogBody","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DialogBody/DialogBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles.styles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogBodyStyles_unstable')(state);\n\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAG7C,SAASC,2BAA2B,QAAQ;AAE5C;;;;AAIA,OAAO,MAAMC,UAAA,gBAAmDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC/F,MAAMC,KAAA,GAAQR,sBAAA,CAAuBM,KAAA,EAAOC,GAAA;EAE5CL,4BAAA,CAA6BM,KAAA;EAE7BL,2BAAA,CAA4B,gCAAgCK,KAAA;EAE5D,OAAOP,yBAAA,CAA0BO,KAAA;AACnC;AAEAJ,UAAA,CAAWK,WAAW,GAAG"}
@@ -2,5 +2,5 @@ export * from './DialogBody';
2
2
  export * from './DialogBody.types';
3
3
  export * from './renderDialogBody';
4
4
  export * from './useDialogBody';
5
- export * from './useDialogBodyStyles';
5
+ export * from './useDialogBodyStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DialogBody/index.ts"],"sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogBody/index.ts"],"sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -41,4 +41,4 @@ export const useDialogBodyStyles_unstable = state => {
41
41
  state.root.className = mergeClasses(dialogBodyClassNames.root, styles.root, state.root.className);
42
42
  return state;
43
43
  };
44
- //# sourceMappingURL=useDialogBodyStyles.js.map
44
+ //# sourceMappingURL=useDialogBodyStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","ACTIONS_END_GRID_AREA","ACTIONS_START_GRID_AREA","CONTENT_GRID_AREA","DIALOG_GAP","MEDIA_QUERY_BREAKPOINT_SELECTOR","SURFACE_PADDING","TITLE_ACTION_GRID_AREA","TITLE_GRID_AREA","dialogBodyClassNames","root","useStyles","mc9l5x","fshzfu","Bxyxcbc","B7ck84d","wkccdc","Budl1dq","zoa1oz","B68tc82","Bmxbyg5","i8kkvl","Belr9w4","B5xtmjs","Bqu9lor","B06wobe","d","m","useDialogBodyStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogBody/useDialogBodyStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogBodySlots, DialogBodyState } from './DialogBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n CONTENT_GRID_AREA,\n DIALOG_GAP,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n SURFACE_PADDING,\n TITLE_ACTION_GRID_AREA,\n TITLE_GRID_AREA,\n} from '../../contexts';\n\nexport const dialogBodyClassNames: SlotClassNames<DialogBodySlots> = {\n root: 'fui-DialogBody',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'grid',\n '&::backdrop': {\n backgroundColor: 'rgba(0, 0, 0, 0.4)',\n },\n maxHeight: `calc(100vh - 2 * ${SURFACE_PADDING})`,\n boxSizing: 'border-box',\n gridTemplateRows: 'auto 1fr auto',\n gridTemplateColumns: '1fr 1fr auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n ...shorthands.overflow('unset'),\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n maxWidth: '100vw',\n gridTemplateRows: 'auto 1fr auto auto',\n gridTemplateAreas: `\n \"${TITLE_GRID_AREA} ${TITLE_GRID_AREA} ${TITLE_ACTION_GRID_AREA}\"\n \"${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA} ${CONTENT_GRID_AREA}\"\n \"${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA} ${ACTIONS_START_GRID_AREA}\"\n \"${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA} ${ACTIONS_END_GRID_AREA}\"\n `,\n },\n },\n});\n\n/**\n * Apply styling to the DialogBody slots based on the state\n */\nexport const useDialogBodyStyles_unstable = (state: DialogBodyState): DialogBodyState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogBodyClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SACEC,qBAAqB,EACrBC,uBAAuB,EACvBC,iBAAiB,EACjBC,UAAU,EACVC,+BAA+B,EAC/BC,eAAe,EACfC,sBAAsB,EACtBC,eAAe,QACV;AAEP,OAAO,MAAMC,oBAAA,GAAwD;EACnEC,IAAA,EAAM;AACR;AAEA;;;AAGA,MAAMC,SAAA,gBAAYb,QAAA;EAAAY,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,EA4BlB;AAEA;;;AAGA,OAAO,MAAMC,4BAAA,GAAgCC,KAAA,IAA4C;EACvF,MAAMC,MAAA,GAASnB,SAAA;EACfkB,KAAA,CAAMnB,IAAI,CAACqB,SAAS,GAAGhC,YAAA,CAAaU,oBAAA,CAAqBC,IAAI,EAAEoB,MAAA,CAAOpB,IAAI,EAAEmB,KAAA,CAAMnB,IAAI,CAACqB,SAAS;EAEhG,OAAOF,KAAA;AACT"}
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { useDialogContent_unstable } from './useDialogContent';
3
3
  import { renderDialogContent_unstable } from './renderDialogContent';
4
- import { useDialogContentStyles_unstable } from './useDialogContentStyles';
5
- import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
4
+ import { useDialogContentStyles_unstable } from './useDialogContentStyles.styles';
5
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * The `DialogContent` is a container where the content of the dialog is rendered.
8
8
  * Apart from styling, this component does not have other behavior.
@@ -10,10 +10,7 @@ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
10
10
  export const DialogContent = /*#__PURE__*/React.forwardRef((props, ref) => {
11
11
  const state = useDialogContent_unstable(props, ref);
12
12
  useDialogContentStyles_unstable(state);
13
- const {
14
- useDialogContentStyles_unstable: useCustomStyles
15
- } = useCustomStyleHooks_unstable();
16
- useCustomStyles(state);
13
+ useCustomStyleHook_unstable('useDialogContentStyles_unstable')(state);
17
14
  return renderDialogContent_unstable(state);
18
15
  });
19
16
  DialogContent.displayName = 'DialogContent';
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogContent_unstable","renderDialogContent_unstable","useDialogContentStyles_unstable","useCustomStyleHooks_unstable","DialogContent","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/DialogContent/DialogContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogContent_unstable } from './useDialogContent';\nimport { renderDialogContent_unstable } from './renderDialogContent';\nimport { useDialogContentStyles_unstable } from './useDialogContentStyles';\nimport type { DialogContentProps } from './DialogContent.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogContent` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogContent: ForwardRefComponent<DialogContentProps> = React.forwardRef((props, ref) => {\n const state = useDialogContent_unstable(props, ref);\n\n useDialogContentStyles_unstable(state);\n\n const { useDialogContentStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogContent_unstable(state);\n});\n\nDialogContent.displayName = 'DialogContent';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,4BAA4B,QAAQ;AAE7C;;;;AAIA,OAAO,MAAMC,aAAA,gBAAyDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQR,yBAAA,CAA0BM,KAAA,EAAOC,GAAA;EAE/CL,+BAAA,CAAgCM,KAAA;EAEhC,MAAM;IAAEN,+BAAA,EAAiCO;EAAe,CAAE,GAAGN,4BAAA;EAC7DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOP,4BAAA,CAA6BO,KAAA;AACtC;AAEAJ,aAAA,CAAcM,WAAW,GAAG"}
1
+ {"version":3,"names":["React","useDialogContent_unstable","renderDialogContent_unstable","useDialogContentStyles_unstable","useCustomStyleHook_unstable","DialogContent","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DialogContent/DialogContent.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogContent_unstable } from './useDialogContent';\nimport { renderDialogContent_unstable } from './renderDialogContent';\nimport { useDialogContentStyles_unstable } from './useDialogContentStyles.styles';\nimport type { DialogContentProps } from './DialogContent.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogContent` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogContent: ForwardRefComponent<DialogContentProps> = React.forwardRef((props, ref) => {\n const state = useDialogContent_unstable(props, ref);\n\n useDialogContentStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogContentStyles_unstable')(state);\n\n return renderDialogContent_unstable(state);\n});\n\nDialogContent.displayName = 'DialogContent';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,2BAA2B,QAAQ;AAE5C;;;;AAIA,OAAO,MAAMC,aAAA,gBAAyDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQR,yBAAA,CAA0BM,KAAA,EAAOC,GAAA;EAE/CL,+BAAA,CAAgCM,KAAA;EAEhCL,2BAAA,CAA4B,mCAAmCK,KAAA;EAE/D,OAAOP,4BAAA,CAA6BO,KAAA;AACtC;AAEAJ,aAAA,CAAcK,WAAW,GAAG"}
@@ -2,5 +2,5 @@ export * from './DialogContent';
2
2
  export * from './DialogContent.types';
3
3
  export * from './renderDialogContent';
4
4
  export * from './useDialogContent';
5
- export * from './useDialogContentStyles';
5
+ export * from './useDialogContentStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DialogContent/index.ts"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogContent/index.ts"],"sourcesContent":["export * from './DialogContent';\nexport * from './DialogContent.types';\nexport * from './renderDialogContent';\nexport * from './useDialogContent';\nexport * from './useDialogContentStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -40,4 +40,4 @@ export const useDialogContentStyles_unstable = state => {
40
40
  state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);
41
41
  return state;
42
42
  };
43
- //# sourceMappingURL=useDialogContentStyles.js.map
43
+ //# sourceMappingURL=useDialogContentStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","CONTENT_GRID_AREA","tokens","typographyStyles","dialogContentClassNames","root","useStyles","Bmxbyg5","sshi5w","B7ck84d","z8tnut","z189sj","Byoj8tv","uwmqm3","B6of3ja","t21cq0","jrapky","Frg6f3","Ijaq50","Br312pm","nk6f5a","Bw0ie65","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","d","useDialogContentStyles_unstable","state","styles","className"],"sources":["../../../src/components/DialogContent/useDialogContentStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogContentSlots, DialogContentState } from './DialogContent.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { CONTENT_GRID_AREA } from '../../contexts/constants';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\nexport const dialogContentClassNames: SlotClassNames<DialogContentSlots> = {\n root: 'fui-DialogContent',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n overflowY: 'auto',\n minHeight: '32px',\n boxSizing: 'border-box',\n ...shorthands.padding(tokens.strokeWidthThick),\n ...shorthands.margin(`calc(${tokens.strokeWidthThick} * -1)`),\n ...shorthands.gridArea(CONTENT_GRID_AREA),\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Apply styling to the DialogContent slots based on the state\n */\nexport const useDialogContentStyles_unstable = (state: DialogContentState): DialogContentState => {\n const styles = useStyles();\n state.root.className = mergeClasses(dialogContentClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAEzC,OAAO,MAAMC,uBAAA,GAA8D;EACzEC,IAAA,EAAM;AACR;AAEA;;;AAGA,MAAMC,SAAA,gBAAYR,QAAA;EAAAO,IAAA;IAAAE,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAUlB;AAEA;;;AAGA,OAAO,MAAMC,+BAAA,GAAmCC,KAAA,IAAkD;EAChG,MAAMC,MAAA,GAASvB,SAAA;EACfsB,KAAA,CAAMvB,IAAI,CAACyB,SAAS,GAAG/B,YAAA,CAAaK,uBAAA,CAAwBC,IAAI,EAAEwB,MAAA,CAAOxB,IAAI,EAAEuB,KAAA,CAAMvB,IAAI,CAACyB,SAAS;EACnG,OAAOF,KAAA;AACT"}
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { useDialogSurface_unstable } from './useDialogSurface';
3
3
  import { renderDialogSurface_unstable } from './renderDialogSurface';
4
- import { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles';
4
+ import { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';
5
5
  import { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';
6
- import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
6
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
7
7
  /**
8
8
  * DialogSurface component represents the visual part of a `Dialog` as a whole,
9
9
  * it contains everything that should be visible.
@@ -12,10 +12,7 @@ export const DialogSurface = /*#__PURE__*/React.forwardRef((props, ref) => {
12
12
  const state = useDialogSurface_unstable(props, ref);
13
13
  const contextValues = useDialogSurfaceContextValues_unstable(state);
14
14
  useDialogSurfaceStyles_unstable(state);
15
- const {
16
- useDialogSurfaceStyles_unstable: useCustomStyles
17
- } = useCustomStyleHooks_unstable();
18
- useCustomStyles(state);
15
+ useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);
19
16
  return renderDialogSurface_unstable(state, contextValues);
20
17
  });
21
18
  DialogSurface.displayName = 'DialogSurface';
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDialogSurface_unstable","renderDialogSurface_unstable","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable","useCustomStyleHooks_unstable","DialogSurface","forwardRef","props","ref","state","contextValues","useCustomStyles","displayName"],"sources":["../../../src/components/DialogSurface/DialogSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface: ForwardRefComponent<DialogSurfaceProps> = React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n\n useDialogSurfaceStyles_unstable(state);\n\n const { useDialogSurfaceStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,sCAAsC,QAAQ;AACvD,SAASC,4BAA4B,QAAQ;AAE7C;;;;AAIA,OAAO,MAAMC,aAAA,gBAAyDN,KAAA,CAAMO,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQT,yBAAA,CAA0BO,KAAA,EAAOC,GAAA;EAC/C,MAAME,aAAA,GAAgBP,sCAAA,CAAuCM,KAAA;EAE7DP,+BAAA,CAAgCO,KAAA;EAEhC,MAAM;IAAEP,+BAAA,EAAiCS;EAAe,CAAE,GAAGP,4BAAA;EAC7DO,eAAA,CAAgBF,KAAA;EAEhB,OAAOR,4BAAA,CAA6BQ,KAAA,EAAOC,aAAA;AAC7C;AAEAL,aAAA,CAAcO,WAAW,GAAG"}
1
+ {"version":3,"names":["React","useDialogSurface_unstable","renderDialogSurface_unstable","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable","useCustomStyleHook_unstable","DialogSurface","forwardRef","props","ref","state","contextValues","displayName"],"sources":["../../../src/components/DialogSurface/DialogSurface.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDialogSurface_unstable } from './useDialogSurface';\nimport { renderDialogSurface_unstable } from './renderDialogSurface';\nimport { useDialogSurfaceStyles_unstable } from './useDialogSurfaceStyles.styles';\nimport type { DialogSurfaceProps } from './DialogSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDialogSurfaceContextValues_unstable } from './useDialogSurfaceContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DialogSurface component represents the visual part of a `Dialog` as a whole,\n * it contains everything that should be visible.\n */\nexport const DialogSurface: ForwardRefComponent<DialogSurfaceProps> = React.forwardRef((props, ref) => {\n const state = useDialogSurface_unstable(props, ref);\n const contextValues = useDialogSurfaceContextValues_unstable(state);\n\n useDialogSurfaceStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDialogSurfaceStyles_unstable')(state);\n\n return renderDialogSurface_unstable(state, contextValues);\n});\n\nDialogSurface.displayName = 'DialogSurface';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,+BAA+B,QAAQ;AAGhD,SAASC,sCAAsC,QAAQ;AACvD,SAASC,2BAA2B,QAAQ;AAE5C;;;;AAIA,OAAO,MAAMC,aAAA,gBAAyDN,KAAA,CAAMO,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrG,MAAMC,KAAA,GAAQT,yBAAA,CAA0BO,KAAA,EAAOC,GAAA;EAC/C,MAAME,aAAA,GAAgBP,sCAAA,CAAuCM,KAAA;EAE7DP,+BAAA,CAAgCO,KAAA;EAEhCL,2BAAA,CAA4B,mCAAmCK,KAAA;EAE/D,OAAOR,4BAAA,CAA6BQ,KAAA,EAAOC,aAAA;AAC7C;AAEAL,aAAA,CAAcM,WAAW,GAAG"}
@@ -2,5 +2,5 @@ export * from './DialogSurface';
2
2
  export * from './DialogSurface.types';
3
3
  export * from './renderDialogSurface';
4
4
  export * from './useDialogSurface';
5
- export * from './useDialogSurfaceStyles';
5
+ export * from './useDialogSurfaceStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DialogSurface/index.ts"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"names":[],"sources":["../../../src/components/DialogSurface/index.ts"],"sourcesContent":["export * from './DialogSurface';\nexport * from './DialogSurface.types';\nexport * from './renderDialogSurface';\nexport * from './useDialogSurface';\nexport * from './useDialogSurfaceStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  import { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs, isResolvedShorthand } from '@fluentui/react-utilities';
3
3
  import { useDialogContext_unstable } from '../../contexts';
4
4
  import { isEscapeKeyDismiss } from '../../utils';
5
- import { useModalAttributes } from '@fluentui/react-tabster';
6
5
  /**
7
6
  * Create the state required to render DialogSurface.
8
7
  *
@@ -18,7 +17,7 @@ export const useDialogSurface_unstable = (props, ref) => {
18
17
  as
19
18
  } = props;
20
19
  const modalType = useDialogContext_unstable(ctx => ctx.modalType);
21
- const inertTrapFocus = useDialogContext_unstable(ctx => ctx.inertTrapFocus);
20
+ const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);
22
21
  const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);
23
22
  const open = useDialogContext_unstable(ctx => ctx.open);
24
23
  const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);
@@ -50,12 +49,6 @@ export const useDialogSurface_unstable = (props, ref) => {
50
49
  event.stopPropagation();
51
50
  }
52
51
  });
53
- const {
54
- modalAttributes
55
- } = useModalAttributes({
56
- trapFocus: modalType !== 'non-modal',
57
- legacyTrapFocus: !inertTrapFocus
58
- });
59
52
  return {
60
53
  components: {
61
54
  backdrop: 'div',