@fluentui/react-dialog 9.0.0-beta.7 → 9.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +189 -5
- package/CHANGELOG.md +44 -6
- package/Spec.md +44 -25
- package/dist/index.d.ts +99 -55
- package/lib/Dialog.js.map +1 -1
- package/lib/DialogActions.js.map +1 -1
- package/lib/DialogBody.js.map +1 -1
- package/lib/DialogContent.js +2 -0
- package/lib/DialogContent.js.map +1 -0
- package/lib/DialogSurface.js.map +1 -1
- package/lib/DialogTitle.js.map +1 -1
- package/lib/DialogTrigger.js.map +1 -1
- package/lib/components/Dialog/Dialog.js +0 -2
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/index.js +0 -1
- package/lib/components/Dialog/index.js.map +1 -1
- package/lib/components/Dialog/renderDialog.js +2 -10
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/Dialog/useDialog.js +19 -129
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/Dialog/useDialogContextValues.js +4 -4
- package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.types.js.map +1 -1
- package/lib/components/DialogActions/index.js.map +1 -1
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.js +3 -5
- package/lib/components/DialogActions/useDialogActionsStyles.js.map +1 -1
- package/lib/components/DialogBody/DialogBody.js.map +1 -1
- package/lib/components/DialogBody/DialogBody.types.js.map +1 -1
- package/lib/components/DialogBody/index.js.map +1 -1
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.js +5 -5
- package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.js +15 -0
- package/lib/components/DialogContent/DialogContent.js.map +1 -0
- package/lib/components/DialogContent/DialogContent.types.js +2 -0
- package/lib/components/DialogContent/DialogContent.types.js.map +1 -0
- package/lib/components/DialogContent/index.js +6 -0
- package/lib/components/DialogContent/index.js.map +1 -0
- package/lib/components/DialogContent/renderDialogContent.js +16 -0
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -0
- package/lib/components/DialogContent/useDialogContent.js +27 -0
- package/lib/components/DialogContent/useDialogContent.js.map +1 -0
- package/lib/components/DialogContent/useDialogContentStyles.js +26 -0
- package/lib/components/DialogContent/useDialogContentStyles.js.map +1 -0
- package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
- package/lib/components/DialogSurface/index.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js +4 -2
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +120 -21
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.js +57 -7
- package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.js +2 -3
- package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.types.js.map +1 -1
- package/lib/components/DialogTitle/index.js.map +1 -1
- package/lib/components/DialogTitle/renderDialogTitle.js +2 -5
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js +15 -9
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitleStyles.js +61 -54
- package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
- package/lib/components/DialogTrigger/index.js.map +1 -1
- package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js +3 -22
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib/contexts/constants.js +1 -1
- package/lib/contexts/constants.js.map +1 -1
- package/lib/contexts/dialogContext.js +2 -4
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/index.js +4 -3
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isEscapeKeyDown.js +5 -4
- package/lib/utils/isEscapeKeyDown.js.map +1 -1
- package/lib/utils/isHTMLDialogElement.js +4 -0
- package/lib/utils/isHTMLDialogElement.js.map +1 -0
- package/lib/utils/useControlNativeDialogOpenState.js +20 -0
- package/lib/utils/useControlNativeDialogOpenState.js.map +1 -0
- package/lib/utils/useDisableBodyScroll.js +60 -0
- package/lib/utils/useDisableBodyScroll.js.map +1 -0
- package/lib/utils/useFocusFirstElement.js +41 -0
- package/lib/utils/useFocusFirstElement.js.map +1 -0
- package/lib-commonjs/Dialog.js.map +1 -1
- package/lib-commonjs/DialogActions.js.map +1 -1
- package/lib-commonjs/DialogBody.js.map +1 -1
- package/lib-commonjs/DialogContent.js +10 -0
- package/lib-commonjs/DialogContent.js.map +1 -0
- package/lib-commonjs/DialogSurface.js.map +1 -1
- package/lib-commonjs/DialogTitle.js.map +1 -1
- package/lib-commonjs/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.js +0 -3
- package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/index.js +0 -2
- package/lib-commonjs/components/Dialog/index.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js +2 -12
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +18 -128
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js +4 -4
- package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/index.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +3 -6
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/index.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +4 -5
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.js +26 -0
- package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -0
- package/lib-commonjs/components/DialogContent/DialogContent.types.js +6 -0
- package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -0
- package/lib-commonjs/components/DialogContent/index.js +18 -0
- package/lib-commonjs/components/DialogContent/index.js.map +1 -0
- package/lib-commonjs/components/DialogContent/renderDialogContent.js +27 -0
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -0
- package/lib-commonjs/components/DialogContent/useDialogContent.js +37 -0
- package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -0
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +36 -0
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -0
- package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +5 -2
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +120 -21
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +57 -6
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.js +2 -3
- package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +2 -6
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js +18 -10
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +62 -56
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +4 -24
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib-commonjs/contexts/constants.js +2 -2
- package/lib-commonjs/contexts/constants.js.map +1 -1
- package/lib-commonjs/contexts/dialogContext.js +2 -4
- package/lib-commonjs/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +34 -13
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/index.js +5 -3
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/isEscapeKeyDown.js +5 -4
- package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
- package/lib-commonjs/utils/isHTMLDialogElement.js +13 -0
- package/lib-commonjs/utils/isHTMLDialogElement.js.map +1 -0
- package/lib-commonjs/utils/useControlNativeDialogOpenState.js +31 -0
- package/lib-commonjs/utils/useControlNativeDialogOpenState.js.map +1 -0
- package/lib-commonjs/utils/useDisableBodyScroll.js +73 -0
- package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -0
- package/lib-commonjs/utils/useFocusFirstElement.js +54 -0
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -0
- package/package.json +15 -16
- package/dist/tsdoc-metadata.json +0 -11
- package/lib/components/Dialog/useDialogStyles.js +0 -41
- package/lib/components/Dialog/useDialogStyles.js.map +0 -1
- package/lib/utils/isTargetDisabled.js +0 -14
- package/lib/utils/isTargetDisabled.js.map +0 -1
- package/lib/utils/localShorthands.js +0 -9
- package/lib/utils/localShorthands.js.map +0 -1
- package/lib/utils/normalizeDefaultPrevented.js +0 -11
- package/lib/utils/normalizeDefaultPrevented.js.map +0 -1
- package/lib-commonjs/components/Dialog/useDialogStyles.js +0 -53
- package/lib-commonjs/components/Dialog/useDialogStyles.js.map +0 -1
- package/lib-commonjs/utils/isTargetDisabled.js +0 -23
- package/lib-commonjs/utils/isTargetDisabled.js.map +0 -1
- package/lib-commonjs/utils/localShorthands.js +0 -18
- package/lib-commonjs/utils/localShorthands.js.map +0 -1
- package/lib-commonjs/utils/normalizeDefaultPrevented.js +0 -20
- package/lib-commonjs/utils/normalizeDefaultPrevented.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,191 @@
|
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 20 Sep 2022 20:54:06 GMT",
|
|
6
|
+
"tag": "@fluentui/react-dialog_v9.0.0-beta.9",
|
|
7
|
+
"version": "9.0.0-beta.9",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
12
|
+
"package": "@fluentui/react-dialog",
|
|
13
|
+
"commit": "79d1b0e32631bf916a52834e3731de464aa4898c",
|
|
14
|
+
"comment": "bugfix(react-dialog): Adds color style to DialogSurface"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-dialog",
|
|
19
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14",
|
|
20
|
+
"commit": "9617a5a46ef4c5e310a066a5374ff2ed61db3c66"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"none": [
|
|
24
|
+
{
|
|
25
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
26
|
+
"package": "@fluentui/react-dialog",
|
|
27
|
+
"commit": "81de40f0df0dfa8bac4e4fb522bf830d9fe8e066",
|
|
28
|
+
"comment": "Includes Tooltip Escape scenarios on e2e tests"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
32
|
+
"package": "@fluentui/react-dialog",
|
|
33
|
+
"commit": "cf5f5e14c86cc35ee8bfff6c6be130a36fb6d16d",
|
|
34
|
+
"comment": "chore: scaffold DialogContent component"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"date": "Thu, 15 Sep 2022 09:48:59 GMT",
|
|
41
|
+
"tag": "@fluentui/react-dialog_v9.0.0-beta.8",
|
|
42
|
+
"version": "9.0.0-beta.8",
|
|
43
|
+
"comments": {
|
|
44
|
+
"prerelease": [
|
|
45
|
+
{
|
|
46
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
47
|
+
"package": "@fluentui/react-dialog",
|
|
48
|
+
"commit": "0547583ebcebe746110e5ef8d0599b0972b1f4c6",
|
|
49
|
+
"comment": "chore(react-dialog): Updates trigger to use useARIAButtonProps"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"author": "olfedias@microsoft.com",
|
|
53
|
+
"package": "@fluentui/react-dialog",
|
|
54
|
+
"commit": "e610024474cfe5d45f61501a8b6a21daf4c794a2",
|
|
55
|
+
"comment": "chore: Update Griffel to latest version"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
59
|
+
"package": "@fluentui/react-dialog",
|
|
60
|
+
"commit": "827dffa4e4a164682c29b157b572ceb63c5dd6a9",
|
|
61
|
+
"comment": "chore(react-dialog): removes react-button max-width overrides"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
65
|
+
"package": "@fluentui/react-dialog",
|
|
66
|
+
"commit": "7b46e969e352bd636f7094ac5e29177fb7e8bff2",
|
|
67
|
+
"comment": "feat: add scroll lock feature to Dialog"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
71
|
+
"package": "@fluentui/react-dialog",
|
|
72
|
+
"commit": "b02e8f3ab48daf6b9db7f7efebbf026c6cbed740",
|
|
73
|
+
"comment": "feat(react-dialog): moves backdrop slot from Dialog to DialogSurface"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
77
|
+
"package": "@fluentui/react-dialog",
|
|
78
|
+
"commit": "9c10bc432b8fc8df6d51975c580a19603a10fd1e",
|
|
79
|
+
"comment": "feat(react-dialog): adds proper style to make DialogBody responsive"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
83
|
+
"package": "@fluentui/react-dialog",
|
|
84
|
+
"commit": "c9a58334a7abebf949f59d2c0a4bb1271074d808",
|
|
85
|
+
"comment": "chore: renames overlay slot to backdrop"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
89
|
+
"package": "@fluentui/react-dialog",
|
|
90
|
+
"commit": "6c6fe4c8246abec30d9cd3ba2079d379c4d7acb8",
|
|
91
|
+
"comment": "bugfix: stops propagation on Escape key"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
95
|
+
"package": "@fluentui/react-dialog",
|
|
96
|
+
"commit": "2630091d8093879d26c38dc6a4c585e886cff057",
|
|
97
|
+
"comment": "feat: Adds padding-right style to avoid jumping on scroll lock"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
101
|
+
"package": "@fluentui/react-dialog",
|
|
102
|
+
"commit": "94ab82dd00db0bf177908e7ccc60125efaa4e22d",
|
|
103
|
+
"comment": "chore(react-dialog): removes document listener to Escape keydown"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
107
|
+
"package": "@fluentui/react-dialog",
|
|
108
|
+
"commit": "0865ee92c7cab7273aafd21b1b3dff9418c0d479",
|
|
109
|
+
"comment": "feat(react-dialog): replace `closeButton` to a more generic `action` slot"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
113
|
+
"package": "@fluentui/react-dialog",
|
|
114
|
+
"commit": "fd88d8b10fe32eb635c949aa28653c3376f64c3d",
|
|
115
|
+
"comment": "feat(react-dialog): 1st rule of ARIA for Dialog"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"author": "beachball",
|
|
119
|
+
"package": "@fluentui/react-dialog",
|
|
120
|
+
"comment": "Bump @fluentui/react-utilities to v9.1.0",
|
|
121
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"author": "beachball",
|
|
125
|
+
"package": "@fluentui/react-dialog",
|
|
126
|
+
"comment": "Bump @fluentui/react-context-selector to v9.0.3",
|
|
127
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"author": "beachball",
|
|
131
|
+
"package": "@fluentui/react-dialog",
|
|
132
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.1",
|
|
133
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"author": "beachball",
|
|
137
|
+
"package": "@fluentui/react-dialog",
|
|
138
|
+
"comment": "Bump @fluentui/react-aria to v9.2.0",
|
|
139
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"author": "beachball",
|
|
143
|
+
"package": "@fluentui/react-dialog",
|
|
144
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.1",
|
|
145
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"author": "beachball",
|
|
149
|
+
"package": "@fluentui/react-dialog",
|
|
150
|
+
"comment": "Bump @fluentui/react-theme to v9.1.0",
|
|
151
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"author": "beachball",
|
|
155
|
+
"package": "@fluentui/react-dialog",
|
|
156
|
+
"comment": "Bump @fluentui/react-portal to v9.0.5",
|
|
157
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"author": "beachball",
|
|
161
|
+
"package": "@fluentui/react-dialog",
|
|
162
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13",
|
|
163
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"none": [
|
|
167
|
+
{
|
|
168
|
+
"author": "martinhochel@microsoft.com",
|
|
169
|
+
"package": "@fluentui/react-dialog",
|
|
170
|
+
"commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
|
|
171
|
+
"comment": "chore: update package scaffold"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
175
|
+
"package": "@fluentui/react-dialog",
|
|
176
|
+
"commit": "5cd0e8dbc07b0a71ab0a48813cdcbbbd37a222e1",
|
|
177
|
+
"comment": "chore: remove localShorthands in favor of griffel shorthands"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"author": "martinhochel@microsoft.com",
|
|
181
|
+
"package": "@fluentui/react-dialog",
|
|
182
|
+
"commit": "ba9444d594f3a960cc590eae5237c08bf7c5a07f",
|
|
183
|
+
"comment": "chore: consume cypress.config from it's package boundary"
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"date": "Wed, 03 Aug 2022 16:03:47 GMT",
|
|
6
190
|
"tag": "@fluentui/react-dialog_v9.0.0-beta.7",
|
|
7
191
|
"version": "9.0.0-beta.7",
|
|
8
192
|
"comments": {
|
|
@@ -23,25 +207,25 @@
|
|
|
23
207
|
"author": "beachball",
|
|
24
208
|
"package": "@fluentui/react-dialog",
|
|
25
209
|
"comment": "Bump @fluentui/react-aria to v9.1.0",
|
|
26
|
-
"commit": "
|
|
210
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
27
211
|
},
|
|
28
212
|
{
|
|
29
213
|
"author": "beachball",
|
|
30
214
|
"package": "@fluentui/react-dialog",
|
|
31
215
|
"comment": "Bump @fluentui/react-tabster to v9.1.0",
|
|
32
|
-
"commit": "
|
|
216
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
33
217
|
},
|
|
34
218
|
{
|
|
35
219
|
"author": "beachball",
|
|
36
220
|
"package": "@fluentui/react-dialog",
|
|
37
221
|
"comment": "Bump @fluentui/react-portal to v9.0.4",
|
|
38
|
-
"commit": "
|
|
222
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
39
223
|
},
|
|
40
224
|
{
|
|
41
225
|
"author": "beachball",
|
|
42
226
|
"package": "@fluentui/react-dialog",
|
|
43
227
|
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
|
|
44
|
-
"commit": "
|
|
228
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
45
229
|
}
|
|
46
230
|
],
|
|
47
231
|
"none": [
|
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,60 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-dialog
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 20 Sep 2022 20:54:06 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.9)
|
|
8
|
+
|
|
9
|
+
Tue, 20 Sep 2022 20:54:06 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.8..@fluentui/react-dialog_v9.0.0-beta.9)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- bugfix(react-dialog): Adds color style to DialogSurface ([PR #24832](https://github.com/microsoft/fluentui/pull/24832) by bernardo.sunderhus@gmail.com)
|
|
15
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14 ([PR #24870](https://github.com/microsoft/fluentui/pull/24870) by beachball)
|
|
16
|
+
|
|
17
|
+
## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.8)
|
|
18
|
+
|
|
19
|
+
Thu, 15 Sep 2022 09:48:59 GMT
|
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.7..@fluentui/react-dialog_v9.0.0-beta.8)
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- chore(react-dialog): Updates trigger to use useARIAButtonProps ([PR #24177](https://github.com/microsoft/fluentui/pull/24177) by bernardo.sunderhus@gmail.com)
|
|
25
|
+
- chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
|
|
26
|
+
- chore(react-dialog): removes react-button max-width overrides ([PR #24674](https://github.com/microsoft/fluentui/pull/24674) by bernardo.sunderhus@gmail.com)
|
|
27
|
+
- feat: add scroll lock feature to Dialog ([PR #24375](https://github.com/microsoft/fluentui/pull/24375) by bernardo.sunderhus@gmail.com)
|
|
28
|
+
- feat(react-dialog): moves backdrop slot from Dialog to DialogSurface ([PR #24669](https://github.com/microsoft/fluentui/pull/24669) by bernardo.sunderhus@gmail.com)
|
|
29
|
+
- feat(react-dialog): adds proper style to make DialogBody responsive ([PR #24354](https://github.com/microsoft/fluentui/pull/24354) by bernardo.sunderhus@gmail.com)
|
|
30
|
+
- chore: renames overlay slot to backdrop ([PR #24220](https://github.com/microsoft/fluentui/pull/24220) by bernardo.sunderhus@gmail.com)
|
|
31
|
+
- bugfix: stops propagation on Escape key ([PR #24750](https://github.com/microsoft/fluentui/pull/24750) by bernardo.sunderhus@gmail.com)
|
|
32
|
+
- feat: Adds padding-right style to avoid jumping on scroll lock ([PR #24408](https://github.com/microsoft/fluentui/pull/24408) by bernardo.sunderhus@gmail.com)
|
|
33
|
+
- chore(react-dialog): removes document listener to Escape keydown ([PR #24668](https://github.com/microsoft/fluentui/pull/24668) by bernardo.sunderhus@gmail.com)
|
|
34
|
+
- feat(react-dialog): replace `closeButton` to a more generic `action` slot ([PR #24719](https://github.com/microsoft/fluentui/pull/24719) by bernardo.sunderhus@gmail.com)
|
|
35
|
+
- feat(react-dialog): 1st rule of ARIA for Dialog ([PR #24525](https://github.com/microsoft/fluentui/pull/24525) by bernardo.sunderhus@gmail.com)
|
|
36
|
+
- Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
37
|
+
- Bump @fluentui/react-context-selector to v9.0.3 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
38
|
+
- Bump @fluentui/react-shared-contexts to v9.0.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
39
|
+
- Bump @fluentui/react-aria to v9.2.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
40
|
+
- Bump @fluentui/react-tabster to v9.1.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
41
|
+
- Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
42
|
+
- Bump @fluentui/react-portal to v9.0.5 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
43
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
44
|
+
|
|
7
45
|
## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.7)
|
|
8
46
|
|
|
9
|
-
Wed, 03 Aug 2022 16:
|
|
47
|
+
Wed, 03 Aug 2022 16:03:47 GMT
|
|
10
48
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.6..@fluentui/react-dialog_v9.0.0-beta.7)
|
|
11
49
|
|
|
12
50
|
### Changes
|
|
13
51
|
|
|
14
52
|
- chore: adds aria-labelledby and aria-describedby attributes ([PR #24141](https://github.com/microsoft/fluentui/pull/24141) by bernardo.sunderhus@gmail.com)
|
|
15
53
|
- feat: adds react-dialog to react-components unstable ([PR #24140](https://github.com/microsoft/fluentui/pull/24140) by bernardo.sunderhus@gmail.com)
|
|
16
|
-
- Bump @fluentui/react-aria to v9.1.0 ([PR #
|
|
17
|
-
- Bump @fluentui/react-tabster to v9.1.0 ([PR #
|
|
18
|
-
- Bump @fluentui/react-portal to v9.0.4 ([PR #
|
|
19
|
-
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #
|
|
54
|
+
- Bump @fluentui/react-aria to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
55
|
+
- Bump @fluentui/react-tabster to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
56
|
+
- Bump @fluentui/react-portal to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
57
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
20
58
|
|
|
21
59
|
## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0-beta.6)
|
|
22
60
|
|
package/Spec.md
CHANGED
|
@@ -83,19 +83,7 @@ Sample usages will be give in the following section of this document [Sample cod
|
|
|
83
83
|
The root level component serves as an interface for interaction with all possible behaviors exposed. It provides context down the hierarchy to `children` compound components to allow functionality. This component expects to receive as children either a `DialogSurface` or a `DialogTrigger` and a `DialogSurface` (or some component that will eventually render one of those compound components) in this specific order
|
|
84
84
|
|
|
85
85
|
```tsx
|
|
86
|
-
type DialogSlots = {
|
|
87
|
-
/**
|
|
88
|
-
* Dimmed background of dialog.
|
|
89
|
-
* The default overlay is rendered as a `<div>` with styling.
|
|
90
|
-
* This slot expects a `<div>` element which will replace the default overlay.
|
|
91
|
-
* The overlay should have `aria-hidden="true"`.
|
|
92
|
-
*/
|
|
93
|
-
overlay?: Slot<'div'>;
|
|
94
|
-
/**
|
|
95
|
-
* The root element of the Dialog right after Portal.
|
|
96
|
-
*/
|
|
97
|
-
root: Slot<'div'>;
|
|
98
|
-
};
|
|
86
|
+
type DialogSlots = {};
|
|
99
87
|
|
|
100
88
|
type DialogProps = ComponentProps<DialogSlots> & {
|
|
101
89
|
/**
|
|
@@ -131,7 +119,7 @@ type DialogOpenChangeData = {
|
|
|
131
119
|
/**
|
|
132
120
|
* The event source of the callback invocation
|
|
133
121
|
*/
|
|
134
|
-
type: 'escapeKeyDown' | '
|
|
122
|
+
type: 'escapeKeyDown' | 'backdropClick' | 'triggerClick';
|
|
135
123
|
/**
|
|
136
124
|
* The next value for the internal state of the dialog
|
|
137
125
|
*/
|
|
@@ -167,19 +155,26 @@ export type DialogTriggerProps = {
|
|
|
167
155
|
The `DialogSurface` component represents the visual part of a `Dialog` as a whole, it contains everything that should be visible.
|
|
168
156
|
|
|
169
157
|
```tsx
|
|
170
|
-
type
|
|
158
|
+
type DialogSurfaceSlots = {
|
|
171
159
|
/**
|
|
172
|
-
*
|
|
160
|
+
* Dimmed background of dialog.
|
|
161
|
+
* The default backdrop is rendered as a `<div>` with styling.
|
|
162
|
+
* This slot expects a `<div>` element which will replace the default backdrop.
|
|
163
|
+
* The backdrop should have `aria-hidden="true"`.
|
|
164
|
+
*
|
|
165
|
+
* By default if `DialogSurface` is `<dialog>` element the backdrop is ignored,
|
|
166
|
+
* since native `<dialog>` element supports [::backdrop](https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop)
|
|
173
167
|
*/
|
|
174
|
-
|
|
168
|
+
backdrop?: Slot<'div'>;
|
|
169
|
+
root: NonNullable<Slot<'dialog', 'div'>>;
|
|
175
170
|
};
|
|
176
171
|
|
|
177
|
-
type DialogTitleProps = ComponentProps<
|
|
172
|
+
type DialogTitleProps = ComponentProps<DialogSurfaceSlots>;
|
|
178
173
|
```
|
|
179
174
|
|
|
180
175
|
### DialogTitle
|
|
181
176
|
|
|
182
|
-
The DialogTitle component
|
|
177
|
+
The `DialogTitle` component expects to have a title/header and when `Dialog` is `non-modal` a close (X icon) button is provided through `action` slot by default.
|
|
183
178
|
|
|
184
179
|
```tsx
|
|
185
180
|
type DialogTitleSlots = {
|
|
@@ -187,7 +182,10 @@ type DialogTitleSlots = {
|
|
|
187
182
|
* By default this is a div, but can be a heading.
|
|
188
183
|
*/
|
|
189
184
|
root: Slot<'div', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
|
|
190
|
-
|
|
185
|
+
/**
|
|
186
|
+
* By default a Dialog with modalType='non-modal' will have a close button action
|
|
187
|
+
*/
|
|
188
|
+
action?: Slot<'div'>;
|
|
191
189
|
};
|
|
192
190
|
|
|
193
191
|
type DialogTitleProps = ComponentProps<DialogTitleSlots>;
|
|
@@ -238,7 +236,7 @@ const dialog = <Dialog>
|
|
|
238
236
|
<!-- expected DOM output -->
|
|
239
237
|
<button aria-haspopup="true" class="fui-button">Open Dialog</button>
|
|
240
238
|
<!-- ... portal ... -->
|
|
241
|
-
<div aria-hidden="true" class="fui-dialog-
|
|
239
|
+
<div aria-hidden="true" class="fui-dialog-backdrop"></div>
|
|
242
240
|
<div aria-modal="true" role="dialog" class="fui-dialog-content">This is as basic as it gets</div>
|
|
243
241
|
```
|
|
244
242
|
|
|
@@ -271,7 +269,7 @@ const dialog = <Dialog type="alert">
|
|
|
271
269
|
```html
|
|
272
270
|
<button aria-haspopup="true" class="fui-button">Open Dialog</button>
|
|
273
271
|
<!-- ... portal ... -->
|
|
274
|
-
<div aria-hidden="true" class="fui-dialog-
|
|
272
|
+
<div aria-hidden="true" class="fui-dialog-backdrop"></div>
|
|
275
273
|
<div
|
|
276
274
|
aria-describedby="fui-dialog-body-id"
|
|
277
275
|
aria-labelledby="fui-dialog-title-id"
|
|
@@ -281,7 +279,7 @@ const dialog = <Dialog type="alert">
|
|
|
281
279
|
>
|
|
282
280
|
<div id="fui-dialog-title-id" class="fui-dialog-title">
|
|
283
281
|
<span>Title</span>
|
|
284
|
-
<!--
|
|
282
|
+
<!-- action -->
|
|
285
283
|
</div>
|
|
286
284
|
<div id="fui-dialog-body-id" class="fui-dialog-body">This is going to be inside the dialog</div>
|
|
287
285
|
<div class="fui-dialog-actions">
|
|
@@ -333,7 +331,7 @@ const CustomDialog = () => {
|
|
|
333
331
|
```html
|
|
334
332
|
<button aria-haspopup="true" class="fui-button">Open Dialog</button>
|
|
335
333
|
<!-- ... portal ... -->
|
|
336
|
-
<div aria-hidden="true" class="fui-dialog-
|
|
334
|
+
<div aria-hidden="true" class="fui-dialog-backdrop"></div>
|
|
337
335
|
<div
|
|
338
336
|
aria-describedby="fui-dialog-body-id"
|
|
339
337
|
aria-labelledby="fui-dialog-title-id"
|
|
@@ -343,7 +341,7 @@ const CustomDialog = () => {
|
|
|
343
341
|
>
|
|
344
342
|
<div id="fui-dialog-title-id" class="fui-dialog-title">
|
|
345
343
|
<span>Title</span>
|
|
346
|
-
<!--
|
|
344
|
+
<!-- action -->
|
|
347
345
|
</div>
|
|
348
346
|
<div id="fui-dialog-body-id" class="fui-dialog-body">This is going to be inside the dialog</div>
|
|
349
347
|
<div class="fui-dialog-actions">
|
|
@@ -402,6 +400,27 @@ function AsyncConfirmDialog() {
|
|
|
402
400
|
}
|
|
403
401
|
```
|
|
404
402
|
|
|
403
|
+
### Opting out of native `<dialog>`
|
|
404
|
+
|
|
405
|
+
```tsx
|
|
406
|
+
const dialog = <Dialog>
|
|
407
|
+
<DialogTrigger>
|
|
408
|
+
<Button>Open Dialog</Button>
|
|
409
|
+
<DialogTrigger>
|
|
410
|
+
<DialogSurface as="div">
|
|
411
|
+
This is as basic as it gets.
|
|
412
|
+
</DialogSurface>
|
|
413
|
+
</Dialog>
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
```html
|
|
417
|
+
<!-- expected DOM output -->
|
|
418
|
+
<button aria-haspopup="true" class="fui-button">Open Dialog</button>
|
|
419
|
+
<!-- ... portal ... -->
|
|
420
|
+
<div aria-hidden="true" class="fui-dialog-backdrop"></div>
|
|
421
|
+
<div aria-modal="true" role="dialog" class="fui-dialog-content">This is as basic as it gets</div>
|
|
422
|
+
```
|
|
423
|
+
|
|
405
424
|
## Migration
|
|
406
425
|
|
|
407
426
|
_TBA: Link to migration guide doc_
|