@fluentui/react-dialog 9.14.4 → 9.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -2
- package/dist/index.d.ts +15 -13
- package/lib/components/Dialog/renderDialog.js.map +1 -1
- package/lib/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib/components/DialogActions/useDialogActionsStyles.styles.raw.js +4 -4
- package/lib/components/DialogActions/useDialogActionsStyles.styles.raw.js.map +1 -1
- package/lib/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.styles.js +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
- package/lib/components/DialogBody/useDialogBodyStyles.styles.raw.js +3 -3
- package/lib/components/DialogBody/useDialogBodyStyles.styles.raw.js.map +1 -1
- package/lib/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.styles.js +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
- package/lib/components/DialogContent/useDialogContentStyles.styles.raw.js +2 -2
- package/lib/components/DialogContent/useDialogContentStyles.styles.raw.js.map +1 -1
- package/lib/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js +7 -7
- package/lib/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js.map +1 -1
- package/lib/components/DialogSurfaceMotion.js +8 -24
- package/lib/components/DialogSurfaceMotion.js.map +1 -1
- package/lib/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js +2 -2
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib/components/MotionRefForwarder.js.map +1 -1
- package/lib/contexts/constants.js +3 -3
- package/lib/contexts/constants.js.map +1 -1
- package/lib/contexts/dialogContext.js.map +1 -1
- package/lib/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib/contexts/index.js +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/useFocusFirstElement.js.map +1 -1
- package/lib-commonjs/components/Dialog/renderDialog.js.map +1 -1
- package/lib-commonjs/components/DialogActions/renderDialogActions.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.js +3 -3
- package/lib-commonjs/components/DialogActions/useDialogActionsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DialogBody/renderDialogBody.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.js +2 -2
- package/lib-commonjs/components/DialogBody/useDialogBodyStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DialogContent/renderDialogContent.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/DialogContent/useDialogContentStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/renderDialogSurface.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js +6 -6
- package/lib-commonjs/components/DialogSurface/useDialogSurfaceStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DialogSurfaceMotion.js +7 -23
- package/lib-commonjs/components/DialogSurfaceMotion.js.map +1 -1
- package/lib-commonjs/components/DialogTitle/renderDialogTitle.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/renderDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/MotionRefForwarder.js.map +1 -1
- package/lib-commonjs/contexts/constants.js +10 -10
- package/lib-commonjs/contexts/constants.js.map +1 -1
- package/lib-commonjs/contexts/dialogContext.js.map +1 -1
- package/lib-commonjs/contexts/dialogSurfaceContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +9 -9
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +10 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/useFocusFirstElement.js.map +1 -1
- package/package.json +14 -14
|
@@ -9,17 +9,17 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
|
|
13
|
+
return DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
|
|
14
|
+
},
|
|
12
15
|
DIALOG_GAP: function() {
|
|
13
16
|
return DIALOG_GAP;
|
|
14
17
|
},
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
},
|
|
18
|
-
MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
|
|
19
|
-
return MEDIA_QUERY_BREAKPOINT_SELECTOR;
|
|
18
|
+
DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
|
|
19
|
+
return DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR;
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
return
|
|
21
|
+
DIALOG_MEDIA_QUERY_SHORT_SCREEN: function() {
|
|
22
|
+
return DIALOG_MEDIA_QUERY_SHORT_SCREEN;
|
|
23
23
|
},
|
|
24
24
|
SURFACE_BORDER_WIDTH: function() {
|
|
25
25
|
return SURFACE_BORDER_WIDTH;
|
|
@@ -28,9 +28,9 @@ _export(exports, {
|
|
|
28
28
|
return SURFACE_PADDING;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
const
|
|
32
|
-
const
|
|
31
|
+
const DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR = '@media screen and (max-width: 480px)';
|
|
32
|
+
const DIALOG_MEDIA_QUERY_SHORT_SCREEN = '@media screen and (max-height: 359px)';
|
|
33
33
|
const SURFACE_PADDING = '24px';
|
|
34
34
|
const DIALOG_GAP = '8px';
|
|
35
35
|
const SURFACE_BORDER_WIDTH = '1px';
|
|
36
|
-
const
|
|
36
|
+
const DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET = '4px';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/constants.ts"],"sourcesContent":["export const
|
|
1
|
+
{"version":3,"sources":["../src/contexts/constants.ts"],"sourcesContent":["export const DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR = '@media screen and (max-width: 480px)';\nexport const DIALOG_MEDIA_QUERY_SHORT_SCREEN = '@media screen and (max-height: 359px)';\nexport const SURFACE_PADDING = '24px';\nexport const DIALOG_GAP = '8px';\nexport const SURFACE_BORDER_WIDTH = '1px';\nexport const DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET = '4px';\n"],"names":["DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_PADDING","DIALOG_GAP","SURFACE_BORDER_WIDTH","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET"],"mappings":";;;;;;;;;;;6CAKaK;;;IAFAF,UAAAA;;;0CAHAH;;;mCACAC;;;wBAGAG;;;mBAFAF;;;;AAFN,MAAMF,yCAAyC,uCAAuC;AACtF,MAAMC,kCAAkC,wCAAwC;AAChF,MAAMC,kBAAkB,OAAO;AAC/B,mBAAmB,MAAM;AACzB,MAAME,uBAAuB,MAAM;AACnC,MAAMC,4CAA4C,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/dialogContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext, ContextSelector, useContextSelector } from '@fluentui/react-context-selector';\nimport { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement>;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n} & Partial<ReturnType<typeof useModalAttributes>>;\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"],"names":["React","createContext","useContextSelector","defaultContextValue","open","inertTrapFocus","modalType","isNestedDialog","dialogRef","current","requestOpenChange","DialogContext","undefined","DialogProvider","Provider","useDialogContext_unstable","selector","ctx"],"mappings":";;;;;;;;;;;iBAgCaW;;;kBAIAE;;;6BACAE;;;;;iEArCU,QAAQ;sCACoC,mCAAmC;AAmBtG,MAAMZ,sBAA0C;IAC9CC,MAAM;IACNC,gBAAgB;IAChBC,WAAW;IACXC,gBAAgB;IAChBC,WAAW;QAAEC,SAAS;IAAK;IAC3BC;IACE,QAAQ,GACV;AACF;AAGO,MAAMC,oBAAyDV,mCAAAA,EACpEW,WACA;AAEK,MAAMC,iBAAiBF,cAAcG,QAAQ,CAAC;AAC9C,MAAMC,4BAA4B,CAAIC,eAC3Cd,wCAAAA,EAAmBS,eAAe,CAACM,MAAMd,mBAAmB,GAAKa,SAASC,MAAM"}
|
|
1
|
+
{"version":3,"sources":["../src/contexts/dialogContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext, ContextSelector, useContextSelector } from '@fluentui/react-context-selector';\nimport { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement | null>;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n} & Partial<ReturnType<typeof useModalAttributes>>;\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"],"names":["React","createContext","useContextSelector","defaultContextValue","open","inertTrapFocus","modalType","isNestedDialog","dialogRef","current","requestOpenChange","DialogContext","undefined","DialogProvider","Provider","useDialogContext_unstable","selector","ctx"],"mappings":";;;;;;;;;;;iBAgCaW;;;kBAIAE;;;6BACAE;;;;;iEArCU,QAAQ;sCACoC,mCAAmC;AAmBtG,MAAMZ,sBAA0C;IAC9CC,MAAM;IACNC,gBAAgB;IAChBC,WAAW;IACXC,gBAAgB;IAChBC,WAAW;QAAEC,SAAS;IAAK;IAC3BC;IACE,QAAQ,GACV;AACF;AAGO,MAAMC,oBAAyDV,mCAAAA,EACpEW,WACA;AAEK,MAAMC,iBAAiBF,cAAcG,QAAQ,CAAC;AAC9C,MAAMC,4BAA4B,CAAIC,eAC3Cd,wCAAAA,EAAmBS,eAAe,CAACM,MAAMd,mBAAmB,GAAKa,SAASC,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/dialogSurfaceContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type DialogSurfaceContextValue = boolean;\n\nconst defaultContextValue: DialogSurfaceContextValue = false;\n\nexport const DialogSurfaceContext = React.createContext<DialogSurfaceContextValue | undefined>(undefined);\n\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\n\nexport const useDialogSurfaceContext_unstable = ()
|
|
1
|
+
{"version":3,"sources":["../src/contexts/dialogSurfaceContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type DialogSurfaceContextValue = boolean;\n\nconst defaultContextValue: DialogSurfaceContextValue = false;\n\nexport const DialogSurfaceContext = React.createContext<DialogSurfaceContextValue | undefined>(undefined);\n\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\n\nexport const useDialogSurfaceContext_unstable = (): DialogSurfaceContextValue =>\n React.useContext(DialogSurfaceContext) ?? defaultContextValue;\n"],"names":["React","defaultContextValue","DialogSurfaceContext","createContext","undefined","DialogSurfaceProvider","Provider","useDialogSurfaceContext_unstable","useContext"],"mappings":";;;;;;;;;;;IAMaE,oBAAAA;;;yBAEAG;eAAAA;;oCAEAE;;;;;iEAVU,QAAQ;AAI/B,MAAMN,sBAAiD;AAEhD,2CAA6BD,OAAMG,aAAa,CAAwCC,WAAW;AAEnG,8BAA8BF,qBAAqBI,QAAQ,CAAC;AAE5D,MAAMC,mCAAmC;QAC9CP;WAAAA,CAAAA,oBAAAA,OAAMQ,UAAU,CAACN,qBAAAA,MAAAA,QAAjBF,sBAAAA,KAAAA,IAAAA,oBAA0CC;EAAoB"}
|
|
@@ -9,9 +9,18 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
|
|
13
|
+
return _constants.DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
|
|
14
|
+
},
|
|
12
15
|
DIALOG_GAP: function() {
|
|
13
16
|
return _constants.DIALOG_GAP;
|
|
14
17
|
},
|
|
18
|
+
DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
|
|
19
|
+
return _constants.DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR;
|
|
20
|
+
},
|
|
21
|
+
DIALOG_MEDIA_QUERY_SHORT_SCREEN: function() {
|
|
22
|
+
return _constants.DIALOG_MEDIA_QUERY_SHORT_SCREEN;
|
|
23
|
+
},
|
|
15
24
|
DialogContext: function() {
|
|
16
25
|
return _dialogContext.DialogContext;
|
|
17
26
|
},
|
|
@@ -24,15 +33,6 @@ _export(exports, {
|
|
|
24
33
|
DialogSurfaceProvider: function() {
|
|
25
34
|
return _dialogSurfaceContext.DialogSurfaceProvider;
|
|
26
35
|
},
|
|
27
|
-
FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
|
|
28
|
-
return _constants.FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
|
|
29
|
-
},
|
|
30
|
-
MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
|
|
31
|
-
return _constants.MEDIA_QUERY_BREAKPOINT_SELECTOR;
|
|
32
|
-
},
|
|
33
|
-
MEDIA_QUERY_SHORT_SCREEN: function() {
|
|
34
|
-
return _constants.MEDIA_QUERY_SHORT_SCREEN;
|
|
35
|
-
},
|
|
36
36
|
SURFACE_BORDER_WIDTH: function() {
|
|
37
37
|
return _constants.SURFACE_BORDER_WIDTH;
|
|
38
38
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export {\n DIALOG_GAP,\n
|
|
1
|
+
{"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export {\n DIALOG_GAP,\n DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR,\n DIALOG_MEDIA_QUERY_SHORT_SCREEN,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n} from './constants';\nexport type { DialogContextValue } from './dialogContext';\nexport { DialogContext, DialogProvider, useDialogContext_unstable } from './dialogContext';\nexport type { DialogSurfaceContextValue } from './dialogSurfaceContext';\nexport { DialogSurfaceContext, DialogSurfaceProvider, useDialogSurfaceContext_unstable } from './dialogSurfaceContext';\n"],"names":["DIALOG_GAP","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","DialogContext","DialogProvider","useDialogContext_unstable","DialogSurfaceContext","DialogSurfaceProvider","useDialogSurfaceContext_unstable"],"mappings":";;;;;;;;;;;IAEEC,yCAAyC;;;;eADzCD,qBAAU;;;eAEVE,iDAAsC;;;eACtCC,0CAA+B;;;eAKxBG,4BAAa;;;eAAEC,6BAAc;;IAE7BE,oBAAoB;;;;eAAEC,2CAAqB;;;eANlDN,+BAAoB;;;eACpBC,0BAAe;;IAGuBG;uDAAyB;;;eAEXG,sDAAgC;;;2BAJ/E,cAAc;+BAEoD,kBAAkB;sCAEG,yBAAyB"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -9,6 +9,15 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
|
|
13
|
+
return _constants.DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
|
|
14
|
+
},
|
|
15
|
+
DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
|
|
16
|
+
return _constants.DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR;
|
|
17
|
+
},
|
|
18
|
+
DIALOG_MEDIA_QUERY_SHORT_SCREEN: function() {
|
|
19
|
+
return _constants.DIALOG_MEDIA_QUERY_SHORT_SCREEN;
|
|
20
|
+
},
|
|
12
21
|
Dialog: function() {
|
|
13
22
|
return _Dialog.Dialog;
|
|
14
23
|
},
|
|
@@ -129,3 +138,4 @@ const _DialogTitle = require("./DialogTitle");
|
|
|
129
138
|
const _DialogSurface = require("./DialogSurface");
|
|
130
139
|
const _DialogContent = require("./DialogContent");
|
|
131
140
|
const _index = require("./contexts/index");
|
|
141
|
+
const _constants = require("./contexts/constants");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { Dialog, renderDialog_unstable, useDialog_unstable, useDialogContextValues_unstable } from './Dialog';\nexport type {\n DialogContextValues,\n DialogSlots,\n DialogProps,\n DialogState,\n DialogModalType,\n DialogOpenChangeData,\n DialogOpenChangeEvent,\n DialogOpenChangeEventHandler,\n} from './Dialog';\n\nexport { DialogTrigger, useDialogTrigger_unstable, renderDialogTrigger_unstable } from './DialogTrigger';\nexport type {\n DialogTriggerProps,\n DialogTriggerChildProps,\n DialogTriggerState,\n DialogTriggerAction,\n} from './DialogTrigger';\n\nexport {\n DialogActions,\n dialogActionsClassNames,\n useDialogActions_unstable,\n useDialogActionsStyles_unstable,\n renderDialogActions_unstable,\n} from './DialogActions';\nexport type {\n DialogActionsProps,\n DialogActionsSlots,\n DialogActionsState,\n DialogActionsPosition,\n} from './DialogActions';\n\nexport {\n DialogBody,\n dialogBodyClassNames,\n useDialogBody_unstable,\n useDialogBodyStyles_unstable,\n renderDialogBody_unstable,\n} from './DialogBody';\nexport type { DialogBodyProps, DialogBodySlots, DialogBodyState } from './DialogBody';\n\nexport {\n DialogTitle,\n dialogTitleClassNames,\n useDialogTitle_unstable,\n useDialogTitleStyles_unstable,\n renderDialogTitle_unstable,\n} from './DialogTitle';\nexport type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './DialogTitle';\n\nexport {\n DialogSurface,\n dialogSurfaceClassNames,\n useDialogSurface_unstable,\n useDialogSurfaceStyles_unstable,\n useDialogSurfaceContextValues_unstable,\n renderDialogSurface_unstable,\n} from './DialogSurface';\nexport type {\n DialogSurfaceProps,\n DialogSurfaceSlots,\n DialogSurfaceState,\n DialogSurfaceElement,\n DialogSurfaceContextValues,\n} from './DialogSurface';\n\nexport {\n DialogContent,\n dialogContentClassNames,\n useDialogContent_unstable,\n useDialogContentStyles_unstable,\n renderDialogContent_unstable,\n} from './DialogContent';\nexport type { DialogContentProps, DialogContentSlots, DialogContentState } from './DialogContent';\n\nexport {\n useDialogContext_unstable,\n useDialogSurfaceContext_unstable,\n DialogProvider,\n DialogSurfaceProvider,\n} from './contexts/index';\n\nexport type { DialogContextValue, DialogSurfaceContextValue } from './contexts/index';\n"],"names":["Dialog","renderDialog_unstable","useDialog_unstable","useDialogContextValues_unstable","DialogTrigger","useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogActions","dialogActionsClassNames","useDialogActions_unstable","useDialogActionsStyles_unstable","renderDialogActions_unstable","DialogBody","dialogBodyClassNames","useDialogBody_unstable","useDialogBodyStyles_unstable","renderDialogBody_unstable","DialogTitle","dialogTitleClassNames","useDialogTitle_unstable","useDialogTitleStyles_unstable","renderDialogTitle_unstable","DialogSurface","dialogSurfaceClassNames","useDialogSurface_unstable","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable","renderDialogSurface_unstable","DialogContent","dialogContentClassNames","useDialogContent_unstable","useDialogContentStyles_unstable","renderDialogContent_unstable","useDialogContext_unstable","useDialogSurfaceContext_unstable","DialogProvider","DialogSurfaceProvider"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { Dialog, renderDialog_unstable, useDialog_unstable, useDialogContextValues_unstable } from './Dialog';\nexport type {\n DialogContextValues,\n DialogSlots,\n DialogProps,\n DialogState,\n DialogModalType,\n DialogOpenChangeData,\n DialogOpenChangeEvent,\n DialogOpenChangeEventHandler,\n} from './Dialog';\n\nexport { DialogTrigger, useDialogTrigger_unstable, renderDialogTrigger_unstable } from './DialogTrigger';\nexport type {\n DialogTriggerProps,\n DialogTriggerChildProps,\n DialogTriggerState,\n DialogTriggerAction,\n} from './DialogTrigger';\n\nexport {\n DialogActions,\n dialogActionsClassNames,\n useDialogActions_unstable,\n useDialogActionsStyles_unstable,\n renderDialogActions_unstable,\n} from './DialogActions';\nexport type {\n DialogActionsProps,\n DialogActionsSlots,\n DialogActionsState,\n DialogActionsPosition,\n} from './DialogActions';\n\nexport {\n DialogBody,\n dialogBodyClassNames,\n useDialogBody_unstable,\n useDialogBodyStyles_unstable,\n renderDialogBody_unstable,\n} from './DialogBody';\nexport type { DialogBodyProps, DialogBodySlots, DialogBodyState } from './DialogBody';\n\nexport {\n DialogTitle,\n dialogTitleClassNames,\n useDialogTitle_unstable,\n useDialogTitleStyles_unstable,\n renderDialogTitle_unstable,\n} from './DialogTitle';\nexport type { DialogTitleProps, DialogTitleSlots, DialogTitleState } from './DialogTitle';\n\nexport {\n DialogSurface,\n dialogSurfaceClassNames,\n useDialogSurface_unstable,\n useDialogSurfaceStyles_unstable,\n useDialogSurfaceContextValues_unstable,\n renderDialogSurface_unstable,\n} from './DialogSurface';\nexport type {\n DialogSurfaceProps,\n DialogSurfaceSlots,\n DialogSurfaceState,\n DialogSurfaceElement,\n DialogSurfaceContextValues,\n} from './DialogSurface';\n\nexport {\n DialogContent,\n dialogContentClassNames,\n useDialogContent_unstable,\n useDialogContentStyles_unstable,\n renderDialogContent_unstable,\n} from './DialogContent';\nexport type { DialogContentProps, DialogContentSlots, DialogContentState } from './DialogContent';\n\nexport {\n useDialogContext_unstable,\n useDialogSurfaceContext_unstable,\n DialogProvider,\n DialogSurfaceProvider,\n} from './contexts/index';\n\nexport type { DialogContextValue, DialogSurfaceContextValue } from './contexts/index';\n\nexport {\n DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR,\n DIALOG_MEDIA_QUERY_SHORT_SCREEN,\n DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n} from './contexts/constants';\n"],"names":["Dialog","renderDialog_unstable","useDialog_unstable","useDialogContextValues_unstable","DialogTrigger","useDialogTrigger_unstable","renderDialogTrigger_unstable","DialogActions","dialogActionsClassNames","useDialogActions_unstable","useDialogActionsStyles_unstable","renderDialogActions_unstable","DialogBody","dialogBodyClassNames","useDialogBody_unstable","useDialogBodyStyles_unstable","renderDialogBody_unstable","DialogTitle","dialogTitleClassNames","useDialogTitle_unstable","useDialogTitleStyles_unstable","renderDialogTitle_unstable","DialogSurface","dialogSurfaceClassNames","useDialogSurface_unstable","useDialogSurfaceStyles_unstable","useDialogSurfaceContextValues_unstable","renderDialogSurface_unstable","DialogContent","dialogContentClassNames","useDialogContent_unstable","useDialogContentStyles_unstable","renderDialogContent_unstable","useDialogContext_unstable","useDialogSurfaceContext_unstable","DialogProvider","DialogSurfaceProvider","DIALOG_MEDIA_QUERY_BREAKPOINT_SELECTOR","DIALOG_MEDIA_QUERY_SHORT_SCREEN","DIALOG_FULLSCREEN_DIALOG_SCROLLBAR_OFFSET"],"mappings":";;;;;;;;;;;6CAyF2C;eAAzCuC;;IAFAF,sCAAsC;;;IACtCC;yDAA+B;;;eAxFxBtC,cAAM;;;eAqBbO,4BAAa;;;eAcbK,sBAAU;;IAkCVgB;2CAAa;;IAWbO,cAAc;;;IA3Bdb;2CAAa;;yBA4BQ;eAArBc;;;eArCAnB,wBAAW;;;eAhCJb,4BAAa;;IAUpBI,uBAAuB;;;;eAcvBK,gCAAoB;;;eAkCpBgB,sCAAuB;;;eAhBvBN,sCAAuB;;IATvBL,qBAAqB;;;;eApBrBP,2CAA4B;;IAc5BK,yBAAyB;;;;eAkCzBgB,2CAA4B;;;eAf5BL,2CAA4B;;8BAVF;eAA1BN;;gCApC6E;eAA5Bf;;;eAZlCL,6BAAqB;;IAwBpCS;6DAA+B;;6BADN;eAAzBD;;;eAeAM,wCAA4B;;;eAD5BD,kCAAsB;;;eAmCtBiB,8CAA+B;;;eAD/BD,wCAAyB;;;eAvEiC3B,uCAA+B;;IA8EzF8B,yBAAyB;;;;eArBzBP,qDAAsC;;;eAsBtCQ,uCAAgC;;;eAvBhCT,8CAA+B;;;eAD/BD,wCAAyB;;IARzBJ,6BAA6B;;;IAD7BD;mDAAuB;;;eAlCDd,wCAAyB;;;eAZTH,0BAAkB;;;wBAAyC,WAAW;+BAYvB,kBAAkB;+BAclG,kBAAkB;4BAclB,eAAe;6BASf,gBAAgB;+BAUhB,kBAAkB;+BAelB,kBAAkB;uBAQlB,mBAAmB;2BAQnB,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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
|
|
1
|
+
{"version":3,"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(\n open: boolean,\n modalType: DialogModalType,\n): React.RefObject<DialogSurfaceElement | null> {\n const { findFirstFocusable } = useFocusFinders();\n const { targetDocument } = useFluent_unstable();\n const dialogRef = React.useRef<DialogSurfaceElement | null>(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 === 'development') {\n // eslint-disable-next-line no-console\n console.warn(/** #__DE-INDENT__ */ `\n @fluentui/react-dialog [useFocusFirstElement]:\n 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 `);\n }\n }\n }, [findFirstFocusable, open, modalType, targetDocument]);\n\n return dialogRef;\n}\n"],"names":["React","useFocusFinders","useFluent_unstable","useFocusFirstElement","open","modalType","findFirstFocusable","targetDocument","dialogRef","useRef","useEffect","element","current","focus","process","env","NODE_ENV","console","warn"],"mappings":";;;;+BASgBG;;;;;;;iEATO,QAAQ;8BACC,0BAA0B;qCACvB,kCAAkC;AAO9D,8BACLC,IAAa,EACbC,SAA0B;IAE1B,MAAM,EAAEC,kBAAkB,EAAE,OAAGL,6BAAAA;IAC/B,MAAM,EAAEM,cAAc,EAAE,OAAGL,uCAAAA;IAC3B,MAAMM,YAAYR,OAAMS,MAAM,CAA8B;IAE5DT,OAAMU,SAAS,CAAC;QACd,IAAI,CAACN,MAAM;YACT;QACF;QACA,MAAMO,UAAUH,UAAUI,OAAO,IAAIN,mBAAmBE,UAAUI,OAAO;QACzE,IAAID,SAAS;YACXA,QAAQE,KAAK;QACf,OAAO;gBACLL;aAAAA,qBAAAA,UAAUI,OAAAA,AAAO,MAAA,QAAjBJ,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,mBAAmBK,KAAK,IAAI,qDAAqD;YACjF,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;gBAC1C,sCAAsC;gBACtCC,QAAQC,IAAI,CAAuB,CAAC;;oGAIpC,CAAC;YACH;QACF;IACF,GAAG;QAACZ;QAAoBF;QAAMC;QAAWE;KAAe;IAExD,OAAOC;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.15.1",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -24,26 +24,26 @@
|
|
|
24
24
|
"@fluentui/scripts-cypress": "*"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@fluentui/react-utilities": "^9.
|
|
28
|
-
"@fluentui/react-jsx-runtime": "^9.
|
|
27
|
+
"@fluentui/react-utilities": "^9.24.1",
|
|
28
|
+
"@fluentui/react-jsx-runtime": "^9.2.0",
|
|
29
29
|
"@fluentui/keyboard-keys": "^9.0.8",
|
|
30
|
-
"@fluentui/react-context-selector": "^9.2.
|
|
31
|
-
"@fluentui/react-motion": "^9.10.
|
|
32
|
-
"@fluentui/react-motion-components-preview": "^0.
|
|
33
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
34
|
-
"@fluentui/react-aria": "^9.
|
|
30
|
+
"@fluentui/react-context-selector": "^9.2.7",
|
|
31
|
+
"@fluentui/react-motion": "^9.10.4",
|
|
32
|
+
"@fluentui/react-motion-components-preview": "^0.10.0",
|
|
33
|
+
"@fluentui/react-shared-contexts": "^9.25.1",
|
|
34
|
+
"@fluentui/react-aria": "^9.17.0",
|
|
35
35
|
"@fluentui/react-icons": "^2.0.245",
|
|
36
|
-
"@fluentui/react-tabster": "^9.26.
|
|
36
|
+
"@fluentui/react-tabster": "^9.26.5",
|
|
37
37
|
"@fluentui/react-theme": "^9.2.0",
|
|
38
|
-
"@fluentui/react-portal": "^9.8.
|
|
38
|
+
"@fluentui/react-portal": "^9.8.2",
|
|
39
39
|
"@griffel/react": "^1.5.22",
|
|
40
40
|
"@swc/helpers": "^0.5.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@types/react": ">=16.14.0 <
|
|
44
|
-
"@types/react-dom": ">=16.9.0 <
|
|
45
|
-
"react": ">=16.14.0 <
|
|
46
|
-
"react-dom": ">=16.14.0 <
|
|
43
|
+
"@types/react": ">=16.14.0 <20.0.0",
|
|
44
|
+
"@types/react-dom": ">=16.9.0 <20.0.0",
|
|
45
|
+
"react": ">=16.14.0 <20.0.0",
|
|
46
|
+
"react-dom": ">=16.14.0 <20.0.0"
|
|
47
47
|
},
|
|
48
48
|
"beachball": {
|
|
49
49
|
"disallowedChangeTypes": [
|