Socket
Socket
Sign inDemoInstall

@yamada-ui/portal

Package Overview
Dependencies
Maintainers
1
Versions
528
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/portal - npm Package Compare versions

Comparing version 1.0.23-next-20241005235555 to 1.0.23-next-20241008193728

dist/chunk-DMWOTLFW.mjs

10

dist/container-portal.js

@@ -34,4 +34,4 @@ "use client"

var [PortalProvider, usePortal] = (0, import_utils.createContext)({
strict: false,
name: "PortalContext"
name: "PortalContext",
strict: false
});

@@ -42,5 +42,5 @@

var ContainerPortal = ({
appendToParentPortal,
children,
containerRef,
appendToParentPortal
containerRef
}) => {

@@ -53,3 +53,3 @@ const parent = containerRef.current;

const node = ownerDocument.createElement("div");
if (node) node.className = "ui-portal";
node.className = "ui-portal";
return node;

@@ -56,0 +56,0 @@ }, [parent]);

@@ -34,4 +34,4 @@ "use client"

var [PortalProvider, usePortal] = (0, import_utils.createContext)({
strict: false,
name: "PortalContext"
name: "PortalContext",
strict: false
});

@@ -51,3 +51,2 @@

const host = appendToParentPortal ? parent != null ? parent : ownerDocument.body : ownerDocument.body;
if (!host) return;
el.current = ownerDocument.createElement("div");

@@ -54,0 +53,0 @@ el.current.className = "ui-portal";

@@ -0,5 +1,5 @@

export { ContainerPortal } from './container-portal.js';
export { DefaultPortal } from './default-portal.js';
export { Portal, PortalProps } from './portal.js';
export { DefaultPortal } from './default-portal.js';
export { ContainerPortal } from './container-portal.js';
import 'react';
import 'react/jsx-runtime';
import 'react';

@@ -38,4 +38,4 @@ "use client"

var [PortalProvider, usePortal] = (0, import_utils.createContext)({
strict: false,
name: "PortalContext"
name: "PortalContext",
strict: false
});

@@ -46,5 +46,5 @@

var ContainerPortal = ({
appendToParentPortal,
children,
containerRef,
appendToParentPortal
containerRef
}) => {

@@ -57,3 +57,3 @@ const parent = containerRef.current;

const node = ownerDocument.createElement("div");
if (node) node.className = "ui-portal";
node.className = "ui-portal";
return node;

@@ -91,3 +91,2 @@ }, [parent]);

const host = appendToParentPortal ? parent != null ? parent : ownerDocument.body : ownerDocument.body;
if (!host) return;
el.current = ownerDocument.createElement("div");

@@ -111,6 +110,6 @@ el.current.className = "ui-portal";

var Portal = ({
appendToParentPortal = true,
children,
containerRef,
appendToParentPortal = true,
isDisabled,
children
isDisabled
}) => {

@@ -117,0 +116,0 @@ if (isDisabled) return children;

import * as react from 'react';
type PortalContext = HTMLDivElement | null;
declare const PortalProvider: react.Provider<PortalContext>;
declare const usePortal: () => PortalContext;
declare const PortalProvider: react.Provider<PortalContext | undefined>;
declare const usePortal: () => PortalContext | undefined;
export { PortalProvider, usePortal };

@@ -30,4 +30,4 @@ "use client"

var [PortalProvider, usePortal] = (0, import_utils.createContext)({
strict: false,
name: "PortalContext"
name: "PortalContext",
strict: false
});

@@ -34,0 +34,0 @@ // Annotate the CommonJS export names for ESM import in node:

import * as react_jsx_runtime from 'react/jsx-runtime';
import { RefObject, ReactNode } from 'react';
import { ReactNode, RefObject } from 'react';
interface PortalProps {
/**
* The `ref` to the component where the portal will be attached to.
*/
containerRef?: RefObject<HTMLElement | null>;
children: ReactNode;

@@ -22,2 +18,6 @@ /**

/**
* The `ref` to the component where the portal will be attached to.
*/
containerRef?: RefObject<HTMLElement | null>;
/**
* If `true`, the forwarding will be disabled.

@@ -33,3 +33,3 @@ */

declare const Portal: {
({ containerRef, appendToParentPortal, isDisabled, children, }: PortalProps): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
({ appendToParentPortal, children, containerRef, isDisabled, }: PortalProps): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
displayName: string;

@@ -36,0 +36,0 @@ __ui__: string;

@@ -36,4 +36,4 @@ "use client"

var [PortalProvider, usePortal] = (0, import_utils.createContext)({
strict: false,
name: "PortalContext"
name: "PortalContext",
strict: false
});

@@ -44,5 +44,5 @@

var ContainerPortal = ({
appendToParentPortal,
children,
containerRef,
appendToParentPortal
containerRef
}) => {

@@ -55,3 +55,3 @@ const parent = containerRef.current;

const node = ownerDocument.createElement("div");
if (node) node.className = "ui-portal";
node.className = "ui-portal";
return node;

@@ -89,3 +89,2 @@ }, [parent]);

const host = appendToParentPortal ? parent != null ? parent : ownerDocument.body : ownerDocument.body;
if (!host) return;
el.current = ownerDocument.createElement("div");

@@ -109,6 +108,6 @@ el.current.className = "ui-portal";

var Portal = ({
appendToParentPortal = true,
children,
containerRef,
appendToParentPortal = true,
isDisabled,
children
isDisabled
}) => {

@@ -115,0 +114,0 @@ if (isDisabled) return children;

{
"name": "@yamada-ui/portal",
"version": "1.0.23-next-20241005235555",
"version": "1.0.23-next-20241008193728",
"description": "Yamada UI portal component",

@@ -39,3 +39,3 @@ "keywords": [

"dependencies": {
"@yamada-ui/utils": "1.5.2"
"@yamada-ui/utils": "1.5.3-next-20241008193728"
},

@@ -42,0 +42,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc