react-modal-global
Advanced tools
Comparing version 0.9.16 to 0.9.17
@@ -11,4 +11,4 @@ 'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react"),extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(a[e]=c[e])};return extendStatics(d,b)}; | ||
forkedQueue:[]};modalPrivate.dispatch=a.setState.bind(a);return a}__extends(b,d);Object.defineProperty(b.prototype,"className",{get:function(){return this.props.className||"modal"},enumerable:!1,configurable:!0});b.prototype.render=function(){var a,c,e=this.state,f=e.active;e=e.queue;e=e[e.length-1];var g=(null===(a=null===e||void 0===e?void 0:e.params)||void 0===a?0:a.closable)?stopPropagation(e.close):void 0;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",__assign({className:classWithModifiers(this.className, | ||
f&&"active"),"aria-modal":!0,"aria-hidden":!f},{children:jsxRuntime.jsx("div",__assign({className:this.className+"__container",onClick:g},{children:jsxRuntime.jsx(modalContext.Provider,__assign({value:e||null},{children:(null===e||void 0===e?void 0:e.component)&&jsxRuntime.jsx(e.component,__assign({},e.params))}))}))}),null===(c=null===e||void 0===e?void 0:e.params)||void 0===c?void 0:c.id),this.renderForks()]})};b.prototype.renderForks=function(){var a=this;return this.state.forkedQueue.map(function(c){var e; | ||
f&&"active"),"aria-modal":!0,"aria-hidden":!f},{children:jsxRuntime.jsx("div",__assign({className:this.className+"__container",onClick:g},{children:jsxRuntime.jsx(modalContext.Provider,__assign({value:e||null},{children:(null===e||void 0===e?void 0:e.component)&&react.createElement(e.component,__assign({},e.params,{key:null===(c=null===e||void 0===e?void 0:e.params)||void 0===c?void 0:c.id}))}))}))})),this.renderForks()]})};b.prototype.renderForks=function(){var a=this;return this.state.forkedQueue.map(function(c){var e; | ||
return jsxRuntime.jsx("div",__assign({className:a.className,"aria-modal":!0},{children:jsxRuntime.jsx("div",__assign({className:a.className+"__container",onClick:(null===(e=c.params)||void 0===e?0:e.closable)?stopPropagation(c.close):void 0},{children:jsxRuntime.jsx(modalContext.Provider,__assign({value:c},{children:jsxRuntime.jsx(c.component,__assign({},c.params))}))}))}),c.params.id)})};return b}(react.Component); | ||
function useModalContext(){var d=react.useContext(modalContext);if(!d)throw Error("ModalError: Out of Modal context");return d}exports.Modal=Modal;exports.ModalContainer=ModalContainer;exports.useModalContext=useModalContext |
{ | ||
"name": "react-modal-global", | ||
"version": "0.9.16", | ||
"version": "0.9.17", | ||
"description": "React Modal but Global", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15951
81