@fluentui/react-portal 9.0.0-nightly.d730088d7f.0 → 9.0.0-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +465 -20
- package/CHANGELOG.md +209 -75
- package/dist/{react-portal.d.ts → index.d.ts} +11 -11
- package/{lib → dist}/tsdoc-metadata.json +0 -0
- package/lib/Portal.js.map +1 -1
- package/lib/components/Portal/Portal.js +8 -6
- package/lib/components/Portal/Portal.js.map +1 -1
- package/lib/components/Portal/Portal.types.js.map +1 -1
- package/lib/components/Portal/index.js.map +1 -1
- package/lib/components/Portal/renderPortal.js +6 -2
- package/lib/components/Portal/renderPortal.js.map +1 -1
- package/lib/components/Portal/usePortal.js +23 -17
- package/lib/components/Portal/usePortal.js.map +1 -1
- package/lib/components/Portal/usePortalMountNode.js +27 -21
- package/lib/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/virtualParent/elementContains.js +18 -14
- package/lib/virtualParent/elementContains.js.map +1 -1
- package/lib/virtualParent/getParent.js +2 -1
- package/lib/virtualParent/getParent.js.map +1 -1
- package/lib/virtualParent/getVirtualParent.js +8 -5
- package/lib/virtualParent/getVirtualParent.js.map +1 -1
- package/lib/virtualParent/index.js.map +1 -1
- package/lib/virtualParent/isVirtualElement.js +1 -1
- package/lib/virtualParent/isVirtualElement.js.map +1 -1
- package/lib/virtualParent/setVirtualParent.js +11 -8
- package/lib/virtualParent/setVirtualParent.js.map +1 -1
- package/lib/virtualParent/types.js.map +1 -1
- package/lib-commonjs/Portal.js +7 -2
- package/lib-commonjs/Portal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.js +16 -7
- package/lib-commonjs/components/Portal/Portal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.types.js +4 -1
- package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
- package/lib-commonjs/components/Portal/index.js +10 -2
- package/lib-commonjs/components/Portal/index.js.map +1 -1
- package/lib-commonjs/components/Portal/renderPortal.js +18 -7
- package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortal.js +39 -24
- package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortalMountNode.js +41 -26
- package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib-commonjs/index.js +41 -7
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/virtualParent/elementContains.js +26 -16
- package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
- package/lib-commonjs/virtualParent/getParent.js +10 -3
- package/lib-commonjs/virtualParent/getParent.js.map +1 -1
- package/lib-commonjs/virtualParent/getVirtualParent.js +16 -7
- package/lib-commonjs/virtualParent/getVirtualParent.js.map +1 -1
- package/lib-commonjs/virtualParent/index.js +11 -2
- package/lib-commonjs/virtualParent/index.js.map +1 -1
- package/lib-commonjs/virtualParent/isVirtualElement.js +7 -2
- package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
- package/lib-commonjs/virtualParent/setVirtualParent.js +17 -9
- package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
- package/lib-commonjs/virtualParent/types.js +4 -1
- package/lib-commonjs/virtualParent/types.js.map +1 -1
- package/package.json +17 -22
- package/lib/Portal.d.ts +0 -1
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -9
- package/lib/common/isConformant.js.map +0 -1
- package/lib/components/Portal/Portal.d.ts +0 -6
- package/lib/components/Portal/Portal.types.d.ts +0 -21
- package/lib/components/Portal/index.d.ts +0 -4
- package/lib/components/Portal/renderPortal.d.ts +0 -6
- package/lib/components/Portal/usePortal.d.ts +0 -9
- package/lib/components/Portal/usePortalMountNode.d.ts +0 -10
- package/lib/index.d.ts +0 -2
- package/lib/virtualParent/elementContains.d.ts +0 -7
- package/lib/virtualParent/getParent.d.ts +0 -5
- package/lib/virtualParent/getVirtualParent.d.ts +0 -4
- package/lib/virtualParent/index.d.ts +0 -5
- package/lib/virtualParent/isVirtualElement.d.ts +0 -5
- package/lib/virtualParent/setVirtualParent.d.ts +0 -7
- package/lib/virtualParent/types.d.ts +0 -5
- package/lib-commonjs/Portal.d.ts +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -13
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/components/Portal/Portal.d.ts +0 -6
- package/lib-commonjs/components/Portal/Portal.types.d.ts +0 -21
- package/lib-commonjs/components/Portal/index.d.ts +0 -4
- package/lib-commonjs/components/Portal/renderPortal.d.ts +0 -6
- package/lib-commonjs/components/Portal/usePortal.d.ts +0 -9
- package/lib-commonjs/components/Portal/usePortalMountNode.d.ts +0 -10
- package/lib-commonjs/index.d.ts +0 -2
- package/lib-commonjs/virtualParent/elementContains.d.ts +0 -7
- package/lib-commonjs/virtualParent/getParent.d.ts +0 -5
- package/lib-commonjs/virtualParent/getVirtualParent.d.ts +0 -4
- package/lib-commonjs/virtualParent/index.d.ts +0 -5
- package/lib-commonjs/virtualParent/isVirtualElement.d.ts +0 -5
- package/lib-commonjs/virtualParent/setVirtualParent.d.ts +0 -7
- package/lib-commonjs/virtualParent/types.d.ts +0 -5
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { PortalProps, PortalState } from './Portal.types';
|
2
|
-
/**
|
3
|
-
* Create the state required to render Portal.
|
4
|
-
*
|
5
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal.
|
6
|
-
*
|
7
|
-
* @param props - props from this instance of Portal
|
8
|
-
*/
|
9
|
-
export declare const usePortal: (props: PortalProps) => PortalState;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
export declare type UsePortalMountNodeOptions = {
|
2
|
-
/**
|
3
|
-
* Since hooks cannot be called conditionally use this flag to disable creating the node
|
4
|
-
*/
|
5
|
-
disabled?: boolean;
|
6
|
-
};
|
7
|
-
/**
|
8
|
-
* Creates a new element on a document.body to mount portals
|
9
|
-
*/
|
10
|
-
export declare const usePortalMountNode: (options: UsePortalMountNodeOptions) => HTMLDivElement | undefined;
|
package/lib/index.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Similar functionality to `element.contains` DOM API for use with out of order DOM elements that
|
3
|
-
* checks the virtual parent hierarchy. If a virtual parents exists, it is chosen over the actual parent
|
4
|
-
*
|
5
|
-
* @returns true if the child can find the parent in its virtual hierarchy
|
6
|
-
*/
|
7
|
-
export declare function elementContains(parent: HTMLElement | null, child: HTMLElement | null): boolean;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Sets the virtual parent of an element.
|
3
|
-
*
|
4
|
-
* @param child - Theme element to set the virtual parent
|
5
|
-
* @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship
|
6
|
-
*/
|
7
|
-
export declare function setVirtualParent(child: HTMLElement, parent?: HTMLElement): void;
|
package/lib-commonjs/Portal.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './components/Portal/index';
|
@@ -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"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
export declare type PortalCommons = {
|
3
|
-
/**
|
4
|
-
* React children
|
5
|
-
*/
|
6
|
-
children: React.ReactNode;
|
7
|
-
/**
|
8
|
-
* Where the portal children are mounted on DOM
|
9
|
-
* @defaultValue a new element on document.body without any styling
|
10
|
-
*/
|
11
|
-
mountNode: HTMLDivElement | undefined;
|
12
|
-
};
|
13
|
-
export declare type PortalProps = Partial<PortalCommons>;
|
14
|
-
export declare type PortalState = PortalCommons & {
|
15
|
-
/** Indicates if a Portal should be rendered. */
|
16
|
-
shouldRender: boolean;
|
17
|
-
/**
|
18
|
-
* Ref to the root span element as virtual parent
|
19
|
-
*/
|
20
|
-
virtualParentRootRef: React.MutableRefObject<HTMLSpanElement | null>;
|
21
|
-
};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { PortalProps, PortalState } from './Portal.types';
|
2
|
-
/**
|
3
|
-
* Create the state required to render Portal.
|
4
|
-
*
|
5
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal.
|
6
|
-
*
|
7
|
-
* @param props - props from this instance of Portal
|
8
|
-
*/
|
9
|
-
export declare const usePortal: (props: PortalProps) => PortalState;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
export declare type UsePortalMountNodeOptions = {
|
2
|
-
/**
|
3
|
-
* Since hooks cannot be called conditionally use this flag to disable creating the node
|
4
|
-
*/
|
5
|
-
disabled?: boolean;
|
6
|
-
};
|
7
|
-
/**
|
8
|
-
* Creates a new element on a document.body to mount portals
|
9
|
-
*/
|
10
|
-
export declare const usePortalMountNode: (options: UsePortalMountNodeOptions) => HTMLDivElement | undefined;
|
package/lib-commonjs/index.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Similar functionality to `element.contains` DOM API for use with out of order DOM elements that
|
3
|
-
* checks the virtual parent hierarchy. If a virtual parents exists, it is chosen over the actual parent
|
4
|
-
*
|
5
|
-
* @returns true if the child can find the parent in its virtual hierarchy
|
6
|
-
*/
|
7
|
-
export declare function elementContains(parent: HTMLElement | null, child: HTMLElement | null): boolean;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Sets the virtual parent of an element.
|
3
|
-
*
|
4
|
-
* @param child - Theme element to set the virtual parent
|
5
|
-
* @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship
|
6
|
-
*/
|
7
|
-
export declare function setVirtualParent(child: HTMLElement, parent?: HTMLElement): void;
|