@fluentui/react-dialog 9.5.17 → 9.5.18
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 +34 -1
- package/CHANGELOG.md +14 -2
- package/lib/components/DialogTrigger/useDialogTrigger.js +2 -1
- package/lib/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js +2 -1
- package/lib-commonjs/components/DialogTrigger/useDialogTrigger.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,40 @@
|
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 25 Jul 2023 13:26:21 GMT",
|
|
6
|
+
"tag": "@fluentui/react-dialog_v9.5.18",
|
|
7
|
+
"version": "9.5.18",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "ololubek@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-dialog",
|
|
13
|
+
"commit": "1082207b08959996cd736725735cadc01d0849b0",
|
|
14
|
+
"comment": "chore: Update react-icons version to pick up fowardref change."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "lingfan.gao@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-dialog",
|
|
19
|
+
"commit": "c0c62f9383781f0dbebd800eaa2c64ef761075a2",
|
|
20
|
+
"comment": "fix: Focus should restore to a DialogTrigger outside of a Dialog"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-dialog",
|
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v9.11.0",
|
|
26
|
+
"commit": "c0c62f9383781f0dbebd800eaa2c64ef761075a2"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-dialog",
|
|
31
|
+
"comment": "Bump @fluentui/react-portal to v9.3.3",
|
|
32
|
+
"commit": "c0c62f9383781f0dbebd800eaa2c64ef761075a2"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"date": "Thu, 20 Jul 2023 18:27:28 GMT",
|
|
6
39
|
"tag": "@fluentui/react-dialog_v9.5.17",
|
|
7
40
|
"version": "9.5.17",
|
|
8
41
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-dialog
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 25 Jul 2023 13:26:21 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.5.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.18)
|
|
8
|
+
|
|
9
|
+
Tue, 25 Jul 2023 13:26:21 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.17..@fluentui/react-dialog_v9.5.18)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: Update react-icons version to pick up fowardref change. ([PR #28590](https://github.com/microsoft/fluentui/pull/28590) by ololubek@microsoft.com)
|
|
15
|
+
- fix: Focus should restore to a DialogTrigger outside of a Dialog ([PR #28530](https://github.com/microsoft/fluentui/pull/28530) by lingfan.gao@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-tabster to v9.11.0 ([PR #28530](https://github.com/microsoft/fluentui/pull/28530) by beachball)
|
|
17
|
+
- Bump @fluentui/react-portal to v9.3.3 ([PR #28530](https://github.com/microsoft/fluentui/pull/28530) by beachball)
|
|
18
|
+
|
|
7
19
|
## [9.5.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.5.17)
|
|
8
20
|
|
|
9
|
-
Thu, 20 Jul 2023 18:
|
|
21
|
+
Thu, 20 Jul 2023 18:27:28 GMT
|
|
10
22
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.5.16..@fluentui/react-dialog_v9.5.17)
|
|
11
23
|
|
|
12
24
|
### Patches
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';
|
|
3
3
|
import { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';
|
|
4
4
|
import { useARIAButtonProps } from '@fluentui/react-aria';
|
|
5
|
+
import { useModalAttributes } from '@fluentui/react-tabster';
|
|
5
6
|
/**
|
|
6
7
|
* Create the state required to render DialogTrigger.
|
|
7
8
|
* Clones the only child component and adds necessary event handling behaviours to open a popup Dialog
|
|
@@ -12,7 +13,7 @@ import { useARIAButtonProps } from '@fluentui/react-aria';
|
|
|
12
13
|
const { children , disableButtonEnhancement =false , action =isInsideSurfaceDialog ? 'close' : 'open' } = props;
|
|
13
14
|
const child = getTriggerChild(children);
|
|
14
15
|
const requestOpenChange = useDialogContext_unstable((ctx)=>ctx.requestOpenChange);
|
|
15
|
-
const triggerAttributes =
|
|
16
|
+
const { triggerAttributes } = useModalAttributes();
|
|
16
17
|
const handleClick = useEventCallback((event)=>{
|
|
17
18
|
var _child_props, _child_props_onClick;
|
|
18
19
|
(_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDialogTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport type { DialogTriggerProps, DialogTriggerState } from './DialogTrigger.types';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */\nexport const useDialogTrigger_unstable = (props: DialogTriggerProps): DialogTriggerState => {\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n\n const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;\n\n const child = getTriggerChild(children);\n\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const triggerAttributes =
|
|
1
|
+
{"version":3,"sources":["useDialogTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport type { DialogTriggerProps, DialogTriggerState } from './DialogTrigger.types';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */\nexport const useDialogTrigger_unstable = (props: DialogTriggerProps): DialogTriggerState => {\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n\n const { children, disableButtonEnhancement = false, action = isInsideSurfaceDialog ? 'close' : 'open' } = props;\n\n const child = getTriggerChild(children);\n\n const requestOpenChange = useDialogContext_unstable(ctx => ctx.requestOpenChange);\n const { triggerAttributes } = useModalAttributes();\n\n const handleClick = useEventCallback(\n (event: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open',\n });\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: child?.ref,\n onClick: handleClick,\n ...triggerAttributes,\n } as const;\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"names":["React","applyTriggerPropsToChildren","getTriggerChild","useEventCallback","useDialogContext_unstable","useDialogSurfaceContext_unstable","useARIAButtonProps","useModalAttributes","useDialogTrigger_unstable","props","isInsideSurfaceDialog","children","disableButtonEnhancement","action","child","requestOpenChange","ctx","triggerAttributes","handleClick","event","onClick","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,4BAA4B;AAE3G,SAASC,yBAAyB,EAAEC,gCAAgC,QAAQ,iBAAiB;AAC7F,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,kBAAkB,QAAQ,0BAA0B;AAE7D;;;;;CAKC,GACD,OAAO,MAAMC,4BAA4B,CAACC,QAAkD;IAC1F,MAAMC,wBAAwBL;IAE9B,MAAM,EAAEM,SAAQ,EAAEC,0BAA2B,KAAK,CAAA,EAAEC,QAASH,wBAAwB,UAAU,MAAM,CAAA,EAAE,GAAGD;IAE1G,MAAMK,QAAQZ,gBAAgBS;IAE9B,MAAMI,oBAAoBX,0BAA0BY,CAAAA,MAAOA,IAAID,iBAAiB;IAChF,MAAM,EAAEE,kBAAiB,EAAE,GAAGV;IAE9B,MAAMW,cAAcf,iBAClB,CAACgB,QAAoF;YACnFL,cAAAA;QAAAA,CAAAA,uBAAAA,CAAAA,eAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOL,KAAK,EAACW,OAAO,cAApBN,kCAAAA,KAAAA,IAAAA,qBAAAA,KAAAA,cAAuBK;QACvB,IAAI,CAACA,MAAME,kBAAkB,IAAI;YAC/BN,kBAAkB;gBAChBI;gBACAG,MAAM;gBACNC,MAAMV,WAAW;YACnB;QACF,CAAC;IACH;IAGF,MAAMW,oBAAoB;QACxB,GAAGV,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOL,KAAK;QACfgB,KAAKX,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOW,GAAG;QACfL,SAASF;QACT,GAAGD,iBAAiB;IACtB;IAEA,MAAMS,8BAA8BpB,mBAClCQ,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOQ,IAAI,AAAD,MAAM,YAAYR,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOQ,IAAI,AAAD,MAAM,MAAMR,MAAMQ,IAAI,GAAG,KAAK,EACpE;QACE,GAAGE,iBAAiB;QACpBF,MAAM;IACR;IAGF,OAAO;QACLX,UAAUV,4BACRU,UACAC,2BAA2BY,oBAAoBE,2BAA2B;IAE9E;AACF,EAAE"}
|
|
@@ -11,12 +11,13 @@ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
|
11
11
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
12
|
const _contexts = require("../../contexts");
|
|
13
13
|
const _reactAria = require("@fluentui/react-aria");
|
|
14
|
+
const _reactTabster = require("@fluentui/react-tabster");
|
|
14
15
|
const useDialogTrigger_unstable = (props)=>{
|
|
15
16
|
const isInsideSurfaceDialog = (0, _contexts.useDialogSurfaceContext_unstable)();
|
|
16
17
|
const { children , disableButtonEnhancement =false , action =isInsideSurfaceDialog ? 'close' : 'open' } = props;
|
|
17
18
|
const child = (0, _reactUtilities.getTriggerChild)(children);
|
|
18
19
|
const requestOpenChange = (0, _contexts.useDialogContext_unstable)((ctx)=>ctx.requestOpenChange);
|
|
19
|
-
const triggerAttributes = (0,
|
|
20
|
+
const { triggerAttributes } = (0, _reactTabster.useModalAttributes)();
|
|
20
21
|
const handleClick = (0, _reactUtilities.useEventCallback)((event)=>{
|
|
21
22
|
var _child_props, _child_props_onClick;
|
|
22
23
|
(_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useDialogTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */ export const useDialogTrigger_unstable = (props)=>{\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n const { children , disableButtonEnhancement =false , action =isInsideSurfaceDialog ? 'close' : 'open' } = props;\n const child = getTriggerChild(children);\n const requestOpenChange = useDialogContext_unstable((ctx)=>ctx.requestOpenChange);\n const triggerAttributes =
|
|
1
|
+
{"version":3,"sources":["useDialogTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useDialogContext_unstable, useDialogSurfaceContext_unstable } from '../../contexts';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n/**\n * Create the state required to render DialogTrigger.\n * Clones the only child component and adds necessary event handling behaviours to open a popup Dialog\n *\n * @param props - props from this instance of DialogTrigger\n */ export const useDialogTrigger_unstable = (props)=>{\n const isInsideSurfaceDialog = useDialogSurfaceContext_unstable();\n const { children , disableButtonEnhancement =false , action =isInsideSurfaceDialog ? 'close' : 'open' } = props;\n const child = getTriggerChild(children);\n const requestOpenChange = useDialogContext_unstable((ctx)=>ctx.requestOpenChange);\n const { triggerAttributes } = useModalAttributes();\n const handleClick = useEventCallback((event)=>{\n var _child_props, _child_props_onClick;\n (_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, event);\n if (!event.isDefaultPrevented()) {\n requestOpenChange({\n event,\n type: 'triggerClick',\n open: action === 'open'\n });\n }\n });\n const triggerChildProps = {\n ...child === null || child === void 0 ? void 0 : child.props,\n ref: child === null || child === void 0 ? void 0 : child.ref,\n onClick: handleClick,\n ...triggerAttributes\n };\n const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {\n ...triggerChildProps,\n type: 'button'\n });\n return {\n children: applyTriggerPropsToChildren(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)\n };\n};\n"],"names":["useDialogTrigger_unstable","props","isInsideSurfaceDialog","useDialogSurfaceContext_unstable","children","disableButtonEnhancement","action","child","getTriggerChild","requestOpenChange","useDialogContext_unstable","ctx","triggerAttributes","useModalAttributes","handleClick","useEventCallback","event","_child_props","_child_props_onClick","onClick","call","isDefaultPrevented","type","open","triggerChildProps","ref","ariaButtonTriggerChildProps","useARIAButtonProps","applyTriggerPropsToChildren"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACwD;0BACH;2BACzC;8BACA;AAMxB,MAAMA,4BAA4B,CAACC,QAAQ;IAClD,MAAMC,wBAAwBC,IAAAA,0CAAgC;IAC9D,MAAM,EAAEC,SAAQ,EAAGC,0BAA0B,KAAK,CAAA,EAAGC,QAAQJ,wBAAwB,UAAU,MAAM,CAAA,EAAG,GAAGD;IAC3G,MAAMM,QAAQC,IAAAA,+BAAe,EAACJ;IAC9B,MAAMK,oBAAoBC,IAAAA,mCAAyB,EAAC,CAACC,MAAMA,IAAIF,iBAAiB;IAChF,MAAM,EAAEG,kBAAiB,EAAG,GAAGC,IAAAA,gCAAkB;IACjD,MAAMC,cAAcC,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QAC1C,IAAIC,cAAcC;QACjBA,CAAAA,uBAAuB,AAACD,CAAAA,eAAeV,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMN,KAAK,AAAD,EAAGkB,OAAO,AAAD,MAAO,IAAI,IAAID,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBE,IAAI,CAACH,cAAcD,MAAM;QACjN,IAAI,CAACA,MAAMK,kBAAkB,IAAI;YAC7BZ,kBAAkB;gBACdO;gBACAM,MAAM;gBACNC,MAAMjB,WAAW;YACrB;QACJ,CAAC;IACL;IACA,MAAMkB,oBAAoB;QACtB,GAAGjB,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMN,KAAK;QAC5DwB,KAAKlB,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMkB,GAAG;QAC5DN,SAASL;QACT,GAAGF,iBAAiB;IACxB;IACA,MAAMc,8BAA8BC,IAAAA,6BAAkB,EAAC,AAACpB,CAAAA,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMe,IAAI,AAAD,MAAO,YAAY,AAACf,CAAAA,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMe,IAAI,AAAD,MAAO,MAAMf,MAAMe,IAAI,GAAG,KAAK,EAAE;QACvN,GAAGE,iBAAiB;QACpBF,MAAM;IACV;IACA,OAAO;QACHlB,UAAUwB,IAAAA,2CAA2B,EAACxB,UAAUC,2BAA2BmB,oBAAoBE,2BAA2B;IAC9H;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-dialog",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.18",
|
|
4
4
|
"description": "Dialog component for Fluent UI React",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
43
43
|
"@fluentui/react-shared-contexts": "^9.6.0",
|
|
44
44
|
"@fluentui/react-aria": "^9.3.27",
|
|
45
|
-
"@fluentui/react-icons": "^2.0.
|
|
46
|
-
"@fluentui/react-tabster": "^9.
|
|
45
|
+
"@fluentui/react-icons": "^2.0.207",
|
|
46
|
+
"@fluentui/react-tabster": "^9.11.0",
|
|
47
47
|
"@fluentui/react-theme": "^9.1.9",
|
|
48
|
-
"@fluentui/react-portal": "^9.3.
|
|
48
|
+
"@fluentui/react-portal": "^9.3.3",
|
|
49
49
|
"@griffel/react": "^1.5.7",
|
|
50
50
|
"@swc/helpers": "^0.4.14"
|
|
51
51
|
},
|