@fluentui/react-dialog 9.5.26 → 9.6.1
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 +139 -1
- package/CHANGELOG.md +38 -2
- package/dist/index.d.ts +3 -2
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/Dialog/renderDialog.js +12 -7
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/Dialog/useDialog.js +7 -4
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/Dialog/useDialogContextValues.js +1 -1
- package/lib/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib/components/DialogActions/DialogActions.js.map +1 -1
- package/lib/components/DialogActions/renderDialogActions.js +2 -2
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActions.js +1 -1
- package/lib/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js +12 -2
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib/components/DialogBody/DialogBody.js.map +1 -1
- package/lib/components/DialogBody/renderDialogBody.js +2 -2
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.js.map +1 -1
- package/lib/components/DialogContent/renderDialogContent.js +2 -2
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/DialogSurface.types.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js +11 -4
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +4 -3
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/renderDialogTitle.js +9 -2
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js +8 -7
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib/utils/useDisableBodyScroll.js +2 -2
- package/lib/utils/useDisableBodyScroll.js.map +1 -1
- package/lib/utils/useFocusFirstElement.js +5 -6
- package/lib/utils/useFocusFirstElement.js.map +1 -1
- package/lib-commonjs/Dialog.js +2 -2
- package/lib-commonjs/Dialog.js.map +1 -1
- package/lib-commonjs/DialogActions.js +2 -2
- package/lib-commonjs/DialogActions.js.map +1 -1
- package/lib-commonjs/DialogBody.js +2 -2
- package/lib-commonjs/DialogBody.js.map +1 -1
- package/lib-commonjs/DialogContent.js +2 -2
- package/lib-commonjs/DialogContent.js.map +1 -1
- package/lib-commonjs/DialogSurface.js +2 -2
- package/lib-commonjs/DialogSurface.js.map +1 -1
- package/lib-commonjs/DialogTitle.js +2 -2
- package/lib-commonjs/DialogTitle.js.map +1 -1
- package/lib-commonjs/DialogTrigger.js +2 -2
- package/lib-commonjs/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.js +5 -3
- package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/index.js +5 -5
- package/lib-commonjs/components/Dialog/index.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js +16 -9
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +20 -15
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js +4 -2
- package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.js +9 -7
- package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/index.js +6 -6
- package/lib-commonjs/components/DialogActions/index.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js +8 -6
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActions.js +8 -6
- package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js +31 -5
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.js +9 -7
- package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/index.js +6 -6
- package/lib-commonjs/components/DialogBody/index.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js +8 -6
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBody.js +7 -5
- package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js +7 -3
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.js +9 -7
- package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/index.js +6 -6
- package/lib-commonjs/components/DialogContent/index.js.map +1 -1
- package/lib-commonjs/components/DialogContent/renderDialogContent.js +8 -6
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContent.js +7 -5
- package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js +7 -3
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.js +9 -7
- package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/index.js +6 -6
- package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +18 -9
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +18 -15
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +3 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js +7 -3
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.js +9 -7
- package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/index.js +6 -6
- package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +15 -6
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js +15 -13
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js +11 -5
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +5 -3
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +2 -2
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/index.js +5 -5
- package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +3 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +19 -16
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib-commonjs/contexts/constants.js +12 -4
- package/lib-commonjs/contexts/constants.js.map +1 -1
- package/lib-commonjs/contexts/dialogContext.js +14 -8
- package/lib-commonjs/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js +9 -3
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +4 -4
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +100 -38
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/index.js +3 -3
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/useDisableBodyScroll.js +9 -5
- package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
- package/lib-commonjs/utils/useFocusFirstElement.js +12 -11
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
- package/package.json +15 -15
package/lib-commonjs/index.js
CHANGED
|
@@ -9,42 +9,104 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Dialog: ()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
12
|
+
Dialog: function() {
|
|
13
|
+
return _Dialog.Dialog;
|
|
14
|
+
},
|
|
15
|
+
renderDialog_unstable: function() {
|
|
16
|
+
return _Dialog.renderDialog_unstable;
|
|
17
|
+
},
|
|
18
|
+
useDialog_unstable: function() {
|
|
19
|
+
return _Dialog.useDialog_unstable;
|
|
20
|
+
},
|
|
21
|
+
DialogTrigger: function() {
|
|
22
|
+
return _DialogTrigger.DialogTrigger;
|
|
23
|
+
},
|
|
24
|
+
useDialogTrigger_unstable: function() {
|
|
25
|
+
return _DialogTrigger.useDialogTrigger_unstable;
|
|
26
|
+
},
|
|
27
|
+
renderDialogTrigger_unstable: function() {
|
|
28
|
+
return _DialogTrigger.renderDialogTrigger_unstable;
|
|
29
|
+
},
|
|
30
|
+
DialogActions: function() {
|
|
31
|
+
return _DialogActions.DialogActions;
|
|
32
|
+
},
|
|
33
|
+
dialogActionsClassNames: function() {
|
|
34
|
+
return _DialogActions.dialogActionsClassNames;
|
|
35
|
+
},
|
|
36
|
+
useDialogActions_unstable: function() {
|
|
37
|
+
return _DialogActions.useDialogActions_unstable;
|
|
38
|
+
},
|
|
39
|
+
useDialogActionsStyles_unstable: function() {
|
|
40
|
+
return _DialogActions.useDialogActionsStyles_unstable;
|
|
41
|
+
},
|
|
42
|
+
renderDialogActions_unstable: function() {
|
|
43
|
+
return _DialogActions.renderDialogActions_unstable;
|
|
44
|
+
},
|
|
45
|
+
DialogBody: function() {
|
|
46
|
+
return _DialogBody.DialogBody;
|
|
47
|
+
},
|
|
48
|
+
dialogBodyClassNames: function() {
|
|
49
|
+
return _DialogBody.dialogBodyClassNames;
|
|
50
|
+
},
|
|
51
|
+
useDialogBody_unstable: function() {
|
|
52
|
+
return _DialogBody.useDialogBody_unstable;
|
|
53
|
+
},
|
|
54
|
+
useDialogBodyStyles_unstable: function() {
|
|
55
|
+
return _DialogBody.useDialogBodyStyles_unstable;
|
|
56
|
+
},
|
|
57
|
+
renderDialogBody_unstable: function() {
|
|
58
|
+
return _DialogBody.renderDialogBody_unstable;
|
|
59
|
+
},
|
|
60
|
+
DialogTitle: function() {
|
|
61
|
+
return _DialogTitle.DialogTitle;
|
|
62
|
+
},
|
|
63
|
+
dialogTitleClassNames: function() {
|
|
64
|
+
return _DialogTitle.dialogTitleClassNames;
|
|
65
|
+
},
|
|
66
|
+
useDialogTitle_unstable: function() {
|
|
67
|
+
return _DialogTitle.useDialogTitle_unstable;
|
|
68
|
+
},
|
|
69
|
+
useDialogTitleStyles_unstable: function() {
|
|
70
|
+
return _DialogTitle.useDialogTitleStyles_unstable;
|
|
71
|
+
},
|
|
72
|
+
renderDialogTitle_unstable: function() {
|
|
73
|
+
return _DialogTitle.renderDialogTitle_unstable;
|
|
74
|
+
},
|
|
75
|
+
DialogSurface: function() {
|
|
76
|
+
return _DialogSurface.DialogSurface;
|
|
77
|
+
},
|
|
78
|
+
dialogSurfaceClassNames: function() {
|
|
79
|
+
return _DialogSurface.dialogSurfaceClassNames;
|
|
80
|
+
},
|
|
81
|
+
useDialogSurface_unstable: function() {
|
|
82
|
+
return _DialogSurface.useDialogSurface_unstable;
|
|
83
|
+
},
|
|
84
|
+
useDialogSurfaceStyles_unstable: function() {
|
|
85
|
+
return _DialogSurface.useDialogSurfaceStyles_unstable;
|
|
86
|
+
},
|
|
87
|
+
renderDialogSurface_unstable: function() {
|
|
88
|
+
return _DialogSurface.renderDialogSurface_unstable;
|
|
89
|
+
},
|
|
90
|
+
DialogContent: function() {
|
|
91
|
+
return _DialogContent.DialogContent;
|
|
92
|
+
},
|
|
93
|
+
dialogContentClassNames: function() {
|
|
94
|
+
return _DialogContent.dialogContentClassNames;
|
|
95
|
+
},
|
|
96
|
+
useDialogContent_unstable: function() {
|
|
97
|
+
return _DialogContent.useDialogContent_unstable;
|
|
98
|
+
},
|
|
99
|
+
useDialogContentStyles_unstable: function() {
|
|
100
|
+
return _DialogContent.useDialogContentStyles_unstable;
|
|
101
|
+
},
|
|
102
|
+
renderDialogContent_unstable: function() {
|
|
103
|
+
return _DialogContent.renderDialogContent_unstable;
|
|
104
|
+
}
|
|
43
105
|
});
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
106
|
+
const _Dialog = require("./Dialog");
|
|
107
|
+
const _DialogTrigger = require("./DialogTrigger");
|
|
108
|
+
const _DialogActions = require("./DialogActions");
|
|
109
|
+
const _DialogBody = require("./DialogBody");
|
|
110
|
+
const _DialogTitle = require("./DialogTitle");
|
|
111
|
+
const _DialogSurface = require("./DialogSurface");
|
|
112
|
+
const _DialogContent = require("./DialogContent");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export { Dialog, renderDialog_unstable, useDialog_unstable } from './Dialog';\nexport { DialogTrigger, useDialogTrigger_unstable, renderDialogTrigger_unstable } from './DialogTrigger';\nexport { DialogActions, dialogActionsClassNames, useDialogActions_unstable, useDialogActionsStyles_unstable, renderDialogActions_unstable } from './DialogActions';\nexport { DialogBody, dialogBodyClassNames, useDialogBody_unstable, useDialogBodyStyles_unstable, renderDialogBody_unstable } from './DialogBody';\nexport { DialogTitle, dialogTitleClassNames, useDialogTitle_unstable, useDialogTitleStyles_unstable, renderDialogTitle_unstable } from './DialogTitle';\nexport { DialogSurface, dialogSurfaceClassNames, useDialogSurface_unstable, useDialogSurfaceStyles_unstable, renderDialogSurface_unstable } from './DialogSurface';\nexport { DialogContent, dialogContentClassNames, useDialogContent_unstable, useDialogContentStyles_unstable, renderDialogContent_unstable } from './DialogContent';\n"],"names":["Dialog","renderDialog_unstable","useDialog_unstable","DialogTrigger","useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogActions","dialogActionsClassNames","useDialogActions_unstable","useDialogActionsStyles_unstable","renderDialogActions_unstable","DialogBody","dialogBodyClassNames","useDialogBody_unstable","useDialogBodyStyles_unstable","renderDialogBody_unstable","DialogTitle","dialogTitleClassNames","useDialogTitle_unstable","useDialogTitleStyles_unstable","renderDialogTitle_unstable","DialogSurface","dialogSurfaceClassNames","useDialogSurface_unstable","useDialogSurfaceStyles_unstable","renderDialogSurface_unstable","DialogContent","dialogContentClassNames","useDialogContent_unstable","useDialogContentStyles_unstable","renderDialogContent_unstable"],"mappings":";;;;;;;;;;;IAASA,MAAM,
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { Dialog, renderDialog_unstable, useDialog_unstable } from './Dialog';\nexport { DialogTrigger, useDialogTrigger_unstable, renderDialogTrigger_unstable } from './DialogTrigger';\nexport { DialogActions, dialogActionsClassNames, useDialogActions_unstable, useDialogActionsStyles_unstable, renderDialogActions_unstable } from './DialogActions';\nexport { DialogBody, dialogBodyClassNames, useDialogBody_unstable, useDialogBodyStyles_unstable, renderDialogBody_unstable } from './DialogBody';\nexport { DialogTitle, dialogTitleClassNames, useDialogTitle_unstable, useDialogTitleStyles_unstable, renderDialogTitle_unstable } from './DialogTitle';\nexport { DialogSurface, dialogSurfaceClassNames, useDialogSurface_unstable, useDialogSurfaceStyles_unstable, renderDialogSurface_unstable } from './DialogSurface';\nexport { DialogContent, dialogContentClassNames, useDialogContent_unstable, useDialogContentStyles_unstable, renderDialogContent_unstable } from './DialogContent';\n"],"names":["Dialog","renderDialog_unstable","useDialog_unstable","DialogTrigger","useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogActions","dialogActionsClassNames","useDialogActions_unstable","useDialogActionsStyles_unstable","renderDialogActions_unstable","DialogBody","dialogBodyClassNames","useDialogBody_unstable","useDialogBodyStyles_unstable","renderDialogBody_unstable","DialogTitle","dialogTitleClassNames","useDialogTitle_unstable","useDialogTitleStyles_unstable","renderDialogTitle_unstable","DialogSurface","dialogSurfaceClassNames","useDialogSurface_unstable","useDialogSurfaceStyles_unstable","renderDialogSurface_unstable","DialogContent","dialogContentClassNames","useDialogContent_unstable","useDialogContentStyles_unstable","renderDialogContent_unstable"],"mappings":";;;;;;;;;;;IAASA,MAAM;eAANA,cAAM;;IAAEC,qBAAqB;eAArBA,6BAAqB;;IAAEC,kBAAkB;eAAlBA,0BAAkB;;IACjDC,aAAa;eAAbA,4BAAa;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IACtEC,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAChIC,UAAU;eAAVA,sBAAU;;IAAEC,oBAAoB;eAApBA,gCAAoB;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;IAAEC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,yBAAyB;eAAzBA,qCAAyB;;IACjHC,WAAW;eAAXA,wBAAW;;IAAEC,qBAAqB;eAArBA,kCAAqB;;IAAEC,uBAAuB;eAAvBA,oCAAuB;;IAAEC,6BAA6B;eAA7BA,0CAA6B;;IAAEC,0BAA0B;eAA1BA,uCAA0B;;IACtHC,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAChIC,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;;wBANvE;+BACqB;+BAC0D;4BACf;6BACK;+BACU;+BACA"}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./useDisableBodyScroll"), exports);
|
|
7
|
+
_export_star._(require("./useFocusFirstElement"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './useDisableBodyScroll';\nexport * from './useFocusFirstElement';\n"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './useDisableBodyScroll';\nexport * from './useFocusFirstElement';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
|
|
@@ -9,14 +9,18 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
useDisableBodyScroll: ()
|
|
13
|
-
|
|
12
|
+
useDisableBodyScroll: function() {
|
|
13
|
+
return useDisableBodyScroll;
|
|
14
|
+
},
|
|
15
|
+
disableScroll: function() {
|
|
16
|
+
return disableScroll;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
const
|
|
19
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
16
20
|
const _react = require("react");
|
|
17
21
|
const disableScrollElementProp = '__fluentDisableScrollElement';
|
|
18
22
|
function useDisableBodyScroll() {
|
|
19
|
-
const { targetDocument
|
|
23
|
+
const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
|
|
20
24
|
return (0, _react.useCallback)(()=>{
|
|
21
25
|
if (targetDocument) {
|
|
22
26
|
return disableScroll(targetDocument.body);
|
|
@@ -27,7 +31,7 @@ function useDisableBodyScroll() {
|
|
|
27
31
|
}
|
|
28
32
|
function disableScroll(target) {
|
|
29
33
|
var _target_ownerDocument_defaultView;
|
|
30
|
-
const { clientWidth
|
|
34
|
+
const { clientWidth } = target.ownerDocument.documentElement;
|
|
31
35
|
var _target_ownerDocument_defaultView_innerWidth;
|
|
32
36
|
const innerWidth = (_target_ownerDocument_defaultView_innerWidth = (_target_ownerDocument_defaultView = target.ownerDocument.defaultView) === null || _target_ownerDocument_defaultView === void 0 ? void 0 : _target_ownerDocument_defaultView.innerWidth) !== null && _target_ownerDocument_defaultView_innerWidth !== void 0 ? _target_ownerDocument_defaultView_innerWidth : 0;
|
|
33
37
|
assertIsDisableScrollElement(target);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDisableBodyScroll.js"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { useCallback } from 'react';\nconst disableScrollElementProp = '__fluentDisableScrollElement';\n/**\n * hook that disables body scrolling through `overflow: hidden` CSS property\n */ export function useDisableBodyScroll() {\n const { targetDocument
|
|
1
|
+
{"version":3,"sources":["useDisableBodyScroll.js"],"sourcesContent":["import { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { useCallback } from 'react';\nconst disableScrollElementProp = '__fluentDisableScrollElement';\n/**\n * hook that disables body scrolling through `overflow: hidden` CSS property\n */ export function useDisableBodyScroll() {\n const { targetDocument } = useFluent_unstable();\n return useCallback(()=>{\n if (targetDocument) {\n return disableScroll(targetDocument.body);\n }\n }, [\n targetDocument\n ]);\n}\n/**\n * disables scrolling from a given element through `overflow: hidden` CSS property\n * @param target - element to disable scrolling from\n * @returns a method for enabling scrolling again\n */ export function disableScroll(target) {\n var _target_ownerDocument_defaultView;\n const { clientWidth } = target.ownerDocument.documentElement;\n var _target_ownerDocument_defaultView_innerWidth;\n const innerWidth = (_target_ownerDocument_defaultView_innerWidth = (_target_ownerDocument_defaultView = target.ownerDocument.defaultView) === null || _target_ownerDocument_defaultView === void 0 ? void 0 : _target_ownerDocument_defaultView.innerWidth) !== null && _target_ownerDocument_defaultView_innerWidth !== void 0 ? _target_ownerDocument_defaultView_innerWidth : 0;\n assertIsDisableScrollElement(target);\n if (target[disableScrollElementProp].count === 0) {\n target.style.overflow = 'hidden';\n target.style.paddingRight = `${innerWidth - clientWidth}px`;\n }\n target[disableScrollElementProp].count++;\n return ()=>{\n target[disableScrollElementProp].count--;\n if (target[disableScrollElementProp].count === 0) {\n target.style.overflow = target[disableScrollElementProp].previousOverflowStyle;\n target.style.paddingRight = target[disableScrollElementProp].previousPaddingRightStyle;\n }\n };\n}\nfunction assertIsDisableScrollElement(element) {\n var _element, _disableScrollElementProp;\n var _;\n (_ = (_element = element)[_disableScrollElementProp = disableScrollElementProp]) !== null && _ !== void 0 ? _ : _element[_disableScrollElementProp] = {\n count: 0,\n previousOverflowStyle: element.style.overflow,\n previousPaddingRightStyle: element.style.paddingRight\n };\n}\n"],"names":["useDisableBodyScroll","disableScroll","disableScrollElementProp","targetDocument","useFluent_unstable","useCallback","body","target","_target_ownerDocument_defaultView","clientWidth","ownerDocument","documentElement","_target_ownerDocument_defaultView_innerWidth","innerWidth","defaultView","assertIsDisableScrollElement","count","style","overflow","paddingRight","previousOverflowStyle","previousPaddingRightStyle","element","_element","_disableScrollElementProp","_"],"mappings":";;;;;;;;;;;IAKoBA,oBAAoB;eAApBA;;IAcAC,aAAa;eAAbA;;;qCAnBe;uBACP;AAC5B,MAAMC,2BAA2B;AAGtB,SAASF;IAChB,MAAM,EAAEG,cAAc,EAAE,GAAGC,IAAAA,uCAAkB;IAC7C,OAAOC,IAAAA,kBAAW,EAAC;QACf,IAAIF,gBAAgB;YAChB,OAAOF,cAAcE,eAAeG,IAAI;QAC5C;IACJ,GAAG;QACCH;KACH;AACL;AAKW,SAASF,cAAcM,MAAM;IACpC,IAAIC;IACJ,MAAM,EAAEC,WAAW,EAAE,GAAGF,OAAOG,aAAa,CAACC,eAAe;IAC5D,IAAIC;IACJ,MAAMC,aAAa,AAACD,CAAAA,+CAA+C,AAACJ,CAAAA,oCAAoCD,OAAOG,aAAa,CAACI,WAAW,AAAD,MAAO,QAAQN,sCAAsC,KAAK,IAAI,KAAK,IAAIA,kCAAkCK,UAAU,AAAD,MAAO,QAAQD,iDAAiD,KAAK,IAAIA,+CAA+C;IACjXG,6BAA6BR;IAC7B,IAAIA,MAAM,CAACL,yBAAyB,CAACc,KAAK,KAAK,GAAG;QAC9CT,OAAOU,KAAK,CAACC,QAAQ,GAAG;QACxBX,OAAOU,KAAK,CAACE,YAAY,GAAG,CAAC,EAAEN,aAAaJ,YAAY,EAAE,CAAC;IAC/D;IACAF,MAAM,CAACL,yBAAyB,CAACc,KAAK;IACtC,OAAO;QACHT,MAAM,CAACL,yBAAyB,CAACc,KAAK;QACtC,IAAIT,MAAM,CAACL,yBAAyB,CAACc,KAAK,KAAK,GAAG;YAC9CT,OAAOU,KAAK,CAACC,QAAQ,GAAGX,MAAM,CAACL,yBAAyB,CAACkB,qBAAqB;YAC9Eb,OAAOU,KAAK,CAACE,YAAY,GAAGZ,MAAM,CAACL,yBAAyB,CAACmB,yBAAyB;QAC1F;IACJ;AACJ;AACA,SAASN,6BAA6BO,OAAO;IACzC,IAAIC,UAAUC;IACd,IAAIC;IACHA,CAAAA,IAAI,AAACF,CAAAA,WAAWD,OAAM,CAAE,CAACE,4BAA4BtB,yBAAyB,AAAD,MAAO,QAAQuB,MAAM,KAAK,IAAIA,IAAIF,QAAQ,CAACC,0BAA0B,GAAG;QAClJR,OAAO;QACPI,uBAAuBE,QAAQL,KAAK,CAACC,QAAQ;QAC7CG,2BAA2BC,QAAQL,KAAK,CAACE,YAAY;IACzD;AACJ"}
|
|
@@ -4,15 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "useFocusFirstElement", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return useFocusFirstElement;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
14
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
13
15
|
function useFocusFirstElement(open, modalType) {
|
|
14
|
-
const { findFirstFocusable
|
|
15
|
-
const { targetDocument
|
|
16
|
+
const { findFirstFocusable } = (0, _reacttabster.useFocusFinders)();
|
|
17
|
+
const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
|
|
16
18
|
const dialogRef = _react.useRef(null);
|
|
17
19
|
_react.useEffect(()=>{
|
|
18
20
|
if (!open) {
|
|
@@ -26,10 +28,9 @@ function useFocusFirstElement(open, modalType) {
|
|
|
26
28
|
(_dialogRef_current = dialogRef.current) === null || _dialogRef_current === void 0 ? void 0 : _dialogRef_current.focus(); // https://github.com/microsoft/fluentui/issues/25150
|
|
27
29
|
if (process.env.NODE_ENV !== 'production') {
|
|
28
30
|
// eslint-disable-next-line no-console
|
|
29
|
-
console.warn([
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
].join('\n'));
|
|
31
|
+
console.warn(`@fluentui/react-dialog [useFocusFirstElement]:
|
|
32
|
+
A Dialog should have at least one focusable element inside DialogSurface.
|
|
33
|
+
Please add at least a close button either on \`DialogTitle\` action slot or inside \`DialogActions\``);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useFocusFirstElement.js"],"sourcesContent":["import * as React from 'react';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Focus first element on content when dialog is opened,\n */ export function useFocusFirstElement(open, modalType) {\n const { findFirstFocusable
|
|
1
|
+
{"version":3,"sources":["useFocusFirstElement.js"],"sourcesContent":["import * as React from 'react';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Focus first element on content when dialog is opened,\n */ export function useFocusFirstElement(open, modalType) {\n const { findFirstFocusable } = useFocusFinders();\n const { targetDocument } = useFluent_unstable();\n const dialogRef = React.useRef(null);\n React.useEffect(()=>{\n if (!open) {\n return;\n }\n const element = dialogRef.current && findFirstFocusable(dialogRef.current);\n if (element) {\n element.focus();\n } else {\n var _dialogRef_current;\n (_dialogRef_current = dialogRef.current) === null || _dialogRef_current === void 0 ? void 0 : _dialogRef_current.focus(); // https://github.com/microsoft/fluentui/issues/25150\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(`@fluentui/react-dialog [useFocusFirstElement]:\nA Dialog should have at least one focusable element inside DialogSurface.\nPlease add at least a close button either on \\`DialogTitle\\` action slot or inside \\`DialogActions\\``);\n }\n }\n }, [\n findFirstFocusable,\n open,\n modalType,\n targetDocument\n ]);\n return dialogRef;\n}\n"],"names":["useFocusFirstElement","open","modalType","findFirstFocusable","useFocusFinders","targetDocument","useFluent_unstable","dialogRef","React","useRef","useEffect","element","current","focus","_dialogRef_current","process","env","NODE_ENV","console","warn"],"mappings":";;;;+BAKoBA;;;eAAAA;;;;iEALG;8BACS;qCACG;AAGxB,SAASA,qBAAqBC,IAAI,EAAEC,SAAS;IACpD,MAAM,EAAEC,kBAAkB,EAAE,GAAGC,IAAAA,6BAAe;IAC9C,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAkB;IAC7C,MAAMC,YAAYC,OAAMC,MAAM,CAAC;IAC/BD,OAAME,SAAS,CAAC;QACZ,IAAI,CAACT,MAAM;YACP;QACJ;QACA,MAAMU,UAAUJ,UAAUK,OAAO,IAAIT,mBAAmBI,UAAUK,OAAO;QACzE,IAAID,SAAS;YACTA,QAAQE,KAAK;QACjB,OAAO;YACH,IAAIC;YACHA,CAAAA,qBAAqBP,UAAUK,OAAO,AAAD,MAAO,QAAQE,uBAAuB,KAAK,IAAI,KAAK,IAAIA,mBAAmBD,KAAK,IAAI,qDAAqD;YAC/K,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;gBACvC,sCAAsC;gBACtCC,QAAQC,IAAI,CAAC,CAAC;;oGAEsE,CAAC;YACzF;QACJ;IACJ,GAAG;QACChB;QACAF;QACAC;QACAG;KACH;IACD,OAAOE;AACX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.1",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
"@fluentui/scripts-tasks": "*"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@fluentui/react-utilities": "^9.
|
|
40
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
41
|
-
"@fluentui/keyboard-keys": "^9.0.
|
|
42
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
43
|
-
"@fluentui/react-shared-contexts": "^9.7.
|
|
44
|
-
"@fluentui/react-aria": "^9.3.
|
|
39
|
+
"@fluentui/react-utilities": "^9.13.1",
|
|
40
|
+
"@fluentui/react-jsx-runtime": "^9.0.4",
|
|
41
|
+
"@fluentui/keyboard-keys": "^9.0.4",
|
|
42
|
+
"@fluentui/react-context-selector": "^9.1.32",
|
|
43
|
+
"@fluentui/react-shared-contexts": "^9.7.3",
|
|
44
|
+
"@fluentui/react-aria": "^9.3.34",
|
|
45
45
|
"@fluentui/react-icons": "^2.0.207",
|
|
46
|
-
"@fluentui/react-tabster": "^9.12.
|
|
47
|
-
"@fluentui/react-theme": "^9.1.
|
|
48
|
-
"@fluentui/react-portal": "^9.3.
|
|
46
|
+
"@fluentui/react-tabster": "^9.12.6",
|
|
47
|
+
"@fluentui/react-theme": "^9.1.12",
|
|
48
|
+
"@fluentui/react-portal": "^9.3.11",
|
|
49
49
|
"@griffel/react": "^1.5.14",
|
|
50
|
-
"@swc/helpers": "^0.
|
|
50
|
+
"@swc/helpers": "^0.5.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@types/react": ">=16.
|
|
54
|
-
"@types/react-dom": ">=16.
|
|
55
|
-
"react": ">=16.
|
|
56
|
-
"react-dom": ">=16.
|
|
53
|
+
"@types/react": ">=16.14.0 <19.0.0",
|
|
54
|
+
"@types/react-dom": ">=16.14.0 <19.0.0",
|
|
55
|
+
"react": ">=16.14.0 <19.0.0",
|
|
56
|
+
"react-dom": ">=16.14.0 <19.0.0"
|
|
57
57
|
},
|
|
58
58
|
"beachball": {
|
|
59
59
|
"disallowedChangeTypes": [
|