@fluentui/react-portal 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/CHANGELOG.json +217 -16
  2. package/CHANGELOG.md +55 -10
  3. package/dist/react-portal.d.ts +6 -5
  4. package/lib/components/Portal/Portal.d.ts +2 -1
  5. package/lib/components/Portal/Portal.js +8 -6
  6. package/lib/components/Portal/Portal.js.map +1 -1
  7. package/lib/components/Portal/Portal.types.d.ts +2 -1
  8. package/lib/components/Portal/renderPortal.d.ts +1 -1
  9. package/lib/components/Portal/renderPortal.js +6 -2
  10. package/lib/components/Portal/renderPortal.js.map +1 -1
  11. package/lib/components/Portal/usePortal.d.ts +2 -2
  12. package/lib/components/Portal/usePortal.js +23 -17
  13. package/lib/components/Portal/usePortal.js.map +1 -1
  14. package/lib/components/Portal/usePortalMountNode.js +27 -21
  15. package/lib/components/Portal/usePortalMountNode.js.map +1 -1
  16. package/lib/virtualParent/elementContains.js +18 -14
  17. package/lib/virtualParent/elementContains.js.map +1 -1
  18. package/lib/virtualParent/getParent.js +2 -1
  19. package/lib/virtualParent/getParent.js.map +1 -1
  20. package/lib/virtualParent/getVirtualParent.js +8 -5
  21. package/lib/virtualParent/getVirtualParent.js.map +1 -1
  22. package/lib/virtualParent/isVirtualElement.js +1 -1
  23. package/lib/virtualParent/isVirtualElement.js.map +1 -1
  24. package/lib/virtualParent/setVirtualParent.js +11 -8
  25. package/lib/virtualParent/setVirtualParent.js.map +1 -1
  26. package/lib-commonjs/Portal.js +7 -2
  27. package/lib-commonjs/Portal.js.map +1 -1
  28. package/lib-commonjs/components/Portal/Portal.d.ts +2 -1
  29. package/lib-commonjs/components/Portal/Portal.js +16 -7
  30. package/lib-commonjs/components/Portal/Portal.js.map +1 -1
  31. package/lib-commonjs/components/Portal/Portal.types.d.ts +2 -1
  32. package/lib-commonjs/components/Portal/Portal.types.js +4 -1
  33. package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
  34. package/lib-commonjs/components/Portal/index.js +10 -2
  35. package/lib-commonjs/components/Portal/index.js.map +1 -1
  36. package/lib-commonjs/components/Portal/renderPortal.d.ts +1 -1
  37. package/lib-commonjs/components/Portal/renderPortal.js +18 -7
  38. package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
  39. package/lib-commonjs/components/Portal/usePortal.d.ts +2 -2
  40. package/lib-commonjs/components/Portal/usePortal.js +39 -24
  41. package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
  42. package/lib-commonjs/components/Portal/usePortalMountNode.js +41 -26
  43. package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
  44. package/lib-commonjs/index.js +22 -5
  45. package/lib-commonjs/index.js.map +1 -1
  46. package/lib-commonjs/virtualParent/elementContains.js +26 -16
  47. package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
  48. package/lib-commonjs/virtualParent/getParent.js +10 -3
  49. package/lib-commonjs/virtualParent/getParent.js.map +1 -1
  50. package/lib-commonjs/virtualParent/getVirtualParent.js +16 -7
  51. package/lib-commonjs/virtualParent/getVirtualParent.js.map +1 -1
  52. package/lib-commonjs/virtualParent/index.js +11 -2
  53. package/lib-commonjs/virtualParent/index.js.map +1 -1
  54. package/lib-commonjs/virtualParent/isVirtualElement.js +7 -2
  55. package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
  56. package/lib-commonjs/virtualParent/setVirtualParent.js +17 -9
  57. package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
  58. package/lib-commonjs/virtualParent/types.js +4 -1
  59. package/lib-commonjs/virtualParent/types.js.map +1 -1
  60. package/package.json +8 -10
  61. package/lib/common/isConformant.d.ts +0 -4
  62. package/lib/common/isConformant.js +0 -9
  63. package/lib/common/isConformant.js.map +0 -1
  64. package/lib-commonjs/common/isConformant.d.ts +0 -4
  65. package/lib-commonjs/common/isConformant.js +0 -13
  66. package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getParent.js","sourceRoot":"","sources":["../../src/virtualParent/getParent.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAEtD;;;GAGG;AACH,SAAgB,SAAS,CAAC,KAAyB;IACjD,OAAO,CAAC,KAAK,IAAI,mCAAgB,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAiC,CAAA,CAAC;AACzF,CAAC;AAFD,8BAEC"}
