@radix-ui/react-portal 1.1.14 → 1.1.15
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/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +2 -2
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -9,6 +9,5 @@ interface PortalProps extends PrimitiveDivProps {
|
|
|
9
9
|
container?: Element | DocumentFragment | null;
|
|
10
10
|
}
|
|
11
11
|
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const Root: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
12
|
|
|
14
|
-
export { Portal, type PortalProps, Root };
|
|
13
|
+
export { Portal, type PortalProps, Portal as Root };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,5 @@ interface PortalProps extends PrimitiveDivProps {
|
|
|
9
9
|
container?: Element | DocumentFragment | null;
|
|
10
10
|
}
|
|
11
11
|
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const Root: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
12
|
|
|
14
|
-
export { Portal, type PortalProps, Root };
|
|
13
|
+
export { Portal, type PortalProps, Portal as Root };
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
33
33
|
var index_exports = {};
|
|
34
34
|
__export(index_exports, {
|
|
35
35
|
Portal: () => Portal,
|
|
36
|
-
Root: () =>
|
|
36
|
+
Root: () => Portal
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(index_exports);
|
|
39
39
|
|
|
@@ -52,5 +52,4 @@ var Portal = /* @__PURE__ */ React.forwardRef(
|
|
|
52
52
|
return container ? ReactDOM.createPortal(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
53
53
|
}, "Portal")
|
|
54
54
|
);
|
|
55
|
-
var Root = Portal;
|
|
56
55
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/portal.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\nexport {\n Portal,\n //\n Root,\n} from './portal';\nexport type { PortalProps } from './portal';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\ntype PortalElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = /* @__PURE__ */ React.forwardRef<PortalElement, PortalProps>(\n function Portal(props, forwardedRef) {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || (mounted && globalThis?.document?.body);\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,eAA0B;AAC1B,6BAA0B;AAC1B,qCAAgC;AAsBF;AAP9B,IAAM,SAAyB,gBAAM;AAAA,EACnC,gCAASA,QAAO,OAAO,cAAc;AACnC,UAAM,EAAE,WAAW,eAAe,GAAG,YAAY,IAAI;AACrD,UAAM,CAAC,SAAS,UAAU,IAAU,eAAS,KAAK;AAClD,wDAAgB,MAAM,WAAW,IAAI,GAAG,CAAC,CAAC;AAC1C,UAAM,YAAY,iBAAkB,WAAW,YAAY,UAAU;AACrE,WAAO,YACM,sBAAa,4CAAC,iCAAU,KAAV,EAAe,GAAG,aAAa,KAAK,cAAc,GAAI,SAAS,IACtF;AAAA,EACN,GARA;AASF;
|
|
4
|
+
"sourcesContent": ["'use client';\nexport {\n Portal,\n //\n Root,\n} from './portal';\nexport type { PortalProps } from './portal';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\ntype PortalElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = /* @__PURE__ */ React.forwardRef<PortalElement, PortalProps>(\n function Portal(props, forwardedRef) {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || (mounted && globalThis?.document?.body);\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nexport {\n Portal,\n //\n Portal as Root,\n};\nexport type { PortalProps };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,eAA0B;AAC1B,6BAA0B;AAC1B,qCAAgC;AAsBF;AAP9B,IAAM,SAAyB,gBAAM;AAAA,EACnC,gCAASA,QAAO,OAAO,cAAc;AACnC,UAAM,EAAE,WAAW,eAAe,GAAG,YAAY,IAAI;AACrD,UAAM,CAAC,SAAS,UAAU,IAAU,eAAS,KAAK;AAClD,wDAAgB,MAAM,WAAW,IAAI,GAAG,CAAC,CAAC;AAC1C,UAAM,YAAY,iBAAkB,WAAW,YAAY,UAAU;AACrE,WAAO,YACM,sBAAa,4CAAC,iCAAU,KAAV,EAAe,GAAG,aAAa,KAAK,cAAc,GAAI,SAAS,IACtF;AAAA,EACN,GARA;AASF;",
|
|
6
6
|
"names": ["Portal"]
|
|
7
7
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -17,9 +17,8 @@ var Portal = /* @__PURE__ */ React.forwardRef(
|
|
|
17
17
|
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
18
18
|
}, "Portal")
|
|
19
19
|
);
|
|
20
|
-
var Root = Portal;
|
|
21
20
|
export {
|
|
22
21
|
Portal,
|
|
23
|
-
Root
|
|
22
|
+
Portal as Root
|
|
24
23
|
};
|
|
25
24
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/portal.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\ntype PortalElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = /* @__PURE__ */ React.forwardRef<PortalElement, PortalProps>(\n function Portal(props, forwardedRef) {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || (mounted && globalThis?.document?.body);\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\
|
|
5
|
-
"mappings": ";;;;;AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAsBF;AAP9B,IAAM,SAAyB,gBAAM;AAAA,EACnC,gCAASA,QAAO,OAAO,cAAc;AACnC,UAAM,EAAE,WAAW,eAAe,GAAG,YAAY,IAAI;AACrD,UAAM,CAAC,SAAS,UAAU,IAAU,eAAS,KAAK;AAClD,oBAAgB,MAAM,WAAW,IAAI,GAAG,CAAC,CAAC;AAC1C,UAAM,YAAY,iBAAkB,WAAW,YAAY,UAAU;AACrE,WAAO,YACM,sBAAa,oBAAC,UAAU,KAAV,EAAe,GAAG,aAAa,KAAK,cAAc,GAAI,SAAS,IACtF;AAAA,EACN,GARA;AASF;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\ntype PortalElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface PortalProps extends PrimitiveDivProps {\n /**\n * An optional container where the portaled content should be appended.\n */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = /* @__PURE__ */ React.forwardRef<PortalElement, PortalProps>(\n function Portal(props, forwardedRef) {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || (mounted && globalThis?.document?.body);\n return container\n ? ReactDOM.createPortal(<Primitive.div {...portalProps} ref={forwardedRef} />, container)\n : null;\n },\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nexport {\n Portal,\n //\n Portal as Root,\n};\nexport type { PortalProps };\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAsBF;AAP9B,IAAM,SAAyB,gBAAM;AAAA,EACnC,gCAASA,QAAO,OAAO,cAAc;AACnC,UAAM,EAAE,WAAW,eAAe,GAAG,YAAY,IAAI;AACrD,UAAM,CAAC,SAAS,UAAU,IAAU,eAAS,KAAK;AAClD,oBAAgB,MAAM,WAAW,IAAI,GAAG,CAAC,CAAC;AAC1C,UAAM,YAAY,iBAAkB,WAAW,YAAY,UAAU;AACrE,WAAO,YACM,sBAAa,oBAAC,UAAU,KAAV,EAAe,GAAG,aAAa,KAAK,cAAc,GAAI,SAAS,IACtF;AAAA,EACN,GARA;AASF;",
|
|
6
6
|
"names": ["Portal"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-portal",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@radix-ui/react-primitive": "2.1.
|
|
15
|
-
"@radix-ui/react-use-layout-effect": "1.1.
|
|
14
|
+
"@radix-ui/react-primitive": "2.1.8",
|
|
15
|
+
"@radix-ui/react-use-layout-effect": "1.1.3"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/react": "^19.2.
|
|
19
|
-
"@types/react-dom": "^19.2.
|
|
20
|
-
"react": "^19.2.
|
|
21
|
-
"react-dom": "^19.2.
|
|
18
|
+
"@types/react": "^19.2.17",
|
|
19
|
+
"@types/react-dom": "^19.2.3",
|
|
20
|
+
"react": "^19.2.7",
|
|
21
|
+
"react-dom": "^19.2.7",
|
|
22
22
|
"typescript": "^5.9.3",
|
|
23
23
|
"@repo/builder": "0.0.0",
|
|
24
24
|
"@repo/typescript-config": "0.0.0"
|