@fluentui/react-dialog 9.5.0 → 9.5.2
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 +97 -1
- package/CHANGELOG.md +31 -2
- package/lib/components/Dialog/renderDialog.js +3 -3
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/DialogActions/renderDialogActions.js +4 -4
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogBody/renderDialogBody.js +4 -4
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogContent/renderDialogContent.js +4 -4
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js +5 -5
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogTitle/renderDialogTitle.js +4 -4
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/utils/useFocusFirstElement.js +1 -4
- package/lib/utils/useFocusFirstElement.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js +4 -5
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js +4 -5
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js +4 -5
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogContent/renderDialogContent.js +4 -5
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +5 -6
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +4 -5
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/utils/useFocusFirstElement.js +1 -4
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
- package/package.json +7 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,103 @@
|
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 17 Apr 2023 17:50:00 GMT",
|
|
6
|
+
"tag": "@fluentui/react-dialog_v9.5.2",
|
|
7
|
+
"version": "9.5.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
12
|
+
"package": "@fluentui/react-dialog",
|
|
13
|
+
"commit": "46c89e8e688152ab8d0ed44ed79572508e4fb50e",
|
|
14
|
+
"comment": "chore: adopts custom JSX pragma"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-dialog",
|
|
19
|
+
"comment": "Bump @fluentui/react-utilities to v9.8.0",
|
|
20
|
+
"commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-dialog",
|
|
25
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.1",
|
|
26
|
+
"commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-dialog",
|
|
31
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.18",
|
|
32
|
+
"commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-dialog",
|
|
37
|
+
"comment": "Bump @fluentui/react-aria to v9.3.18",
|
|
38
|
+
"commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-dialog",
|
|
43
|
+
"comment": "Bump @fluentui/react-tabster to v9.6.5",
|
|
44
|
+
"commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-dialog",
|
|
49
|
+
"comment": "Bump @fluentui/react-portal to v9.2.6",
|
|
50
|
+
"commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"date": "Wed, 12 Apr 2023 09:31:43 GMT",
|
|
57
|
+
"tag": "@fluentui/react-dialog_v9.5.1",
|
|
58
|
+
"version": "9.5.1",
|
|
59
|
+
"comments": {
|
|
60
|
+
"patch": [
|
|
61
|
+
{
|
|
62
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
63
|
+
"package": "@fluentui/react-dialog",
|
|
64
|
+
"commit": "841ea75d516d85b88eb826030718c19c3239ee4d",
|
|
65
|
+
"comment": "fix: use tabster to focus on trigger, instead of manually invoking .focus"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@fluentui/react-dialog",
|
|
70
|
+
"comment": "Bump @fluentui/react-utilities to v9.7.4",
|
|
71
|
+
"commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "beachball",
|
|
75
|
+
"package": "@fluentui/react-dialog",
|
|
76
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.17",
|
|
77
|
+
"commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@fluentui/react-dialog",
|
|
82
|
+
"comment": "Bump @fluentui/react-aria to v9.3.17",
|
|
83
|
+
"commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@fluentui/react-dialog",
|
|
88
|
+
"comment": "Bump @fluentui/react-tabster to v9.6.4",
|
|
89
|
+
"commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"author": "beachball",
|
|
93
|
+
"package": "@fluentui/react-dialog",
|
|
94
|
+
"comment": "Bump @fluentui/react-portal to v9.2.5",
|
|
95
|
+
"commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"date": "Fri, 07 Apr 2023 00:01:38 GMT",
|
|
6
102
|
"tag": "@fluentui/react-dialog_v9.5.0",
|
|
7
103
|
"version": "9.5.0",
|
|
8
104
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-dialog
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 17 Apr 2023 17:50:00 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.5.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.2)
|
|
8
|
+
|
|
9
|
+
Mon, 17 Apr 2023 17:50:00 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.1..@fluentui/react-dialog_v9.5.2)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: adopts custom JSX pragma ([PR #27475](https://github.com/microsoft/fluentui/pull/27475) by bernardo.sunderhus@gmail.com)
|
|
15
|
+
- Bump @fluentui/react-utilities to v9.8.0 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.1 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
|
|
17
|
+
- Bump @fluentui/react-context-selector to v9.1.18 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
|
|
18
|
+
- Bump @fluentui/react-aria to v9.3.18 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
|
|
19
|
+
- Bump @fluentui/react-tabster to v9.6.5 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
|
|
20
|
+
- Bump @fluentui/react-portal to v9.2.6 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
|
|
21
|
+
|
|
22
|
+
## [9.5.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.1)
|
|
23
|
+
|
|
24
|
+
Wed, 12 Apr 2023 09:31:43 GMT
|
|
25
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.0..@fluentui/react-dialog_v9.5.1)
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- fix: use tabster to focus on trigger, instead of manually invoking .focus ([PR #27512](https://github.com/microsoft/fluentui/pull/27512) by bernardo.sunderhus@gmail.com)
|
|
30
|
+
- Bump @fluentui/react-utilities to v9.7.4 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
|
|
31
|
+
- Bump @fluentui/react-context-selector to v9.1.17 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
|
|
32
|
+
- Bump @fluentui/react-aria to v9.3.17 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
|
|
33
|
+
- Bump @fluentui/react-tabster to v9.6.4 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
|
|
34
|
+
- Bump @fluentui/react-portal to v9.2.5 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
|
|
35
|
+
|
|
7
36
|
## [9.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.0)
|
|
8
37
|
|
|
9
|
-
|
|
38
|
+
Fri, 07 Apr 2023 00:01:38 GMT
|
|
10
39
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.4.3..@fluentui/react-dialog_v9.5.0)
|
|
11
40
|
|
|
12
41
|
### Minor changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
2
|
import { DialogProvider, DialogSurfaceProvider } from '../../contexts';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of Dialog
|
|
@@ -8,9 +8,9 @@ export const renderDialog_unstable = (state, contextValues) => {
|
|
|
8
8
|
content,
|
|
9
9
|
trigger
|
|
10
10
|
} = state;
|
|
11
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/createElement(DialogProvider, {
|
|
12
12
|
value: contextValues.dialog
|
|
13
|
-
}, /*#__PURE__*/
|
|
13
|
+
}, /*#__PURE__*/createElement(DialogSurfaceProvider, {
|
|
14
14
|
value: contextValues.dialogSurface
|
|
15
15
|
}, trigger, content));
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createElement","DialogProvider","DialogSurfaceProvider","renderDialog_unstable","state","contextValues","content","trigger","value","dialog","dialogSurface"],"sources":["../../../src/components/Dialog/renderDialog.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\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"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,cAAc,EAAEC,qBAAqB,QAAQ;AAGtD;;;AAGA,OAAO,MAAMC,qBAAA,GAAwBA,CAACC,KAAA,EAAoBC,aAAA,KAAuC;EAC/F,MAAM;IAAEC,OAAA;IAASC;EAAO,CAAE,GAAGH,KAAA;EAE7B,oBACEJ,aAdJ,CAcKC,cAAA;IAAeO,KAAA,EAAOH,aAAA,CAAcI;kBACnCT,aAfN,CAeOE,qBAAA;IAAsBM,KAAA,EAAOH,aAAA,CAAcK;KACzCH,OAAA,EACAD,OAAA;AAIT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DialogActions
|
|
5
5
|
*/
|
|
@@ -7,8 +7,8 @@ export const renderDialogActions_unstable = state => {
|
|
|
7
7
|
const {
|
|
8
8
|
slots,
|
|
9
9
|
slotProps
|
|
10
|
-
} =
|
|
10
|
+
} = getSlotsNext(state);
|
|
11
11
|
// TODO Add additional slots in the appropriate place
|
|
12
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/createElement(slots.root, slotProps.root);
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=renderDialogActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createElement","getSlotsNext","renderDialogActions_unstable","state","slots","slotProps","root"],"sources":["../../../src/components/DialogActions/renderDialogActions.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DialogActionsState, DialogActionsSlots } from './DialogActions.types';\n\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = (state: DialogActionsState) => {\n const { slots, slotProps } = getSlotsNext<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,4BAAA,GAAgCC,KAAA,IAA8B;EACzE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAAiCE,KAAA;EAE9D;EACA,oBAAOH,aAdT,CAcUI,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI;AACvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DialogBody
|
|
5
5
|
*/
|
|
@@ -7,8 +7,8 @@ export const renderDialogBody_unstable = state => {
|
|
|
7
7
|
const {
|
|
8
8
|
slots,
|
|
9
9
|
slotProps
|
|
10
|
-
} =
|
|
10
|
+
} = getSlotsNext(state);
|
|
11
11
|
// TODO Add additional slots in the appropriate place
|
|
12
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/createElement(slots.root, slotProps.root);
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=renderDialogBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createElement","getSlotsNext","renderDialogBody_unstable","state","slots","slotProps","root"],"sources":["../../../src/components/DialogBody/renderDialogBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DialogBodyState, DialogBodySlots } from './DialogBody.types';\n\n/**\n * Render the final JSX of DialogBody\n */\nexport const renderDialogBody_unstable = (state: DialogBodyState) => {\n const { slots, slotProps } = getSlotsNext<DialogBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,yBAAA,GAA6BC,KAAA,IAA2B;EACnE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAA8BE,KAAA;EAE3D;EACA,oBAAOH,aAdT,CAcUI,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI;AACvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DialogContent
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export const renderDialogContent_unstable = state => {
|
|
|
7
7
|
const {
|
|
8
8
|
slots,
|
|
9
9
|
slotProps
|
|
10
|
-
} =
|
|
11
|
-
return /*#__PURE__*/
|
|
10
|
+
} = getSlotsNext(state);
|
|
11
|
+
return /*#__PURE__*/createElement(slots.root, slotProps.root);
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=renderDialogContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createElement","getSlotsNext","renderDialogContent_unstable","state","slots","slotProps","root"],"sources":["../../../src/components/DialogContent/renderDialogContent.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DialogContentState, DialogContentSlots } from './DialogContent.types';\n\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = (state: DialogContentState) => {\n const { slots, slotProps } = getSlotsNext<DialogContentSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,4BAAA,GAAgCC,KAAA,IAA8B;EACzE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAAiCE,KAAA;EAE9D,oBAAOH,aAbT,CAaUI,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI;AACvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
import { DialogSurfaceProvider } from '../../contexts';
|
|
4
4
|
import { Portal } from '@fluentui/react-portal';
|
|
5
5
|
/**
|
|
@@ -9,9 +9,9 @@ export const renderDialogSurface_unstable = (state, contextValues) => {
|
|
|
9
9
|
const {
|
|
10
10
|
slots,
|
|
11
11
|
slotProps
|
|
12
|
-
} =
|
|
13
|
-
return /*#__PURE__*/
|
|
12
|
+
} = getSlotsNext(state);
|
|
13
|
+
return /*#__PURE__*/createElement(Portal, null, slots.backdrop && /*#__PURE__*/createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/createElement(DialogSurfaceProvider, {
|
|
14
14
|
value: contextValues.dialogSurface
|
|
15
|
-
}, /*#__PURE__*/
|
|
15
|
+
}, /*#__PURE__*/createElement(slots.root, slotProps.root)));
|
|
16
16
|
};
|
|
17
17
|
//# sourceMappingURL=renderDialogSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createElement","getSlotsNext","DialogSurfaceProvider","Portal","renderDialogSurface_unstable","state","contextValues","slots","slotProps","backdrop","value","dialogSurface","root"],"sources":["../../../src/components/DialogSurface/renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n const { slots, slotProps } = getSlotsNext<DialogSurfaceSlots>(state);\n\n return (\n <Portal>\n {slots.backdrop && <slots.backdrop {...slotProps.backdrop} />}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <slots.root {...slotProps.root} />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAE7B,SAASC,qBAAqB,QAAQ;AACtC,SAASC,MAAM,QAAQ;AAEvB;;;AAGA,OAAO,MAAMC,4BAAA,GAA+BA,CAACC,KAAA,EAA2BC,aAAA,KAA8C;EACpH,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGP,YAAA,CAAiCI,KAAA;EAE9D,oBACEL,aAhBJ,CAgBKG,MAAA,QACEI,KAAA,CAAME,QAAQ,iBAAIT,aAjBzB,CAiB0BO,KAAA,CAAME,QAAQ,EAAKD,SAAA,CAAUC,QAAQ,gBACzDT,aAlBN,CAkBOE,qBAAA;IAAsBQ,KAAA,EAAOJ,aAAA,CAAcK;kBAC1CX,aAnBR,CAmBSO,KAAA,CAAMK,IAAI,EAAKJ,SAAA,CAAUI,IAAI;AAItC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */import { createElement, Fragment } from '@fluentui/react-jsx-runtime';
|
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of DialogTitle
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export const renderDialogTitle_unstable = state => {
|
|
|
7
7
|
const {
|
|
8
8
|
slots,
|
|
9
9
|
slotProps
|
|
10
|
-
} =
|
|
11
|
-
return /*#__PURE__*/
|
|
10
|
+
} = getSlotsNext(state);
|
|
11
|
+
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/createElement(slots.action, slotProps.action));
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=renderDialogTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createElement","Fragment","getSlotsNext","renderDialogTitle_unstable","state","slots","slotProps","root","children","action"],"sources":["../../../src/components/DialogTitle/renderDialogTitle.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsxFrag Fragment */\n/** @jsx createElement */\n\nimport { createElement, Fragment } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DialogTitleState, DialogTitleSlots } from './DialogTitle.types';\n\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = (state: DialogTitleState) => {\n const { slots, slotProps } = getSlotsNext<DialogTitleSlots>(state);\n\n return (\n <>\n <slots.root {...slotProps.root}>{slotProps.root.children}</slots.root>\n {slots.action && <slots.action {...slotProps.action} />}\n </>\n );\n};\n"],"mappings":"AAAA,2BACA,yBACA,yBAEA,SAASA,aAAa,EAAEC,QAAQ,QAAQ;AAExC,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAA4B;EACrE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAA+BE,KAAA;EAE5D,oBACEJ,aAdJ,CADAC,QAAA,qBAgBMD,aAfN,CAeOK,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI,EAAGD,SAAA,CAAUC,IAAI,CAACC,QAAQ,GACvDH,KAAA,CAAMI,MAAM,iBAAIT,aAhBvB,CAgBwBK,KAAA,CAAMI,MAAM,EAAKH,SAAA,CAAUG,MAAM;AAGzD"}
|
|
@@ -12,13 +12,10 @@ export function useFocusFirstElement(open, modalType) {
|
|
|
12
12
|
targetDocument
|
|
13
13
|
} = useFluent_unstable();
|
|
14
14
|
const dialogRef = React.useRef(null);
|
|
15
|
-
const triggerRef = React.useRef();
|
|
16
15
|
React.useEffect(() => {
|
|
17
16
|
if (!open) {
|
|
18
|
-
|
|
19
|
-
return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();
|
|
17
|
+
return;
|
|
20
18
|
}
|
|
21
|
-
triggerRef.current = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
|
|
22
19
|
const element = dialogRef.current && findFirstFocusable(dialogRef.current);
|
|
23
20
|
if (element) {
|
|
24
21
|
element.focus();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useFocusFinders","useFluent_unstable","useFocusFirstElement","open","modalType","findFirstFocusable","targetDocument","dialogRef","useRef","
|
|
1
|
+
{"version":3,"names":["React","useFocusFinders","useFluent_unstable","useFocusFirstElement","open","modalType","findFirstFocusable","targetDocument","dialogRef","useRef","useEffect","element","current","focus","_dialogRef_current","process","env","NODE_ENV","console","warn","join"],"sources":["../../src/utils/useFocusFirstElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface';\nimport type { DialogModalType } from '../Dialog';\n\n/**\n * Focus first element on content when dialog is opened,\n */\nexport function useFocusFirstElement(open: boolean, modalType: DialogModalType) {\n const { findFirstFocusable } = useFocusFinders();\n const { targetDocument } = useFluent_unstable();\n const dialogRef = React.useRef<DialogSurfaceElement>(null);\n\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 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(\n [\n '@fluentui/react-dialog: a Dialog should have at least one focusable element inside DialogSurface.',\n 'Please add at least a close button either on `DialogTitle` action slot or inside `DialogActions`',\n ].join('\\n'),\n );\n }\n }\n }, [findFirstFocusable, open, modalType, targetDocument]);\n\n return dialogRef;\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,eAAe,QAAQ;AAChC,SAASC,kBAAkB,QAAQ;AAInC;;;AAGA,OAAO,SAASC,qBAAqBC,IAAa,EAAEC,SAA0B,EAAE;EAC9E,MAAM;IAAEC;EAAkB,CAAE,GAAGL,eAAA;EAC/B,MAAM;IAAEM;EAAc,CAAE,GAAGL,kBAAA;EAC3B,MAAMM,SAAA,GAAYR,KAAA,CAAMS,MAAM,CAAuB,IAAI;EAEzDT,KAAA,CAAMU,SAAS,CAAC,MAAM;IACpB,IAAI,CAACN,IAAA,EAAM;MACT;IACF;IACA,MAAMO,OAAA,GAAUH,SAAA,CAAUI,OAAO,IAAIN,kBAAA,CAAmBE,SAAA,CAAUI,OAAO;IACzE,IAAID,OAAA,EAAS;MACXA,OAAA,CAAQE,KAAK;IACf,OAAO;UACLC,kBAAA;MAAA,CAAAA,kBAAA,GAAAN,SAAA,CAAUI,OAAO,cAAjBE,kBAAA,uBAAAA,kBAAA,CAAmBD,KAAA,IAAS;MAC5B,IAAIE,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC;QACAC,OAAA,CAAQC,IAAI,CACV,CACE,qGACA,mGACD,CAACC,IAAI,CAAC;MAEX;IACF;EACF,GAAG,CAACd,kBAAA,EAAoBF,IAAA,EAAMC,SAAA,EAAWE,cAAA,CAAe;EAExD,OAAOC,SAAA;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "renderDialog_unstable", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: ()=>renderDialog_unstable
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
11
10
|
const _contexts = require("../../contexts");
|
|
12
11
|
const renderDialog_unstable = (state, contextValues)=>{
|
|
13
12
|
const { content , trigger } = state;
|
|
14
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogProvider, {
|
|
15
14
|
value: contextValues.dialog
|
|
16
|
-
}, /*#__PURE__*/
|
|
15
|
+
}, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogSurfaceProvider, {
|
|
17
16
|
value: contextValues.dialogSurface
|
|
18
17
|
}, trigger, content));
|
|
19
18
|
}; //# sourceMappingURL=renderDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Dialog/renderDialog.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Dialog/renderDialog.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state, contextValues) => {\n const {\n content,\n trigger\n } = state;\n return /*#__PURE__*/createElement(DialogProvider, {\n value: contextValues.dialog\n }, /*#__PURE__*/createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, trigger, content));\n};\n//# sourceMappingURL=renderDialog.js.map"],"names":["renderDialog_unstable","state","contextValues","content","trigger","createElement","DialogProvider","value","dialog","DialogSurfaceProvider","dialogSurface"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;0BAC5B;AAI/C,MAAMA,wBAAwB,CAACC,OAAOC,gBAAkB;IAC7D,MAAM,EACJC,QAAO,EACPC,QAAO,EACR,GAAGH;IACJ,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACC,wBAAc,EAAE;QAChDC,OAAOL,cAAcM,MAAM;IAC7B,GAAG,WAAW,GAAEH,IAAAA,8BAAa,EAACI,+BAAqB,EAAE;QACnDF,OAAOL,cAAcQ,aAAa;IACpC,GAAGN,SAASD;AACd,GACA,wCAAwC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "renderDialogActions_unstable", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: ()=>renderDialogActions_unstable
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
11
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
11
|
const renderDialogActions_unstable = (state)=>{
|
|
13
|
-
const { slots , slotProps } = (0, _reactUtilities.
|
|
12
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
14
13
|
// TODO Add additional slots in the appropriate place
|
|
15
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
|
|
16
15
|
}; //# sourceMappingURL=renderDialogActions.js.map
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=renderDialogActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogActions/renderDialogActions.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogActions/renderDialogActions.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogActions\n */\nexport const renderDialogActions_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogActions.js.map"],"names":["renderDialogActions_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,+BAA+BC,CAAAA,QAAS;IACnD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,qDAAqD;IACrD,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AAC9D,GACA,+CAA+C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "renderDialogBody_unstable", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: ()=>renderDialogBody_unstable
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
11
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
11
|
const renderDialogBody_unstable = (state)=>{
|
|
13
|
-
const { slots , slotProps } = (0, _reactUtilities.
|
|
12
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
14
13
|
// TODO Add additional slots in the appropriate place
|
|
15
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
|
|
16
15
|
}; //# sourceMappingURL=renderDialogBody.js.map
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=renderDialogBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogBody/renderDialogBody.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogBody/renderDialogBody.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogBody\n */\nexport const renderDialogBody_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogBody.js.map"],"names":["renderDialogBody_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,4BAA4BC,CAAAA,QAAS;IAChD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,qDAAqD;IACrD,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AAC9D,GACA,4CAA4C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "renderDialogContent_unstable", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: ()=>renderDialogContent_unstable
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
11
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
11
|
const renderDialogContent_unstable = (state)=>{
|
|
13
|
-
const { slots , slotProps } = (0, _reactUtilities.
|
|
14
|
-
return /*#__PURE__*/
|
|
12
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
13
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
|
|
15
14
|
}; //# sourceMappingURL=renderDialogContent.js.map
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=renderDialogContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogContent/renderDialogContent.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogContent/renderDialogContent.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogContent\n */\nexport const renderDialogContent_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(slots.root, slotProps.root);\n};\n//# sourceMappingURL=renderDialogContent.js.map"],"names":["renderDialogContent_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,+BAA+BC,CAAAA,QAAS;IACnD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AAC9D,GACA,+CAA+C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "renderDialogSurface_unstable", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: ()=>renderDialogSurface_unstable
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
11
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
11
|
const _contexts = require("../../contexts");
|
|
13
12
|
const _reactPortal = require("@fluentui/react-portal");
|
|
14
13
|
const renderDialogSurface_unstable = (state, contextValues)=>{
|
|
15
|
-
const { slots , slotProps } = (0, _reactUtilities.
|
|
16
|
-
return /*#__PURE__*/
|
|
14
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
15
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactPortal.Portal, null, slots.backdrop && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.backdrop, slotProps.backdrop), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogSurfaceProvider, {
|
|
17
16
|
value: contextValues.dialogSurface
|
|
18
|
-
}, /*#__PURE__*/
|
|
17
|
+
}, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root)));
|
|
19
18
|
}; //# sourceMappingURL=renderDialogSurface.js.map
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=renderDialogSurface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogSurface/renderDialogSurface.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogSurface/renderDialogSurface.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state, contextValues) => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(Portal, null, slots.backdrop && /*#__PURE__*/createElement(slots.backdrop, slotProps.backdrop), /*#__PURE__*/createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, /*#__PURE__*/createElement(slots.root, slotProps.root)));\n};\n//# sourceMappingURL=renderDialogSurface.js.map"],"names":["renderDialogSurface_unstable","state","contextValues","slots","slotProps","getSlotsNext","createElement","Portal","backdrop","DialogSurfaceProvider","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAOrCA;;aAAAA;;iCAPqE;gCACrD;0BACS;6BACf;AAIhB,MAAMA,+BAA+B,CAACC,OAAOC,gBAAkB;IACpE,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACJ;IACjB,OAAO,WAAW,GAAEK,IAAAA,8BAAa,EAACC,mBAAM,EAAE,IAAI,EAAEJ,MAAMK,QAAQ,IAAI,WAAW,GAAEF,IAAAA,8BAAa,EAACH,MAAMK,QAAQ,EAAEJ,UAAUI,QAAQ,GAAG,WAAW,GAAEF,IAAAA,8BAAa,EAACG,+BAAqB,EAAE;QAClLC,OAAOR,cAAcS,aAAa;IACpC,GAAG,WAAW,GAAEL,IAAAA,8BAAa,EAACH,MAAMS,IAAI,EAAER,UAAUQ,IAAI;AAC1D,GACA,+CAA+C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "renderDialogTitle_unstable", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: ()=>renderDialogTitle_unstable
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
11
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
11
|
const renderDialogTitle_unstable = (state)=>{
|
|
13
|
-
const { slots , slotProps } = (0, _reactUtilities.
|
|
14
|
-
return /*#__PURE__*/
|
|
12
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
13
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactJsxRuntime.Fragment, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.action, slotProps.action));
|
|
15
14
|
}; //# sourceMappingURL=renderDialogTitle.js.map
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=renderDialogTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/DialogTitle/renderDialogTitle.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/DialogTitle/renderDialogTitle.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */import { createElement, Fragment } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of DialogTitle\n */\nexport const renderDialogTitle_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(slots.root, slotProps.root, slotProps.root.children), slots.action && /*#__PURE__*/createElement(slots.action, slotProps.action));\n};\n//# sourceMappingURL=renderDialogTitle.js.map"],"names":["renderDialogTitle_unstable","state","slots","slotProps","getSlotsNext","createElement","Fragment","root","children","action"],"mappings":"AAAA,wBAAwB,GAAG,sBAAsB,GAAG,uBAAuB;;;;+BAK9DA;;aAAAA;;iCALwG;gCACxF;AAItB,MAAMA,6BAA6BC,CAAAA,QAAS;IACjD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACC,yBAAQ,EAAE,IAAI,EAAE,WAAW,GAAED,IAAAA,8BAAa,EAACH,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAEJ,UAAUI,IAAI,CAACC,QAAQ,GAAGN,MAAMO,MAAM,IAAI,WAAW,GAAEJ,IAAAA,8BAAa,EAACH,MAAMO,MAAM,EAAEN,UAAUM,MAAM;AAC9M,GACA,6CAA6C"}
|
|
@@ -14,13 +14,10 @@ function useFocusFirstElement(open, modalType) {
|
|
|
14
14
|
const { findFirstFocusable } = (0, _reactTabster.useFocusFinders)();
|
|
15
15
|
const { targetDocument } = (0, _reactSharedContexts.useFluent_unstable)();
|
|
16
16
|
const dialogRef = _react.useRef(null);
|
|
17
|
-
const triggerRef = _react.useRef();
|
|
18
17
|
_react.useEffect(()=>{
|
|
19
18
|
if (!open) {
|
|
20
|
-
|
|
21
|
-
return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();
|
|
19
|
+
return;
|
|
22
20
|
}
|
|
23
|
-
triggerRef.current = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
|
|
24
21
|
const element = dialogRef.current && findFirstFocusable(dialogRef.current);
|
|
25
22
|
if (element) {
|
|
26
23
|
element.focus();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../lib/utils/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 */\nexport function useFocusFirstElement(open, modalType) {\n const {\n findFirstFocusable\n } = useFocusFinders();\n const {\n targetDocument\n } = useFluent_unstable();\n const dialogRef = React.useRef(null);\n
|
|
1
|
+
{"version":3,"sources":["../../lib/utils/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 */\nexport function useFocusFirstElement(open, modalType) {\n const {\n findFirstFocusable\n } = useFocusFinders();\n const {\n targetDocument\n } = 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: a Dialog should have at least one focusable element inside DialogSurface.', 'Please add at least a close button either on `DialogTitle` action slot or inside `DialogActions`'].join('\\n'));\n }\n }\n }, [findFirstFocusable, open, modalType, targetDocument]);\n return dialogRef;\n}\n//# sourceMappingURL=useFocusFirstElement.js.map"],"names":["useFocusFirstElement","open","modalType","findFirstFocusable","useFocusFinders","targetDocument","useFluent_unstable","dialogRef","React","useRef","useEffect","element","current","focus","_dialogRef_current","process","env","NODE_ENV","console","warn","join"],"mappings":";;;;+BAMgBA;;aAAAA;;;6DANO;8BACS;qCACG;AAI5B,SAASA,qBAAqBC,IAAI,EAAEC,SAAS,EAAE;IACpD,MAAM,EACJC,mBAAkB,EACnB,GAAGC,IAAAA,6BAAe;IACnB,MAAM,EACJC,eAAc,EACf,GAAGC,IAAAA,uCAAkB;IACtB,MAAMC,YAAYC,OAAMC,MAAM,CAAC,IAAI;IACnCD,OAAME,SAAS,CAAC,IAAM;QACpB,IAAI,CAACT,MAAM;YACT;QACF,CAAC;QACD,MAAMU,UAAUJ,UAAUK,OAAO,IAAIT,mBAAmBI,UAAUK,OAAO;QACzE,IAAID,SAAS;YACXA,QAAQE,KAAK;QACf,OAAO;YACL,IAAIC;YACHA,CAAAA,qBAAqBP,UAAUK,OAAO,AAAD,MAAO,IAAI,IAAIE,uBAAuB,KAAK,IAAI,KAAK,IAAIA,mBAAmBD,KAAK,EAAE,EAAE,qDAAqD;YAC/K,IAAIE,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;gBACzC,sCAAsC;gBACtCC,QAAQC,IAAI,CAAC;oBAAC;oBAAqG;iBAAmG,CAACC,IAAI,CAAC;YAC9N,CAAC;QACH,CAAC;IACH,GAAG;QAACjB;QAAoBF;QAAMC;QAAWG;KAAe;IACxD,OAAOE;AACT,EACA,gDAAgD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.2",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -36,15 +36,16 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@griffel/react": "^1.5.2",
|
|
39
|
-
"@fluentui/react-utilities": "^9.
|
|
39
|
+
"@fluentui/react-utilities": "^9.8.0",
|
|
40
|
+
"@fluentui/react-jsx-runtime": "^9.0.0-alpha.1",
|
|
40
41
|
"@fluentui/keyboard-keys": "^9.0.2",
|
|
41
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
42
|
+
"@fluentui/react-context-selector": "^9.1.18",
|
|
42
43
|
"@fluentui/react-shared-contexts": "^9.3.3",
|
|
43
|
-
"@fluentui/react-aria": "^9.3.
|
|
44
|
+
"@fluentui/react-aria": "^9.3.18",
|
|
44
45
|
"@fluentui/react-icons": "^2.0.196",
|
|
45
|
-
"@fluentui/react-tabster": "^9.6.
|
|
46
|
+
"@fluentui/react-tabster": "^9.6.5",
|
|
46
47
|
"@fluentui/react-theme": "^9.1.7",
|
|
47
|
-
"@fluentui/react-portal": "^9.2.
|
|
48
|
+
"@fluentui/react-portal": "^9.2.6",
|
|
48
49
|
"@swc/helpers": "^0.4.14"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|