@fluentui/react-dialog 9.0.0-beta.8 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/CHANGELOG.json +175 -1
  2. package/CHANGELOG.md +56 -2
  3. package/README.md +41 -1
  4. package/dist/index.d.ts +66 -16
  5. package/lib/Dialog.js.map +1 -1
  6. package/lib/DialogActions.js.map +1 -1
  7. package/lib/DialogBody.js.map +1 -1
  8. package/lib/DialogContent.js +2 -0
  9. package/lib/DialogContent.js.map +1 -0
  10. package/lib/DialogSurface.js.map +1 -1
  11. package/lib/DialogTitle.js.map +1 -1
  12. package/lib/DialogTrigger.js.map +1 -1
  13. package/lib/components/Dialog/Dialog.js.map +1 -1
  14. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  15. package/lib/components/Dialog/index.js.map +1 -1
  16. package/lib/components/Dialog/renderDialog.js.map +1 -1
  17. package/lib/components/Dialog/useDialog.js +5 -6
  18. package/lib/components/Dialog/useDialog.js.map +1 -1
  19. package/lib/components/Dialog/useDialogContextValues.js +4 -4
  20. package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
  21. package/lib/components/DialogActions/DialogActions.js.map +1 -1
  22. package/lib/components/DialogActions/DialogActions.types.js.map +1 -1
  23. package/lib/components/DialogActions/index.js.map +1 -1
  24. package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
  25. package/lib/components/DialogActions/useDialogActions.js.map +1 -1
  26. package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  27. package/lib/components/DialogBody/DialogBody.js.map +1 -1
  28. package/lib/components/DialogBody/DialogBody.types.js.map +1 -1
  29. package/lib/components/DialogBody/index.js.map +1 -1
  30. package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
  31. package/lib/components/DialogBody/useDialogBody.js +3 -3
  32. package/lib/components/DialogBody/useDialogBody.js.map +1 -1
  33. package/lib/components/DialogBody/useDialogBodyStyles.js +25 -17
  34. package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  35. package/lib/components/DialogContent/DialogContent.js +16 -0
  36. package/lib/components/DialogContent/DialogContent.js.map +1 -0
  37. package/lib/components/DialogContent/DialogContent.types.js +2 -0
  38. package/lib/components/DialogContent/DialogContent.types.js.map +1 -0
  39. package/lib/components/DialogContent/index.js +6 -0
  40. package/lib/components/DialogContent/index.js.map +1 -0
  41. package/lib/components/DialogContent/renderDialogContent.js +15 -0
  42. package/lib/components/DialogContent/renderDialogContent.js.map +1 -0
  43. package/lib/components/DialogContent/useDialogContent.js +28 -0
  44. package/lib/components/DialogContent/useDialogContent.js.map +1 -0
  45. package/lib/components/DialogContent/useDialogContentStyles.js +40 -0
  46. package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -0
  47. package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
  48. package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
  49. package/lib/components/DialogSurface/index.js.map +1 -1
  50. package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
  51. package/lib/components/DialogSurface/useDialogSurface.js +10 -81
  52. package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
  53. package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  54. package/lib/components/DialogSurface/useDialogSurfaceStyles.js +62 -59
  55. package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  56. package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
  57. package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
  58. package/lib/components/DialogTitle/index.js.map +1 -1
  59. package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
  60. package/lib/components/DialogTitle/useDialogTitle.js +1 -1
  61. package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
  62. package/lib/components/DialogTitle/useDialogTitleStyles.js +29 -29
  63. package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  64. package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
  65. package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
  66. package/lib/components/DialogTrigger/index.js.map +1 -1
  67. package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  68. package/lib/components/DialogTrigger/useDialogTrigger.js +4 -3
  69. package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  70. package/lib/contexts/constants.js +1 -1
  71. package/lib/contexts/constants.js.map +1 -1
  72. package/lib/contexts/dialogContext.js.map +1 -1
  73. package/lib/contexts/dialogSurfaceContext.js.map +1 -1
  74. package/lib/contexts/index.js.map +1 -1
  75. package/lib/index.js +1 -0
  76. package/lib/index.js.map +1 -1
  77. package/lib/utils/index.js +0 -2
  78. package/lib/utils/index.js.map +1 -1
  79. package/lib/utils/isEscapeKeyDown.js +1 -4
  80. package/lib/utils/isEscapeKeyDown.js.map +1 -1
  81. package/lib/utils/useDisableBodyScroll.js.map +1 -1
  82. package/lib/utils/useFocusFirstElement.js +7 -8
  83. package/lib/utils/useFocusFirstElement.js.map +1 -1
  84. package/lib-commonjs/Dialog.js.map +1 -1
  85. package/lib-commonjs/DialogActions.js.map +1 -1
  86. package/lib-commonjs/DialogBody.js.map +1 -1
  87. package/lib-commonjs/DialogContent.js +10 -0
  88. package/lib-commonjs/DialogContent.js.map +1 -0
  89. package/lib-commonjs/DialogSurface.js.map +1 -1
  90. package/lib-commonjs/DialogTitle.js.map +1 -1
  91. package/lib-commonjs/DialogTrigger.js.map +1 -1
  92. package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
  93. package/lib-commonjs/components/Dialog/index.js.map +1 -1
  94. package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
  95. package/lib-commonjs/components/Dialog/useDialog.js +3 -4
  96. package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
  97. package/lib-commonjs/components/Dialog/useDialogContextValues.js +4 -4
  98. package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
  99. package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
  100. package/lib-commonjs/components/DialogActions/index.js.map +1 -1
  101. package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
  102. package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
  103. package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
  104. package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
  105. package/lib-commonjs/components/DialogBody/index.js.map +1 -1
  106. package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
  107. package/lib-commonjs/components/DialogBody/useDialogBody.js +3 -4
  108. package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
  109. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +25 -18
  110. package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
  111. package/lib-commonjs/components/DialogContent/DialogContent.js +27 -0
  112. package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -0
  113. package/lib-commonjs/components/DialogContent/DialogContent.types.js +6 -0
  114. package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -0
  115. package/lib-commonjs/components/DialogContent/index.js +18 -0
  116. package/lib-commonjs/components/DialogContent/index.js.map +1 -0
  117. package/lib-commonjs/components/DialogContent/renderDialogContent.js +26 -0
  118. package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -0
  119. package/lib-commonjs/components/DialogContent/useDialogContent.js +39 -0
  120. package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -0
  121. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +52 -0
  122. package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -0
  123. package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
  124. package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
  125. package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
  126. package/lib-commonjs/components/DialogSurface/useDialogSurface.js +10 -81
  127. package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
  128. package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
  129. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +63 -60
  130. package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
  131. package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
  132. package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
  133. package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
  134. package/lib-commonjs/components/DialogTitle/useDialogTitle.js +1 -1
  135. package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
  136. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +29 -29
  137. package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
  138. package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
  139. package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
  140. package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
  141. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +4 -4
  142. package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
  143. package/lib-commonjs/contexts/constants.js +2 -2
  144. package/lib-commonjs/contexts/constants.js.map +1 -1
  145. package/lib-commonjs/contexts/dialogContext.js.map +1 -1
  146. package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
  147. package/lib-commonjs/contexts/index.js.map +1 -1
  148. package/lib-commonjs/index.js +34 -1
  149. package/lib-commonjs/index.js.map +1 -1
  150. package/lib-commonjs/utils/index.js +0 -4
  151. package/lib-commonjs/utils/index.js.map +1 -1
  152. package/lib-commonjs/utils/isEscapeKeyDown.js +1 -5
  153. package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
  154. package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
  155. package/lib-commonjs/utils/useFocusFirstElement.js +7 -9
  156. package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
  157. package/package.json +11 -14
  158. package/lib/utils/isHTMLDialogElement.js +0 -4
  159. package/lib/utils/isHTMLDialogElement.js.map +0 -1
  160. package/lib/utils/useControlNativeDialogOpenState.js +0 -20
  161. package/lib/utils/useControlNativeDialogOpenState.js.map +0 -1
  162. package/lib-commonjs/utils/isHTMLDialogElement.js +0 -13
  163. package/lib-commonjs/utils/isHTMLDialogElement.js.map +0 -1
  164. package/lib-commonjs/utils/useControlNativeDialogOpenState.js +0 -31
  165. package/lib-commonjs/utils/useControlNativeDialogOpenState.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,181 @@