1
+ {"version":3,"sources":["../../src/virtualParent/getParent.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;AAEA;;;AAGG;;;AACH,SAAgB,SAAhB,CAA0B,KAA1B,EAAmD;AACjD,SAAQ,KAAK,IAAI,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,CAAV,KAAuC,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,UAA9C,CAAP;AACD;;AAFD,OAAA,CAAA,SAAA,GAAA,SAAA","sourceRoot":""}
@@ -1,16 +1,25 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.getVirtualParent = void 0;
4
- var isVirtualElement_1 = require("./isVirtualElement");
7
+
8
+ const isVirtualElement_1 = /*#__PURE__*/require("./isVirtualElement");
5
9
  /**
6
10
  * Gets the virtual parent given the child element, if it exists.
7
11
  */
12
+
13
+
8
14
  function getVirtualParent(child) {
9
- var parent;
10
- if (isVirtualElement_1.isVirtualElement(child)) {
11
- parent = child._virtual.parent;
12
- }
13
- return parent;
15
+ let parent;
16
+
17
+ if (isVirtualElement_1.isVirtualElement(child)) {
18
+ parent = child._virtual.parent;
19
+ }
20
+
21
+ return parent;
14
22
  }
23
+
15
24
  exports.getVirtualParent = getVirtualParent;
16
25
  //# sourceMappingURL=getVirtualParent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getVirtualParent.js","sourceRoot":"","sources":["../../src/virtualParent/getVirtualParent.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AACtD;;GAEG;AACH,SAAgB,gBAAgB,CAAC,KAAkB;IACjD,IAAI,MAA+B,CAAC;IACpC,IAAI,mCAAgB,CAAC,KAAK,CAAC,EAAE;QAC3B,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;KAChC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAND,4CAMC"}
1
+ {"version":3,"sources":["../../src/virtualParent/getVirtualParent.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;AACA;;AAEG;;;AACH,SAAgB,gBAAhB,CAAiC,KAAjC,EAAmD;AACjD,MAAI,MAAJ;;AACA,MAAI,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,CAAJ,EAA6B;AAC3B,IAAA,MAAM,GAAG,KAAK,CAAC,QAAN,CAAe,MAAxB;AACD;;AACD,SAAO,MAAP;AACD;;AAND,OAAA,CAAA,gBAAA,GAAA,gBAAA","sourceRoot":""}
@@ -1,9 +1,18 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
4
9
  tslib_1.__exportStar(require("./elementContains"), exports);
10
+
5
11
  tslib_1.__exportStar(require("./getParent"), exports);
12
+
6
13
  tslib_1.__exportStar(require("./getVirtualParent"), exports);
14
+
7
15
  tslib_1.__exportStar(require("./isVirtualElement"), exports);
16
+
8
17
  tslib_1.__exportStar(require("./setVirtualParent"), exports);
9
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/virtualParent/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,sDAA4B;AAC5B,6DAAmC;AACnC,6DAAmC;AACnC,6DAAmC"}
1
+ {"version":3,"sources":["../../src/virtualParent/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,11 +1,16 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.isVirtualElement = void 0;
4
7
  /**
5
8
  * Determines whether or not an element has the virtual hierarchy extension.
6
9
  */
10
+
7
11
  function isVirtualElement(element) {
8
- return element && !!element._virtual;
12
+ return element && !!element._virtual;
9
13
  }
14
+
10
15
  exports.isVirtualElement = isVirtualElement;
11
16
  //# sourceMappingURL=isVirtualElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isVirtualElement.js","sourceRoot":"","sources":["../../src/virtualParent/isVirtualElement.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,SAAgB,gBAAgB,CAAC,OAAqC;IACpE,OAAO,OAAO,IAAI,CAAC,CAAkB,OAAQ,CAAC,QAAQ,CAAC;AACzD,CAAC;AAFD,4CAEC"}
1
+ {"version":3,"sources":["../../src/virtualParent/isVirtualElement.ts"],"names":[],"mappings":";;;;;;AAEA;;AAEG;;AACH,SAAgB,gBAAhB,CAAiC,OAAjC,EAAsE;AACpE,SAAO,OAAO,IAAI,CAAC,CAAkB,OAAQ,CAAC,QAA9C;AACD;;AAFD,OAAA,CAAA,gBAAA,GAAA,gBAAA","sourceRoot":""}
@@ -1,5 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.setVirtualParent = void 0;
4
7
  /**
5
8
  * Sets the virtual parent of an element.
@@ -7,15 +10,20 @@ exports.setVirtualParent = void 0;
7
10
  * @param child - Theme element to set the virtual parent
8
11
  * @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship
9
12
  */
13
+
10
14
  function setVirtualParent(child, parent) {
11
- if (!child) {
12
- return;
13
- }
14
- var virtualChild = child;
15
- if (!virtualChild._virtual) {
16
- virtualChild._virtual = {};
17
- }
18
- virtualChild._virtual.parent = parent || undefined;
15
+ if (!child) {
16
+ return;
17
+ }
18
+
19
+ const virtualChild = child;
20
+
21
+ if (!virtualChild._virtual) {
22
+ virtualChild._virtual = {};
23
+ }
24
+
25
+ virtualChild._virtual.parent = parent || undefined;
19
26
  }
27
+
20
28
  exports.setVirtualParent = setVirtualParent;
21
29
  //# sourceMappingURL=setVirtualParent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setVirtualParent.js","sourceRoot":"","sources":["../../src/virtualParent/setVirtualParent.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,KAAkB,EAAE,MAAoB;IACvE,IAAI,CAAC,KAAK,EAAE;QACV,OAAO;KACR;IAED,IAAM,YAAY,GAAmB,KAAK,CAAC;IAE3C,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;QAC1B,YAAY,CAAC,QAAQ,GAAG,EAAE,CAAC;KAC5B;IAED,YAAY,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,IAAI,SAAS,CAAC;AACrD,CAAC;AAZD,4CAYC"}
1
+ {"version":3,"sources":["../../src/virtualParent/setVirtualParent.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;AAKG;;AACH,SAAgB,gBAAhB,CAAiC,KAAjC,EAAqD,MAArD,EAAyE;AACvE,MAAI,CAAC,KAAL,EAAY;AACV;AACD;;AAED,QAAM,YAAY,GAAmB,KAArC;;AAEA,MAAI,CAAC,YAAY,CAAC,QAAlB,EAA4B;AAC1B,IAAA,YAAY,CAAC,QAAb,GAAwB,EAAxB;AACD;;AAED,EAAA,YAAY,CAAC,QAAb,CAAsB,MAAtB,GAA+B,MAAM,IAAI,SAAzC;AACD;;AAZD,OAAA,CAAA,gBAAA,GAAA,gBAAA","sourceRoot":""}
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/virtualParent/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-portal",
3
- "version": "9.0.0-nightly.f81b28ceb3.1",
3
+ "version": "9.0.0-rc.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,14 +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
- "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-portal/src && yarn docs",
25
- "storybook": "start-storybook"
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": "node ../../scripts/storybook/runner",
26
+ "type-check": "tsc -b tsconfig.json"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@fluentui/eslint-plugin": "*",
29
- "@fluentui/jest-serializer-make-styles": "9.0.0-nightly.f81b28ceb3.1",
30
30
  "@fluentui/react-conformance": "*",
31
31
  "@fluentui/scripts": "^1.0.0",
32
32
  "@types/enzyme": "3.10.3",
@@ -41,10 +41,9 @@
41
41
  "react-test-renderer": "^16.3.0"
42
42
  },
43
43
  "dependencies": {
44
- "@fluentui/react-make-styles": "9.0.0-nightly.f81b28ceb3.1",
45
- "@fluentui/react-shared-contexts": "9.0.0-nightly.f81b28ceb3.1",
46
- "@fluentui/react-tabster": "9.0.0-nightly.f81b28ceb3.1",
47
- "@fluentui/react-utilities": "9.0.0-nightly.f81b28ceb3.1",
44
+ "@fluentui/react-shared-contexts": "9.0.0-rc.1",
45
+ "@fluentui/react-tabster": "9.0.0-rc.1",
46
+ "@fluentui/react-utilities": "9.0.0-rc.1",
48
47
  "tslib": "^2.1.0"
49
48
  },
50
49
  "peerDependencies": {
@@ -54,7 +53,6 @@
54
53
  "react-dom": ">=16.8.0 <18.0.0"
55
54
  },
56
55
  "beachball": {
57
- "tag": "beta",
58
56
  "disallowedChangeTypes": [
59
57
  "major",
60
58
  "minor",
@@ -1,4 +0,0 @@
1
- import type { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,9 +0,0 @@
1
- import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
2
- export function isConformant(testInfo) {
3
- var defaultOptions = {
4
- asPropHandlesRef: true,
5
- componentPath: module.parent.filename.replace('.test', ''),
6
- };
7
- baseIsConformant(defaultOptions, testInfo);
8
- }
9
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isConformant.js","sourceRoot":"","sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/E,MAAM,UAAU,YAAY,CAC1B,QAAyF;IAEzF,IAAM,cAAc,GAAyC;QAC3D,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KAC7D,CAAC;IAEF,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isConformant = void 0;
4
- var react_conformance_1 = require("@fluentui/react-conformance");
5
- function isConformant(testInfo) {
6
- var defaultOptions = {
7
- asPropHandlesRef: true,
8
- componentPath: module.parent.filename.replace('.test', ''),
9
- };
10
- react_conformance_1.isConformant(defaultOptions, testInfo);
11
- }
12
- exports.isConformant = isConformant;
13
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isConformant.js","sourceRoot":"","sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;AAAA,iEAA+E;AAG/E,SAAgB,YAAY,CAC1B,QAAyF;IAEzF,IAAM,cAAc,GAAyC;QAC3D,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KAC7D,CAAC;IAEF,gCAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC;AATD,oCASC"}