Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-modal

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-modal - npm Package Compare versions

Comparing version 3.0.0 to 3.0.2

.eslintrc.js

23

CHANGELOG.md

@@ -1,7 +0,28 @@

v2.4.1 - Fri, 06 Oct 2017 12:09:11 UTC
v3.0.2 - Sat, 14 Oct 2017 12:03:32 UTC
--------------------------------------
- [d98f091](../../commit/d98f091) [chore] update CHANGELOG.md
- [95f628a](../../commit/95f628a) [chore] fix prettier linting after merge issue
- [47d0d87](../../commit/47d0d87) [chore] prettier all the things
- [c0620e0](../../commit/c0620e0) [chore] Use babel-preset-env instead of babel-preset-es2015
- [2a05bd8](../../commit/2a05bd8) [chore] Updated eslint and a few related deps
- [b3701f6](../../commit/b3701f6) [fixed] Issue #526 Import PropTypes as default import.
v3.0.0 - Fri, 06 Oct 2017 13:29:20 UTC
--------------------------------------
- [a2a7128](../../commit/a2a7128) Release v3.0.0.
- [d0f242b](../../commit/d0f242b) Merged next into master.
- [de3c039](../../commit/de3c039) [chore] remove warning about injectCSS.
- [f77b53e](../../commit/f77b53e) [chore] use canUseDOM from exenv.
- [cc4577c](../../commit/cc4577c) Release 3.0.0-rc2.
- [1260850](../../commit/1260850) [fixed] backward compatibility with previous react versions.
- [45ca9d4](../../commit/45ca9d4) Release v3.0.0-rc1.
- [d25563c](../../commit/d25563c) [fixed] check for both window and document.createElement.
- [2b835d6](../../commit/2b835d6) [fixed] typeof returns a string (canUseDOM).
- [cd10612](../../commit/cd10612) Release v3.0.0-alpha.
- [b942504](../../commit/b942504) [feature] initial support for react 16.
v2.4.1 - Fri, 06 Oct 2017 13:23:42 UTC

@@ -8,0 +29,0 @@ --------------------------------------

9

