@fluentui/react-portal 0.0.0-nightlyd3bf09bf8120211201.1 → 0.0.0-nightlyd45ba4664620220211.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +73 -22
- package/CHANGELOG.md +23 -11
- package/dist/react-portal.d.ts +4 -4
- package/lib/components/Portal/Portal.js +4 -4
- package/lib/components/Portal/Portal.js.map +1 -1
- package/lib/components/Portal/Portal.types.d.ts +2 -1
- package/lib/components/Portal/renderPortal.d.ts +1 -1
- package/lib/components/Portal/renderPortal.js +1 -1
- package/lib/components/Portal/renderPortal.js.map +1 -1
- package/lib/components/Portal/usePortal.d.ts +2 -2
- package/lib/components/Portal/usePortal.js +2 -2
- package/lib/components/Portal/usePortal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.js +2 -2
- package/lib-commonjs/components/Portal/Portal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.types.d.ts +2 -1
- package/lib-commonjs/components/Portal/renderPortal.d.ts +1 -1
- package/lib-commonjs/components/Portal/renderPortal.js +3 -3
- package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortal.d.ts +2 -2
- package/lib-commonjs/components/Portal/usePortal.js +4 -4
- package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
- package/package.json +7 -10
package/CHANGELOG.json
CHANGED
@@ -2,60 +2,111 @@
|
|
2
2
|
"name": "@fluentui/react-portal",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-portal_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Fri, 11 Feb 2022 04:15:28 GMT",
|
6
|
+
"tag": "@fluentui/react-portal_v0.0.0-nightlyd45ba4664620220211.1",
|
7
|
+
"version": "0.0.0-nightlyd45ba4664620220211.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-portal",
|
13
|
-
"commit": "
|
13
|
+
"commit": "7a8e7f5eaff83b67d7307566347303c32157ff60",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-portal",
|
19
|
-
"comment": "Bump @fluentui/react-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlyd45ba4664620220211.1",
|
20
|
+
"commit": "7a8e7f5eaff83b67d7307566347303c32157ff60"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-portal",
|
25
|
-
"comment": "Bump @fluentui/react-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightlyd45ba4664620220211.1",
|
26
|
+
"commit": "7a8e7f5eaff83b67d7307566347303c32157ff60"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-portal",
|
31
|
-
"comment": "Bump @fluentui/react-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyd45ba4664620220211.1",
|
32
|
+
"commit": "7a8e7f5eaff83b67d7307566347303c32157ff60"
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"date": "Thu, 10 Feb 2022 08:50:38 GMT",
|
39
|
+
"tag": "@fluentui/react-portal_v9.0.0-rc.1",
|
40
|
+
"version": "9.0.0-rc.1",
|
41
|
+
"comments": {
|
42
|
+
"none": [
|
43
|
+
{
|
44
|
+
"author": "olfedias@microsoft.com",
|
45
|
+
"package": "@fluentui/react-portal",
|
46
|
+
"commit": "f4883108ae74c089213780f09997115c0d547aef",
|
47
|
+
"comment": "update stories to not use CSS shorthands in styles"
|
33
48
|
},
|
34
49
|
{
|
35
|
-
"author": "
|
50
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
36
51
|
"package": "@fluentui/react-portal",
|
37
|
-
"
|
38
|
-
"
|
52
|
+
"commit": "60e153e786c586b867898109c07a51876d3bfd5a",
|
53
|
+
"comment": "Replacing use of functions in makeStyles with direct use of tokens"
|
39
54
|
},
|
40
55
|
{
|
41
|
-
"author": "
|
56
|
+
"author": "martinhochel@microsoft.com",
|
42
57
|
"package": "@fluentui/react-portal",
|
43
|
-
"
|
44
|
-
"
|
58
|
+
"commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
|
59
|
+
"comment": "chore: use storybook runner for all vNext packages"
|
45
60
|
},
|
46
61
|
{
|
47
|
-
"author": "
|
62
|
+
"author": "olfedias@microsoft.com",
|
48
63
|
"package": "@fluentui/react-portal",
|
49
|
-
"
|
50
|
-
"
|
64
|
+
"commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
|
65
|
+
"comment": "remove inline-style-expand-shorthand from tsconfigs"
|
51
66
|
}
|
52
67
|
],
|
53
|
-
"
|
68
|
+
"prerelease": [
|
69
|
+
{
|
70
|
+
"author": "behowell@microsoft.com",
|
71
|
+
"package": "@fluentui/react-portal",
|
72
|
+
"commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
|
73
|
+
"comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"author": "mgodbolt@microsoft.com",
|
77
|
+
"package": "@fluentui/react-portal",
|
78
|
+
"commit": "839ec14849e112b85aa321d034739ec421199141",
|
79
|
+
"comment": "remove export of commons types"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"author": "lingfangao@hotmail.com",
|
83
|
+
"package": "@fluentui/react-portal",
|
84
|
+
"commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
|
85
|
+
"comment": "Bump Fluent UI packages to 9.0.0-rc"
|
86
|
+
},
|
54
87
|
{
|
55
88
|
"author": "olfedias@microsoft.com",
|
56
89
|
"package": "@fluentui/react-portal",
|
57
|
-
"commit": "
|
58
|
-
"comment": "
|
90
|
+
"commit": "d525c8b2106551865d648873210a6b48c2326ecb",
|
91
|
+
"comment": "remove unused dependency on Griffel"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"author": "beachball",
|
95
|
+
"package": "@fluentui/react-portal",
|
96
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.1",
|
97
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"author": "beachball",
|
101
|
+
"package": "@fluentui/react-portal",
|
102
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.1",
|
103
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"author": "beachball",
|
107
|
+
"package": "@fluentui/react-portal",
|
108
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
|
109
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
59
110
|
}
|
60
111
|
]
|
61
112
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,23 +1,35 @@
|
|
1
1
|
# Change Log - @fluentui/react-portal
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 11 Feb 2022 04:15:28 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlyd45ba4664620220211.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v0.0.0-nightlyd45ba4664620220211.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-
|
9
|
+
Fri, 11 Feb 2022 04:15:28 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.1..@fluentui/react-portal_v0.0.0-nightlyd45ba4664620220211.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
15
|
-
- Bump @fluentui/react-
|
16
|
-
- Bump @fluentui/react-
|
17
|
-
- Bump @fluentui/react-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/7a8e7f5eaff83b67d7307566347303c32157ff60) by email not defined)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightlyd45ba4664620220211.1 ([commit](https://github.com/microsoft/fluentui/commit/7a8e7f5eaff83b67d7307566347303c32157ff60) by beachball)
|
16
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightlyd45ba4664620220211.1 ([commit](https://github.com/microsoft/fluentui/commit/7a8e7f5eaff83b67d7307566347303c32157ff60) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlyd45ba4664620220211.1 ([commit](https://github.com/microsoft/fluentui/commit/7a8e7f5eaff83b67d7307566347303c32157ff60) by beachball)
|
18
|
+
|
19
|
+
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.1)
|
20
|
+
|
21
|
+
Thu, 10 Feb 2022 08:50:38 GMT
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.5..@fluentui/react-portal_v9.0.0-rc.1)
|
23
|
+
|
24
|
+
### Changes
|
25
|
+
|
26
|
+
- BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
|
27
|
+
- remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
|
28
|
+
- Bump Fluent UI packages to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
|
29
|
+
- remove unused dependency on Griffel ([PR #21393](https://github.com/microsoft/fluentui/pull/21393) by olfedias@microsoft.com)
|
30
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
31
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
32
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
21
33
|
|
22
34
|
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.5)
|
23
35
|
|
package/dist/react-portal.d.ts
CHANGED
@@ -14,7 +14,7 @@ export declare function elementContains(parent: HTMLElement | null, child: HTMLE
|
|
14
14
|
*/
|
15
15
|
export declare const Portal: React_2.FC<PortalProps>;
|
16
16
|
|
17
|
-
|
17
|
+
declare type PortalCommons = {
|
18
18
|
/**
|
19
19
|
* React children
|
20
20
|
*/
|
@@ -40,7 +40,7 @@ export declare type PortalState = PortalCommons & {
|
|
40
40
|
/**
|
41
41
|
* Render the final JSX of Portal
|
42
42
|
*/
|
43
|
-
export declare const
|
43
|
+
export declare const renderPortal_unstable: (state: PortalState) => React_2.ReactElement;
|
44
44
|
|
45
45
|
/**
|
46
46
|
* Sets the virtual parent of an element.
|
@@ -53,10 +53,10 @@ export declare function setVirtualParent(child: HTMLElement, parent?: HTMLElemen
|
|
53
53
|
/**
|
54
54
|
* Create the state required to render Portal.
|
55
55
|
*
|
56
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
56
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
57
57
|
*
|
58
58
|
* @param props - props from this instance of Portal
|
59
59
|
*/
|
60
|
-
export declare const
|
60
|
+
export declare const usePortal_unstable: (props: PortalProps) => PortalState;
|
61
61
|
|
62
62
|
export { }
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { usePortal_unstable } from './usePortal';
|
2
|
+
import { renderPortal_unstable } from './renderPortal';
|
3
3
|
/**
|
4
4
|
* A portal provides a way to render children into a DOM node
|
5
5
|
* that exists outside the DOM hierarchy of the parent component.
|
6
6
|
*/
|
7
7
|
|
8
8
|
export const Portal = props => {
|
9
|
-
const state =
|
10
|
-
return
|
9
|
+
const state = usePortal_unstable(props);
|
10
|
+
return renderPortal_unstable(state);
|
11
11
|
};
|
12
12
|
Portal.displayName = 'Portal';
|
13
13
|
//# sourceMappingURL=Portal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAEA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAEA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AAGA;;;AAGG;;AACH,OAAO,MAAM,MAAM,GAA0B,KAAK,IAAG;AACnD,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,CAAhC;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CAJM;AAMP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
|
2
|
+
declare type PortalCommons = {
|
3
3
|
/**
|
4
4
|
* React children
|
5
5
|
*/
|
@@ -19,3 +19,4 @@ export declare type PortalState = PortalCommons & {
|
|
19
19
|
*/
|
20
20
|
virtualParentRootRef: React.MutableRefObject<HTMLSpanElement | null>;
|
21
21
|
};
|
22
|
+
export {};
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
4
4
|
* Render the final JSX of Portal
|
5
5
|
*/
|
6
6
|
|
7
|
-
export const
|
7
|
+
export const renderPortal_unstable = state => {
|
8
8
|
return /*#__PURE__*/React.createElement("span", {
|
9
9
|
hidden: true,
|
10
10
|
ref: state.virtualParentRootRef
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Portal/renderPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAZ,MAA0B,WAA1B;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA;;AAEG;;AACH,OAAO,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/renderPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAZ,MAA0B,WAA1B;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAA2C;AAC9E,sBACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,MAAM,EAAA,IAAZ;AAAa,IAAA,GAAG,EAAE,KAAK,CAAC;AAAxB,GAAA,EACG,KAAK,CAAC,YAAN,IAAsB,KAAK,CAAC,SAA5B,iBAAyC,QAAQ,CAAC,YAAT,CAAsB,KAAK,CAAC,QAA5B,EAAsC,KAAK,CAAC,SAA5C,CAD5C,CADF;AAKD,CANM","sourceRoot":""}
|
@@ -2,8 +2,8 @@ import type { PortalProps, PortalState } from './Portal.types';
|
|
2
2
|
/**
|
3
3
|
* Create the state required to render Portal.
|
4
4
|
*
|
5
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
5
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
6
6
|
*
|
7
7
|
* @param props - props from this instance of Portal
|
8
8
|
*/
|
9
|
-
export declare const
|
9
|
+
export declare const usePortal_unstable: (props: PortalProps) => PortalState;
|
@@ -5,12 +5,12 @@ import { setVirtualParent } from '../../virtualParent/index';
|
|
5
5
|
/**
|
6
6
|
* Create the state required to render Portal.
|
7
7
|
*
|
8
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
8
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
9
9
|
*
|
10
10
|
* @param props - props from this instance of Portal
|
11
11
|
*/
|
12
12
|
|
13
|
-
export const
|
13
|
+
export const usePortal_unstable = props => {
|
14
14
|
const {
|
15
15
|
children,
|
16
16
|
mountNode
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Portal/usePortal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AAGA;;;;;;AAMG;;AACH,OAAO,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/usePortal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AAGA;;;;;;AAMG;;AACH,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAAoC;AACpE,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAA0B,KAAhC;AAEA,QAAM,oBAAoB,GAAG,KAAK,CAAC,MAAN,CAA8B,IAA9B,CAA7B;AACA,QAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAAE,IAAA,QAAQ,EAAE,CAAC,CAAC;AAAd,GAAD,CAA5C;AAEA,QAAM,KAAK,GAAgB;AACzB,IAAA,QADyB;AAEzB,IAAA,SAAS,EAAE,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAA,SAAA,GAAa,iBAFC;AAGzB,IAAA,YAAY,EAAE,CAAC,QAAQ,EAHE;AAIzB,IAAA;AAJyB,GAA3B;AAOA,EAAA,KAAK,CAAC,SAAN,CAAgB,MAAK;AACnB,QAAI,KAAK,CAAC,oBAAN,CAA2B,OAA3B,IAAsC,KAAK,CAAC,SAAhD,EAA2D;AACzD,MAAA,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB,KAAK,CAAC,oBAAN,CAA2B,OAA7C,CAAhB;AACD;AACF,GAJD,EAIG,CAAC,KAAK,CAAC,oBAAP,EAA6B,KAAK,CAAC,SAAnC,CAJH;AAMA,SAAO,KAAP;AACD,CApBM","sourceRoot":""}
|
@@ -15,8 +15,8 @@ const renderPortal_1 = /*#__PURE__*/require("./renderPortal");
|
|
15
15
|
|
16
16
|
|
17
17
|
const Portal = props => {
|
18
|
-
const state = usePortal_1.
|
19
|
-
return renderPortal_1.
|
18
|
+
const state = usePortal_1.usePortal_unstable(props);
|
19
|
+
return renderPortal_1.renderPortal_unstable(state);
|
20
20
|
};
|
21
21
|
|
22
22
|
exports.Portal = Portal;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":";;;;;;;AAEA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;;AAGG;;;AACI,MAAM,MAAM,GAA0B,KAAK,IAAG;AACnD,QAAM,KAAK,GAAG,WAAA,CAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":";;;;;;;AAEA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;;AAGG;;;AACI,MAAM,MAAM,GAA0B,KAAK,IAAG;AACnD,QAAM,KAAK,GAAG,WAAA,CAAA,kBAAA,CAAmB,KAAnB,CAAd;AAEA,SAAO,cAAA,CAAA,qBAAA,CAAsB,KAAtB,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,MAAA,GAAM,MAAN;AAMb,OAAA,CAAA,MAAA,CAAO,WAAP,GAAqB,QAArB","sourceRoot":""}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
|
2
|
+
declare type PortalCommons = {
|
3
3
|
/**
|
4
4
|
* React children
|
5
5
|
*/
|
@@ -19,3 +19,4 @@ export declare type PortalState = PortalCommons & {
|
|
19
19
|
*/
|
20
20
|
virtualParentRootRef: React.MutableRefObject<HTMLSpanElement | null>;
|
21
21
|
};
|
22
|
+
export {};
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderPortal_unstable = void 0;
|
7
7
|
|
8
8
|
const ReactDOM = /*#__PURE__*/require("react-dom");
|
9
9
|
|
@@ -13,12 +13,12 @@ const React = /*#__PURE__*/require("react");
|
|
13
13
|
*/
|
14
14
|
|
15
15
|
|
16
|
-
const
|
16
|
+
const renderPortal_unstable = state => {
|
17
17
|
return React.createElement("span", {
|
18
18
|
hidden: true,
|
19
19
|
ref: state.virtualParentRootRef
|
20
20
|
}, state.shouldRender && state.mountNode && ReactDOM.createPortal(state.children, state.mountNode));
|
21
21
|
};
|
22
22
|
|
23
|
-
exports.
|
23
|
+
exports.renderPortal_unstable = renderPortal_unstable;
|
24
24
|
//# sourceMappingURL=renderPortal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Portal/renderPortal.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,QAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/renderPortal.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,QAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,qBAAqB,GAAI,KAAD,IAA2C;AAC9E,SACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,MAAM,EAAA,IAAZ;AAAa,IAAA,GAAG,EAAE,KAAK,CAAC;AAAxB,GAAA,EACG,KAAK,CAAC,YAAN,IAAsB,KAAK,CAAC,SAA5B,IAAyC,QAAQ,CAAC,YAAT,CAAsB,KAAK,CAAC,QAA5B,EAAsC,KAAK,CAAC,SAA5C,CAD5C,CADF;AAKD,CANM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourceRoot":""}
|
@@ -2,8 +2,8 @@ import type { PortalProps, PortalState } from './Portal.types';
|
|
2
2
|
/**
|
3
3
|
* Create the state required to render Portal.
|
4
4
|
*
|
5
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
5
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
6
6
|
*
|
7
7
|
* @param props - props from this instance of Portal
|
8
8
|
*/
|
9
|
-
export declare const
|
9
|
+
export declare const usePortal_unstable: (props: PortalProps) => PortalState;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.usePortal_unstable = void 0;
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
@@ -15,13 +15,13 @@ const index_1 = /*#__PURE__*/require("../../virtualParent/index");
|
|
15
15
|
/**
|
16
16
|
* Create the state required to render Portal.
|
17
17
|
*
|
18
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
18
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
19
19
|
*
|
20
20
|
* @param props - props from this instance of Portal
|
21
21
|
*/
|
22
22
|
|
23
23
|
|
24
|
-
const
|
24
|
+
const usePortal_unstable = props => {
|
25
25
|
const {
|
26
26
|
children,
|
27
27
|
mountNode
|
@@ -44,5 +44,5 @@ const usePortal = props => {
|
|
44
44
|
return state;
|
45
45
|
};
|
46
46
|
|
47
|
-
exports.
|
47
|
+
exports.usePortal_unstable = usePortal_unstable;
|
48
48
|
//# sourceMappingURL=usePortal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Portal/usePortal.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;AAMG;;;AACI,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/usePortal.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;AAMG;;;AACI,MAAM,kBAAkB,GAAI,KAAD,IAAoC;AACpE,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAA0B,KAAhC;AAEA,QAAM,oBAAoB,GAAG,KAAK,CAAC,MAAN,CAA8B,IAA9B,CAA7B;AACA,QAAM,iBAAiB,GAAG,oBAAA,CAAA,kBAAA,CAAmB;AAAE,IAAA,QAAQ,EAAE,CAAC,CAAC;AAAd,GAAnB,CAA1B;AAEA,QAAM,KAAK,GAAgB;AACzB,IAAA,QADyB;AAEzB,IAAA,SAAS,EAAE,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAA,SAAA,GAAa,iBAFC;AAGzB,IAAA,YAAY,EAAE,CAAC,iBAAA,CAAA,QAAA,EAHU;AAIzB,IAAA;AAJyB,GAA3B;AAOA,EAAA,KAAK,CAAC,SAAN,CAAgB,MAAK;AACnB,QAAI,KAAK,CAAC,oBAAN,CAA2B,OAA3B,IAAsC,KAAK,CAAC,SAAhD,EAA2D;AACzD,MAAA,OAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,SAAvB,EAAkC,KAAK,CAAC,oBAAN,CAA2B,OAA7D;AACD;AACF,GAJD,EAIG,CAAC,KAAK,CAAC,oBAAP,EAA6B,KAAK,CAAC,SAAnC,CAJH;AAMA,SAAO,KAAP;AACD,CApBM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-portal",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyd45ba4664620220211.1",
|
4
4
|
"description": "A utility component that creates portals compatible with Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -19,15 +19,14 @@
|
|
19
19
|
"just": "just-scripts",
|
20
20
|
"lint": "just-scripts lint",
|
21
21
|
"start": "yarn storybook",
|
22
|
-
"test": "jest",
|
22
|
+
"test": "jest --passWithNoTests",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
24
|
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-portal/src && yarn docs",
|
25
|
-
"storybook": "
|
25
|
+
"storybook": "node ../../scripts/storybook/runner",
|
26
26
|
"type-check": "tsc -b tsconfig.json"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyd3bf09bf8120211201.1",
|
31
30
|
"@fluentui/react-conformance": "*",
|
32
31
|
"@fluentui/scripts": "^1.0.0",
|
33
32
|
"@types/enzyme": "3.10.3",
|
@@ -39,14 +38,12 @@
|
|
39
38
|
"enzyme-adapter-react-16": "^1.15.0",
|
40
39
|
"react": "16.8.6",
|
41
40
|
"react-dom": "16.8.6",
|
42
|
-
"react-test-renderer": "^16.3.0"
|
43
|
-
"@fluentui/babel-make-styles": "0.0.0-nightlyd3bf09bf8120211201.1"
|
41
|
+
"react-test-renderer": "^16.3.0"
|
44
42
|
},
|
45
43
|
"dependencies": {
|
46
|
-
"@fluentui/react-
|
47
|
-
"@fluentui/react-
|
48
|
-
"@fluentui/react-
|
49
|
-
"@fluentui/react-utilities": "0.0.0-nightlyd3bf09bf8120211201.1",
|
44
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightlyd45ba4664620220211.1",
|
45
|
+
"@fluentui/react-tabster": "0.0.0-nightlyd45ba4664620220211.1",
|
46
|
+
"@fluentui/react-utilities": "0.0.0-nightlyd45ba4664620220211.1",
|
50
47
|
"tslib": "^2.1.0"
|
51
48
|
},
|
52
49
|
"peerDependencies": {
|