@fluentui/react-dialog 9.3.2 → 9.4.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/.swcrc +30 -0
- package/CHANGELOG.json +141 -1
- package/CHANGELOG.md +41 -2
- package/dist/index.d.ts +6 -3
- 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.map +1 -1
- 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.map +1 -1
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/index.js.map +1 -1
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/Dialog/useDialog.js.map +1 -1
- package/lib/components/Dialog/useDialogContextValues.js +3 -3
- 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 +1 -3
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActions.js +5 -2
- package/lib/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.js +7 -1
- 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 +1 -3
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBody.js +3 -2
- package/lib/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.js +1 -2
- package/lib/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.js.map +1 -1
- package/lib/components/DialogContent/DialogContent.types.js.map +1 -1
- package/lib/components/DialogContent/index.js.map +1 -1
- package/lib/components/DialogContent/renderDialogContent.js +1 -3
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContent.js +3 -2
- package/lib/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.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/index.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js +2 -6
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurface.js +5 -4
- package/lib/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- 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 +1 -5
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitle.js +2 -0
- package/lib/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.js +1 -0
- package/lib/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/DialogTrigger.types.js +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 +1 -2
- package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js +3 -2
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib/contexts/constants.js.map +1 -1
- package/lib/contexts/dialogContext.js +2 -2
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js +2 -4
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isEscapeKeyDown.js +1 -0
- package/lib/utils/isEscapeKeyDown.js.map +1 -1
- package/lib/utils/useDisableBodyScroll.js +6 -5
- package/lib/utils/useDisableBodyScroll.js.map +1 -1
- package/lib/utils/useFocusFirstElement.js +4 -3
- package/lib/utils/useFocusFirstElement.js.map +1 -1
- package/lib-commonjs/Dialog.js +5 -4
- package/lib-commonjs/Dialog.js.map +1 -1
- package/lib-commonjs/DialogActions.js +5 -4
- package/lib-commonjs/DialogActions.js.map +1 -1
- package/lib-commonjs/DialogBody.js +5 -4
- package/lib-commonjs/DialogBody.js.map +1 -1
- package/lib-commonjs/DialogContent.js +5 -4
- package/lib-commonjs/DialogContent.js.map +1 -1
- package/lib-commonjs/DialogSurface.js +5 -4
- package/lib-commonjs/DialogSurface.js.map +1 -1
- package/lib-commonjs/DialogTitle.js +5 -4
- package/lib-commonjs/DialogTitle.js.map +1 -1
- package/lib-commonjs/DialogTrigger.js +5 -4
- package/lib-commonjs/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.js +16 -19
- package/lib-commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/Dialog.types.js +3 -2
- package/lib-commonjs/components/Dialog/Dialog.types.js.map +1 -1
- package/lib-commonjs/components/Dialog/index.js +8 -7
- package/lib-commonjs/components/Dialog/index.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js +17 -20
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialog.js +78 -80
- package/lib-commonjs/components/Dialog/useDialog.js.map +1 -1
- package/lib-commonjs/components/Dialog/useDialogContextValues.js +25 -32
- package/lib-commonjs/components/Dialog/useDialogContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.js +19 -21
- package/lib-commonjs/components/DialogActions/DialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/DialogActions.types.js +3 -2
- package/lib-commonjs/components/DialogActions/DialogActions.types.js.map +1 -1
- package/lib-commonjs/components/DialogActions/index.js +9 -8
- package/lib-commonjs/components/DialogActions/index.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js +14 -19
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActions.js +23 -29
- package/lib-commonjs/components/DialogActions/useDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js +81 -46
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.js +19 -21
- package/lib-commonjs/components/DialogBody/DialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/DialogBody.types.js +3 -2
- package/lib-commonjs/components/DialogBody/DialogBody.types.js.map +1 -1
- package/lib-commonjs/components/DialogBody/index.js +9 -8
- package/lib-commonjs/components/DialogBody/index.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js +14 -19
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBody.js +21 -26
- package/lib-commonjs/components/DialogBody/useDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js +74 -45
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.js +19 -21
- package/lib-commonjs/components/DialogContent/DialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/DialogContent.types.js +3 -2
- package/lib-commonjs/components/DialogContent/DialogContent.types.js.map +1 -1
- package/lib-commonjs/components/DialogContent/index.js +9 -8
- package/lib-commonjs/components/DialogContent/index.js.map +1 -1
- package/lib-commonjs/components/DialogContent/renderDialogContent.js +13 -18
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContent.js +21 -26
- package/lib-commonjs/components/DialogContent/useDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js +51 -35
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.js +21 -23
- package/lib-commonjs/components/DialogSurface/DialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/DialogSurface.types.js +3 -2
- package/lib-commonjs/components/DialogSurface/DialogSurface.types.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/index.js +9 -8
- package/lib-commonjs/components/DialogSurface/index.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js +17 -24
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js +75 -85
- package/lib-commonjs/components/DialogSurface/useDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js +11 -9
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceContextValues.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js +309 -123
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.js +19 -21
- package/lib-commonjs/components/DialogTitle/DialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/DialogTitle.types.js +3 -2
- package/lib-commonjs/components/DialogTitle/DialogTitle.types.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/index.js +9 -8
- package/lib-commonjs/components/DialogTitle/index.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js +13 -20
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js +43 -51
- package/lib-commonjs/components/DialogTitle/useDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js +225 -107
- package/lib-commonjs/components/DialogTitle/useDialogTitleStyles.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js +15 -21
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js +5 -2
- package/lib-commonjs/components/DialogTrigger/DialogTrigger.types.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/index.js +8 -7
- package/lib-commonjs/components/DialogTrigger/index.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js +10 -9
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +45 -53
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib-commonjs/contexts/constants.js +28 -12
- package/lib-commonjs/contexts/constants.js.map +1 -1
- package/lib-commonjs/contexts/dialogContext.js +28 -19
- package/lib-commonjs/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js +18 -11
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +7 -6
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +50 -197
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/index.js +7 -6
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/isEscapeKeyDown.js +11 -10
- package/lib-commonjs/utils/isEscapeKeyDown.js.map +1 -1
- package/lib-commonjs/utils/useDisableBodyScroll.js +45 -47
- package/lib-commonjs/utils/useDisableBodyScroll.js.map +1 -1
- package/lib-commonjs/utils/useFocusFirstElement.js +42 -37
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
- package/package.json +14 -13
- package/lib-amd/Dialog.js +0 -6
- package/lib-amd/Dialog.js.map +0 -1
- package/lib-amd/DialogActions.js +0 -6
- package/lib-amd/DialogActions.js.map +0 -1
- package/lib-amd/DialogBody.js +0 -6
- package/lib-amd/DialogBody.js.map +0 -1
- package/lib-amd/DialogContent.js +0 -6
- package/lib-amd/DialogContent.js.map +0 -1
- package/lib-amd/DialogSurface.js +0 -6
- package/lib-amd/DialogSurface.js.map +0 -1
- package/lib-amd/DialogTitle.js +0 -6
- package/lib-amd/DialogTitle.js.map +0 -1
- package/lib-amd/DialogTrigger.js +0 -6
- package/lib-amd/DialogTrigger.js.map +0 -1
- package/lib-amd/components/Dialog/Dialog.js +0 -19
- package/lib-amd/components/Dialog/Dialog.js.map +0 -1
- package/lib-amd/components/Dialog/Dialog.types.js +0 -5
- package/lib-amd/components/Dialog/Dialog.types.js.map +0 -1
- package/lib-amd/components/Dialog/index.js +0 -9
- package/lib-amd/components/Dialog/index.js.map +0 -1
- package/lib-amd/components/Dialog/renderDialog.js +0 -17
- package/lib-amd/components/Dialog/renderDialog.js.map +0 -1
- package/lib-amd/components/Dialog/useDialog.js +0 -78
- package/lib-amd/components/Dialog/useDialog.js.map +0 -1
- package/lib-amd/components/Dialog/useDialogContextValues.js +0 -25
- package/lib-amd/components/Dialog/useDialogContextValues.js.map +0 -1
- package/lib-amd/components/DialogActions/DialogActions.js +0 -18
- package/lib-amd/components/DialogActions/DialogActions.js.map +0 -1
- package/lib-amd/components/DialogActions/DialogActions.types.js +0 -5
- package/lib-amd/components/DialogActions/DialogActions.types.js.map +0 -1
- package/lib-amd/components/DialogActions/index.js +0 -10
- package/lib-amd/components/DialogActions/index.js.map +0 -1
- package/lib-amd/components/DialogActions/renderDialogActions.js +0 -15
- package/lib-amd/components/DialogActions/renderDialogActions.js.map +0 -1
- package/lib-amd/components/DialogActions/useDialogActions.js +0 -26
- package/lib-amd/components/DialogActions/useDialogActions.js.map +0 -1
- package/lib-amd/components/DialogActions/useDialogActionsStyles.js +0 -27
- package/lib-amd/components/DialogActions/useDialogActionsStyles.js.map +0 -1
- package/lib-amd/components/DialogBody/DialogBody.js +0 -18
- package/lib-amd/components/DialogBody/DialogBody.js.map +0 -1
- package/lib-amd/components/DialogBody/DialogBody.types.js +0 -5
- package/lib-amd/components/DialogBody/DialogBody.types.js.map +0 -1
- package/lib-amd/components/DialogBody/index.js +0 -10
- package/lib-amd/components/DialogBody/index.js.map +0 -1
- package/lib-amd/components/DialogBody/renderDialogBody.js +0 -15
- package/lib-amd/components/DialogBody/renderDialogBody.js.map +0 -1
- package/lib-amd/components/DialogBody/useDialogBody.js +0 -25
- package/lib-amd/components/DialogBody/useDialogBody.js.map +0 -1
- package/lib-amd/components/DialogBody/useDialogBodyStyles.js +0 -31
- package/lib-amd/components/DialogBody/useDialogBodyStyles.js.map +0 -1
- package/lib-amd/components/DialogContent/DialogContent.js +0 -18
- package/lib-amd/components/DialogContent/DialogContent.js.map +0 -1
- package/lib-amd/components/DialogContent/DialogContent.types.js +0 -5
- package/lib-amd/components/DialogContent/DialogContent.types.js.map +0 -1
- package/lib-amd/components/DialogContent/index.js +0 -10
- package/lib-amd/components/DialogContent/index.js.map +0 -1
- package/lib-amd/components/DialogContent/renderDialogContent.js +0 -14
- package/lib-amd/components/DialogContent/renderDialogContent.js.map +0 -1
- package/lib-amd/components/DialogContent/useDialogContent.js +0 -25
- package/lib-amd/components/DialogContent/useDialogContent.js.map +0 -1
- package/lib-amd/components/DialogContent/useDialogContentStyles.js +0 -24
- package/lib-amd/components/DialogContent/useDialogContentStyles.js.map +0 -1
- package/lib-amd/components/DialogSurface/DialogSurface.js +0 -19
- package/lib-amd/components/DialogSurface/DialogSurface.js.map +0 -1
- package/lib-amd/components/DialogSurface/DialogSurface.types.js +0 -5
- package/lib-amd/components/DialogSurface/DialogSurface.types.js.map +0 -1
- package/lib-amd/components/DialogSurface/index.js +0 -10
- package/lib-amd/components/DialogSurface/index.js.map +0 -1
- package/lib-amd/components/DialogSurface/renderDialogSurface.js +0 -17
- package/lib-amd/components/DialogSurface/renderDialogSurface.js.map +0 -1
- package/lib-amd/components/DialogSurface/useDialogSurface.js +0 -70
- package/lib-amd/components/DialogSurface/useDialogSurface.js.map +0 -1
- package/lib-amd/components/DialogSurface/useDialogSurfaceContextValues.js +0 -11
- package/lib-amd/components/DialogSurface/useDialogSurfaceContextValues.js.map +0 -1
- package/lib-amd/components/DialogSurface/useDialogSurfaceStyles.js +0 -44
- package/lib-amd/components/DialogSurface/useDialogSurfaceStyles.js.map +0 -1
- package/lib-amd/components/DialogTitle/DialogTitle.js +0 -18
- package/lib-amd/components/DialogTitle/DialogTitle.js.map +0 -1
- package/lib-amd/components/DialogTitle/DialogTitle.types.js +0 -5
- package/lib-amd/components/DialogTitle/DialogTitle.types.js.map +0 -1
- package/lib-amd/components/DialogTitle/index.js +0 -10
- package/lib-amd/components/DialogTitle/index.js.map +0 -1
- package/lib-amd/components/DialogTitle/renderDialogTitle.js +0 -16
- package/lib-amd/components/DialogTitle/renderDialogTitle.js.map +0 -1
- package/lib-amd/components/DialogTitle/useDialogTitle.js +0 -36
- package/lib-amd/components/DialogTitle/useDialogTitle.js.map +0 -1
- package/lib-amd/components/DialogTitle/useDialogTitleStyles.js +0 -37
- package/lib-amd/components/DialogTitle/useDialogTitleStyles.js.map +0 -1
- package/lib-amd/components/DialogTrigger/DialogTrigger.js +0 -24
- package/lib-amd/components/DialogTrigger/DialogTrigger.js.map +0 -1
- package/lib-amd/components/DialogTrigger/DialogTrigger.types.js +0 -5
- package/lib-amd/components/DialogTrigger/DialogTrigger.types.js.map +0 -1
- package/lib-amd/components/DialogTrigger/index.js +0 -9
- package/lib-amd/components/DialogTrigger/index.js.map +0 -1
- package/lib-amd/components/DialogTrigger/renderDialogTrigger.js +0 -13
- package/lib-amd/components/DialogTrigger/renderDialogTrigger.js.map +0 -1
- package/lib-amd/components/DialogTrigger/useDialogTrigger.js +0 -37
- package/lib-amd/components/DialogTrigger/useDialogTrigger.js.map +0 -1
- package/lib-amd/contexts/constants.js +0 -15
- package/lib-amd/contexts/constants.js.map +0 -1
- package/lib-amd/contexts/dialogContext.js +0 -26
- package/lib-amd/contexts/dialogContext.js.map +0 -1
- package/lib-amd/contexts/dialogSurfaceContext.js +0 -11
- package/lib-amd/contexts/dialogSurfaceContext.js.map +0 -1
- package/lib-amd/contexts/index.js +0 -8
- package/lib-amd/contexts/index.js.map +0 -1
- package/lib-amd/index.js +0 -37
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/utils/index.js +0 -8
- package/lib-amd/utils/index.js.map +0 -1
- package/lib-amd/utils/isEscapeKeyDown.js +0 -13
- package/lib-amd/utils/isEscapeKeyDown.js.map +0 -1
- package/lib-amd/utils/useDisableBodyScroll.js +0 -52
- package/lib-amd/utils/useDisableBodyScroll.js.map +0 -1
- package/lib-amd/utils/useFocusFirstElement.js +0 -38
- package/lib-amd/utils/useFocusFirstElement.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.1",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
"e2e:local": "cypress open --component",
|
|
25
25
|
"storybook": "start-storybook",
|
|
26
26
|
"type-check": "tsc -b tsconfig.json",
|
|
27
|
-
"generate-api": "
|
|
27
|
+
"generate-api": "just-scripts generate-api"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
|
31
31
|
"@fluentui/react-conformance": "*",
|
|
32
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.20",
|
|
33
33
|
"@fluentui/scripts-api-extractor": "*",
|
|
34
34
|
"@fluentui/scripts-cypress": "*",
|
|
35
35
|
"@fluentui/scripts-tasks": "*"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@griffel/react": "^1.5.2",
|
|
39
|
-
"@fluentui/react-utilities": "^9.7.
|
|
40
|
-
"@fluentui/keyboard-keys": "^9.0.
|
|
41
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
42
|
-
"@fluentui/react-shared-contexts": "^9.3.
|
|
43
|
-
"@fluentui/react-aria": "^9.3.
|
|
44
|
-
"@fluentui/react-icons": "^2.0.
|
|
45
|
-
"@fluentui/react-tabster": "^9.
|
|
46
|
-
"@fluentui/react-theme": "^9.1.
|
|
47
|
-
"@fluentui/react-portal": "^9.2.
|
|
48
|
-
"
|
|
39
|
+
"@fluentui/react-utilities": "^9.7.2",
|
|
40
|
+
"@fluentui/keyboard-keys": "^9.0.2",
|
|
41
|
+
"@fluentui/react-context-selector": "^9.1.15",
|
|
42
|
+
"@fluentui/react-shared-contexts": "^9.3.2",
|
|
43
|
+
"@fluentui/react-aria": "^9.3.15",
|
|
44
|
+
"@fluentui/react-icons": "^2.0.196",
|
|
45
|
+
"@fluentui/react-tabster": "^9.6.1",
|
|
46
|
+
"@fluentui/react-theme": "^9.1.7",
|
|
47
|
+
"@fluentui/react-portal": "^9.2.2",
|
|
48
|
+
"@swc/helpers": "^0.4.14"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@types/react": ">=16.8.0 <19.0.0",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"exports": {
|
|
63
63
|
".": {
|
|
64
64
|
"types": "./dist/index.d.ts",
|
|
65
|
+
"node": "./lib-commonjs/index.js",
|
|
65
66
|
"import": "./lib/index.js",
|
|
66
67
|
"require": "./lib-commonjs/index.js"
|
|
67
68
|
},
|
package/lib-amd/Dialog.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/Dialog/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=Dialog.js.map
|
package/lib-amd/Dialog.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-dialog/src/Dialog.ts"],"names":[],"mappings":";;;IAAA,uCAA0C","sourcesContent":["export * from './components/Dialog/index';\n"]}
|
package/lib-amd/DialogActions.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/DialogActions/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=DialogActions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogActions.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-dialog/src/DialogActions.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/DialogActions/index';\n"]}
|
package/lib-amd/DialogBody.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/DialogBody/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=DialogBody.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogBody.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-dialog/src/DialogBody.ts"],"names":[],"mappings":";;;IAAA,uCAA8C","sourcesContent":["export * from './components/DialogBody/index';\n"]}
|
package/lib-amd/DialogContent.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/DialogContent/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=DialogContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogContent.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-dialog/src/DialogContent.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/DialogContent/index';\n"]}
|
package/lib-amd/DialogSurface.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/DialogSurface/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=DialogSurface.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogSurface.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-dialog/src/DialogSurface.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/DialogSurface/index';\n"]}
|
package/lib-amd/DialogTitle.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/DialogTitle/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=DialogTitle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-dialog/src/DialogTitle.ts"],"names":[],"mappings":";;;IAAA,uCAA+C","sourcesContent":["export * from './components/DialogTitle/index';\n"]}
|
package/lib-amd/DialogTrigger.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/DialogTrigger/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=DialogTrigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTrigger.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-dialog/src/DialogTrigger.ts"],"names":[],"mappings":";;;IAAA,uCAAiD","sourcesContent":["export * from './components/DialogTrigger/index';\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "react", "./useDialog", "./renderDialog", "./useDialogContextValues"], function (require, exports, React, useDialog_1, renderDialog_1, useDialogContextValues_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Dialog = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.
|
|
7
|
-
* It provides context down the hierarchy to `children` compound components to allow functionality.
|
|
8
|
-
* This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`
|
|
9
|
-
* and a `DialogSurface` (or some component that will eventually render one of those compound components)
|
|
10
|
-
* in this specific order
|
|
11
|
-
*/
|
|
12
|
-
exports.Dialog = React.memo(function (props) {
|
|
13
|
-
var state = useDialog_1.useDialog_unstable(props);
|
|
14
|
-
var contextValues = useDialogContextValues_1.useDialogContextValues_unstable(state);
|
|
15
|
-
return renderDialog_1.renderDialog_unstable(state, contextValues);
|
|
16
|
-
});
|
|
17
|
-
exports.Dialog.displayName = 'Dialog';
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=Dialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";;;;IAMA;;;;;;OAMG;IACU,QAAA,MAAM,GAA0B,KAAK,CAAC,IAAI,CAAC,UAAA,KAAK;QAC3D,IAAM,KAAK,GAAG,8BAAkB,CAAC,KAAK,CAAC,CAAC;QACxC,IAAM,aAAa,GAAG,wDAA+B,CAAC,KAAK,CAAC,CAAC;QAE7D,OAAO,oCAAqB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,cAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import * as React from 'react';\nimport { useDialog_unstable } from './useDialog';\nimport { renderDialog_unstable } from './renderDialog';\nimport type { DialogProps } from './Dialog.types';\nimport { useDialogContextValues_unstable } from './useDialogContextValues';\n\n/**\n * The `Dialog` root level component serves as an interface for interaction with all possible behaviors exposed.\n * It provides context down the hierarchy to `children` compound components to allow functionality.\n * This component expects to receive as children either a `DialogSurface` or a `DialogTrigger`\n * and a `DialogSurface` (or some component that will eventually render one of those compound components)\n * in this specific order\n */\nexport const Dialog: React.FC<DialogProps> = React.memo(props => {\n const state = useDialog_unstable(props);\n const contextValues = useDialogContextValues_unstable(state);\n\n return renderDialog_unstable(state, contextValues);\n});\n\nDialog.displayName = 'Dialog';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/Dialog/Dialog.types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogSurfaceElement } from '../DialogSurface/DialogSurface.types';\n\nexport type DialogSlots = {};\n\nexport type DialogOpenChangeEvent = DialogOpenChangeData['event'];\n\nexport type DialogOpenChangeData =\n | {\n type: 'escapeKeyDown';\n open: boolean;\n event: React.KeyboardEvent<DialogSurfaceElement>;\n }\n | {\n type: 'backdropClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n }\n | {\n type: 'triggerClick';\n open: boolean;\n event: React.MouseEvent<DialogSurfaceElement>;\n };\n\nexport type DialogModalType = 'modal' | 'non-modal' | 'alert';\n\n/**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\nexport type DialogOpenChangeEventHandler = (event: DialogOpenChangeEvent, data: DialogOpenChangeData) => void;\n\nexport type DialogContextValues = {\n dialog: DialogContextValue;\n /**\n * dialogSurface context is provided by Dialog as false\n * to ensure components inside Dialog but outside DialogSurface will consume this as false\n */\n dialogSurface: DialogSurfaceContextValue;\n};\n\nexport type DialogProps = ComponentProps<Partial<DialogSlots>> & {\n /**\n * Dialog variations.\n *\n * `modal`: When this type of dialog is open, the rest of the page is dimmed out and cannot be interacted with.\n * The tab sequence is kept within the dialog and moving the focus outside\n * the dialog will imply closing it. This is the default type of the component.\n *\n * `non-modal`: When a non-modal dialog is open, the rest of the page is not dimmed out\n * and users can interact with the rest of the page.\n * This also implies that the tab focus can move outside the dialog when it reaches the last focusable element.\n *\n * `alert`: is a special type of modal dialogs that interrupts the user's workflow\n * to communicate an important message or ask for a decision.\n * Unlike a typical modal dialog, the user must take an action through the options given to dismiss the dialog,\n * and it cannot be dismissed through the dimmed background or escape key.\n *\n * @default modal\n */\n modalType?: DialogModalType;\n /**\n * Controls the open state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Default value for the uncontrolled open state of the dialog.\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback fired when the component changes value from open state.\n *\n * @param event - a React's Synthetic event or a KeyboardEvent in case of `documentEscapeKeyDown`\n * @param data - A data object with relevant information,\n * such as open value and type of interaction that created the event\n */\n onOpenChange?: DialogOpenChangeEventHandler;\n /**\n * Can contain two children including {@link DialogTrigger} and {@link DialogSurface}.\n * Alternatively can only contain {@link DialogSurface} if using trigger outside dialog, or controlling state.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n};\n\nexport type DialogState = ComponentState<DialogSlots> &\n DialogContextValue & {\n content: React.ReactNode;\n trigger: React.ReactNode;\n };\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./Dialog", "./Dialog.types", "./renderDialog", "./useDialog"], function (require, exports, tslib_1, Dialog_1, Dialog_types_1, renderDialog_1, useDialog_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(Dialog_1, exports);
|
|
5
|
-
tslib_1.__exportStar(Dialog_types_1, exports);
|
|
6
|
-
tslib_1.__exportStar(renderDialog_1, exports);
|
|
7
|
-
tslib_1.__exportStar(useDialog_1, exports);
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/Dialog/index.ts"],"names":[],"mappings":";;;IAAA,wCAAyB;IACzB,8CAA+B;IAC/B,8CAA+B;IAC/B,2CAA4B","sourcesContent":["export * from './Dialog';\nexport * from './Dialog.types';\nexport * from './renderDialog';\nexport * from './useDialog';\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "react", "../../contexts"], function (require, exports, React, contexts_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.renderDialog_unstable = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Render the final JSX of Dialog
|
|
7
|
-
*/
|
|
8
|
-
var renderDialog_unstable = function (state, contextValues) {
|
|
9
|
-
var content = state.content, trigger = state.trigger;
|
|
10
|
-
return (React.createElement(contexts_1.DialogProvider, { value: contextValues.dialog },
|
|
11
|
-
React.createElement(contexts_1.DialogSurfaceProvider, { value: contextValues.dialogSurface },
|
|
12
|
-
trigger,
|
|
13
|
-
content)));
|
|
14
|
-
};
|
|
15
|
-
exports.renderDialog_unstable = renderDialog_unstable;
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=renderDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderDialog.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/Dialog/renderDialog.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,qBAAqB,GAAG,UAAC,KAAkB,EAAE,aAAkC;QAClF,IAAA,OAAO,GAAc,KAAK,QAAnB,EAAE,OAAO,GAAK,KAAK,QAAV,CAAW;QAEnC,OAAO,CACL,oBAAC,yBAAc,IAAC,KAAK,EAAE,aAAa,CAAC,MAAM;YACzC,oBAAC,gCAAqB,IAAC,KAAK,EAAE,aAAa,CAAC,aAAa;gBACtD,OAAO;gBACP,OAAO,CACc,CACT,CAClB,CAAC;IACJ,CAAC,CAAC;IAXW,QAAA,qBAAqB,yBAWhC","sourcesContent":["import * as React from 'react';\nimport { DialogProvider, DialogSurfaceProvider } from '../../contexts';\nimport type { DialogState, DialogContextValues } from './Dialog.types';\n\n/**\n * Render the final JSX of Dialog\n */\nexport const renderDialog_unstable = (state: DialogState, contextValues: DialogContextValues) => {\n const { content, trigger } = state;\n\n return (\n <DialogProvider value={contextValues.dialog}>\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n {trigger}\n {content}\n </DialogSurfaceProvider>\n </DialogProvider>\n );\n};\n"]}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "react", "@fluentui/react-utilities", "@fluentui/react-context-selector", "../../utils", "../../contexts"], function (require, exports, React, react_utilities_1, react_context_selector_1, utils_1, contexts_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useDialog_unstable = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Create the state required to render Dialog.
|
|
7
|
-
*
|
|
8
|
-
* The returned state can be modified with hooks such as useDialogStyles_unstable,
|
|
9
|
-
* before being passed to renderDialog_unstable.
|
|
10
|
-
*
|
|
11
|
-
* @param props - props from this instance of Dialog
|
|
12
|
-
*/
|
|
13
|
-
var useDialog_unstable = function (props) {
|
|
14
|
-
var children = props.children, _a = props.modalType, modalType = _a === void 0 ? 'modal' : _a, onOpenChange = props.onOpenChange, _b = props.inertTrapFocus, inertTrapFocus = _b === void 0 ? false : _b;
|
|
15
|
-
var _c = childrenToTriggerAndContent(children), trigger = _c[0], content = _c[1];
|
|
16
|
-
var _d = react_utilities_1.useControllableState({
|
|
17
|
-
state: props.open,
|
|
18
|
-
defaultState: props.defaultOpen,
|
|
19
|
-
initialState: false,
|
|
20
|
-
}), open = _d[0], setOpen = _d[1];
|
|
21
|
-
var requestOpenChange = react_utilities_1.useEventCallback(function (data) {
|
|
22
|
-
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(data.event, data);
|
|
23
|
-
// if user prevents default then do not change state value
|
|
24
|
-
// otherwise updates state value and trigger reference to the element that caused the opening
|
|
25
|
-
if (!data.event.isDefaultPrevented()) {
|
|
26
|
-
setOpen(data.open);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
var focusRef = utils_1.useFocusFirstElement(open, modalType);
|
|
30
|
-
var disableBodyScroll = utils_1.useDisableBodyScroll();
|
|
31
|
-
var isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');
|
|
32
|
-
react_utilities_1.useIsomorphicLayoutEffect(function () {
|
|
33
|
-
if (isBodyScrollLocked) {
|
|
34
|
-
return disableBodyScroll();
|
|
35
|
-
}
|
|
36
|
-
}, [disableBodyScroll, isBodyScrollLocked]);
|
|
37
|
-
return {
|
|
38
|
-
components: {
|
|
39
|
-
backdrop: 'div',
|
|
40
|
-
},
|
|
41
|
-
inertTrapFocus: inertTrapFocus,
|
|
42
|
-
open: open,
|
|
43
|
-
modalType: modalType,
|
|
44
|
-
content: open ? content : null,
|
|
45
|
-
trigger: trigger,
|
|
46
|
-
requestOpenChange: requestOpenChange,
|
|
47
|
-
dialogTitleId: react_utilities_1.useId('dialog-title-'),
|
|
48
|
-
isNestedDialog: react_context_selector_1.useHasParentContext(contexts_1.DialogContext),
|
|
49
|
-
dialogRef: focusRef,
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
exports.useDialog_unstable = useDialog_unstable;
|
|
53
|
-
/**
|
|
54
|
-
* Extracts trigger and content from children
|
|
55
|
-
*/
|
|
56
|
-
function childrenToTriggerAndContent(children) {
|
|
57
|
-
var childrenArray = React.Children.toArray(children);
|
|
58
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
59
|
-
if (childrenArray.length !== 1 && childrenArray.length !== 2) {
|
|
60
|
-
// eslint-disable-next-line no-console
|
|
61
|
-
console.warn('Dialog must contain at least one child <DialogSurface/>,\n' +
|
|
62
|
-
'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)');
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
switch (childrenArray.length) {
|
|
66
|
-
// case where there's a trigger followed by content
|
|
67
|
-
case 2:
|
|
68
|
-
return childrenArray;
|
|
69
|
-
// case where there's only content
|
|
70
|
-
case 1:
|
|
71
|
-
return [undefined, childrenArray[0]];
|
|
72
|
-
// unknown case
|
|
73
|
-
default:
|
|
74
|
-
return [undefined, undefined];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
//# sourceMappingURL=useDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDialog.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/Dialog/useDialog.ts"],"names":[],"mappings":";;;;IAQA;;;;;;;OAOG;IACI,IAAM,kBAAkB,GAAG,UAAC,KAAkB;QAC3C,IAAA,QAAQ,GAAgE,KAAK,SAArE,EAAE,KAA8D,KAAK,UAAhD,EAAnB,SAAS,mBAAG,OAAO,KAAA,EAAE,YAAY,GAA6B,KAAK,aAAlC,EAAE,KAA2B,KAAK,eAAV,EAAtB,cAAc,mBAAG,KAAK,KAAA,CAAW;QAEhF,IAAA,KAAqB,2BAA2B,CAAC,QAAQ,CAAC,EAAzD,OAAO,QAAA,EAAE,OAAO,QAAyC,CAAC;QAE3D,IAAA,KAAkB,sCAAoB,CAAC;YAC3C,KAAK,EAAE,KAAK,CAAC,IAAI;YACjB,YAAY,EAAE,KAAK,CAAC,WAAW;YAC/B,YAAY,EAAE,KAAK;SACpB,CAAC,EAJK,IAAI,QAAA,EAAE,OAAO,QAIlB,CAAC;QAEH,IAAM,iBAAiB,GAAG,kCAAgB,CAAC,UAAC,IAA0B;YACpE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAEjC,0DAA0D;YAC1D,6FAA6F;YAC7F,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE;gBACpC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;QAEH,IAAM,QAAQ,GAAG,4BAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACvD,IAAM,iBAAiB,GAAG,4BAAoB,EAAE,CAAC;QACjD,IAAM,kBAAkB,GAAG,OAAO,CAAC,IAAI,IAAI,SAAS,KAAK,WAAW,CAAC,CAAC;QAEtE,2CAAyB,CAAC;YACxB,IAAI,kBAAkB,EAAE;gBACtB,OAAO,iBAAiB,EAAE,CAAC;aAC5B;QACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAC;QAE5C,OAAO;YACL,UAAU,EAAE;gBACV,QAAQ,EAAE,KAAK;aAChB;YACD,cAAc,gBAAA;YACd,IAAI,MAAA;YACJ,SAAS,WAAA;YACT,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;YAC9B,OAAO,SAAA;YACP,iBAAiB,mBAAA;YACjB,aAAa,EAAE,uBAAK,CAAC,eAAe,CAAC;YACrC,cAAc,EAAE,4CAAmB,CAAC,wBAAa,CAAC;YAClD,SAAS,EAAE,QAAQ;SACpB,CAAC;IACJ,CAAC,CAAC;IA7CW,QAAA,kBAAkB,sBA6C7B;IAEF;;OAEG;IACH,SAAS,2BAA2B,CAClC,QAAyB;QAEzB,IAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAyB,CAAC;QAC/E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;YACzC,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC5D,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CACV,4DAA4D;oBAC1D,4EAA4E,CAC/E,CAAC;aACH;SACF;QACD,QAAQ,aAAa,CAAC,MAAM,EAAE;YAC5B,mDAAmD;YACnD,KAAK,CAAC;gBACJ,OAAO,aAAqE,CAAC;YAC/E,kCAAkC;YAClC,KAAK,CAAC;gBACJ,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,eAAe;YACf;gBACE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;SACjC;IACH,CAAC","sourcesContent":["import * as React from 'react';\nimport { useControllableState, useEventCallback, useId, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useDisableBodyScroll, useFocusFirstElement } from '../../utils';\nimport { DialogContext } from '../../contexts';\n\nimport type { DialogOpenChangeData, DialogProps, DialogState } from './Dialog.types';\n\n/**\n * Create the state required to render Dialog.\n *\n * The returned state can be modified with hooks such as useDialogStyles_unstable,\n * before being passed to renderDialog_unstable.\n *\n * @param props - props from this instance of Dialog\n */\nexport const useDialog_unstable = (props: DialogProps): DialogState => {\n const { children, modalType = 'modal', onOpenChange, inertTrapFocus = false } = props;\n\n const [trigger, content] = childrenToTriggerAndContent(children);\n\n const [open, setOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const requestOpenChange = useEventCallback((data: DialogOpenChangeData) => {\n onOpenChange?.(data.event, data);\n\n // if user prevents default then do not change state value\n // otherwise updates state value and trigger reference to the element that caused the opening\n if (!data.event.isDefaultPrevented()) {\n setOpen(data.open);\n }\n });\n\n const focusRef = useFocusFirstElement(open, modalType);\n const disableBodyScroll = useDisableBodyScroll();\n const isBodyScrollLocked = Boolean(open && modalType !== 'non-modal');\n\n useIsomorphicLayoutEffect(() => {\n if (isBodyScrollLocked) {\n return disableBodyScroll();\n }\n }, [disableBodyScroll, isBodyScrollLocked]);\n\n return {\n components: {\n backdrop: 'div',\n },\n inertTrapFocus,\n open,\n modalType,\n content: open ? content : null,\n trigger,\n requestOpenChange,\n dialogTitleId: useId('dialog-title-'),\n isNestedDialog: useHasParentContext(DialogContext),\n dialogRef: focusRef,\n };\n};\n\n/**\n * Extracts trigger and content from children\n */\nfunction childrenToTriggerAndContent(\n children: React.ReactNode,\n): readonly [trigger: React.ReactNode, content: React.ReactNode] {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length !== 1 && childrenArray.length !== 2) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Dialog must contain at least one child <DialogSurface/>,\\n' +\n 'and at most two children <DialogTrigger/> <DialogSurface/> (in this order)',\n );\n }\n }\n switch (childrenArray.length) {\n // case where there's a trigger followed by content\n case 2:\n return childrenArray as [trigger: React.ReactNode, content: React.ReactNode];\n // case where there's only content\n case 1:\n return [undefined, childrenArray[0]];\n // unknown case\n default:\n return [undefined, undefined];\n }\n}\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useDialogContextValues_unstable = void 0;
|
|
5
|
-
function useDialogContextValues_unstable(state) {
|
|
6
|
-
var modalType = state.modalType, open = state.open, dialogRef = state.dialogRef, dialogTitleId = state.dialogTitleId, isNestedDialog = state.isNestedDialog, inertTrapFocus = state.inertTrapFocus, requestOpenChange = state.requestOpenChange;
|
|
7
|
-
/**
|
|
8
|
-
* This context is created with "@fluentui/react-context-selector",
|
|
9
|
-
* there is no sense to memoize it
|
|
10
|
-
*/
|
|
11
|
-
var dialog = {
|
|
12
|
-
open: open,
|
|
13
|
-
modalType: modalType,
|
|
14
|
-
dialogRef: dialogRef,
|
|
15
|
-
dialogTitleId: dialogTitleId,
|
|
16
|
-
isNestedDialog: isNestedDialog,
|
|
17
|
-
inertTrapFocus: inertTrapFocus,
|
|
18
|
-
requestOpenChange: requestOpenChange,
|
|
19
|
-
};
|
|
20
|
-
var dialogSurface = false;
|
|
21
|
-
return { dialog: dialog, dialogSurface: dialogSurface };
|
|
22
|
-
}
|
|
23
|
-
exports.useDialogContextValues_unstable = useDialogContextValues_unstable;
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=useDialogContextValues.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDialogContextValues.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/Dialog/useDialogContextValues.ts"],"names":[],"mappings":";;;;IAGA,SAAgB,+BAA+B,CAAC,KAAkB;QACxD,IAAA,SAAS,GAAwF,KAAK,UAA7F,EAAE,IAAI,GAAkF,KAAK,KAAvF,EAAE,SAAS,GAAuE,KAAK,UAA5E,EAAE,aAAa,GAAwD,KAAK,cAA7D,EAAE,cAAc,GAAwC,KAAK,eAA7C,EAAE,cAAc,GAAwB,KAAK,eAA7B,EAAE,iBAAiB,GAAK,KAAK,kBAAV,CAAW;QAE/G;;;WAGG;QACH,IAAM,MAAM,GAAuB;YACjC,IAAI,MAAA;YACJ,SAAS,WAAA;YACT,SAAS,WAAA;YACT,aAAa,eAAA;YACb,cAAc,gBAAA;YACd,cAAc,gBAAA;YACd,iBAAiB,mBAAA;SAClB,CAAC;QAEF,IAAM,aAAa,GAA8B,KAAK,CAAC;QAEvD,OAAO,EAAE,MAAM,QAAA,EAAE,aAAa,eAAA,EAAE,CAAC;IACnC,CAAC;IApBD,0EAoBC","sourcesContent":["import type { DialogContextValue, DialogSurfaceContextValue } from '../../contexts';\nimport type { DialogContextValues, DialogState } from './Dialog.types';\n\nexport function useDialogContextValues_unstable(state: DialogState): DialogContextValues {\n const { modalType, open, dialogRef, dialogTitleId, isNestedDialog, inertTrapFocus, requestOpenChange } = state;\n\n /**\n * This context is created with \"@fluentui/react-context-selector\",\n * there is no sense to memoize it\n */\n const dialog: DialogContextValue = {\n open,\n modalType,\n dialogRef,\n dialogTitleId,\n isNestedDialog,\n inertTrapFocus,\n requestOpenChange,\n };\n\n const dialogSurface: DialogSurfaceContextValue = false;\n\n return { dialog, dialogSurface };\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "react", "./useDialogActions", "./renderDialogActions", "./useDialogActionsStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, useDialogActions_1, renderDialogActions_1, useDialogActionsStyles_1, react_shared_contexts_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DialogActions = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* `DialogActions` is a container for the actions of the dialog.
|
|
7
|
-
* Apart from styling, this component does not have other behavior.
|
|
8
|
-
*/
|
|
9
|
-
exports.DialogActions = React.forwardRef(function (props, ref) {
|
|
10
|
-
var state = useDialogActions_1.useDialogActions_unstable(props, ref);
|
|
11
|
-
useDialogActionsStyles_1.useDialogActionsStyles_unstable(state);
|
|
12
|
-
var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useDialogActionsStyles_unstable;
|
|
13
|
-
useCustomStyles(state);
|
|
14
|
-
return renderDialogActions_1.renderDialogActions_unstable(state);
|
|
15
|
-
});
|
|
16
|
-
exports.DialogActions.displayName = 'DialogActions';
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=DialogActions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogActions.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogActions/DialogActions.tsx"],"names":[],"mappings":";;;;IAQA;;;OAGG;IACU,QAAA,aAAa,GAA4C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAChG,IAAM,KAAK,GAAG,4CAAyB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEpD,wDAA+B,CAAC,KAAK,CAAC,CAAC;QAE/B,IAAiC,eAAe,GAAK,oDAA4B,EAAE,gCAAnC,CAAoC;QAC5F,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,kDAA4B,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import * as React from 'react';\nimport { useDialogActions_unstable } from './useDialogActions';\nimport { renderDialogActions_unstable } from './renderDialogActions';\nimport { useDialogActionsStyles_unstable } from './useDialogActionsStyles';\nimport type { DialogActionsProps } from './DialogActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * `DialogActions` is a container for the actions of the dialog.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogActions: ForwardRefComponent<DialogActionsProps> = React.forwardRef((props, ref) => {\n const state = useDialogActions_unstable(props, ref);\n\n useDialogActionsStyles_unstable(state);\n\n const { useDialogActionsStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogActions_unstable(state);\n});\n\nDialogActions.displayName = 'DialogActions';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogActions.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogActions/DialogActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogActionsSlots = {\n root: Slot<'div'>;\n};\n\nexport type DialogActionsPosition = 'start' | 'end';\n\n/**\n * DialogActions Props\n */\nexport type DialogActionsProps = ComponentProps<DialogActionsSlots> & {\n /**\n * defines the position on the dialog grid of the actions\n * @default 'end'\n */\n position?: DialogActionsPosition;\n};\n\n/**\n * State used in rendering DialogActions\n */\nexport type DialogActionsState = ComponentState<DialogActionsSlots> & {\n position: DialogActionsPosition;\n};\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./DialogActions", "./DialogActions.types", "./renderDialogActions", "./useDialogActions", "./useDialogActionsStyles"], function (require, exports, tslib_1, DialogActions_1, DialogActions_types_1, renderDialogActions_1, useDialogActions_1, useDialogActionsStyles_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(DialogActions_1, exports);
|
|
5
|
-
tslib_1.__exportStar(DialogActions_types_1, exports);
|
|
6
|
-
tslib_1.__exportStar(renderDialogActions_1, exports);
|
|
7
|
-
tslib_1.__exportStar(useDialogActions_1, exports);
|
|
8
|
-
tslib_1.__exportStar(useDialogActionsStyles_1, exports);
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogActions/index.ts"],"names":[],"mappings":";;;IAAA,+CAAgC;IAChC,qDAAsC;IACtC,qDAAsC;IACtC,kDAAmC;IACnC,wDAAyC","sourcesContent":["export * from './DialogActions';\nexport * from './DialogActions.types';\nexport * from './renderDialogActions';\nexport * from './useDialogActions';\nexport * from './useDialogActionsStyles';\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.renderDialogActions_unstable = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Render the final JSX of DialogActions
|
|
7
|
-
*/
|
|
8
|
-
var renderDialogActions_unstable = function (state) {
|
|
9
|
-
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
|
10
|
-
// TODO Add additional slots in the appropriate place
|
|
11
|
-
return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root));
|
|
12
|
-
};
|
|
13
|
-
exports.renderDialogActions_unstable = renderDialogActions_unstable;
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=renderDialogActions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderDialogActions.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogActions/renderDialogActions.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,4BAA4B,GAAG,UAAC,KAAyB;QAC9D,IAAA,KAAuB,0BAAQ,CAAqB,KAAK,CAAC,EAAxD,KAAK,WAAA,EAAE,SAAS,eAAwC,CAAC;QAEjE,qDAAqD;QACrD,OAAO,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CAAC;IAC5C,CAAC,CAAC;IALW,QAAA,4BAA4B,gCAKvC","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 } = getSlots<DialogActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "@fluentui/react-utilities"], function (require, exports, tslib_1, react_utilities_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useDialogActions_unstable = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Create the state required to render DialogActions.
|
|
7
|
-
*
|
|
8
|
-
* The returned state can be modified with hooks such as useDialogActionsStyles_unstable,
|
|
9
|
-
* before being passed to renderDialogActions_unstable.
|
|
10
|
-
*
|
|
11
|
-
* @param props - props from this instance of DialogActions
|
|
12
|
-
* @param ref - reference to root HTMLElement of DialogActions
|
|
13
|
-
*/
|
|
14
|
-
var useDialogActions_unstable = function (props, ref) {
|
|
15
|
-
var _a = props.position, position = _a === void 0 ? 'end' : _a;
|
|
16
|
-
return {
|
|
17
|
-
components: {
|
|
18
|
-
root: 'div',
|
|
19
|
-
},
|
|
20
|
-
root: react_utilities_1.getNativeElementProps('div', tslib_1.__assign({ ref: ref }, props)),
|
|
21
|
-
position: position,
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
exports.useDialogActions_unstable = useDialogActions_unstable;
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=useDialogActions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDialogActions.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogActions/useDialogActions.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;;OAQG;IACI,IAAM,yBAAyB,GAAG,UACvC,KAAyB,EACzB,GAA2B;QAEnB,IAAA,KAAqB,KAAK,SAAV,EAAhB,QAAQ,mBAAG,KAAK,KAAA,CAAW;QACnC,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YACD,IAAI,EAAE,uCAAqB,CAAC,KAAK,qBAC/B,GAAG,KAAA,IACA,KAAK,EACR;YACF,QAAQ,UAAA;SACT,CAAC;IACJ,CAAC,CAAC;IAfW,QAAA,yBAAyB,6BAepC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { DialogActionsProps, DialogActionsState } from './DialogActions.types';\n\n/**\n * Create the state required to render DialogActions.\n *\n * The returned state can be modified with hooks such as useDialogActionsStyles_unstable,\n * before being passed to renderDialogActions_unstable.\n *\n * @param props - props from this instance of DialogActions\n * @param ref - reference to root HTMLElement of DialogActions\n */\nexport const useDialogActions_unstable = (\n props: DialogActionsProps,\n ref: React.Ref<HTMLElement>,\n): DialogActionsState => {\n const { position = 'end' } = props;\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n position,\n };\n};\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "@griffel/react", "../../contexts/constants"], function (require, exports, tslib_1, react_1, constants_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
var _a;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.useDialogActionsStyles_unstable = exports.dialogActionsClassNames = void 0;
|
|
6
|
-
exports.dialogActionsClassNames = {
|
|
7
|
-
root: 'fui-DialogActions',
|
|
8
|
-
};
|
|
9
|
-
var useStyles = react_1.makeStyles({
|
|
10
|
-
root: tslib_1.__assign(tslib_1.__assign({ height: 'fit-content', boxSizing: 'border-box', display: 'flex' }, react_1.shorthands.gap(constants_1.DIALOG_GAP)), (_a = {}, _a[constants_1.MEDIA_QUERY_BREAKPOINT_SELECTOR] = {
|
|
11
|
-
flexDirection: 'column',
|
|
12
|
-
justifySelf: 'stretch',
|
|
13
|
-
}, _a)),
|
|
14
|
-
gridPositionEnd: tslib_1.__assign({ justifySelf: 'end' }, react_1.shorthands.gridArea(constants_1.ACTIONS_END_GRID_AREA)),
|
|
15
|
-
gridPositionStart: tslib_1.__assign({ justifySelf: 'start' }, react_1.shorthands.gridArea(constants_1.ACTIONS_START_GRID_AREA)),
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* Apply styling to the DialogActions slots based on the state
|
|
19
|
-
*/
|
|
20
|
-
var useDialogActionsStyles_unstable = function (state) {
|
|
21
|
-
var styles = useStyles();
|
|
22
|
-
state.root.className = react_1.mergeClasses(exports.dialogActionsClassNames.root, styles.root, state.position === 'start' && styles.gridPositionStart, state.position === 'end' && styles.gridPositionEnd, state.root.className);
|
|
23
|
-
return state;
|
|
24
|
-
};
|
|
25
|
-
exports.useDialogActionsStyles_unstable = useDialogActionsStyles_unstable;
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=useDialogActionsStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDialogActionsStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogActions/useDialogActionsStyles.ts"],"names":[],"mappings":";;;;;IAUa,QAAA,uBAAuB,GAAuC;QACzE,IAAI,EAAE,mBAAmB;KAC1B,CAAC;IAEF,IAAM,SAAS,GAAG,kBAAU,CAAC;QAC3B,IAAI,sCACF,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,MAAM,IACZ,kBAAU,CAAC,GAAG,CAAC,sBAAU,CAAC,gBAC5B,2CAA+B,IAAG;YACjC,aAAa,EAAE,QAAQ;YACvB,WAAW,EAAE,SAAS;SACvB,MACF;QACD,eAAe,qBACb,WAAW,EAAE,KAAK,IACf,kBAAU,CAAC,QAAQ,CAAC,iCAAqB,CAAC,CAC9C;QACD,iBAAiB,qBACf,WAAW,EAAE,OAAO,IACjB,kBAAU,CAAC,QAAQ,CAAC,mCAAuB,CAAC,CAChD;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,+BAA+B,GAAG,UAAC,KAAyB;QACvE,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,+BAAuB,CAAC,IAAI,EAC5B,MAAM,CAAC,IAAI,EACX,KAAK,CAAC,QAAQ,KAAK,OAAO,IAAI,MAAM,CAAC,iBAAiB,EACtD,KAAK,CAAC,QAAQ,KAAK,KAAK,IAAI,MAAM,CAAC,eAAe,EAClD,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAVW,QAAA,+BAA+B,mCAU1C","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { DialogActionsSlots, DialogActionsState } from './DialogActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport {\n DIALOG_GAP,\n ACTIONS_END_GRID_AREA,\n ACTIONS_START_GRID_AREA,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n} from '../../contexts/constants';\n\nexport const dialogActionsClassNames: SlotClassNames<DialogActionsSlots> = {\n root: 'fui-DialogActions',\n};\n\nconst useStyles = makeStyles({\n root: {\n height: 'fit-content',\n boxSizing: 'border-box',\n display: 'flex',\n ...shorthands.gap(DIALOG_GAP),\n [MEDIA_QUERY_BREAKPOINT_SELECTOR]: {\n flexDirection: 'column',\n justifySelf: 'stretch',\n },\n },\n gridPositionEnd: {\n justifySelf: 'end',\n ...shorthands.gridArea(ACTIONS_END_GRID_AREA),\n },\n gridPositionStart: {\n justifySelf: 'start',\n ...shorthands.gridArea(ACTIONS_START_GRID_AREA),\n },\n});\n\n/**\n * Apply styling to the DialogActions slots based on the state\n */\nexport const useDialogActionsStyles_unstable = (state: DialogActionsState): DialogActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n dialogActionsClassNames.root,\n styles.root,\n state.position === 'start' && styles.gridPositionStart,\n state.position === 'end' && styles.gridPositionEnd,\n state.root.className,\n );\n return state;\n};\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "react", "./useDialogBody", "./renderDialogBody", "./useDialogBodyStyles", "@fluentui/react-shared-contexts"], function (require, exports, React, useDialogBody_1, renderDialogBody_1, useDialogBodyStyles_1, react_shared_contexts_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DialogBody = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* The `DialogBody` is a container where the content of the dialog is rendered.
|
|
7
|
-
* Apart from styling, this component does not have other behavior.
|
|
8
|
-
*/
|
|
9
|
-
exports.DialogBody = React.forwardRef(function (props, ref) {
|
|
10
|
-
var state = useDialogBody_1.useDialogBody_unstable(props, ref);
|
|
11
|
-
useDialogBodyStyles_1.useDialogBodyStyles_unstable(state);
|
|
12
|
-
var useCustomStyles = react_shared_contexts_1.useCustomStyleHooks_unstable().useDialogBodyStyles_unstable;
|
|
13
|
-
useCustomStyles(state);
|
|
14
|
-
return renderDialogBody_1.renderDialogBody_unstable(state);
|
|
15
|
-
});
|
|
16
|
-
exports.DialogBody.displayName = 'DialogBody';
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=DialogBody.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogBody.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogBody/DialogBody.tsx"],"names":[],"mappings":";;;;IAQA;;;OAGG;IACU,QAAA,UAAU,GAAyC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC1F,IAAM,KAAK,GAAG,sCAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEjD,kDAA4B,CAAC,KAAK,CAAC,CAAC;QAE5B,IAA8B,eAAe,GAAK,oDAA4B,EAAE,6BAAnC,CAAoC;QACzF,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,4CAAyB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import * as React from 'react';\nimport { useDialogBody_unstable } from './useDialogBody';\nimport { renderDialogBody_unstable } from './renderDialogBody';\nimport { useDialogBodyStyles_unstable } from './useDialogBodyStyles';\nimport type { DialogBodyProps } from './DialogBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * The `DialogBody` is a container where the content of the dialog is rendered.\n * Apart from styling, this component does not have other behavior.\n */\nexport const DialogBody: ForwardRefComponent<DialogBodyProps> = React.forwardRef((props, ref) => {\n const state = useDialogBody_unstable(props, ref);\n\n useDialogBodyStyles_unstable(state);\n\n const { useDialogBodyStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDialogBody_unstable(state);\n});\n\nDialogBody.displayName = 'DialogBody';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogBody.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogBody/DialogBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DialogBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * DialogBody Props\n */\nexport type DialogBodyProps = ComponentProps<DialogBodySlots> & {};\n\n/**\n * State used in rendering DialogBody\n */\nexport type DialogBodyState = ComponentState<DialogBodySlots>;\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./DialogBody", "./DialogBody.types", "./renderDialogBody", "./useDialogBody", "./useDialogBodyStyles"], function (require, exports, tslib_1, DialogBody_1, DialogBody_types_1, renderDialogBody_1, useDialogBody_1, useDialogBodyStyles_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(DialogBody_1, exports);
|
|
5
|
-
tslib_1.__exportStar(DialogBody_types_1, exports);
|
|
6
|
-
tslib_1.__exportStar(renderDialogBody_1, exports);
|
|
7
|
-
tslib_1.__exportStar(useDialogBody_1, exports);
|
|
8
|
-
tslib_1.__exportStar(useDialogBodyStyles_1, exports);
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogBody/index.ts"],"names":[],"mappings":";;;IAAA,4CAA6B;IAC7B,kDAAmC;IACnC,kDAAmC;IACnC,+CAAgC;IAChC,qDAAsC","sourcesContent":["export * from './DialogBody';\nexport * from './DialogBody.types';\nexport * from './renderDialogBody';\nexport * from './useDialogBody';\nexport * from './useDialogBodyStyles';\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.renderDialogBody_unstable = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Render the final JSX of DialogBody
|
|
7
|
-
*/
|
|
8
|
-
var renderDialogBody_unstable = function (state) {
|
|
9
|
-
var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
|
|
10
|
-
// TODO Add additional slots in the appropriate place
|
|
11
|
-
return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root));
|
|
12
|
-
};
|
|
13
|
-
exports.renderDialogBody_unstable = renderDialogBody_unstable;
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=renderDialogBody.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderDialogBody.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-dialog/src/components/DialogBody/renderDialogBody.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,yBAAyB,GAAG,UAAC,KAAsB;QACxD,IAAA,KAAuB,0BAAQ,CAAkB,KAAK,CAAC,EAArD,KAAK,WAAA,EAAE,SAAS,eAAqC,CAAC;QAE9D,qDAAqD;QACrD,OAAO,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CAAC;IAC5C,CAAC,CAAC;IALW,QAAA,yBAAyB,6BAKpC","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 } = getSlots<DialogBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "@fluentui/react-utilities"], function (require, exports, tslib_1, react_utilities_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useDialogBody_unstable = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Create the state required to render DialogBody.
|
|
7
|
-
*
|
|
8
|
-
* The returned state can be modified with hooks such as useDialogBodyStyles_unstable,
|
|
9
|
-
* before being passed to renderDialogBody_unstable.
|
|
10
|
-
*
|
|
11
|
-
* @param props - props from this instance of DialogBody
|
|
12
|
-
* @param ref - reference to root HTMLElement of DialogBody
|
|
13
|
-
*/
|
|
14
|
-
var useDialogBody_unstable = function (props, ref) {
|
|
15
|
-
var _a;
|
|
16
|
-
return {
|
|
17
|
-
components: {
|
|
18
|
-
root: 'div',
|
|
19
|
-
},
|
|
20
|
-
root: react_utilities_1.getNativeElementProps((_a = props.as) !== null && _a !== void 0 ? _a : 'div', tslib_1.__assign({ ref: ref }, props)),
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
exports.useDialogBody_unstable = useDialogBody_unstable;
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=useDialogBody.js.map
|