dist/react-modal.min.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactModal=t(require("react"),require("react-dom")):e.ReactModal=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=10)}([function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function o(e,t,n,o,a,u,s,i){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,a,u,s,i],f=0;l=new Error(t.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}var r=function(e){};r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},e.exports=o},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n){t.exports=e},function(e,t,n){var o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,r=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o};e.exports=n(13)(r,!0)},function(e,t,n){"use strict";var o=n(0),r=o;!function(){var e=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=0,a="Warning: "+e.replace(/%s/g,function(){return n[r++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}};r=function(t,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==n.indexOf("Failed Composite propType: ")&&!t){for(var o=arguments.length,r=Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];e.apply(void 0,[n].concat(r))}}}(),e.exports=r},function(e,t,n){"use strict";function o(e){return e.offsetWidth<=0&&e.offsetHeight<=0||"none"===e.style.display}function r(e){for(var t=e;t&&t!==document.body;){if(o(t))return!1;t=t.parentNode}return!0}function a(e,t){var n=e.nodeName.toLowerCase();return(i.test(n)&&!e.disabled||("a"===n?e.href||t:t))&&r(e)}function u(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&a(e,!n)}function s(e){return[].slice.call(e.querySelectorAll("*"),0).filter(u)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;/*!
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactModal=t(require("react"),require("react-dom")):e.ReactModal=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=10)}([function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function o(e,t,n,o,a,s,u,i){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,a,s,u,i],f=0;l=new Error(t.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}var r=function(e){};r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},e.exports=o},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n){t.exports=e},function(e,t,n){var o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,r=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o};e.exports=n(13)(r,!0)},function(e,t,n){"use strict";var o=n(0),r=o,a=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=0,a="Warning: "+e.replace(/%s/g,function(){return n[r++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}};r=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,o=Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];a.apply(void 0,[t].concat(o))}},e.exports=r},function(e,t,n){"use strict";function o(e){return e.offsetWidth<=0&&e.offsetHeight<=0||"none"===e.style.display}function r(e){for(var t=e;t&&t!==document.body;){if(o(t))return!1;t=t.parentNode}return!0}function a(e,t){var n=e.nodeName.toLowerCase();return(i.test(n)&&!e.disabled||("a"===n?e.href||t:t))&&r(e)}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&a(e,!n)}function u(e){return[].slice.call(e.querySelectorAll("*"),0).filter(s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;/*!
* Adapted from jQuery UI core

@@ -12,3 +12,8 @@ *

*/
var i=/input|select|textarea|button|object/;e.exports=t.default},function(e,t,n){"use strict";function o(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function r(e){var t=e;if("string"==typeof t){var n=document.querySelectorAll(t);o(n,t),t="length"in n?n[0]:n}return f=t||f}function a(){return!(!document||!document.body)&&(r(document.body),!0)}function u(e){if(!e&&!f&&!a())throw new Error(["react-modal: Cannot fallback to `document.body`, because it's not ready or available.","If you are doing server-side rendering, use this function to defined an element.","`Modal.setAppElement(el)` to make this accessible"])}function s(e){u(e),(e||f).setAttribute("aria-hidden","true")}function i(e){u(e),(e||f).removeAttribute("aria-hidden")}function l(){f=null}function c(){f=document.body}Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=o,t.setElement=r,t.tryForceFallback=a,t.validateElement=u,t.hide=s,t.show=i,t.documentNotReadyOrSSRTesting=l,t.resetForTesting=c;var f=null},function(e,t,n){"use strict";function o(){return s}function r(e){return s[e]||(s[e]=0),s[e]+=1,e}function a(e){return s[e]&&(s[e]-=1),e}function u(){return Object.keys(s).reduce(function(e,t){return e+s[t]},0)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=o,t.add=r,t.remove=a,t.totalCount=u;var s={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var o=n(20),r=function(e){return e&&e.__esModule?e:{default:e}}(o),a=r.default,u=a.canUseDOM?window.HTMLElement:{};t.canUseDOM=a.canUseDOM;t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e()}Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(3),f=o(c),p=n(12),d=o(p),y=n(4),v=o(y),h=n(16),m=o(h),b=n(7),O=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(b),C=n(9),w=o(C),g=t.portalClassName="ReactModalPortal",T=t.bodyOpenClassName="ReactModal__Body--open",P=void 0!==d.default.createPortal,_=P?d.default.createPortal:d.default.unstable_renderSubtreeIntoContainer,j=function(e){function t(){var e,n,o,u;r(this,t);for(var l=arguments.length,c=Array(l),p=0;p<l;p++)c[p]=arguments[p];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),o.removePortal=function(){!P&&d.default.unmountComponentAtNode(o.node),s(o.props.parentSelector).removeChild(o.node)},o.portalRef=function(e){o.portal=e},o.renderPortal=function(e){var n=_(o,f.default.createElement(m.default,i({defaultStyles:t.defaultStyles},e)),o.node);o.portalRef(n)},u=n,a(o,u)}return u(t,e),l(t,[{key:"componentDidMount",value:function(){if(C.canUseDOM){P||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName;s(this.props.parentSelector).appendChild(this.node),!P&&this.renderPortal(this.props)}}},{key:"componentWillReceiveProps",value:function(e){if(C.canUseDOM){var t=e.isOpen;if(this.props.isOpen||t){var n=s(this.props.parentSelector),o=s(e.parentSelector);o!==n&&(n.removeChild(this.node),o.appendChild(this.node)),!P&&this.renderPortal(e)}}}},{key:"componentWillUpdate",value:function(e){C.canUseDOM&&e.portalClassName!==this.props.portalClassName&&(this.node.className=e.portalClassName)}},{key:"componentWillUnmount",value:function(){if(C.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return C.canUseDOM&&P?(!this.node&&P&&(this.node=document.createElement("div")),_(f.default.createElement(m.default,i({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){O.setElement(e)}}]),t}(c.Component);j.propTypes={isOpen:v.default.bool.isRequired,style:v.default.shape({content:v.default.object,overlay:v.default.object}),portalClassName:v.default.string,bodyOpenClassName:v.default.string,className:v.default.oneOfType([v.default.string,v.default.object]),overlayClassName:v.default.oneOfType([v.default.string,v.default.object]),appElement:v.default.instanceOf(w.default),onAfterOpen:v.default.func,onRequestClose:v.default.func,closeTimeoutMS:v.default.number,ariaHideApp:v.default.bool,shouldFocusAfter:v.default.bool,shouldCloseOnOverlayClick:v.default.bool,parentSelector:v.default.func,aria:v.default.object,role:v.default.string,contentLabel:v.default.string},j.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:T,ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnOverlayClick:!0,parentSelector:function(){return document.body}},j.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},t.default=j},function(e,n){e.exports=t},function(e,t,n){"use strict";var o=n(0),r=n(1),a=n(5),u=n(2),s=n(14);e.exports=function(e,t){function n(e){var t=e&&(P&&e[P]||e[_]);if("function"==typeof t)return t}function i(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function l(e){this.message=e,this.stack=""}function c(e){function n(n,i,c,f,p,d,y){if(f=f||j,d=d||c,y!==u)if(t)r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("undefined"!=typeof console){var v=f+":"+c;!o[v]&&s<3&&(a(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",d,f),o[v]=!0,s++)}return null==i[c]?n?new l(null===i[c]?"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `null`.":"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `undefined`."):null:e(i,c,f,p,d)}var o={},s=0,i=n.bind(null,!1);return i.isRequired=n.bind(null,!0),i}function f(e){function t(t,n,o,r,a,u){var s=t[n];if(C(s)!==e)return new l("Invalid "+r+" `"+a+"` of type `"+w(s)+"` supplied to `"+o+"`, expected `"+e+"`.");return null}return c(t)}function p(e){function t(t,n,o,r,a){if("function"!=typeof e)return new l("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new l("Invalid "+r+" `"+a+"` of type `"+C(s)+"` supplied to `"+o+"`, expected an array.")}for(var i=0;i<s.length;i++){var c=e(s,i,o,r,a+"["+i+"]",u);if(c instanceof Error)return c}return null}return c(t)}function d(e){function t(t,n,o,r,a){if(!(t[n]instanceof e)){var u=e.name||j;return new l("Invalid "+r+" `"+a+"` of type `"+T(t[n])+"` supplied to `"+o+"`, expected instance of `"+u+"`.")}return null}return c(t)}function y(e){function t(t,n,o,r,a){for(var u=t[n],s=0;s<e.length;s++)if(i(u,e[s]))return null;return new l("Invalid "+r+" `"+a+"` of value `"+u+"` supplied to `"+o+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?c(t):(a(!1,"Invalid argument supplied to oneOf, expected an instance of array."),o.thatReturnsNull)}function v(e){function t(t,n,o,r,a){if("function"!=typeof e)return new l("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[n],i=C(s);if("object"!==i)return new l("Invalid "+r+" `"+a+"` of type `"+i+"` supplied to `"+o+"`, expected an object.");for(var c in s)if(s.hasOwnProperty(c)){var f=e(s,c,o,r,a+"."+c,u);if(f instanceof Error)return f}return null}return c(t)}function h(e){function t(t,n,o,r,a){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,o,r,a,u))return null}return new l("Invalid "+r+" `"+a+"` supplied to `"+o+"`.")}if(!Array.isArray(e))return a(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),o.thatReturnsNull;for(var n=0;n<e.length;n++){var r=e[n];if("function"!=typeof r)return a(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",g(r),n),o.thatReturnsNull}return c(t)}function m(e){function t(t,n,o,r,a){var s=t[n],i=C(s);if("object"!==i)return new l("Invalid "+r+" `"+a+"` of type `"+i+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var f=e[c];if(f){var p=f(s,c,o,r,a+"."+c,u);if(p)return p}}return null}return c(t)}function b(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(b);if(null===t||e(t))return!0;var o=n(t);if(!o)return!1;var r,a=o.call(t);if(o!==t.entries){for(;!(r=a.next()).done;)if(!b(r.value))return!1}else for(;!(r=a.next()).done;){var u=r.value;if(u&&!b(u[1]))return!1}return!0;default:return!1}}function O(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function C(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":O(t,e)?"symbol":t}function w(e){if(void 0===e||null===e)return""+e;var t=C(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=w(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function T(e){return e.constructor&&e.constructor.name?e.constructor.name:j}var P="function"==typeof Symbol&&Symbol.iterator,_="@@iterator",j="<<anonymous>>",E={array:f("array"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:function(){return c(o.thatReturnsNull)}(),arrayOf:p,element:function(){function t(t,n,o,r,a){var u=t[n];if(!e(u)){return new l("Invalid "+r+" `"+a+"` of type `"+C(u)+"` supplied to `"+o+"`, expected a single ReactElement.")}return null}return c(t)}(),instanceOf:d,node:function(){function e(e,t,n,o,r){return b(e[t])?null:new l("Invalid "+o+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}return c(e)}(),objectOf:v,oneOf:y,oneOfType:h,shape:m};return l.prototype=Error.prototype,E.checkPropTypes=s,E.PropTypes=E,E}},function(e,t,n){"use strict";function o(e,t,n,o,i){for(var l in e)if(e.hasOwnProperty(l)){var c;try{r("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",o||"React class",n,l),c=e[l](t,l,o,n,null,u)}catch(e){c=e}if(a(!c||c instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,l,typeof c),c instanceof Error&&!(c.message in s)){s[c.message]=!0;var f=i?i():"";a(!1,"Failed %s type: %s%s",n,c.message,null!=f?f:"")}}}var r=n(1),a=n(5),u=n(2),s={};e.exports=o},function(e,t,n){"use strict";var o=n(0),r=n(1),a=n(2);e.exports=function(){function e(e,t,n,o,u,s){s!==a&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=n(3),p=r(f),d=n(4),y=n(17),v=o(y),h=n(18),m=r(h),b=n(7),O=o(b),C=n(8),w=o(C),g=n(19),T=o(g),P=n(9),_=r(P),j={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},E=9,M=27,R=function(e){function t(e){a(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setFocusAfterRender=function(e){n.focusAfterRender=n.props.shouldFocusAfterRender&&e},n.setOverlayRef=function(e){n.overlay=e},n.setContentRef=function(e){n.content=e},n.afterClose=function(){v.returnFocus(),v.teardownScopedFocus()},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(v.setupScopedFocus(n.node),v.markForFocusLater(),n.setState({isOpen:!0},function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen()}))},n.close=function(){n.beforeClose(),n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())})},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===E&&(0,m.default)(n.content,e),e.keyCode===M&&(e.preventDefault(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null,n.moveFromContentToOverlay=null},n.handleOverlayOnMouseUp=function(){null===n.moveFromContentToOverlay&&(n.shouldClose=!1)},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(){n.moveFromContentToOverlay=!1},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1,n.moveFromContentToOverlay=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":l(t))?t:{base:j[e],afterOpen:j[e]+"--after-open",beforeClose:j[e]+"--before-close"},r=o.base;return n.state.afterOpen&&(r=r+" "+o.afterOpen),n.state.beforeClose&&(r=r+" "+o.beforeClose),"string"==typeof t&&t?r+" "+t:r},n.ariaAttributes=function(e){return Object.keys(e).reduce(function(t,n){return t["aria-"+n]=e[n],t},{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return s(t,e),c(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&(this.setFocusAfterRender(!0),this.open())}},{key:"componentWillReceiveProps",value:function(e){e.bodyOpenClassName!==this.props.bodyOpenClassName&&console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),!this.props.isOpen&&e.isOpen?(this.setFocusAfterRender(!0),this.open()):this.props.isOpen&&!e.isOpen&&this.close()}},{key:"componentDidUpdate",value:function(){this.focusAfterRender&&(this.focusContent(),this.setFocusAfterRender(!1))}},{key:"componentWillUnmount",value:function(){this.beforeClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.bodyOpenClassName;T.add(o),n&&O.hide(t)}},{key:"beforeClose",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.bodyOpenClassName;T.remove(o),n&&w.totalCount()<1&&O.show(t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.overlayClassName,o=e.defaultStyles,r=t?{}:o.content,a=n?{}:o.overlay;return this.shouldBeClosed()?null:p.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",n),style:i({},a,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown,onMouseUp:this.handleOverlayOnMouseUp},p.default.createElement("div",i({ref:this.setContentRef,style:i({},r,this.props.style.content),className:this.buildClassName("content",t),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.ariaAttributes(this.props.aria||{})),this.props.children))}}]),t}(f.Component);R.defaultProps={style:{overlay:{},content:{}}},R.propTypes={isOpen:d.PropTypes.bool.isRequired,defaultStyles:d.PropTypes.shape({content:d.PropTypes.object,overlay:d.PropTypes.object}),style:d.PropTypes.shape({content:d.PropTypes.object,overlay:d.PropTypes.object}),className:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.object]),overlayClassName:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.object]),bodyOpenClassName:d.PropTypes.string,ariaHideApp:d.PropTypes.bool,appElement:d.PropTypes.instanceOf(_.default),onAfterOpen:d.PropTypes.func,onRequestClose:d.PropTypes.func,closeTimeoutMS:d.PropTypes.number,shouldFocusAfterRender:d.PropTypes.bool,shouldCloseOnOverlayClick:d.PropTypes.bool,role:d.PropTypes.string,contentLabel:d.PropTypes.string,aria:d.PropTypes.object,children:d.PropTypes.node},t.default=R,e.exports=t.default},function(e,t,n){"use strict";function o(){d=!0}function r(){if(d){if(d=!1,!p)return;setTimeout(function(){if(!p.contains(document.activeElement)){((0,c.default)(p)[0]||p).focus()}},0)}}function a(){f.push(document.activeElement)}function u(){var e=null;try{return e=f.pop(),void e.focus()}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}}function s(e){p=e,window.addEventListener?(window.addEventListener("blur",o,!1),document.addEventListener("focus",r,!0)):(window.attachEvent("onBlur",o),document.attachEvent("onFocus",r))}function i(){p=null,window.addEventListener?(window.removeEventListener("blur",o),document.removeEventListener("focus",r)):(window.detachEvent("onBlur",o),document.detachEvent("onFocus",r))}Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=o,t.handleFocus=r,t.markForFocusLater=a,t.returnFocus=u,t.setupScopedFocus=s,t.teardownScopedFocus=i;var l=n(6),c=function(e){return e&&e.__esModule?e:{default:e}}(l),f=[],p=null,d=!1},function(e,t,n){"use strict";function o(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();n[t.shiftKey?0:n.length-1]!==document.activeElement&&e!==document.activeElement||(t.preventDefault(),n[t.shiftKey?n.length-1:0].focus())}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(6),a=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t,n){"use strict";function o(e){e.split(" ").map(u.add).forEach(function(e){return document.body.classList.add(e)})}function r(e){var t=u.get();e.split(" ").map(u.remove).filter(function(e){return 0===t[e]}).forEach(function(e){return document.body.classList.remove(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.add=o,t.remove=r;var a=n(8),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a)},function(e,t,n){var o;/*!
var i=/input|select|textarea|button|object/;e.exports=t.default},function(e,t,n){"use strict";function o(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function r(e){var t=e;if("string"==typeof t){var n=document.querySelectorAll(t);o(n,t),t="length"in n?n[0]:n}return f=t||f}function a(){return!(!document||!document.body)&&(r(document.body),!0)}function s(e){if(!e&&!f&&!a())throw new Error(["react-modal: Cannot fallback to `document.body`, because it is not","ready or available. If you are doing server-side rendering, use this","function to defined an element. `Modal.setAppElement(el)` to make","this accessible"].join(" "))}function u(e){s(e),(e||f).setAttribute("aria-hidden","true")}function i(e){s(e),(e||f).removeAttribute("aria-hidden")}function l(){f=null}function c(){f=document.body}Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=o,t.setElement=r,t.tryForceFallback=a,t.validateElement=s,t.hide=u,t.show=i,t.documentNotReadyOrSSRTesting=l,t.resetForTesting=c;var f=null},function(e,t,n){"use strict";function o(){return u}function r(e){return u[e]||(u[e]=0),u[e]+=1,e}function a(e){return u[e]&&(u[e]-=1),e}function s(){return Object.keys(u).reduce(function(e,t){return e+u[t]},0)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=o,t.add=r,t.remove=a,t.totalCount=s;var u={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var o=n(21),r=function(e){return e&&e.__esModule?e:{default:e}}(o),a=r.default,s=a.canUseDOM?window.HTMLElement:{};t.canUseDOM=a.canUseDOM;t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e()}Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(3),f=o(c),p=n(12),d=o(p),y=n(4),v=o(y),h=n(17),m=o(h),b=n(7),O=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(b),w=n(9),C=o(w),g=t.portalClassName="ReactModalPortal",T=t.bodyOpenClassName="ReactModal__Body--open",j=void 0!==d.default.createPortal,P=j?d.default.createPortal:d.default.unstable_renderSubtreeIntoContainer,_=function(e){function t(){var e,n,o,s;r(this,t);for(var l=arguments.length,c=Array(l),p=0;p<l;p++)c[p]=arguments[p];return n=o=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),o.removePortal=function(){!j&&d.default.unmountComponentAtNode(o.node),u(o.props.parentSelector).removeChild(o.node)},o.portalRef=function(e){o.portal=e},o.renderPortal=function(e){var n=P(o,f.default.createElement(m.default,i({defaultStyles:t.defaultStyles},e)),o.node);o.portalRef(n)},s=n,a(o,s)}return s(t,e),l(t,[{key:"componentDidMount",value:function(){if(w.canUseDOM){j||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName;u(this.props.parentSelector).appendChild(this.node),!j&&this.renderPortal(this.props)}}},{key:"componentWillReceiveProps",value:function(e){if(w.canUseDOM){var t=e.isOpen;if(this.props.isOpen||t){var n=u(this.props.parentSelector),o=u(e.parentSelector);o!==n&&(n.removeChild(this.node),o.appendChild(this.node)),!j&&this.renderPortal(e)}}}},{key:"componentWillUpdate",value:function(e){w.canUseDOM&&e.portalClassName!==this.props.portalClassName&&(this.node.className=e.portalClassName)}},{key:"componentWillUnmount",value:function(){if(w.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return w.canUseDOM&&j?(!this.node&&j&&(this.node=document.createElement("div")),P(f.default.createElement(m.default,i({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){O.setElement(e)}}]),t}(c.Component);_.propTypes={isOpen:v.default.bool.isRequired,style:v.default.shape({content:v.default.object,overlay:v.default.object}),portalClassName:v.default.string,bodyOpenClassName:v.default.string,className:v.default.oneOfType([v.default.string,v.default.object]),overlayClassName:v.default.oneOfType([v.default.string,v.default.object]),appElement:v.default.instanceOf(C.default),onAfterOpen:v.default.func,onRequestClose:v.default.func,closeTimeoutMS:v.default.number,ariaHideApp:v.default.bool,shouldFocusAfter:v.default.bool,shouldCloseOnOverlayClick:v.default.bool,parentSelector:v.default.func,aria:v.default.object,role:v.default.string,contentLabel:v.default.string,shouldCloseOnEsc:v.default.bool},_.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:T,ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,parentSelector:function(){return document.body}},_.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},t.default=_},function(e,n){e.exports=t},function(e,t,n){"use strict";var o=n(0),r=n(1),a=n(5),s=n(14),u=n(2),i=n(15);e.exports=function(e,t){function n(e){var t=e&&(_&&e[_]||e[E]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function c(e){this.message=e,this.stack=""}function f(e){function n(n,i,l,f,p,d,y){if(f=f||M,d=d||l,y!==u)if(t)r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("undefined"!=typeof console){var v=f+":"+l;!o[v]&&s<3&&(a(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",d,f),o[v]=!0,s++)}return null==i[l]?n?new c(null===i[l]?"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `null`.":"The "+p+" `"+d+"` is marked as required in `"+f+"`, but its value is `undefined`."):null:e(i,l,f,p,d)}var o={},s=0,i=n.bind(null,!1);return i.isRequired=n.bind(null,!0),i}function p(e){function t(t,n,o,r,a,s){var u=t[n];if(g(u)!==e)return new c("Invalid "+r+" `"+a+"` of type `"+T(u)+"` supplied to `"+o+"`, expected `"+e+"`.");return null}return f(t)}function d(e){function t(t,n,o,r,a){if("function"!=typeof e)return new c("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new c("Invalid "+r+" `"+a+"` of type `"+g(s)+"` supplied to `"+o+"`, expected an array.")}for(var i=0;i<s.length;i++){var l=e(s,i,o,r,a+"["+i+"]",u);if(l instanceof Error)return l}return null}return f(t)}function y(e){function t(t,n,o,r,a){if(!(t[n]instanceof e)){var s=e.name||M;return new c("Invalid "+r+" `"+a+"` of type `"+P(t[n])+"` supplied to `"+o+"`, expected instance of `"+s+"`.")}return null}return f(t)}function v(e){function t(t,n,o,r,a){for(var s=t[n],u=0;u<e.length;u++)if(l(s,e[u]))return null;return new c("Invalid "+r+" `"+a+"` of value `"+s+"` supplied to `"+o+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?f(t):(a(!1,"Invalid argument supplied to oneOf, expected an instance of array."),o.thatReturnsNull)}function h(e){function t(t,n,o,r,a){if("function"!=typeof e)return new c("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[n],i=g(s);if("object"!==i)return new c("Invalid "+r+" `"+a+"` of type `"+i+"` supplied to `"+o+"`, expected an object.");for(var l in s)if(s.hasOwnProperty(l)){var f=e(s,l,o,r,a+"."+l,u);if(f instanceof Error)return f}return null}return f(t)}function m(e){function t(t,n,o,r,a){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,o,r,a,u))return null}return new c("Invalid "+r+" `"+a+"` supplied to `"+o+"`.")}if(!Array.isArray(e))return a(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),o.thatReturnsNull;for(var n=0;n<e.length;n++){var r=e[n];if("function"!=typeof r)return a(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",j(r),n),o.thatReturnsNull}return f(t)}function b(e){function t(t,n,o,r,a){var s=t[n],i=g(s);if("object"!==i)return new c("Invalid "+r+" `"+a+"` of type `"+i+"` supplied to `"+o+"`, expected `object`.");for(var l in e){var f=e[l];if(f){var p=f(s,l,o,r,a+"."+l,u);if(p)return p}}return null}return f(t)}function O(e){function t(t,n,o,r,a){var i=t[n],l=g(i);if("object"!==l)return new c("Invalid "+r+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");var f=s({},t[n],e);for(var p in f){var d=e[p];if(!d)return new c("Invalid "+r+" `"+a+"` key `"+p+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=d(i,p,o,r,a+"."+p,u);if(y)return y}return null}return f(t)}function w(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(w);if(null===t||e(t))return!0;var o=n(t);if(!o)return!1;var r,a=o.call(t);if(o!==t.entries){for(;!(r=a.next()).done;)if(!w(r.value))return!1}else for(;!(r=a.next()).done;){var s=r.value;if(s&&!w(s[1]))return!1}return!0;default:return!1}}function C(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":C(t,e)?"symbol":t}function T(e){if(void 0===e||null===e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function j(e){var t=T(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function P(e){return e.constructor&&e.constructor.name?e.constructor.name:M}var _="function"==typeof Symbol&&Symbol.iterator,E="@@iterator",M="<<anonymous>>",x={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return f(o.thatReturnsNull)}(),arrayOf:d,element:function(){function t(t,n,o,r,a){var s=t[n];if(!e(s)){return new c("Invalid "+r+" `"+a+"` of type `"+g(s)+"` supplied to `"+o+"`, expected a single ReactElement.")}return null}return f(t)}(),instanceOf:y,node:function(){function e(e,t,n,o,r){return w(e[t])?null:new c("Invalid "+o+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:h,oneOf:v,oneOfType:m,shape:b,exact:O};return c.prototype=Error.prototype,x.checkPropTypes=i,x.PropTypes=x,x}},function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,i=o(e),l=1;l<arguments.length;l++){n=Object(arguments[l]);for(var c in n)a.call(n,c)&&(i[c]=n[c]);if(r){u=r(n);for(var f=0;f<u.length;f++)s.call(n,u[f])&&(i[u[f]]=n[u[f]])}}return i}},function(e,t,n){"use strict";function o(e,t,n,o,i){for(var l in e)if(e.hasOwnProperty(l)){var c;try{r("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",o||"React class",n,l,typeof e[l]),c=e[l](t,l,o,n,null,s)}catch(e){c=e}if(a(!c||c instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,l,typeof c),c instanceof Error&&!(c.message in u)){u[c.message]=!0;var f=i?i():"";a(!1,"Failed %s type: %s%s",n,c.message,null!=f?f:"")}}}var r=n(1),a=n(5),s=n(2),u={};e.exports=o},function(e,t,n){"use strict";var o=n(0),r=n(1),a=n(2);e.exports=function(){function e(e,t,n,o,s,u){u!==a&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=n(3),p=r(f),d=n(4),y=n(18),v=o(y),h=n(19),m=r(h),b=n(7),O=o(b),w=n(8),C=o(w),g=n(20),T=o(g),j=n(9),P=r(j),_={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},E=9,M=27,x=function(e){function t(e){a(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setFocusAfterRender=function(e){n.focusAfterRender=n.props.shouldFocusAfterRender&&e},n.setOverlayRef=function(e){n.overlay=e},n.setContentRef=function(e){n.content=e},n.afterClose=function(){v.returnFocus(),v.teardownScopedFocus()},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(v.setupScopedFocus(n.node),v.markForFocusLater(),n.setState({isOpen:!0},function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen()}))},n.close=function(){n.beforeClose(),n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())})},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===E&&(0,m.default)(n.content,e),n.props.shouldCloseOnEsc&&e.keyCode===M&&(e.preventDefault(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null,n.moveFromContentToOverlay=null},n.handleOverlayOnMouseUp=function(){null===n.moveFromContentToOverlay&&(n.shouldClose=!1)},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(){n.moveFromContentToOverlay=!1},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1,n.moveFromContentToOverlay=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":l(t))?t:{base:_[e],afterOpen:_[e]+"--after-open",beforeClose:_[e]+"--before-close"},r=o.base;return n.state.afterOpen&&(r=r+" "+o.afterOpen),n.state.beforeClose&&(r=r+" "+o.beforeClose),"string"==typeof t&&t?r+" "+t:r},n.ariaAttributes=function(e){return Object.keys(e).reduce(function(t,n){return t["aria-"+n]=e[n],t},{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return u(t,e),c(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&(this.setFocusAfterRender(!0),this.open())}},{key:"componentWillReceiveProps",value:function(e){e.bodyOpenClassName!==this.props.bodyOpenClassName&&console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),!this.props.isOpen&&e.isOpen?(this.setFocusAfterRender(!0),this.open()):this.props.isOpen&&!e.isOpen&&this.close()}},{key:"componentDidUpdate",value:function(){this.focusAfterRender&&(this.focusContent(),this.setFocusAfterRender(!1))}},{key:"componentWillUnmount",value:function(){this.beforeClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.bodyOpenClassName;T.add(o),n&&O.hide(t)}},{key:"beforeClose",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.bodyOpenClassName;T.remove(o),n&&C.totalCount()<1&&O.show(t)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.overlayClassName,o=e.defaultStyles,r=t?{}:o.content,a=n?{}:o.overlay;return this.shouldBeClosed()?null:p.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",n),style:i({},a,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown,onMouseUp:this.handleOverlayOnMouseUp},p.default.createElement("div",i({ref:this.setContentRef,style:i({},r,this.props.style.content),className:this.buildClassName("content",t),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.ariaAttributes(this.props.aria||{})),this.props.children))}}]),t}(f.Component);x.defaultProps={style:{overlay:{},content:{}}},x.propTypes={isOpen:d.PropTypes.bool.isRequired,defaultStyles:d.PropTypes.shape({content:d.PropTypes.object,overlay:d.PropTypes.object}),style:d.PropTypes.shape({content:d.PropTypes.object,overlay:d.PropTypes.object}),className:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.object]),overlayClassName:d.PropTypes.oneOfType([d.PropTypes.string,d.PropTypes.object]),bodyOpenClassName:d.PropTypes.string,ariaHideApp:d.PropTypes.bool,appElement:d.PropTypes.instanceOf(P.default),onAfterOpen:d.PropTypes.func,onRequestClose:d.PropTypes.func,closeTimeoutMS:d.PropTypes.number,shouldFocusAfterRender:d.PropTypes.bool,shouldCloseOnOverlayClick:d.PropTypes.bool,role:d.PropTypes.string,contentLabel:d.PropTypes.string,aria:d.PropTypes.object,children:d.PropTypes.node,shouldCloseOnEsc:d.PropTypes.bool},t.default=x,e.exports=t.default},function(e,t,n){"use strict";function o(){d=!0}function r(){if(d){if(d=!1,!p)return;setTimeout(function(){if(!p.contains(document.activeElement)){((0,c.default)(p)[0]||p).focus()}},0)}}function a(){f.push(document.activeElement)}function s(){var e=null;try{return e=f.pop(),void e.focus()}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}}function u(e){p=e,window.addEventListener?(window.addEventListener("blur",o,!1),document.addEventListener("focus",r,!0)):(window.attachEvent("onBlur",o),document.attachEvent("onFocus",r))}function i(){p=null,window.addEventListener?(window.removeEventListener("blur",o),document.removeEventListener("focus",r)):(window.detachEvent("onBlur",o),document.detachEvent("onFocus",r))}Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=o,t.handleFocus=r,t.markForFocusLater=a,t.returnFocus=s,t.setupScopedFocus=u,t.teardownScopedFocus=i;var l=n(6),c=function(e){return e&&e.__esModule?e:{default:e}}(l),f=[],p=null,d=!1},function(e,t,n){"use strict";function o(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();n[t.shiftKey?0:n.length-1]!==document.activeElement&&e!==document.activeElement||(t.preventDefault(),n[t.shiftKey?n.length-1:0].focus())}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(6),a=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t,n){"use strict";function o(e){e.split(" ").map(s.add).forEach(function(e){return document.body.classList.add(e)})}function r(e){var t=s.get();e.split(" ").map(s.remove).filter(function(e){return 0===t[e]}).forEach(function(e){return document.body.classList.remove(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.add=o,t.remove=r;var a=n(8),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a)},function(e,t,n){var o;/*!
Copyright (c) 2015 Jed Watson.

@@ -15,0 +20,0 @@ Based on code that is Copyright 2013-2015, Facebook, Inc.

@@ -83,2 +83,7 @@ # react-modal

/*
Boolean indicating if pressing the esc key should close the modal
Note: By disabling the esc key from closing the modal you may introduce an accessibility issue.
*/
shouldCloseOnEsc={true}
/*
String indicating the role of the modal, allowing the 'dialog' role to be applied if desired.

@@ -85,0 +90,0 @@ */

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

'use strict';
"use strict";

@@ -12,23 +12,23 @@ Object.defineProperty(exports, "__esModule", {

var _react = require('react');
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _reactDom = require('react-dom');
var _reactDom = require("react-dom");
var _reactDom2 = _interopRequireDefault(_reactDom);
var _propTypes = require('prop-types');
var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _ModalPortal = require('./ModalPortal');
var _ModalPortal = require("./ModalPortal");
var _ModalPortal2 = _interopRequireDefault(_ModalPortal);
var _ariaAppHider = require('../helpers/ariaAppHider');
var _ariaAppHider = require("../helpers/ariaAppHider");
var ariaAppHider = _interopRequireWildcard(_ariaAppHider);
var _safeHTMLElement = require('../helpers/safeHTMLElement');
var _safeHTMLElement = require("../helpers/safeHTMLElement");

@@ -47,4 +47,4 @@ var _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);

var portalClassName = exports.portalClassName = 'ReactModalPortal';
var bodyOpenClassName = exports.bodyOpenClassName = 'ReactModal__Body--open';
var portalClassName = exports.portalClassName = "ReactModalPortal";
var bodyOpenClassName = exports.bodyOpenClassName = "ReactModal__Body--open";

@@ -85,3 +85,3 @@ var isReact16 = _reactDom2.default.createPortal !== undefined;

_createClass(Modal, [{
key: 'componentDidMount',
key: "componentDidMount",
value: function componentDidMount() {

@@ -91,3 +91,3 @@ if (!_safeHTMLElement.canUseDOM) return;

if (!isReact16) {
this.node = document.createElement('div');
this.node = document.createElement("div");
}

@@ -102,3 +102,3 @@ this.node.className = this.props.portalClassName;

}, {
key: 'componentWillReceiveProps',
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(newProps) {

@@ -122,3 +122,3 @@ if (!_safeHTMLElement.canUseDOM) return;

}, {
key: 'componentWillUpdate',
key: "componentWillUpdate",
value: function componentWillUpdate(newProps) {

@@ -131,3 +131,3 @@ if (!_safeHTMLElement.canUseDOM) return;

}, {
key: 'componentWillUnmount',
key: "componentWillUnmount",
value: function componentWillUnmount() {

@@ -151,3 +151,3 @@ if (!_safeHTMLElement.canUseDOM || !this.node || !this.portal) return;

}, {
key: 'render',
key: "render",
value: function render() {

@@ -159,6 +159,7 @@ if (!_safeHTMLElement.canUseDOM || !isReact16) {

if (!this.node && isReact16) {
this.node = document.createElement('div');
this.node = document.createElement("div");
}
return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends({ ref: this.portalRef,
return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends({
ref: this.portalRef,
defaultStyles: Modal.defaultStyles

@@ -168,3 +169,3 @@ }, this.props)), this.node);

}], [{
key: 'setAppElement',
key: "setAppElement",
value: function setAppElement(element) {

@@ -203,3 +204,4 @@ ariaAppHider.setElement(element);

role: _propTypes2.default.string,
contentLabel: _propTypes2.default.string
contentLabel: _propTypes2.default.string,
shouldCloseOnEsc: _propTypes2.default.bool
};

@@ -213,2 +215,3 @@ Modal.defaultProps = {

shouldFocusAfterRender: true,
shouldCloseOnEsc: true,
shouldCloseOnOverlayClick: true,

@@ -221,3 +224,3 @@ parentSelector: function parentSelector() {

overlay: {
position: 'fixed',
position: "fixed",
top: 0,

@@ -227,19 +230,19 @@ left: 0,

bottom: 0,
backgroundColor: 'rgba(255, 255, 255, 0.75)'
backgroundColor: "rgba(255, 255, 255, 0.75)"
},
content: {
position: 'absolute',
top: '40px',
left: '40px',
right: '40px',
bottom: '40px',
border: '1px solid #ccc',
background: '#fff',
overflow: 'auto',
WebkitOverflowScrolling: 'touch',
borderRadius: '4px',
outline: 'none',
padding: '20px'
position: "absolute",
top: "40px",
left: "40px",
right: "40px",
bottom: "40px",
border: "1px solid #ccc",
background: "#fff",
overflow: "auto",
WebkitOverflowScrolling: "touch",
borderRadius: "4px",
outline: "none",
padding: "20px"
}
};
exports.default = Modal;

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

'use strict';
"use strict";

@@ -13,29 +13,29 @@ Object.defineProperty(exports, "__esModule", {

var _react = require('react');
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes = require("prop-types");
var _focusManager = require('../helpers/focusManager');
var _focusManager = require("../helpers/focusManager");
var focusManager = _interopRequireWildcard(_focusManager);
var _scopeTab = require('../helpers/scopeTab');
var _scopeTab = require("../helpers/scopeTab");
var _scopeTab2 = _interopRequireDefault(_scopeTab);
var _ariaAppHider = require('../helpers/ariaAppHider');
var _ariaAppHider = require("../helpers/ariaAppHider");
var ariaAppHider = _interopRequireWildcard(_ariaAppHider);
var _refCount = require('../helpers/refCount');
var _refCount = require("../helpers/refCount");
var refCount = _interopRequireWildcard(_refCount);
var _bodyClassList = require('../helpers/bodyClassList');
var _bodyClassList = require("../helpers/bodyClassList");
var bodyClassList = _interopRequireWildcard(_bodyClassList);
var _safeHTMLElement = require('../helpers/safeHTMLElement');
var _safeHTMLElement = require("../helpers/safeHTMLElement");

@@ -56,4 +56,4 @@ var _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);

var CLASS_NAMES = {
overlay: 'ReactModal__Overlay',
content: 'ReactModal__Content'
overlay: "ReactModal__Overlay",
content: "ReactModal__Content"
};

@@ -140,3 +140,4 @@

}
if (event.keyCode === ESC_KEY) {
if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) {
event.preventDefault();

@@ -203,15 +204,15 @@ _this.requestClose(event);

_this.buildClassName = function (which, additional) {
var classNames = (typeof additional === 'undefined' ? 'undefined' : _typeof(additional)) === 'object' ? additional : {
var classNames = (typeof additional === "undefined" ? "undefined" : _typeof(additional)) === "object" ? additional : {
base: CLASS_NAMES[which],
afterOpen: CLASS_NAMES[which] + '--after-open',
beforeClose: CLASS_NAMES[which] + '--before-close'
afterOpen: CLASS_NAMES[which] + "--after-open",
beforeClose: CLASS_NAMES[which] + "--before-close"
};
var className = classNames.base;
if (_this.state.afterOpen) {
className = className + ' ' + classNames.afterOpen;
className = className + " " + classNames.afterOpen;
}
if (_this.state.beforeClose) {
className = className + ' ' + classNames.beforeClose;
className = className + " " + classNames.beforeClose;
}
return typeof additional === 'string' && additional ? className + ' ' + additional : className;
return typeof additional === "string" && additional ? className + " " + additional : className;
};

@@ -221,3 +222,3 @@

return Object.keys(items).reduce(function (acc, name) {
acc['aria-' + name] = items[name];
acc["aria-" + name] = items[name];
return acc;

@@ -238,3 +239,3 @@ }, {});

_createClass(ModalPortal, [{
key: 'componentDidMount',
key: "componentDidMount",
value: function componentDidMount() {

@@ -248,3 +249,3 @@ // Focus needs to be set when mounting and already open

}, {
key: 'componentWillReceiveProps',
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(newProps) {

@@ -254,3 +255,3 @@ if (process.env.NODE_ENV !== "production") {

// eslint-disable-next-line no-console
console.warn('React-Modal: "bodyOpenClassName" prop has been modified. ' + 'This may cause unexpected behavior when multiple modals are open.');
console.warn('React-Modal: "bodyOpenClassName" prop has been modified. ' + "This may cause unexpected behavior when multiple modals are open.");
}

@@ -267,3 +268,3 @@ }

}, {
key: 'componentDidUpdate',
key: "componentDidUpdate",
value: function componentDidUpdate() {

@@ -276,3 +277,3 @@ if (this.focusAfterRender) {

}, {
key: 'componentWillUnmount',
key: "componentWillUnmount",
value: function componentWillUnmount() {

@@ -283,3 +284,3 @@ this.beforeClose();

}, {
key: 'beforeOpen',
key: "beforeOpen",
value: function beforeOpen() {

@@ -299,3 +300,3 @@ var _props = this.props,

}, {
key: 'beforeClose',
key: "beforeClose",
value: function beforeClose() {

@@ -318,3 +319,3 @@ var _props2 = this.props,

}, {
key: 'render',
key: "render",
value: function render() {

@@ -330,17 +331,18 @@ var _props3 = this.props,

return this.shouldBeClosed() ? null : _react2.default.createElement(
'div',
"div",
{
ref: this.setOverlayRef,
className: this.buildClassName('overlay', overlayClassName),
className: this.buildClassName("overlay", overlayClassName),
style: _extends({}, overlayStyles, this.props.style.overlay),
onClick: this.handleOverlayOnClick,
onMouseDown: this.handleOverlayOnMouseDown,
onMouseUp: this.handleOverlayOnMouseUp },
onMouseUp: this.handleOverlayOnMouseUp
},
_react2.default.createElement(
'div',
"div",
_extends({
ref: this.setContentRef,
style: _extends({}, contentStyles, this.props.style.content),
className: this.buildClassName('content', className),
tabIndex: '-1',
className: this.buildClassName("content", className),
tabIndex: "-1",
onKeyDown: this.handleKeyDown,

@@ -351,3 +353,3 @@ onMouseDown: this.handleContentOnMouseDown,

role: this.props.role,
'aria-label': this.props.contentLabel
"aria-label": this.props.contentLabel
}, this.ariaAttributes(this.props.aria || {})),

@@ -392,5 +394,6 @@ this.props.children

aria: _propTypes.PropTypes.object,
children: _propTypes.PropTypes.node
children: _propTypes.PropTypes.node,
shouldCloseOnEsc: _propTypes.PropTypes.bool
};
exports.default = ModalPortal;
module.exports = exports['default'];
module.exports = exports["default"];

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

'use strict';
"use strict";

@@ -18,3 +18,3 @@ Object.defineProperty(exports, "__esModule", {

if (!nodeList || !nodeList.length) {
throw new Error('react-modal: No elements were found for selector ' + selector + '.');
throw new Error("react-modal: No elements were found for selector " + selector + ".");
}

@@ -25,6 +25,6 @@ }

var useElement = element;
if (typeof useElement === 'string') {
if (typeof useElement === "string") {
var el = document.querySelectorAll(useElement);
assertNodeList(el, useElement);
useElement = 'length' in el ? el[0] : el;
useElement = "length" in el ? el[0] : el;
}

@@ -46,3 +46,3 @@ globalElement = useElement || globalElement;

if (!appElement && !globalElement && !tryForceFallback()) {
throw new Error(['react-modal: Cannot fallback to `document.body`, because it\'s not ready or available.', 'If you are doing server-side rendering, use this function to defined an element.', '`Modal.setAppElement(el)` to make this accessible']);
throw new Error(["react-modal: Cannot fallback to `document.body`, because it is not", "ready or available. If you are doing server-side rendering, use this", "function to defined an element. `Modal.setAppElement(el)` to make", "this accessible"].join(" "));
}

@@ -53,3 +53,3 @@ }

validateElement(appElement);
(appElement || globalElement).setAttribute('aria-hidden', 'true');
(appElement || globalElement).setAttribute("aria-hidden", "true");
}

@@ -59,3 +59,3 @@

validateElement(appElement);
(appElement || globalElement).removeAttribute('aria-hidden');
(appElement || globalElement).removeAttribute("aria-hidden");
}

@@ -62,0 +62,0 @@

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

'use strict';
"use strict";

@@ -9,3 +9,3 @@ Object.defineProperty(exports, "__esModule", {

var _refCount = require('./refCount');
var _refCount = require("./refCount");

@@ -18,3 +18,3 @@ var refCount = _interopRequireWildcard(_refCount);

// Increment class(es) on refCount tracker and add class(es) to body
bodyClass.split(' ').map(refCount.add).forEach(function (className) {
bodyClass.split(" ").map(refCount.add).forEach(function (className) {
return document.body.classList.add(className);

@@ -28,3 +28,3 @@ });

// and remove unused class(es) from body
bodyClass.split(' ').map(refCount.remove).filter(function (className) {
bodyClass.split(" ").map(refCount.remove).filter(function (className) {
return classListMap[className] === 0;

@@ -31,0 +31,0 @@ }).forEach(function (className) {

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

'use strict';
"use strict";

@@ -13,3 +13,3 @@ Object.defineProperty(exports, "__esModule", {

var _tabbable = require('../helpers/tabbable');
var _tabbable = require("../helpers/tabbable");

@@ -61,3 +61,3 @@ var _tabbable2 = _interopRequireDefault(_tabbable);

} catch (e) {
console.warn(['You tried to return focus to', toFocus, 'but it is not in the DOM anymore'].join(" "));
console.warn(["You tried to return focus to", toFocus, "but it is not in the DOM anymore"].join(" "));
}

@@ -71,7 +71,7 @@ }

if (window.addEventListener) {
window.addEventListener('blur', handleBlur, false);
document.addEventListener('focus', handleFocus, true);
window.addEventListener("blur", handleBlur, false);
document.addEventListener("focus", handleFocus, true);
} else {
window.attachEvent('onBlur', handleBlur);
document.attachEvent('onFocus', handleFocus);
window.attachEvent("onBlur", handleBlur);
document.attachEvent("onFocus", handleFocus);
}

@@ -84,8 +84,8 @@ }

if (window.addEventListener) {
window.removeEventListener('blur', handleBlur);
document.removeEventListener('focus', handleFocus);
window.removeEventListener("blur", handleBlur);
document.removeEventListener("focus", handleFocus);
} else {
window.detachEvent('onBlur', handleBlur);
document.detachEvent('onFocus', handleFocus);
window.detachEvent("onBlur", handleBlur);
document.detachEvent("onFocus", handleFocus);
}
}

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

'use strict';
"use strict";

@@ -8,3 +8,3 @@ Object.defineProperty(exports, "__esModule", {

var _exenv = require('exenv');
var _exenv = require("exenv");

@@ -11,0 +11,0 @@ var _exenv2 = _interopRequireDefault(_exenv);

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

'use strict';
"use strict";

@@ -8,3 +8,3 @@ Object.defineProperty(exports, "__esModule", {

var _tabbable = require('./tabbable');
var _tabbable = require("./tabbable");

@@ -30,2 +30,2 @@ var _tabbable2 = _interopRequireDefault(_tabbable);

}
module.exports = exports['default'];
module.exports = exports["default"];

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

'use strict';
"use strict";

@@ -22,3 +22,3 @@ Object.defineProperty(exports, "__esModule", {

function hidden(el) {
return el.offsetWidth <= 0 && el.offsetHeight <= 0 || el.style.display === 'none';
return el.offsetWidth <= 0 && el.offsetHeight <= 0 || el.style.display === "none";
}

@@ -43,3 +43,3 @@

function tabbable(element) {
var tabIndex = element.getAttribute('tabindex');
var tabIndex = element.getAttribute("tabindex");
if (tabIndex === null) tabIndex = undefined;

@@ -51,4 +51,4 @@ var isTabIndexNaN = isNaN(tabIndex);

function findTabbableDescendants(element) {
return [].slice.call(element.querySelectorAll('*'), 0).filter(tabbable);
return [].slice.call(element.querySelectorAll("*"), 0).filter(tabbable);
}
module.exports = exports['default'];
module.exports = exports["default"];

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

'use strict';
"use strict";

@@ -7,3 +7,3 @@ Object.defineProperty(exports, "__esModule", {

var _Modal = require('./components/Modal');
var _Modal = require("./components/Modal");

@@ -15,2 +15,2 @@ var _Modal2 = _interopRequireDefault(_Modal);

exports.default = _Modal2.default;
module.exports = exports['default'];
module.exports = exports["default"];
{
"name": "react-modal",
"version": "3.0.0",
"version": "3.0.2",
"description": "Accessible modal dialog component for React.JS",

@@ -18,3 +18,3 @@ "main": "./lib/index.js",

"test": "cross-env NODE_ENV=test karma start",
"lint": "eslint src/ spec/"
"lint": "eslint src/ specs/"
},

@@ -28,6 +28,6 @@ "authors": [

"babel-core": "^6.25.0",
"babel-eslint": "^8.0.0",
"babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",

@@ -37,5 +37,7 @@ "babel-preset-stage-2": "^6.24.1",

"cross-env": "^5.0.1",
"eslint": "^4.7.1",
"eslint": "^4.8.0",
"eslint-config-prettier": "^2.6.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.4.0",
"gitbook-cli": "^2.3.0",

@@ -53,2 +55,3 @@ "istanbul-instrumenter-loader": "^3.0.0",

"npm-run-all": "^4.1.1",
"prettier": "^1.7.4",
"react": "^16.0.0",

@@ -55,0 +58,0 @@ "react-dom": "^16.0.0",

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 too big to display

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