2
2
  "name": "@fluentui/react-dialog",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 15 Sep 2022 09:44:20 GMT",
5
+ "date": "Thu, 13 Oct 2022 10:59:24 GMT",
6
+ "tag": "@fluentui/react-dialog_v9.0.0",
7
+ "version": "9.0.0",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-dialog",
13
+ "commit": "1a527d440e0497ef8046b3ce240492241e7a04ac",
14
+ "comment": "chore: Update Griffel to latest version"
15
+ },
16
+ {
17
+ "author": "bernardo.sunderhus@gmail.com",
18
+ "package": "@fluentui/react-dialog",
19
+ "commit": "12222c2cfb1851ac6fbf57d17a1573432e842ec7",
20
+ "comment": "feat: focus on surface if no focusable element is available"
21
+ },
22
+ {
23
+ "author": "bernardo.sunderhus@gmail.com",
24
+ "package": "@fluentui/react-dialog",
25
+ "commit": "17c5fe742918bbc41ed22f492a289f53bffc5008",
26
+ "comment": "chore: improves DialogTrigger types"
27
+ },
28
+ {
29
+ "author": "bernardo.sunderhus@gmail.com",
30
+ "package": "@fluentui/react-dialog",
31
+ "commit": "443c503b94e602e55857e4e311413c6257d60766",
32
+ "comment": "chore: cleanups in types"
33
+ },
34
+ {
35
+ "author": "bernardo.sunderhus@gmail.com",
36
+ "package": "@fluentui/react-dialog",
37
+ "commit": "b48083b3009bc75f28c328de0024eb400b989145",
38
+ "comment": "fix: aria-* properties should be reassignable"
39
+ }
40
+ ],
41
+ "patch": [
42
+ {
43
+ "author": "bernardo.sunderhus@gmail.com",
44
+ "package": "@fluentui/react-dialog",
45
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a",
46
+ "comment": "feat: react-dialog stable release"
47
+ },
48
+ {
49
+ "author": "beachball",
50
+ "package": "@fluentui/react-dialog",
51
+ "comment": "Bump @fluentui/react-utilities to v9.1.1",
52
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
53
+ },
54
+ {
55
+ "author": "beachball",
56
+ "package": "@fluentui/react-dialog",
57
+ "comment": "Bump @fluentui/react-context-selector to v9.0.4",
58
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
59
+ },
60
+ {
61
+ "author": "beachball",
62
+ "package": "@fluentui/react-dialog",
63
+ "comment": "Bump @fluentui/react-aria to v9.2.2",
64
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
65
+ },
66
+ {
67
+ "author": "beachball",
68
+ "package": "@fluentui/react-dialog",
69
+ "comment": "Bump @fluentui/react-tabster to v9.1.3",
70
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
71
+ },
72
+ {
73
+ "author": "beachball",
74
+ "package": "@fluentui/react-dialog",
75
+ "comment": "Bump @fluentui/react-portal to v9.0.7",
76
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
77
+ },
78
+ {
79
+ "author": "beachball",
80
+ "package": "@fluentui/react-dialog",
81
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.15",
82
+ "commit": "cd05c21e62ff37812d614330eb70f97fd978c97a"
83
+ }
84
+ ],
85
+ "none": [
86
+ {
87
+ "author": "email not defined",
88
+ "package": "@fluentui/react-dialog",
89
+ "commit": "42acccd4445b42c806f957de00e5f2567589279f",
90
+ "comment": "chore: updates stories and tests"
91
+ }
92
+ ]
93
+ }
94
+ },
95
+ {
96
+ "date": "Mon, 03 Oct 2022 22:24:36 GMT",
97
+ "tag": "@fluentui/react-dialog_v9.0.0-beta.11",
98
+ "version": "9.0.0-beta.11",
99
+ "comments": {
100
+ "prerelease": [
101
+ {
102
+ "author": "bernardo.sunderhus@gmail.com",
103
+ "package": "@fluentui/react-dialog",
104
+ "commit": "da8a1d4d97efdb6d95818b605136415d9428e811",
105
+ "comment": "feat: removes DialogSurface native dialog support "
106
+ },
107
+ {
108
+ "author": "beachball",
109
+ "package": "@fluentui/react-dialog",
110
+ "comment": "Bump @fluentui/react-aria to v9.2.1",
111
+ "commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
112
+ },
113
+ {
114
+ "author": "beachball",
115
+ "package": "@fluentui/react-dialog",
116
+ "comment": "Bump @fluentui/react-tabster to v9.1.2",
117
+ "commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
118
+ },
119
+ {
120
+ "author": "beachball",
121
+ "package": "@fluentui/react-dialog",
122
+ "comment": "Bump @fluentui/react-portal to v9.0.6",
123
+ "commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
124
+ }
125
+ ]
126
+ }
127
+ },
128
+ {
129
+ "date": "Fri, 23 Sep 2022 10:32:29 GMT",
130
+ "tag": "@fluentui/react-dialog_v9.0.0-beta.10",
131
+ "version": "9.0.0-beta.10",
132
+ "comments": {
133
+ "prerelease": [
134
+ {
135
+ "author": "bernardo.sunderhus@gmail.com",
136
+ "package": "@fluentui/react-dialog",
137
+ "commit": "4dd18085b968e10d512c179705d31148e28148b4",
138
+ "comment": "feat: implements DialogContent as a swap of DialogBody"
139
+ }
140
+ ]
141
+ }
142
+ },
143
+ {
144
+ "date": "Tue, 20 Sep 2022 20:55:44 GMT",
145
+ "tag": "@fluentui/react-dialog_v9.0.0-beta.9",
146
+ "version": "9.0.0-beta.9",
147
+ "comments": {
148
+ "prerelease": [
149
+ {
150
+ "author": "bernardo.sunderhus@gmail.com",
151
+ "package": "@fluentui/react-dialog",
152
+ "commit": "79d1b0e32631bf916a52834e3731de464aa4898c",
153
+ "comment": "bugfix(react-dialog): Adds color style to DialogSurface"
154
+ },
155
+ {
156
+ "author": "beachball",
157
+ "package": "@fluentui/react-dialog",
158
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14",
159
+ "commit": "4ceba844c804a2f49b0465389100e7a3dabf116e"
160
+ }
161
+ ],
162
+ "none": [
163
+ {
164
+ "author": "bernardo.sunderhus@gmail.com",
165
+ "package": "@fluentui/react-dialog",
166
+ "commit": "81de40f0df0dfa8bac4e4fb522bf830d9fe8e066",
167
+ "comment": "Includes Tooltip Escape scenarios on e2e tests"
168
+ },
169
+ {
170
+ "author": "bernardo.sunderhus@gmail.com",
171
+ "package": "@fluentui/react-dialog",
172
+ "commit": "cf5f5e14c86cc35ee8bfff6c6be130a36fb6d16d",
173
+ "comment": "chore: scaffold DialogContent component"
174
+ }
175
+ ]
176
+ }
177
+ },
178
+ {
179
+ "date": "Thu, 15 Sep 2022 09:48:59 GMT",
6
180
  "tag": "@fluentui/react-dialog_v9.0.0-beta.8",
7
181
  "version": "9.0.0-beta.8",
8
182
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,66 @@
1
1
  # Change Log - @fluentui/react-dialog
2
2
 
3
- This log was last generated on Thu, 15 Sep 2022 09:44:20 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 13 Oct 2022 10:59:24 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0)
8
+
9
+ Thu, 13 Oct 2022 10:59:24 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.11..@fluentui/react-dialog_v9.0.0)
11
+
12
+ ### Patches
13
+
14
+ - feat: react-dialog stable release ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by bernardo.sunderhus@gmail.com)
15
+ - Bump @fluentui/react-utilities to v9.1.1 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
16
+ - Bump @fluentui/react-context-selector to v9.0.4 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
17
+ - Bump @fluentui/react-aria to v9.2.2 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
18
+ - Bump @fluentui/react-tabster to v9.1.3 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
19
+ - Bump @fluentui/react-portal to v9.0.7 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
20
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.15 ([PR #25181](https://github.com/microsoft/fluentui/pull/25181) by beachball)
21
+
22
+ ### Changes
23
+
24
+ - chore: Update Griffel to latest version ([PR #25075](https://github.com/microsoft/fluentui/pull/25075) by olfedias@microsoft.com)
25
+ - feat: focus on surface if no focusable element is available ([PR #25173](https://github.com/microsoft/fluentui/pull/25173) by bernardo.sunderhus@gmail.com)
26
+ - chore: improves DialogTrigger types ([PR #25044](https://github.com/microsoft/fluentui/pull/25044) by bernardo.sunderhus@gmail.com)
27
+ - chore: cleanups in types ([PR #25070](https://github.com/microsoft/fluentui/pull/25070) by bernardo.sunderhus@gmail.com)
28
+ - fix: aria-* properties should be reassignable ([PR #25092](https://github.com/microsoft/fluentui/pull/25092) by bernardo.sunderhus@gmail.com)
29
+
30
+ ## [9.0.0-beta.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.11)
31
+
32
+ Mon, 03 Oct 2022 22:24:36 GMT
33
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.10..@fluentui/react-dialog_v9.0.0-beta.11)
34
+
35
+ ### Changes
36
+
37
+ - feat: removes DialogSurface native dialog support ([PR #24979](https://github.com/microsoft/fluentui/pull/24979) by bernardo.sunderhus@gmail.com)
38
+ - Bump @fluentui/react-aria to v9.2.1 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
39
+ - Bump @fluentui/react-tabster to v9.1.2 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
40
+ - Bump @fluentui/react-portal to v9.0.6 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
41
+
42
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.10)
43
+
44
+ Fri, 23 Sep 2022 10:32:29 GMT
45
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.9..@fluentui/react-dialog_v9.0.0-beta.10)
46
+
47
+ ### Changes
48
+
49
+ - feat: implements DialogContent as a swap of DialogBody ([PR #24855](https://github.com/microsoft/fluentui/pull/24855) by bernardo.sunderhus@gmail.com)
50
+
51
+ ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.9)
52
+
53
+ Tue, 20 Sep 2022 20:55:44 GMT
54
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.8..@fluentui/react-dialog_v9.0.0-beta.9)
55
+
56
+ ### Changes
57
+
58
+ - bugfix(react-dialog): Adds color style to DialogSurface ([PR #24832](https://github.com/microsoft/fluentui/pull/24832) by bernardo.sunderhus@gmail.com)
59
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14 ([PR #24869](https://github.com/microsoft/fluentui/pull/24869) by beachball)
60
+
7
61
  ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.8)
8
62
 
9
- Thu, 15 Sep 2022 09:44:20 GMT
63
+ Thu, 15 Sep 2022 09:48:59 GMT
10
64
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.7..@fluentui/react-dialog_v9.0.0-beta.8)
11
65
 
12
66
  ### Changes
package/README.md CHANGED
@@ -2,4 +2,44 @@
2
2
 
3
3
  **React Dialog components for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
4
4
 
5
- These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
5
+ To import React Dialog components:
6
+
7
+ ```jsx
8
+ import * as React from 'react';
9
+ import {
10
+ Button,
11
+ Dialog,
12
+ DialogTrigger,
13
+ DialogSurface,
14
+ DialogTitle,
15
+ DialogBody,
16
+ DialogActions,
17
+ DialogContent,
18
+ } from '@fluentui/react-components';
19
+
20
+ export const DialogExample = () => {
21
+ return (
22
+ <Dialog>
23
+ <DialogTrigger>
24
+ <Button>Open dialog</Button>
25
+ </DialogTrigger>
26
+ <DialogSurface>
27
+ <DialogBody>
28
+ <DialogTitle>Dialog title</DialogTitle>
29
+ <DialogContent>
30
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam exercitationem cumque repellendus eaque
31
+ est dolor eius expedita nulla ullam? Tenetur reprehenderit aut voluptatum impedit voluptates in natus iure
32
+ cumque eaque?
33
+ </DialogContent>
34
+ <DialogActions>
35
+ <DialogTrigger>
36
+ <Button appearance="secondary">Close</Button>
37
+ </DialogTrigger>
38
+ <Button appearance="primary">Do Something</Button>
39
+ </DialogActions>
40
+ </DialogBody>
41
+ </DialogSurface>
42
+ </Dialog>
43
+ );
44
+ };
45
+ ```
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import * as React_2 from 'react';
11
11
  import { ReactElement } from 'react';
12
12
  import type { Slot } from '@fluentui/react-utilities';
13
13
  import type { SlotClassNames } from '@fluentui/react-utilities';
14
+ import type { TriggerProps } from '@fluentui/react-utilities';
14
15
 
15
16
  /**
16
17
  * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.
@@ -75,10 +76,32 @@ export declare type DialogBodySlots = {
75
76
  */
76
77
  export declare type DialogBodyState = ComponentState<DialogBodySlots>;
77
78
 
79
+ /**
80
+ * The `DialogContent` is a container where the content of the dialog is rendered.
81
+ * Apart from styling, this component does not have other behavior.
82
+ */
83
+ export declare const DialogContent: ForwardRefComponent<DialogContentProps>;
84
+
85
+ export declare const dialogContentClassNames: SlotClassNames<DialogContentSlots>;
86
+
87
+ /**
88
+ * DialogContent Props
89
+ */
90
+ export declare type DialogContentProps = ComponentProps<DialogContentSlots>;
91
+
92
+ export declare type DialogContentSlots = {
93
+ root: Slot<'div'>;
94
+ };
95
+
96
+ /**
97
+ * State used in rendering DialogContent
98
+ */
99
+ export declare type DialogContentState = ComponentState<DialogContentSlots>;
100
+
78
101
  declare type DialogContextValue = {
79
102
  open: boolean;
80
- dialogBodyID?: string;
81
- dialogTitleID?: string;
103
+ dialogContentId?: string;
104
+ dialogTitleId?: string;
82
105
  isNestedDialog: boolean;
83
106
  dialogRef: React_2.Ref<DialogSurfaceElement>;
84
107
  modalType: DialogModalType;
@@ -126,7 +149,8 @@ export declare type DialogOpenChangeEvent = DialogOpenChangeData['event'];
126
149
  * Callback fired when the component changes value from open state.
127
150
  *
128
151
  * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`
129
- * @param data - A data object with relevant information, such as open value and type
152
+ * @param data - A data object with relevant information,
153
+ * such as open value and type of interaction that created the event
130
154
  */
131
155
  export declare type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;
132
156
 
@@ -160,6 +184,13 @@ export declare type DialogProps = ComponentProps<Partial<DialogSlots>> & {
160
184
  * @default false
161
185
  */
162
186
  defaultOpen?: boolean;
187
+ /**
188
+ * Callback fired when the component changes value from open state.
189
+ *
190
+ * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`
191
+ * @param data - A data object with relevant information,
192
+ * such as open value and type of interaction that created the event
193
+ */
163
194
  onOpenChange?: DialogOpenChangeEventHandler;
164
195
  /**
165
196
  * Can contain two children including {@link DialogTrigger} and {@link DialogSurface}.
@@ -189,8 +220,10 @@ declare type DialogSurfaceContextValues = {
189
220
  dialogSurface: DialogSurfaceContextValue;
190
221
  };
191
222
 
192
- /** @internal */
193
- declare type DialogSurfaceElement = HTMLDialogElement | HTMLDivElement;
223
+ /**
224
+ * Union between all possible semantic element that represent a DialogSurface
225
+ */
226
+ export declare type DialogSurfaceElement = HTMLDialogElement | HTMLDivElement;
194
227
 
195
228
  /**
196
229
  * DialogSurface Props
@@ -211,7 +244,7 @@ export declare type DialogSurfaceSlots = {
211
244
  * since native `<dialog>` element supports [::backdrop](https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop)
212
245
  */
213
246
  backdrop?: Slot<'div'>;
214
- root: NonNullable<Slot<'dialog', 'div'>>;
247
+ root: Slot<'div'>;
215
248
  };
216
249
 
217
250
  /**
@@ -230,7 +263,7 @@ export declare const dialogTitleClassNames: SlotClassNames<DialogTitleSlots>;
230
263
  /**
231
264
  * DialogTitle Props
232
265
  */
233
- export declare type DialogTitleProps = ComponentProps<DialogTitleSlots> & {};
266
+ export declare type DialogTitleProps = ComponentProps<DialogTitleSlots>;
234
267
 
235
268
  export declare type DialogTitleSlots = {
236
269
  /**
@@ -266,23 +299,19 @@ export declare type DialogTriggerAction = 'open' | 'close';
266
299
  * Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog
267
300
  */
268
301
  export declare type DialogTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<Type, Props & {
269
- ref: React_2.Ref<unknown>;
270
302
  'aria-haspopup'?: 'dialog';
271
303
  }>;
272
304
 
273
- export declare type DialogTriggerProps = {
305
+ export declare type DialogTriggerProps = TriggerProps<DialogTriggerChildProps> & {
274
306
  /**
275
307
  * Explicitly declare if the trigger is responsible for opening or
276
308
  * closing a Dialog visibility state.
277
- * @default 'open' // if it's outside DialogSurface
278
- * @default 'close' // if it's inside DialogSurface
309
+ *
310
+ * If `DialogTrigger` is outside `DialogSurface` then it'll be `open` by default
311
+ *
312
+ * If `DialogTrigger` is inside `DialogSurface` then it'll be `close` by default
279
313
  */
280
314
  action?: DialogTriggerAction;
281
- /**
282
- * Explicitly require single child or render function
283
- * to inject properties
284
- */
285
- children: React_2.ReactElement | ((props: DialogTriggerChildProps) => React_2.ReactElement | null);
286
315
  };
287
316
 
288
317
  export declare type DialogTriggerState = {
@@ -304,6 +333,11 @@ export declare const renderDialogActions_unstable: (state: DialogActionsState) =
304
333
  */
305
334
  export declare const renderDialogBody_unstable: (state: DialogBodyState) => JSX.Element;
306
335
 
336
+ /**
337
+ * Render the final JSX of DialogContent
338
+ */
339
+ export declare const renderDialogContent_unstable: (state: DialogContentState) => JSX.Element;
340
+
307
341
  /**
308
342
  * Render the final JSX of DialogSurface
309
343
  */
@@ -363,6 +397,22 @@ export declare const useDialogBody_unstable: (props: DialogBodyProps, ref: React
363
397
  */
364
398
  export declare const useDialogBodyStyles_unstable: (state: DialogBodyState) => DialogBodyState;
365
399
 
400
+ /**
401
+ * Create the state required to render DialogBody.
402
+ *
403
+ * The returned state can be modified with hooks such as useDialogBodyStyles_unstable,
404
+ * before being passed to renderDialogBody_unstable.
405
+ *
406
+ * @param props - props from this instance of DialogBody
407
+ * @param ref - reference to root HTMLElement of DialogBody
408
+ */
409
+ export declare const useDialogContent_unstable: (props: DialogContentProps, ref: React_2.Ref<HTMLElement>) => DialogContentState;
410
+
411
+ /**
412
+ * Apply styling to the DialogContent slots based on the state
413
+ */
414
+ export declare const useDialogContentStyles_unstable: (state: DialogContentState) => DialogContentState;
415
+
366
416
  /**
367
417
  * Create the state required to render DialogSurface.
368
418
  *
package/lib/Dialog.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"../src/","sources":["Dialog.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Dialog/index';\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/Dialog.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Dialog/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.js","sourceRoot":"../src/","sources":["DialogActions.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogActions/index';\n"]}
1
+ {"version":3,"file":"DialogActions.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogActions.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogActions/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogBody.js","sourceRoot":"../src/","sources":["DialogBody.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/DialogBody/index';\n"]}
1
+ {"version":3,"file":"DialogBody.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogBody.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/DialogBody/index';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/DialogContent/index';
2
+ //# sourceMappingURL=DialogContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContent.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogContent.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogContent/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogSurface.js","sourceRoot":"../src/","sources":["DialogSurface.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogSurface/index';\n"]}
1
+ {"version":3,"file":"DialogSurface.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogSurface.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogSurface/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTitle.js","sourceRoot":"../src/","sources":["DialogTitle.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/DialogTitle/index';\n"]}
1
+ {"version":3,"file":"DialogTitle.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogTitle.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/DialogTitle/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTrigger.js","sourceRoot":"../src/","sources":["DialogTrigger.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogTrigger/index';\n"]}
1
+ {"version":3,"file":"DialogTrigger.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/DialogTrigger.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/DialogTrigger/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AAEA,SAAS,+BAAT,QAAgD,0BAAhD;AAEA;;;;;;AAMG;;AACH,OAAO,MAAM,MAAM,gBAA0B,KAAK,CAAC,IAAN,CAAW,KAAK,IAAG;EAC9D,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,CAAhC;EACA,MAAM,aAAa,GAAG,+BAA+B,CAAC,KAAD,CAArD;EAEA,OAAO,qBAAqB,CAAC,KAAD,EAAQ,aAAR,CAA5B;AACD,CAL4C,CAAtC;AAOP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AAEA,SAAS,+BAAT,QAAgD,0BAAhD;AAEA;;;;;;AAMG;;AACH,OAAO,MAAM,MAAM,gBAA0B,KAAK,CAAC,IAAN,CAAW,KAAK,IAAG;EAC9D,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,CAAhC;EACA,MAAM,aAAa,GAAG,+BAA+B,CAAC,KAAD,CAArD;EAEA,OAAO,qBAAqB,CAAC,KAAD,EAAQ,aAAR,CAA5B;AACD,CAL4C,CAAtC;AAOP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.types.js","sourceRoot":"../src/","sources":["components/Dialog/Dialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface/DialogSurface.types';\n\nexport type DialogSlots = {};\n\nexport type DialogOpenChangeEvent = DialogOpenChangeData['event'];\n\nexport type DialogOpenChangeData =\n | {\n /**\n * triggered when Escape key is pressed in a native `dialog`\n */\n type: 'dialogCancel';\n open: boolean;\n event: React.SyntheticEvent<DialogSurfaceElement>;\n }\n | {\n type: 'escapeKeyDown';\n open: boolean;\n event: React.KeyboardEvent<DialogSurfaceElement>;\n }\n | {\n type: 'backdropClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n }\n | {\n type: 'triggerClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n };\n\nexport type DialogModalType = 'modal' | 'non-modal' | 'alert';\n\n/**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information, such as open value and type\n */\nexport type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;\n\nexport type DialogContextValues = {\n dialog: DialogContextValue;\n /**\n * dialogSurface context is provided by Dialog as false\n * to ensure components inside Dialog but outside DialogSurface will consume this as false\n */\n dialogSurface: DialogSurfaceContextValue;\n};\n\nexport type DialogProps = ComponentProps<Partial<DialogSlots>> & {\n /**\n * Dialog variations.\n *\n * `modal`: When this type of dialog is open, the rest of the page is dimmed out and cannot be interacted with.\n * The tab sequence is kept within the dialog and moving the focus outside\n * the dialog will imply closing it. This is the default type of the component.\n *\n * `non-modal`: When a non-modal dialog is open, the rest of the page is not dimmed out\n * and users can interact with the rest of the page.\n * This also implies that the tab focus can move outside the dialog when it reaches the last focusable element.\n *\n * `alert`: is a special type of modal dialogs that interrupts the user's workflow\n * to communicate an important message or ask for a decision.\n * Unlike a typical modal dialog, the user must take an action through the options given to dismiss the dialog,\n * and it cannot be dismissed through the dimmed background or escape key.\n *\n * @default modal\n */\n modalType?: DialogModalType;\n /**\n * Controls the open state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Default value for the uncontrolled open state of the dialog.\n * @default false\n */\n defaultOpen?: boolean;\n onOpenChange?: DialogOpenChangeEventHandler;\n /**\n * Can contain two children including {@link DialogTrigger} and {@link DialogSurface}.\n * Alternatively can only contain {@link DialogSurface} if using trigger outside dialog, or controlling state.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n};\n\nexport type DialogState = ComponentState<DialogSlots> &\n DialogContextValue & {\n content: React.ReactNode;\n trigger: React.ReactNode;\n };\n"]}
1
+ {"version":3,"file":"Dialog.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface/DialogSurface.types';\n\nexport type DialogSlots = {};\n\nexport type DialogOpenChangeEvent = DialogOpenChangeData['event'];\n\nexport type DialogOpenChangeData =\n | {\n /**\n * triggered when Escape key is pressed in a native `dialog`\n */\n type: 'dialogCancel';\n open: boolean;\n event: React.SyntheticEvent<DialogSurfaceElement>;\n }\n | {\n type: 'escapeKeyDown';\n open: boolean;\n event: React.KeyboardEvent<DialogSurfaceElement>;\n }\n | {\n type: 'backdropClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n }\n | {\n type: 'triggerClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n };\n\nexport type DialogModalType = 'modal' | 'non-modal' | 'alert';\n\n/**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\nexport type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;\n\nexport type DialogContextValues = {\n dialog: DialogContextValue;\n /**\n * dialogSurface context is provided by Dialog as false\n * to ensure components inside Dialog but outside DialogSurface will consume this as false\n */\n dialogSurface: DialogSurfaceContextValue;\n};\n\nexport type DialogProps = ComponentProps<Partial<DialogSlots>> & {\n /**\n * Dialog variations.\n *\n * `modal`: When this type of dialog is open, the rest of the page is dimmed out and cannot be interacted with.\n * The tab sequence is kept within the dialog and moving the focus outside\n * the dialog will imply closing it. This is the default type of the component.\n *\n * `non-modal`: When a non-modal dialog is open, the rest of the page is not dimmed out\n * and users can interact with the rest of the page.\n * This also implies that the tab focus can move outside the dialog when it reaches the last focusable element.\n *\n * `alert`: is a special type of modal dialogs that interrupts the user's workflow\n * to communicate an important message or ask for a decision.\n * Unlike a typical modal dialog, the user must take an action through the options given to dismiss the dialog,\n * and it cannot be dismissed through the dimmed background or escape key.\n *\n * @default modal\n */\n modalType?: DialogModalType;\n /**\n * Controls the open state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Default value for the uncontrolled open state of the dialog.\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\n onOpenChange?: DialogOpenChangeEventHandler;\n /**\n * Can contain two children including {@link DialogTrigger} and {@link DialogSurface}.\n * Alternatively can only contain {@link DialogSurface} if using trigger outside dialog, or controlling state.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n};\n\nexport type DialogState = ComponentState<DialogSlots> &\n DialogContextValue & {\n content: React.ReactNode;\n trigger: React.ReactNode;\n };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC","sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-dialog/src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC","sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Dialog/renderDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,EAAyB,qBAAzB,QAAsD,gBAAtD;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAqB,aAArB,KAA2D;EAC9F,MAAM;IAAE,OAAF;IAAW;EAAX,IAAuB,KAA7B;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAf,eACE,KAAA,CAAA,aAAA,CAAC,qBAAD,EAAsB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAtB,EACG,OADH,EAEG,OAFH,CADF,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/renderDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,EAAyB,qBAAzB,QAAsD,gBAAtD;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAqB,aAArB,KAA2D;EAC9F,MAAM;IAAE,OAAF;IAAW;EAAX,IAAuB,KAA7B;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAf,eACE,KAAA,CAAA,aAAA,CAAC,qBAAD,EAAsB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAtB,EACG,OADH,EAEG,OAFH,CADF,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect, useMergedRefs } from '@fluentui/react-utilities';
2
+ import { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';
3
3
  import { useHasParentContext } from '@fluentui/react-context-selector';
4
- import { useControlNativeDialogOpenState, useDisableBodyScroll, useFocusFirstElement } from '../../utils';
4
+ import { useDisableBodyScroll, useFocusFirstElement } from '../../utils';
5
5
  import { DialogContext } from '../../contexts';
6
6
  /**
7
7
  * Create the state required to render Dialog.
@@ -33,7 +33,6 @@ export const useDialog_unstable = props => {
33
33
  }
34
34
  });
35
35
  const focusRef = useFocusFirstElement(open, modalType);
36
- const nativeControlRef = useControlNativeDialogOpenState(open, modalType);
37
36
  const disableBodyScroll = useDisableBodyScroll();
38
37
  const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');
39
38
  useIsomorphicLayoutEffect(() => {
@@ -50,10 +49,10 @@ export const useDialog_unstable = props => {
50
49
  content: open ? content : null,
51
50
  trigger,
52
51
  requestOpenChange,
53
- dialogBodyID: useId('dialog-body-'),
54
- dialogTitleID: useId('dialog-title-'),
52
+ dialogContentId: useId('dialog-content-'),
53
+ dialogTitleId: useId('dialog-title-'),
55
54
  isNestedDialog: useHasParentContext(DialogContext),
56
- dialogRef: useMergedRefs(focusRef, nativeControlRef)
55
+ dialogRef: focusRef
57
56
  };
58
57
  };
59
58
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Dialog/useDialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,oBADF,EAEE,gBAFF,EAGE,KAHF,EAIE,yBAJF,EAKE,aALF,QAMO,2BANP;AAOA,SAAS,mBAAT,QAAoC,kCAApC;AACA,SAAS,+BAAT,EAA0C,oBAA1C,EAAgE,oBAAhE,QAA4F,aAA5F;AACA,SAAS,aAAT,QAA8B,gBAA9B;AAIA;;;;;;;AAOG;;AACH,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAAoC;EACpE,MAAM;IAAE,QAAF;IAAY,SAAS,GAAG,OAAxB;IAAiC;EAAjC,IAAkD,KAAxD;EAEA,MAAM,CAAC,OAAD,EAAU,OAAV,IAAqB,2BAA2B,CAAC,QAAD,CAAtD;EAEA,MAAM,CAAC,IAAD,EAAO,OAAP,IAAkB,oBAAoB,CAAC;IAC3C,KAAK,EAAE,KAAK,CAAC,IAD8B;IAE3C,YAAY,EAAE,KAAK,CAAC,WAFuB;IAG3C,YAAY,EAAE;EAH6B,CAAD,CAA5C;EAMA,MAAM,iBAAiB,GAAG,gBAAgB,CAAE,IAAD,IAA+B;IACxE,YAAY,KAAA,IAAZ,IAAA,YAAY,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAA,YAAY,CAAG,IAAI,CAAC,KAAR,EAAe,IAAf,CAAZ,CADwE,CAGxE;IACA;;IACA,IAAI,CAAC,IAAI,CAAC,KAAL,CAAW,kBAAX,EAAL,EAAsC;MACpC,OAAO,CAAC,IAAI,CAAC,IAAN,CAAP;IACD;EACF,CARyC,CAA1C;EAUA,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAD,EAAO,SAAP,CAArC;EACA,MAAM,gBAAgB,GAAG,+BAA+B,CAAC,IAAD,EAAO,SAAP,CAAxD;EACA,MAAM,iBAAiB,GAAG,oBAAoB,EAA9C;EACA,MAAM,kBAAkB,GAAG,OAAO,CAAC,IAAI,IAAI,SAAS,KAAK,WAAvB,CAAlC;EAEA,yBAAyB,CAAC,MAAK;IAC7B,IAAI,kBAAJ,EAAwB;MACtB,OAAO,iBAAiB,EAAxB;IACD;EACF,CAJwB,EAItB,CAAC,iBAAD,EAAoB,kBAApB,CAJsB,CAAzB;EAMA,OAAO;IACL,UAAU,EAAE;MACV,QAAQ,EAAE;IADA,CADP;IAIL,IAJK;IAKL,SALK;IAML,OAAO,EAAE,IAAI,GAAG,OAAH,GAAa,IANrB;IAOL,OAPK;IAQL,iBARK;IASL,YAAY,EAAE,KAAK,CAAC,cAAD,CATd;IAUL,aAAa,EAAE,KAAK,CAAC,eAAD,CAVf;IAWL,cAAc,EAAE,mBAAmB,CAAC,aAAD,CAX9B;IAYL,SAAS,EAAE,aAAa,CAAC,QAAD,EAAW,gBAAX;EAZnB,CAAP;AAcD,CA9CM;AAgDP;;AAEG;;AACH,SAAS,2BAAT,CACE,QADF,EAC2B;EAEzB,MAAM,aAAa,GAAG,KAAK,CAAC,QAAN,CAAe,OAAf,CAAuB,QAAvB,CAAtB;;EACA,IAAI,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA7B,EAA2C;IACzC,IAAI,aAAa,CAAC,MAAd,KAAyB,CAAzB,IAA8B,aAAa,CAAC,MAAd,KAAyB,CAA3D,EAA8D;MAC5D;MACA,OAAO,CAAC,IAAR,CACE,+DACE,4EAFJ;IAID;EACF;;EACD,QAAQ,aAAa,CAAC,MAAtB;IACE;IACA,KAAK,CAAL;MACE,OAAO,aAAP;IACF;;IACA,KAAK,CAAL;MACE,OAAO,CAAC,SAAD,EAAY,aAAa,CAAC,CAAD,CAAzB,CAAP;IACF;;IACA;MACE,OAAO,CAAC,SAAD,EAAY,SAAZ,CAAP;EATJ;AAWD","sourcesContent":["import * as React from 'react';\nimport {\n useControllableState,\n useEventCallback,\n useId,\n useIsomorphicLayoutEffect,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useControlNativeDialogOpenState, 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 } = 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 nativeControlRef = useControlNativeDialogOpenState(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 open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogBodyID: useId('dialog-body-'),\n dialogTitleID: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: useMergedRefs(focusRef, nativeControlRef),\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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/useDialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,EAA+B,gBAA/B,EAAiD,KAAjD,EAAwD,yBAAxD,QAAyF,2BAAzF;AACA,SAAS,mBAAT,QAAoC,kCAApC;AACA,SAAS,oBAAT,EAA+B,oBAA/B,QAA2D,aAA3D;AACA,SAAS,aAAT,QAA8B,gBAA9B;AAIA;;;;;;;AAOG;;AACH,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAAoC;EACpE,MAAM;IAAE,QAAF;IAAY,SAAS,GAAG,OAAxB;IAAiC;EAAjC,IAAkD,KAAxD;EAEA,MAAM,CAAC,OAAD,EAAU,OAAV,IAAqB,2BAA2B,CAAC,QAAD,CAAtD;EAEA,MAAM,CAAC,IAAD,EAAO,OAAP,IAAkB,oBAAoB,CAAC;IAC3C,KAAK,EAAE,KAAK,CAAC,IAD8B;IAE3C,YAAY,EAAE,KAAK,CAAC,WAFuB;IAG3C,YAAY,EAAE;EAH6B,CAAD,CAA5C;EAMA,MAAM,iBAAiB,GAAG,gBAAgB,CAAE,IAAD,IAA+B;IACxE,YAAY,KAAA,IAAZ,IAAA,YAAY,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAA,YAAY,CAAG,IAAI,CAAC,KAAR,EAAe,IAAf,CAAZ,CADwE,CAGxE;IACA;;IACA,IAAI,CAAC,IAAI,CAAC,KAAL,CAAW,kBAAX,EAAL,EAAsC;MACpC,OAAO,CAAC,IAAI,CAAC,IAAN,CAAP;IACD;EACF,CARyC,CAA1C;EAUA,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAD,EAAO,SAAP,CAArC;EACA,MAAM,iBAAiB,GAAG,oBAAoB,EAA9C;EACA,MAAM,kBAAkB,GAAG,OAAO,CAAC,IAAI,IAAI,SAAS,KAAK,WAAvB,CAAlC;EAEA,yBAAyB,CAAC,MAAK;IAC7B,IAAI,kBAAJ,EAAwB;MACtB,OAAO,iBAAiB,EAAxB;IACD;EACF,CAJwB,EAItB,CAAC,iBAAD,EAAoB,kBAApB,CAJsB,CAAzB;EAMA,OAAO;IACL,UAAU,EAAE;MACV,QAAQ,EAAE;IADA,CADP;IAIL,IAJK;IAKL,SALK;IAML,OAAO,EAAE,IAAI,GAAG,OAAH,GAAa,IANrB;IAOL,OAPK;IAQL,iBARK;IASL,eAAe,EAAE,KAAK,CAAC,iBAAD,CATjB;IAUL,aAAa,EAAE,KAAK,CAAC,eAAD,CAVf;IAWL,cAAc,EAAE,mBAAmB,CAAC,aAAD,CAX9B;IAYL,SAAS,EAAE;EAZN,CAAP;AAcD,CA7CM;AA+CP;;AAEG;;AACH,SAAS,2BAAT,CACE,QADF,EAC2B;EAEzB,MAAM,aAAa,GAAG,KAAK,CAAC,QAAN,CAAe,OAAf,CAAuB,QAAvB,CAAtB;;EACA,IAAI,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAA7B,EAA2C;IACzC,IAAI,aAAa,CAAC,MAAd,KAAyB,CAAzB,IAA8B,aAAa,CAAC,MAAd,KAAyB,CAA3D,EAA8D;MAC5D;MACA,OAAO,CAAC,IAAR,CACE,+DACE,4EAFJ;IAID;EACF;;EACD,QAAQ,aAAa,CAAC,MAAtB;IACE;IACA,KAAK,CAAL;MACE,OAAO,aAAP;IACF;;IACA,KAAK,CAAL;MACE,OAAO,CAAC,SAAD,EAAY,aAAa,CAAC,CAAD,CAAzB,CAAP;IACF;;IACA;MACE,OAAO,CAAC,SAAD,EAAY,SAAZ,CAAP;EATJ;AAWD","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 } = 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 open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogContentId: useId('dialog-content-'),\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"],"sourceRoot":"../src/"}
@@ -2,9 +2,9 @@ export function useDialogContextValues_unstable(state) {
2
2
  const {
3
3
  modalType,
4
4
  open,
5
- dialogBodyID,
5
+ dialogContentId,
6
6
  dialogRef,
7
- dialogTitleID,
7
+ dialogTitleId,
8
8
  isNestedDialog,
9
9
  requestOpenChange
10
10
  } = state;
@@ -17,8 +17,8 @@ export function useDialogContextValues_unstable(state) {
17
17
  open,
18
18
  modalType,
19
19
  dialogRef,
20
- dialogBodyID,
21
- dialogTitleID,
20
+ dialogContentId,
21
+ dialogTitleId,
22
22
  isNestedDialog,
23
23
  requestOpenChange
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Dialog/useDialogContextValues.ts"],"names":[],"mappings":"AAGA,OAAM,SAAU,+BAAV,CAA0C,KAA1C,EAA4D;EAChE,MAAM;IAAE,SAAF;IAAa,IAAb;IAAmB,YAAnB;IAAiC,SAAjC;IAA4C,aAA5C;IAA2D,cAA3D;IAA2E;EAA3E,IAAiG,KAAvG;EAEA;;;AAGG;;EACH,MAAM,MAAM,GAAuB;IACjC,IADiC;IAEjC,SAFiC;IAGjC,SAHiC;IAIjC,YAJiC;IAKjC,aALiC;IAMjC,cANiC;IAOjC;EAPiC,CAAnC;EAUA,MAAM,aAAa,GAA8B,KAAjD;EAEA,OAAO;IAAE,MAAF;IAAU;EAAV,CAAP;AACD","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, dialogBodyID, dialogRef, dialogTitleID, isNestedDialog, 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 dialogBodyID,\n dialogTitleID,\n isNestedDialog,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-dialog/src/components/Dialog/useDialogContextValues.ts"],"names":[],"mappings":"AAGA,OAAM,SAAU,+BAAV,CAA0C,KAA1C,EAA4D;EAChE,MAAM;IAAE,SAAF;IAAa,IAAb;IAAmB,eAAnB;IAAoC,SAApC;IAA+C,aAA/C;IAA8D,cAA9D;IAA8E;EAA9E,IAAoG,KAA1G;EAEA;;;AAGG;;EACH,MAAM,MAAM,GAAuB;IACjC,IADiC;IAEjC,SAFiC;IAGjC,SAHiC;IAIjC,eAJiC;IAKjC,aALiC;IAMjC,cANiC;IAOjC;EAPiC,CAAnC;EAUA,MAAM,aAAa,GAA8B,KAAjD;EAEA,OAAO;IAAE,MAAF;IAAU;EAAV,CAAP;AACD","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, dialogContentId, dialogRef, dialogTitleId, isNestedDialog, 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 dialogContentId,\n dialogTitleId,\n isNestedDialog,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"],"sourceRoot":"../src/"}