Socket
Socket
Sign inDemoInstall

@react-md/portal

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-md/portal - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

26

CHANGELOG.md

@@ -6,2 +6,28 @@ # Change Log

# [4.0.0](https://github.com/mlaursen/react-md/compare/v3.1.1...v4.0.0) (2021-11-24)
### Features
* Update to use new JSX Transform and latest `eslint` ([8111cd3](https://github.com/mlaursen/react-md/commit/8111cd31e45bf60c1b92509264af1b71dfba5696))
* **@react-md/portal:** `ConditionalPortal` supports ReactNode children ([c83d578](https://github.com/mlaursen/react-md/commit/c83d5784de150ccfa8d2605222b115e94baa35c1))
### Other Internal Changes
* always skip lib check ([229cef1](https://github.com/mlaursen/react-md/commit/229cef1e3d338ea362c1a2eaac06204c84ff21a6))
* **react-md:** Remove prop-types package and usage ([2637a6f](https://github.com/mlaursen/react-md/commit/2637a6f43d681a06054e3a4518f692cf51baf997))
### Breaking Changes
* Minimum React version is now 16.14 instead of 16.8
* **react-md:** There will no longer be run-time prop validation with
the `prop-types` package.
# [3.1.0](https://github.com/mlaursen/react-md/compare/v3.0.1...v3.1.0) (2021-09-10)

@@ -8,0 +34,0 @@

34

es/ConditionalPortal.js

@@ -1,2 +0,13 @@

import React from "react";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
import { Portal } from "./Portal";

@@ -11,23 +22,6 @@ /**

if (!portal && !portalInto && !portalIntoId) {
return children;
return _jsx(_Fragment, { children: children }, void 0);
}
return (React.createElement(Portal, { into: portalInto, intoId: portalIntoId }, children));
return (_jsx(Portal, __assign({ into: portalInto, intoId: portalIntoId }, { children: children }), void 0));
}
/* istanbul ignore next */
if (process.env.NODE_ENV !== "production") {
try {
var PropTypes = require("prop-types");
ConditionalPortal.propTypes = {
portal: PropTypes.bool,
portalInto: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.object,
]),
portalIntoId: PropTypes.string,
children: PropTypes.node,
};
}
catch (e) { }
}
//# sourceMappingURL=ConditionalPortal.js.map

@@ -27,18 +27,2 @@ import { useEffect, useState } from "react";

}
/* istanbul ignore next */
if (process.env.NODE_ENV !== "production") {
try {
var PropTypes = require("prop-types");
Portal.propTypes = {
into: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.object,
]),
intoId: PropTypes.string,
children: PropTypes.node,
};
}
catch (e) { }
}
//# sourceMappingURL=Portal.js.map

@@ -1,3 +0,3 @@

import { ReactElement } from "react";
import { PortalInto } from "./getContainer";
import type { ReactElement, ReactNode } from "react";
import type { PortalInto } from "./getContainer";
/**

@@ -24,4 +24,6 @@ * If any of these props are defined on a component, the component will render

* This children to render.
*
* @remarks \@since 4.0.0 Allows `ReactNode` instead of `ReactElement | null`
*/
children: ReactElement | null;
children: ReactNode;
}

@@ -33,10 +35,2 @@ /**

*/
export declare function ConditionalPortal({ portal, portalInto, portalIntoId, children, }: ConditionalPortalProps): ReactElement | null;
export declare namespace ConditionalPortal {
var propTypes: {
portal: any;
portalInto: any;
portalIntoId: any;
children: any;
};
}
export declare function ConditionalPortal({ portal, portalInto, portalIntoId, children, }: ConditionalPortalProps): ReactElement;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConditionalPortal = void 0;
var react_1 = __importDefault(require("react"));
var jsx_runtime_1 = require("react/jsx-runtime");
var Portal_1 = require("./Portal");

@@ -17,24 +25,7 @@ /**

if (!portal && !portalInto && !portalIntoId) {
return children;
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }, void 0);
}
return (react_1.default.createElement(Portal_1.Portal, { into: portalInto, intoId: portalIntoId }, children));
return ((0, jsx_runtime_1.jsx)(Portal_1.Portal, __assign({ into: portalInto, intoId: portalIntoId }, { children: children }), void 0));
}
exports.ConditionalPortal = ConditionalPortal;
/* istanbul ignore next */
if (process.env.NODE_ENV !== "production") {
try {
var PropTypes = require("prop-types");
ConditionalPortal.propTypes = {
portal: PropTypes.bool,
portalInto: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.object,
]),
portalIntoId: PropTypes.string,
children: PropTypes.node,
};
}
catch (e) { }
}
//# sourceMappingURL=ConditionalPortal.js.map

@@ -32,8 +32,1 @@ import { ReactElement, ReactNode } from "react";

export declare function Portal({ into, intoId, children, }: PortalProps): ReactElement | null;
export declare namespace Portal {
var propTypes: {
into: any;
intoId: any;
children: any;
};
}

@@ -31,18 +31,2 @@ "use strict";

exports.Portal = Portal;
/* istanbul ignore next */
if (process.env.NODE_ENV !== "production") {
try {
var PropTypes = require("prop-types");
Portal.propTypes = {
into: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
PropTypes.object,
]),
intoId: PropTypes.string,
children: PropTypes.node,
};
}
catch (e) { }
}
//# sourceMappingURL=Portal.js.map
{
"name": "@react-md/portal",
"version": "3.1.0",
"version": "4.0.0",
"description": "This package is for including icons within react-md. There is included support for both font icons and SVG icons. There is also a helper component for applying spacing between icons and text.",

@@ -37,12 +37,9 @@ "main": "./lib/index.js",

"peerDependencies": {
"react": ">= 16.8",
"react-dom": ">= 16.8"
"react": ">= 16.14",
"react-dom": ">= 16.14"
},
"optionalDependencies": {
"prop-types": ">= 15.6"
},
"publishConfig": {
"access": "public"
},
"gitHead": "5891a3255f12fb34d2cc82d81d10f85f712a21e8"
"gitHead": "a9f2d64a777698fa65bb3196f6063cdd8321f5cb"
}

@@ -37,3 +37,3 @@ # @react-md/portal

```tsx
import React, { useState } from "react";
import { useState } from "react";
import { render } from "react-dom";

@@ -40,0 +40,0 @@ import { Portal } from "@react-md/portal";

@@ -1,3 +0,3 @@

import { ReactElement } from "react";
import { PortalInto } from "./getContainer";
import type { ReactElement, ReactNode } from "react";
import type { PortalInto } from "./getContainer";
/**

@@ -24,4 +24,6 @@ * If any of these props are defined on a component, the component will render

* This children to render.
*
* @remarks \@since 4.0.0 Allows `ReactNode` instead of `ReactElement | null`
*/
children: ReactElement | null;
children: ReactNode;
}

@@ -33,10 +35,2 @@ /**

*/
export declare function ConditionalPortal({ portal, portalInto, portalIntoId, children, }: ConditionalPortalProps): ReactElement | null;
export declare namespace ConditionalPortal {
var propTypes: {
portal: any;
portalInto: any;
portalIntoId: any;
children: any;
};
}
export declare function ConditionalPortal({ portal, portalInto, portalIntoId, children, }: ConditionalPortalProps): ReactElement;

@@ -32,8 +32,1 @@ import { ReactElement, ReactNode } from "react";

export declare function Portal({ into, intoId, children, }: PortalProps): ReactElement | null;
export declare namespace Portal {
var propTypes: {
into: any;
intoId: any;
children: any;
};
}

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