@fluentui/react-dialog 9.5.25 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,103 @@
2
2
  "name": "@fluentui/react-dialog",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 23 Aug 2023 11:58:32 GMT",
5
+ "date": "Tue, 29 Aug 2023 12:53:33 GMT",
6
+ "tag": "@fluentui/react-dialog_v9.6.0",
7
+ "version": "9.6.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "bernardo.sunderhus@gmail.com",
12
+ "package": "@fluentui/react-dialog",
13
+ "commit": "3ef92a485889eee5010ed32b8fc1ec1d8127cc44",
14
+ "comment": "feat: adds mountNode to DialogSurface API"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-dialog",
19
+ "comment": "Bump @fluentui/react-utilities to v9.13.0",
20
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-dialog",
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.3",
26
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-dialog",
31
+ "comment": "Bump @fluentui/react-context-selector to v9.1.31",
32
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-dialog",
37
+ "comment": "Bump @fluentui/react-aria to v9.3.33",
38
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-dialog",
43
+ "comment": "Bump @fluentui/react-tabster to v9.12.5",
44
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-dialog",
49
+ "comment": "Bump @fluentui/react-portal to v9.3.10",
50
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Thu, 24 Aug 2023 10:26:35 GMT",
57
+ "tag": "@fluentui/react-dialog_v9.5.26",
58
+ "version": "9.5.26",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-dialog",
64
+ "comment": "Bump @fluentui/react-utilities to v9.12.0",
65
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-dialog",
70
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.2",
71
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-dialog",
76
+ "comment": "Bump @fluentui/react-context-selector to v9.1.30",
77
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-dialog",
82
+ "comment": "Bump @fluentui/react-aria to v9.3.32",
83
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-dialog",
88
+ "comment": "Bump @fluentui/react-tabster to v9.12.4",
89
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-dialog",
94
+ "comment": "Bump @fluentui/react-portal to v9.3.9",
95
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "date": "Wed, 23 Aug 2023 12:01:49 GMT",
6
102
  "tag": "@fluentui/react-dialog_v9.5.25",
7
103
  "version": "9.5.25",
8
104
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,41 @@
1
1
  # Change Log - @fluentui/react-dialog
2
2
 
3
- This log was last generated on Wed, 23 Aug 2023 11:58:32 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 29 Aug 2023 12:53:33 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.6.0)
8
+
9
+ Tue, 29 Aug 2023 12:53:33 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.26..@fluentui/react-dialog_v9.6.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: adds mountNode to DialogSurface API ([PR #29003](https://github.com/microsoft/fluentui/pull/29003) by bernardo.sunderhus@gmail.com)
15
+ - Bump @fluentui/react-utilities to v9.13.0 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.0.3 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
17
+ - Bump @fluentui/react-context-selector to v9.1.31 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
18
+ - Bump @fluentui/react-aria to v9.3.33 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.12.5 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
20
+ - Bump @fluentui/react-portal to v9.3.10 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
21
+
22
+ ## [9.5.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.26)
23
+
24
+ Thu, 24 Aug 2023 10:26:35 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.25..@fluentui/react-dialog_v9.5.26)
26
+
27
+ ### Patches
28
+
29
+ - Bump @fluentui/react-utilities to v9.12.0 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
30
+ - Bump @fluentui/react-jsx-runtime to v9.0.2 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
31
+ - Bump @fluentui/react-context-selector to v9.1.30 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
32
+ - Bump @fluentui/react-aria to v9.3.32 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
33
+ - Bump @fluentui/react-tabster to v9.12.4 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
34
+ - Bump @fluentui/react-portal to v9.3.9 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
35
+
7
36
  ## [9.5.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.25)
8
37
 
9
- Wed, 23 Aug 2023 11:58:32 GMT
38
+ Wed, 23 Aug 2023 12:01:49 GMT
10
39
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.24..@fluentui/react-dialog_v9.5.25)
11
40
 
12
41
  ### Patches
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import type { ComponentProps } from '@fluentui/react-utilities';
6
6
  import type { ComponentState } from '@fluentui/react-utilities';
7
7
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
8
8
  import { JSXElementConstructor } from 'react';
9
+ import type { PortalProps } from '@fluentui/react-portal';
9
10
  import * as React_2 from 'react';
10
11
  import { ReactElement } from 'react';
11
12
  import type { Slot } from '@fluentui/react-utilities';
@@ -231,7 +232,7 @@ export declare type DialogSurfaceElement = HTMLElement;
231
232
  /**
232
233
  * DialogSurface Props
233
234
  */
234
- export declare type DialogSurfaceProps = ComponentProps<DialogSurfaceSlots>;
235
+ export declare type DialogSurfaceProps = ComponentProps<DialogSurfaceSlots> & Pick<PortalProps, 'mountNode'>;
235
236
 
236
237
  export declare type DialogSurfaceSlots = {
237
238
  /**
@@ -248,7 +249,7 @@ export declare type DialogSurfaceSlots = {
248
249
  /**
249
250
  * State used in rendering DialogSurface
250
251
  */
251
- export declare type DialogSurfaceState = ComponentState<DialogSurfaceSlots>;
252
+ export declare type DialogSurfaceState = ComponentState<DialogSurfaceSlots> & Pick<PortalProps, 'mountNode'>;
252
253
 
253
254
  /**
254
255
  * The `DialogTitle` component expects to have a title/header
@@ -1 +1 @@
1
- {"version":3,"sources":["DialogSurface.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { DialogSurfaceContextValue } from '../../contexts';\n\nexport type DialogSurfaceSlots = {\n /**\n * Dimmed background of dialog.\n * The default backdrop is rendered as a `<div>` with styling.\n * This slot expects a `<div>` element which will replace the default backdrop.\n * The backdrop should have `aria-hidden=\"true\"`.\n *\n */\n backdrop?: Slot<'div'>;\n root: Slot<'div'>;\n};\n\n/**\n * Union between all possible semantic element that represent a DialogSurface\n */\nexport type DialogSurfaceElement = HTMLElement;\n\n/**\n * DialogSurface Props\n */\nexport type DialogSurfaceProps = ComponentProps<DialogSurfaceSlots>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots>;\n"],"names":[],"mappings":"AAAA,WAgCoE"}
1
+ {"version":3,"sources":["DialogSurface.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport { DialogSurfaceContextValue } from '../../contexts';\n\nexport type DialogSurfaceSlots = {\n /**\n * Dimmed background of dialog.\n * The default backdrop is rendered as a `<div>` with styling.\n * This slot expects a `<div>` element which will replace the default backdrop.\n * The backdrop should have `aria-hidden=\"true\"`.\n *\n */\n backdrop?: Slot<'div'>;\n root: Slot<'div'>;\n};\n\n/**\n * Union between all possible semantic element that represent a DialogSurface\n */\nexport type DialogSurfaceElement = HTMLElement;\n\n/**\n * DialogSurface Props\n */\nexport type DialogSurfaceProps = ComponentProps<DialogSurfaceSlots> & Pick<PortalProps, 'mountNode'>;\n\nexport type DialogSurfaceContextValues = {\n dialogSurface: DialogSurfaceContextValue;\n};\n\n/**\n * State used in rendering DialogSurface\n */\nexport type DialogSurfaceState = ComponentState<DialogSurfaceSlots> & Pick<PortalProps, 'mountNode'>;\n"],"names":[],"mappings":"AAAA,WAiCqG"}
@@ -6,7 +6,9 @@ import { Portal } from '@fluentui/react-portal';
6
6
  * Render the final JSX of DialogSurface
7
7
  */ export const renderDialogSurface_unstable = (state, contextValues)=>{
8
8
  assertSlots(state);
9
- return /*#__PURE__*/ createElement(Portal, null, state.backdrop && /*#__PURE__*/ createElement(state.backdrop, null), /*#__PURE__*/ createElement(DialogSurfaceProvider, {
9
+ return /*#__PURE__*/ createElement(Portal, {
10
+ mountNode: state.mountNode
11
+ }, state.backdrop && /*#__PURE__*/ createElement(state.backdrop, null), /*#__PURE__*/ createElement(DialogSurfaceProvider, {
10
12
  value: contextValues.dialogSurface
11
13
  }, /*#__PURE__*/ createElement(state.root, null)));
12
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n assertSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal>\n {state.backdrop && <state.backdrop />}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <state.root />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"],"names":["createElement","assertSlots","DialogSurfaceProvider","Portal","renderDialogSurface_unstable","state","contextValues","backdrop","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,MAAM,QAAQ,yBAAyB;AAEhD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,OAA2BC,gBAA8C;IACpHL,YAAgCI;IAEhC,qBACE,AAhBJ,cAgBKF,cACEE,MAAME,QAAQ,kBAAI,AAjBzB,cAiB0BF,MAAME,QAAQ,uBAClC,AAlBN,cAkBOL;QAAsBM,OAAOF,cAAcG,aAAa;qBACvD,AAnBR,cAmBSJ,MAAMK,IAAI;AAInB,EAAE"}
1
+ {"version":3,"sources":["renderDialogSurface.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DialogSurfaceState, DialogSurfaceSlots, DialogSurfaceContextValues } from './DialogSurface.types';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n\n/**\n * Render the final JSX of DialogSurface\n */\nexport const renderDialogSurface_unstable = (state: DialogSurfaceState, contextValues: DialogSurfaceContextValues) => {\n assertSlots<DialogSurfaceSlots>(state);\n\n return (\n <Portal mountNode={state.mountNode}>\n {state.backdrop && <state.backdrop />}\n <DialogSurfaceProvider value={contextValues.dialogSurface}>\n <state.root />\n </DialogSurfaceProvider>\n </Portal>\n );\n};\n"],"names":["createElement","assertSlots","DialogSurfaceProvider","Portal","renderDialogSurface_unstable","state","contextValues","mountNode","backdrop","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,MAAM,QAAQ,yBAAyB;AAEhD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,OAA2BC,gBAA8C;IACpHL,YAAgCI;IAEhC,qBACE,AAhBJ,cAgBKF;QAAOI,WAAWF,MAAME,SAAS;OAC/BF,MAAMG,QAAQ,kBAAI,AAjBzB,cAiB0BH,MAAMG,QAAQ,uBAClC,AAlBN,cAkBON;QAAsBO,OAAOH,cAAcI,aAAa;qBACvD,AAnBR,cAmBSL,MAAMM,IAAI;AAInB,EAAE"}
@@ -61,6 +61,7 @@ import { Escape } from '@fluentui/keyboard-keys';
61
61
  root: 'div'
62
62
  },
63
63
  backdrop,
64
+ mountNode: props.mountNode,
64
65
  root: slot.always(getNativeElementProps((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {
65
66
  tabIndex: -1,
66
67
  'aria-modal': modalType !== 'non-modal',
@@ -1 +1 @@
1
- {"version":3,"sources":["useDialogSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n slot,\n} from '@fluentui/react-utilities';\nimport type { DialogSurfaceElement, DialogSurfaceProps, DialogSurfaceState } from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { Escape } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n props.onKeyDown?.(event);\n\n if (event.key === Escape && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n const backdrop = slot.optional(props.backdrop, {\n renderByDefault: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n },\n elementType: 'div',\n });\n if (backdrop) {\n backdrop.onClick = handledBackdropClick;\n }\n return {\n components: { backdrop: 'div', root: 'div' },\n backdrop,\n root: slot.always(\n getNativeElementProps(props.as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getNativeElementProps","useEventCallback","useMergedRefs","isResolvedShorthand","slot","useDialogContext_unstable","Escape","useDialogSurface_unstable","props","ref","modalType","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","event","backdrop","onClick","isDefaultPrevented","type","handleKeyDown","onKeyDown","key","stopPropagation","optional","renderByDefault","defaultProps","elementType","components","root","always","as","tabIndex","role","undefined"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB,EACnBC,IAAI,QACC,4BAA4B;AAEnC,SAASC,yBAAyB,QAAQ,iBAAiB;AAC3D,SAASC,MAAM,QAAQ,0BAA0B;AAEjD;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,MAAMC,YAAYL,0BAA0BM,CAAAA,MAAOA,IAAID,SAAS;IAChE,MAAME,kBAAkBP,0BAA0BM,CAAAA,MAAOA,IAAIC,eAAe;IAC5E,MAAMC,YAAYR,0BAA0BM,CAAAA,MAAOA,IAAIE,SAAS;IAChE,MAAMC,OAAOT,0BAA0BM,CAAAA,MAAOA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBV,0BAA0BM,CAAAA,MAAOA,IAAII,iBAAiB;IAChF,MAAMC,gBAAgBX,0BAA0BM,CAAAA,MAAOA,IAAIM,aAAa;IAExE,MAAMC,uBAAuBjB,iBAAiB,CAACkB,QAA4C;QACzF,IAAIhB,oBAAoBK,MAAMY,QAAQ,GAAG;gBACvCZ,iBAAAA;YAAAA,CAAAA,0BAAAA,CAAAA,kBAAAA,MAAMY,QAAQ,EAACC,OAAO,cAAtBb,qCAAAA,KAAAA,IAAAA,wBAAAA,KAAAA,iBAAyBW;QAC3B,CAAC;QACD,IAAIT,cAAc,WAAW,CAACS,MAAMG,kBAAkB,IAAI;YACxDP,kBAAkB;gBAChBI;gBACAL,MAAM,KAAK;gBACXS,MAAM;YACR;QACF,CAAC;IACH;IAEA,MAAMC,gBAAgBvB,iBAAiB,CAACkB,QAA+C;YACrFX;QAAAA,CAAAA,mBAAAA,MAAMiB,SAAS,cAAfjB,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkBW;QAElB,IAAIA,MAAMO,GAAG,KAAKpB,UAAU,CAACa,MAAMG,kBAAkB,IAAI;YACvDP,kBAAkB;gBAChBI;gBACAL,MAAM,KAAK;gBACXS,MAAM;YACR;YACA,qFAAqF;YACrF,gDAAgD;YAChDJ,MAAMQ,eAAe;QACvB,CAAC;IACH;IAEA,MAAMP,WAAWhB,KAAKwB,QAAQ,CAACpB,MAAMY,QAAQ,EAAE;QAC7CS,iBAAiBf,QAAQJ,cAAc;QACvCoB,cAAc;YACZ,eAAe;QACjB;QACAC,aAAa;IACf;IACA,IAAIX,UAAU;QACZA,SAASC,OAAO,GAAGH;IACrB,CAAC;QAKyBV;IAJ1B,OAAO;QACLwB,YAAY;YAAEZ,UAAU;YAAOa,MAAM;QAAM;QAC3Cb;QACAa,MAAM7B,KAAK8B,MAAM,CACflC,sBAAsBQ,CAAAA,YAAAA,MAAM2B,EAAE,cAAR3B,uBAAAA,YAAY,KAAK,EAAE;YACvC4B,UAAU,CAAC;YACX,cAAc1B,cAAc;YAC5B2B,MAAM3B,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBF,KAAK,CAAC,aAAa,GAAG8B,YAAYtB,aAAa;YAClE,GAAGR,KAAK;YACR,GAAGI,eAAe;YAClBa,WAAWD;YACXf,KAAKP,cAAcO,KAAKI;QAC1B,IACA;YAAEkB,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["useDialogSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getNativeElementProps,\n useEventCallback,\n useMergedRefs,\n isResolvedShorthand,\n slot,\n} from '@fluentui/react-utilities';\nimport type { DialogSurfaceElement, DialogSurfaceProps, DialogSurfaceState } from './DialogSurface.types';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { Escape } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */\nexport const useDialogSurface_unstable = (\n props: DialogSurfaceProps,\n ref: React.Ref<DialogSurfaceElement>,\n): DialogSurfaceState => {\n const modalType = useDialogContext_unstable(ctx => ctx.modalType);\n const modalAttributes = useDialogContext_unstable(ctx => ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable(ctx => ctx.dialogRef);\n const open = useDialogContext_unstable(ctx => ctx.open);\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable(ctx => ctx.dialogTitleId);\n\n const handledBackdropClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (isResolvedShorthand(props.backdrop)) {\n props.backdrop.onClick?.(event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick',\n });\n }\n });\n\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent<HTMLDivElement>) => {\n props.onKeyDown?.(event);\n\n if (event.key === Escape && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown',\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n\n const backdrop = slot.optional(props.backdrop, {\n renderByDefault: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true',\n },\n elementType: 'div',\n });\n if (backdrop) {\n backdrop.onClick = handledBackdropClick;\n }\n return {\n components: { backdrop: 'div', root: 'div' },\n backdrop,\n mountNode: props.mountNode,\n root: slot.always(\n getNativeElementProps(props.as ?? 'div', {\n tabIndex: -1, // https://github.com/microsoft/fluentui/issues/25150\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef),\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getNativeElementProps","useEventCallback","useMergedRefs","isResolvedShorthand","slot","useDialogContext_unstable","Escape","useDialogSurface_unstable","props","ref","modalType","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","event","backdrop","onClick","isDefaultPrevented","type","handleKeyDown","onKeyDown","key","stopPropagation","optional","renderByDefault","defaultProps","elementType","components","root","mountNode","always","as","tabIndex","role","undefined"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB,EACnBC,IAAI,QACC,4BAA4B;AAEnC,SAASC,yBAAyB,QAAQ,iBAAiB;AAC3D,SAASC,MAAM,QAAQ,0BAA0B;AAEjD;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,MAAMC,YAAYL,0BAA0BM,CAAAA,MAAOA,IAAID,SAAS;IAChE,MAAME,kBAAkBP,0BAA0BM,CAAAA,MAAOA,IAAIC,eAAe;IAC5E,MAAMC,YAAYR,0BAA0BM,CAAAA,MAAOA,IAAIE,SAAS;IAChE,MAAMC,OAAOT,0BAA0BM,CAAAA,MAAOA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBV,0BAA0BM,CAAAA,MAAOA,IAAII,iBAAiB;IAChF,MAAMC,gBAAgBX,0BAA0BM,CAAAA,MAAOA,IAAIM,aAAa;IAExE,MAAMC,uBAAuBjB,iBAAiB,CAACkB,QAA4C;QACzF,IAAIhB,oBAAoBK,MAAMY,QAAQ,GAAG;gBACvCZ,iBAAAA;YAAAA,CAAAA,0BAAAA,CAAAA,kBAAAA,MAAMY,QAAQ,EAACC,OAAO,cAAtBb,qCAAAA,KAAAA,IAAAA,wBAAAA,KAAAA,iBAAyBW;QAC3B,CAAC;QACD,IAAIT,cAAc,WAAW,CAACS,MAAMG,kBAAkB,IAAI;YACxDP,kBAAkB;gBAChBI;gBACAL,MAAM,KAAK;gBACXS,MAAM;YACR;QACF,CAAC;IACH;IAEA,MAAMC,gBAAgBvB,iBAAiB,CAACkB,QAA+C;YACrFX;QAAAA,CAAAA,mBAAAA,MAAMiB,SAAS,cAAfjB,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkBW;QAElB,IAAIA,MAAMO,GAAG,KAAKpB,UAAU,CAACa,MAAMG,kBAAkB,IAAI;YACvDP,kBAAkB;gBAChBI;gBACAL,MAAM,KAAK;gBACXS,MAAM;YACR;YACA,qFAAqF;YACrF,gDAAgD;YAChDJ,MAAMQ,eAAe;QACvB,CAAC;IACH;IAEA,MAAMP,WAAWhB,KAAKwB,QAAQ,CAACpB,MAAMY,QAAQ,EAAE;QAC7CS,iBAAiBf,QAAQJ,cAAc;QACvCoB,cAAc;YACZ,eAAe;QACjB;QACAC,aAAa;IACf;IACA,IAAIX,UAAU;QACZA,SAASC,OAAO,GAAGH;IACrB,CAAC;QAMyBV;IAL1B,OAAO;QACLwB,YAAY;YAAEZ,UAAU;YAAOa,MAAM;QAAM;QAC3Cb;QACAc,WAAW1B,MAAM0B,SAAS;QAC1BD,MAAM7B,KAAK+B,MAAM,CACfnC,sBAAsBQ,CAAAA,YAAAA,MAAM4B,EAAE,cAAR5B,uBAAAA,YAAY,KAAK,EAAE;YACvC6B,UAAU,CAAC;YACX,cAAc3B,cAAc;YAC5B4B,MAAM5B,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBF,KAAK,CAAC,aAAa,GAAG+B,YAAYvB,aAAa;YAClE,GAAGR,KAAK;YACR,GAAGI,eAAe;YAClBa,WAAWD;YACXf,KAAKP,cAAcO,KAAKI;QAC1B,IACA;YAAEkB,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -12,7 +12,9 @@ const _contexts = require("../../contexts");
12
12
  const _reactPortal = require("@fluentui/react-portal");
13
13
  const renderDialogSurface_unstable = (state, contextValues)=>{
14
14
  (0, _reactUtilities.assertSlots)(state);
15
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactPortal.Portal, null, state.backdrop && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.backdrop, null), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogSurfaceProvider, {
15
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactPortal.Portal, {
16
+ mountNode: state.mountNode
17
+ }, state.backdrop && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.backdrop, null), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_contexts.DialogSurfaceProvider, {
16
18
  value: contextValues.dialogSurface
17
19
  }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null)));
18
20
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDialogSurface.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of DialogSurface\n */ export const renderDialogSurface_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(Portal, null, state.backdrop && /*#__PURE__*/ createElement(state.backdrop, null), /*#__PURE__*/ createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, /*#__PURE__*/ createElement(state.root, null)));\n};\n"],"names":["renderDialogSurface_unstable","state","contextValues","assertSlots","createElement","Portal","backdrop","DialogSurfaceProvider","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAMjCA;;aAAAA;;iCANkE;gCACvD;0BACU;6BACf;AAGZ,MAAMA,+BAA+B,CAACC,OAAOC,gBAAgB;IACpEC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACC,mBAAM,EAAE,IAAI,EAAEJ,MAAMK,QAAQ,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACH,MAAMK,QAAQ,EAAE,IAAI,GAAG,WAAW,GAAGF,IAAAA,8BAAa,EAACG,+BAAqB,EAAE;QACrKC,OAAON,cAAcO,aAAa;IACtC,GAAG,WAAW,GAAGL,IAAAA,8BAAa,EAACH,MAAMS,IAAI,EAAE,IAAI;AACnD"}
1
+ {"version":3,"sources":["renderDialogSurface.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { DialogSurfaceProvider } from '../../contexts';\nimport { Portal } from '@fluentui/react-portal';\n/**\n * Render the final JSX of DialogSurface\n */ export const renderDialogSurface_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(Portal, {\n mountNode: state.mountNode\n }, state.backdrop && /*#__PURE__*/ createElement(state.backdrop, null), /*#__PURE__*/ createElement(DialogSurfaceProvider, {\n value: contextValues.dialogSurface\n }, /*#__PURE__*/ createElement(state.root, null)));\n};\n"],"names":["renderDialogSurface_unstable","state","contextValues","assertSlots","createElement","Portal","mountNode","backdrop","DialogSurfaceProvider","value","dialogSurface","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAMjCA;;aAAAA;;iCANkE;gCACvD;0BACU;6BACf;AAGZ,MAAMA,+BAA+B,CAACC,OAAOC,gBAAgB;IACpEC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACC,mBAAM,EAAE;QACvCC,WAAWL,MAAMK,SAAS;IAC9B,GAAGL,MAAMM,QAAQ,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMM,QAAQ,EAAE,IAAI,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACI,+BAAqB,EAAE;QACvHC,OAAOP,cAAcQ,aAAa;IACtC,GAAG,WAAW,GAAGN,IAAAA,8BAAa,EAACH,MAAMU,IAAI,EAAE,IAAI;AACnD"}
@@ -62,6 +62,7 @@ const useDialogSurface_unstable = (props, ref)=>{
62
62
  root: 'div'
63
63
  },
64
64
  backdrop,
65
+ mountNode: props.mountNode,
65
66
  root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {
66
67
  tabIndex: -1,
67
68
  'aria-modal': modalType !== 'non-modal',
@@ -1 +1 @@
1
- {"version":3,"sources":["useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useEventCallback, useMergedRefs, isResolvedShorthand, slot } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { Escape } from '@fluentui/keyboard-keys';\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */ export const useDialogSurface_unstable = (props, ref)=>{\n const modalType = useDialogContext_unstable((ctx)=>ctx.modalType);\n const modalAttributes = useDialogContext_unstable((ctx)=>ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable((ctx)=>ctx.dialogRef);\n const open = useDialogContext_unstable((ctx)=>ctx.open);\n const requestOpenChange = useDialogContext_unstable((ctx)=>ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable((ctx)=>ctx.dialogTitleId);\n const handledBackdropClick = useEventCallback((event)=>{\n if (isResolvedShorthand(props.backdrop)) {\n var _props_backdrop, _props_backdrop_onClick;\n (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick'\n });\n }\n });\n const handleKeyDown = useEventCallback((event)=>{\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\n if (event.key === Escape && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown'\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n const backdrop = slot.optional(props.backdrop, {\n renderByDefault: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true'\n },\n elementType: 'div'\n });\n if (backdrop) {\n backdrop.onClick = handledBackdropClick;\n }\n var _props_as;\n return {\n components: {\n backdrop: 'div',\n root: 'div'\n },\n backdrop,\n root: slot.always(getNativeElementProps((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {\n tabIndex: -1,\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef)\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useDialogSurface_unstable","props","ref","modalType","useDialogContext_unstable","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","backdrop","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","key","Escape","stopPropagation","slot","optional","renderByDefault","defaultProps","elementType","_props_as","components","root","always","getNativeElementProps","as","tabIndex","role","undefined","useMergedRefs"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;gCAC2E;0BACxD;8BACnB;AASZ,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,MAAMC,YAAYC,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIF,SAAS;IAChE,MAAMG,kBAAkBF,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIC,eAAe;IAC5E,MAAMC,YAAYH,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIE,SAAS;IAChE,MAAMC,OAAOJ,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBL,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAII,iBAAiB;IAChF,MAAMC,gBAAgBN,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIM,aAAa;IACxE,MAAMC,uBAAuBC,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QACnD,IAAIC,IAAAA,mCAAmB,EAACd,MAAMe,QAAQ,GAAG;YACrC,IAAIC,iBAAiBC;YACpBA,CAAAA,0BAA0B,AAACD,CAAAA,kBAAkBhB,MAAMe,QAAQ,AAAD,EAAGG,OAAO,AAAD,MAAO,IAAI,IAAID,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBE,IAAI,CAACH,iBAAiBH,MAAM;QACzL,CAAC;QACD,IAAIX,cAAc,WAAW,CAACW,MAAMO,kBAAkB,IAAI;YACtDZ,kBAAkB;gBACdK;gBACAN,MAAM,KAAK;gBACXc,MAAM;YACV;QACJ,CAAC;IACL;IACA,MAAMC,gBAAgBV,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QAC5C,IAAIU;QACHA,CAAAA,mBAAmBvB,MAAMwB,SAAS,AAAD,MAAO,IAAI,IAAID,qBAAqB,KAAK,IAAI,KAAK,IAAIA,iBAAiBJ,IAAI,CAACnB,OAAOa,MAAM;QAC3H,IAAIA,MAAMY,GAAG,KAAKC,oBAAM,IAAI,CAACb,MAAMO,kBAAkB,IAAI;YACrDZ,kBAAkB;gBACdK;gBACAN,MAAM,KAAK;gBACXc,MAAM;YACV;YACA,qFAAqF;YACrF,gDAAgD;YAChDR,MAAMc,eAAe;QACzB,CAAC;IACL;IACA,MAAMZ,WAAWa,oBAAI,CAACC,QAAQ,CAAC7B,MAAMe,QAAQ,EAAE;QAC3Ce,iBAAiBvB,QAAQL,cAAc;QACvC6B,cAAc;YACV,eAAe;QACnB;QACAC,aAAa;IACjB;IACA,IAAIjB,UAAU;QACVA,SAASG,OAAO,GAAGP;IACvB,CAAC;IACD,IAAIsB;IACJ,OAAO;QACHC,YAAY;YACRnB,UAAU;YACVoB,MAAM;QACV;QACApB;QACAoB,MAAMP,oBAAI,CAACQ,MAAM,CAACC,IAAAA,qCAAqB,EAAC,AAACJ,CAAAA,YAAYjC,MAAMsC,EAAE,AAAD,MAAO,IAAI,IAAIL,cAAc,KAAK,IAAIA,YAAY,KAAK,EAAE;YACjHM,UAAU,CAAC;YACX,cAAcrC,cAAc;YAC5BsC,MAAMtC,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBF,KAAK,CAAC,aAAa,GAAGyC,YAAYhC,aAAa;YAClE,GAAGT,KAAK;YACR,GAAGK,eAAe;YAClBmB,WAAWF;YACXrB,KAAKyC,IAAAA,6BAAa,EAACzC,KAAKK;QAC5B,IAAI;YACA0B,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useDialogSurface.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useEventCallback, useMergedRefs, isResolvedShorthand, slot } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable } from '../../contexts';\nimport { Escape } from '@fluentui/keyboard-keys';\n/**\n * Create the state required to render DialogSurface.\n *\n * The returned state can be modified with hooks such as useDialogSurfaceStyles_unstable,\n * before being passed to renderDialogSurface_unstable.\n *\n * @param props - props from this instance of DialogSurface\n * @param ref - reference to root HTMLElement of DialogSurface\n */ export const useDialogSurface_unstable = (props, ref)=>{\n const modalType = useDialogContext_unstable((ctx)=>ctx.modalType);\n const modalAttributes = useDialogContext_unstable((ctx)=>ctx.modalAttributes);\n const dialogRef = useDialogContext_unstable((ctx)=>ctx.dialogRef);\n const open = useDialogContext_unstable((ctx)=>ctx.open);\n const requestOpenChange = useDialogContext_unstable((ctx)=>ctx.requestOpenChange);\n const dialogTitleID = useDialogContext_unstable((ctx)=>ctx.dialogTitleId);\n const handledBackdropClick = useEventCallback((event)=>{\n if (isResolvedShorthand(props.backdrop)) {\n var _props_backdrop, _props_backdrop_onClick;\n (_props_backdrop_onClick = (_props_backdrop = props.backdrop).onClick) === null || _props_backdrop_onClick === void 0 ? void 0 : _props_backdrop_onClick.call(_props_backdrop, event);\n }\n if (modalType === 'modal' && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'backdropClick'\n });\n }\n });\n const handleKeyDown = useEventCallback((event)=>{\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\n if (event.key === Escape && !event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n open: false,\n type: 'escapeKeyDown'\n });\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: nested Dialog, Popover, Menu and Tooltip\n event.stopPropagation();\n }\n });\n const backdrop = slot.optional(props.backdrop, {\n renderByDefault: open && modalType !== 'non-modal',\n defaultProps: {\n 'aria-hidden': 'true'\n },\n elementType: 'div'\n });\n if (backdrop) {\n backdrop.onClick = handledBackdropClick;\n }\n var _props_as;\n return {\n components: {\n backdrop: 'div',\n root: 'div'\n },\n backdrop,\n mountNode: props.mountNode,\n root: slot.always(getNativeElementProps((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : 'div', {\n tabIndex: -1,\n 'aria-modal': modalType !== 'non-modal',\n role: modalType === 'alert' ? 'alertdialog' : 'dialog',\n 'aria-labelledby': props['aria-label'] ? undefined : dialogTitleID,\n ...props,\n ...modalAttributes,\n onKeyDown: handleKeyDown,\n ref: useMergedRefs(ref, dialogRef)\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useDialogSurface_unstable","props","ref","modalType","useDialogContext_unstable","ctx","modalAttributes","dialogRef","open","requestOpenChange","dialogTitleID","dialogTitleId","handledBackdropClick","useEventCallback","event","isResolvedShorthand","backdrop","_props_backdrop","_props_backdrop_onClick","onClick","call","isDefaultPrevented","type","handleKeyDown","_props_onKeyDown","onKeyDown","key","Escape","stopPropagation","slot","optional","renderByDefault","defaultProps","elementType","_props_as","components","root","mountNode","always","getNativeElementProps","as","tabIndex","role","undefined","useMergedRefs"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;gCAC2E;0BACxD;8BACnB;AASZ,MAAMA,4BAA4B,CAACC,OAAOC,MAAM;IACvD,MAAMC,YAAYC,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIF,SAAS;IAChE,MAAMG,kBAAkBF,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIC,eAAe;IAC5E,MAAMC,YAAYH,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIE,SAAS;IAChE,MAAMC,OAAOJ,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIG,IAAI;IACtD,MAAMC,oBAAoBL,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAII,iBAAiB;IAChF,MAAMC,gBAAgBN,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIM,aAAa;IACxE,MAAMC,uBAAuBC,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QACnD,IAAIC,IAAAA,mCAAmB,EAACd,MAAMe,QAAQ,GAAG;YACrC,IAAIC,iBAAiBC;YACpBA,CAAAA,0BAA0B,AAACD,CAAAA,kBAAkBhB,MAAMe,QAAQ,AAAD,EAAGG,OAAO,AAAD,MAAO,IAAI,IAAID,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBE,IAAI,CAACH,iBAAiBH,MAAM;QACzL,CAAC;QACD,IAAIX,cAAc,WAAW,CAACW,MAAMO,kBAAkB,IAAI;YACtDZ,kBAAkB;gBACdK;gBACAN,MAAM,KAAK;gBACXc,MAAM;YACV;QACJ,CAAC;IACL;IACA,MAAMC,gBAAgBV,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QAC5C,IAAIU;QACHA,CAAAA,mBAAmBvB,MAAMwB,SAAS,AAAD,MAAO,IAAI,IAAID,qBAAqB,KAAK,IAAI,KAAK,IAAIA,iBAAiBJ,IAAI,CAACnB,OAAOa,MAAM;QAC3H,IAAIA,MAAMY,GAAG,KAAKC,oBAAM,IAAI,CAACb,MAAMO,kBAAkB,IAAI;YACrDZ,kBAAkB;gBACdK;gBACAN,MAAM,KAAK;gBACXc,MAAM;YACV;YACA,qFAAqF;YACrF,gDAAgD;YAChDR,MAAMc,eAAe;QACzB,CAAC;IACL;IACA,MAAMZ,WAAWa,oBAAI,CAACC,QAAQ,CAAC7B,MAAMe,QAAQ,EAAE;QAC3Ce,iBAAiBvB,QAAQL,cAAc;QACvC6B,cAAc;YACV,eAAe;QACnB;QACAC,aAAa;IACjB;IACA,IAAIjB,UAAU;QACVA,SAASG,OAAO,GAAGP;IACvB,CAAC;IACD,IAAIsB;IACJ,OAAO;QACHC,YAAY;YACRnB,UAAU;YACVoB,MAAM;QACV;QACApB;QACAqB,WAAWpC,MAAMoC,SAAS;QAC1BD,MAAMP,oBAAI,CAACS,MAAM,CAACC,IAAAA,qCAAqB,EAAC,AAACL,CAAAA,YAAYjC,MAAMuC,EAAE,AAAD,MAAO,IAAI,IAAIN,cAAc,KAAK,IAAIA,YAAY,KAAK,EAAE;YACjHO,UAAU,CAAC;YACX,cAActC,cAAc;YAC5BuC,MAAMvC,cAAc,UAAU,gBAAgB,QAAQ;YACtD,mBAAmBF,KAAK,CAAC,aAAa,GAAG0C,YAAYjC,aAAa;YAClE,GAAGT,KAAK;YACR,GAAGK,eAAe;YAClBmB,WAAWF;YACXrB,KAAK0C,IAAAA,6BAAa,EAAC1C,KAAKK;QAC5B,IAAI;YACA0B,aAAa;QACjB;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-dialog",
3
- "version": "9.5.25",
3
+ "version": "9.6.0",
4
4
  "description": "Dialog component for Fluent UI React",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -36,16 +36,16 @@
36
36
  "@fluentui/scripts-tasks": "*"
37
37
  },
38
38
  "dependencies": {
39
- "@fluentui/react-utilities": "^9.11.2",
40
- "@fluentui/react-jsx-runtime": "^9.0.1",
39
+ "@fluentui/react-utilities": "^9.13.0",
40
+ "@fluentui/react-jsx-runtime": "^9.0.3",
41
41
  "@fluentui/keyboard-keys": "^9.0.3",
42
- "@fluentui/react-context-selector": "^9.1.29",
42
+ "@fluentui/react-context-selector": "^9.1.31",
43
43
  "@fluentui/react-shared-contexts": "^9.7.2",
44
- "@fluentui/react-aria": "^9.3.31",
44
+ "@fluentui/react-aria": "^9.3.33",
45
45
  "@fluentui/react-icons": "^2.0.207",
46
- "@fluentui/react-tabster": "^9.12.3",
46
+ "@fluentui/react-tabster": "^9.12.5",
47
47
  "@fluentui/react-theme": "^9.1.11",
48
- "@fluentui/react-portal": "^9.3.8",
48
+ "@fluentui/react-portal": "^9.3.10",
49
49
  "@griffel/react": "^1.5.14",
50
50
  "@swc/helpers": "^0.4.14"
51
51
  },