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

react-popper

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-popper - npm Package Compare versions

Comparing version 1.3.7 to 2.0.0

2

dist/index.umd.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("create-react-context"),require("deep-equal"),require("popper.js"),require("warning")):"function"==typeof define&&define.amd?define(["exports","react","create-react-context","deep-equal","popper.js","warning"],t):t(e.ReactPopper={},e.React,null,null,e.Popper,null)}(this,function(e,r,t,n,p,a){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n,p=p&&p.hasOwnProperty("default")?p.default:p,a=a&&a.hasOwnProperty("default")?a.default:a;var l=t(),d=t(),o=function(o){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return i(u(t=o.call.apply(o,[this].concat(n))||this),"referenceNode",void 0),i(u(t),"setReferenceNode",function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())}),t}c(e,o);var t=e.prototype;return t.componentWillUnmount=function(){this.referenceNode=null},t.render=function(){return r.createElement(l.Provider,{value:this.referenceNode},r.createElement(d.Provider,{value:this.setReferenceNode},this.props.children))},e}(r.Component),f=function(e){return Array.isArray(e)?e[0]:e},h=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},m=function(e,t){if("function"==typeof e)return h(e,t);null!=e&&(e.current=t)},y={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},v={},w=function(o){function e(){for(var n,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i(u(n=o.call.apply(o,[this].concat(t))||this),"state",{data:void 0,placement:void 0}),i(u(n),"popperInstance",void 0),i(u(n),"popperNode",null),i(u(n),"arrowNode",null),i(u(n),"setPopperNode",function(e){e&&n.popperNode!==e&&(m(n.props.innerRef,e),n.popperNode=e,n.updatePopperInstance())}),i(u(n),"setArrowNode",function(e){n.arrowNode=e}),i(u(n),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var t=e.placement;return n.setState({data:e,placement:t}),e}}),i(u(n),"getOptions",function(){return{placement:n.props.placement,eventsEnabled:n.props.eventsEnabled,positionFixed:n.props.positionFixed,modifiers:s({},n.props.modifiers,{arrow:s({},n.props.modifiers&&n.props.modifiers.arrow,{enabled:!!n.arrowNode,element:n.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:n.updateStateModifier})}}),i(u(n),"getPopperStyle",function(){return n.popperNode&&n.state.data?s({position:n.state.data.offsets.popper.position},n.state.data.styles):y}),i(u(n),"getPopperPlacement",function(){return n.state.data?n.state.placement:void 0}),i(u(n),"getArrowStyle",function(){return n.arrowNode&&n.state.data?n.state.data.arrowStyles:v}),i(u(n),"getOutOfBoundariesState",function(){return n.state.data?n.state.data.hide:void 0}),i(u(n),"destroyPopperInstance",function(){n.popperInstance&&(n.popperInstance.destroy(),n.popperInstance=null)}),i(u(n),"updatePopperInstance",function(){n.destroyPopperInstance();var e=u(n).popperNode,t=n.props.referenceElement;t&&e&&(n.popperInstance=new p(t,e,n.getOptions()))}),i(u(n),"scheduleUpdate",function(){n.popperInstance&&n.popperInstance.scheduleUpdate()}),n}c(e,o);var t=e.prototype;return t.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&n(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},t.componentWillUnmount=function(){m(this.props.innerRef,null),this.destroyPopperInstance()},t.render=function(){return f(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},e}(r.Component);i(w,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});var P=p.placements;var b=function(o){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return i(u(t=o.call.apply(o,[this].concat(n))||this),"refHandler",function(e){m(t.props.innerRef,e),h(t.props.setReferenceNode,e)}),t}c(e,o);var t=e.prototype;return t.componentWillUnmount=function(){m(this.props.innerRef,null)},t.render=function(){return a(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),f(this.props.children)({ref:this.refHandler})},e}(r.Component);e.Popper=function(e){var t=e.referenceElement,n=function(e,t){if(null==e)return{};var n,r,o={},p=Object.keys(e);for(r=0;r<p.length;r++)n=p[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,["referenceElement"]);return r.createElement(l.Consumer,null,function(e){return r.createElement(w,s({referenceElement:void 0!==t?t:e},n))})},e.placements=P,e.Manager=o,e.Reference=function(t){return r.createElement(d.Consumer,null,function(e){return r.createElement(b,s({setReferenceNode:e},t))})},Object.defineProperty(e,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("util"),require("react"),require("@popperjs/core")):"function"==typeof define&&define.amd?define(["exports","util","react","@popperjs/core"],e):e((t=t||self).ReactPopper={},t.util,t.React,t.Popper)}(this,function(t,e,o,n){"use strict";function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t}).apply(this,arguments)}function r(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;function a(t){var e=c.call(t),r="[object Arguments]"===e;return r=r||"[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&0<=t.length&&"[object Function]"===c.call(t.callee)}var u,c=Object.prototype.toString;if(!Object.keys){var l=Object.prototype.hasOwnProperty,s=Object.prototype.toString,d=a,y=Object.prototype.propertyIsEnumerable,b=!y.call({toString:null},"toString"),g=y.call(function(){},"prototype"),h=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],m=function(t){var e=t.constructor;return e&&e.prototype===t},v={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},S=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!v["$"+t]&&l.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{m(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();u=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===s.call(t),o=d(t),n=e&&"[object String]"===s.call(t),p=[];if(!e&&!r&&!o)throw new TypeError("Object.keys called on a non-object");var i=g&&r;if(n&&0<t.length&&!l.call(t,0))for(var a=0;a<t.length;++a)p.push(String(a));if(o&&0<t.length)for(var f=0;f<t.length;++f)p.push(String(f));else for(var u in t)i&&"prototype"===u||!l.call(t,u)||p.push(String(u));if(b)for(var c=function(t){if("undefined"==typeof window||!S)return m(t);try{return m(t)}catch(t){return!1}}(t),y=0;y<h.length;++y)c&&"constructor"===h[y]||!l.call(t,h[y])||p.push(h[y]);return p}}var j=u,P=Array.prototype.slice,A=Object.keys,O=A?function(t){return A(t)}:j,w=Object.keys;O.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return a(t)?w(P.call(t)):w(t)}):Object.keys=O;return Object.keys||O};function E(t){return!(x&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===k.call(t)}function I(t){return!!E(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&0<=t.length&&"[object Array]"!==k.call(t)&&"[object Function]"===k.call(t.callee)}var M=O,x="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,k=Object.prototype.toString,R=function(){return E(arguments)}();E.isLegacyArguments=I;function N(t){return t!=t}function U(t,e,r,o){var n;e in t&&("function"!=typeof(n=o)||"[object Function]"!==J.call(n)||!o())||(Y?X(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)}function W(t,e){var r=2<arguments.length?arguments[2]:{},o=M(e);G&&(o=V.call(o,Object.getOwnPropertySymbols(e)));for(var n=0;n<o.length;n+=1)U(t,o[n],e[o[n]],r[o[n]])}var F=R?E:I,D=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!N(t)||!N(e))},$=Array.prototype.slice,T=Object.prototype.toString,B=Function.prototype.bind||function(e){var r=this;if("function"!=typeof r||"[object Function]"!==T.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var o,n=$.call(arguments,1),t=Math.max(0,r.length-n.length),p=[],i=0;i<t;i++)p.push("$"+i);if(o=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof o){var t=r.apply(this,n.concat($.call(arguments)));return Object(t)===t?t:this}return r.apply(e,n.concat($.call(arguments)))}),r.prototype){var a=function(){};a.prototype=r.prototype,o.prototype=new a,a.prototype=null}return o},C=B.call(Function.call,Object.prototype.hasOwnProperty),_=RegExp.prototype.exec,q=Object.getOwnPropertyDescriptor,H=Object.prototype.toString,L="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,z=function(t){if(!t||"object"!=typeof t)return!1;if(!L)return"[object RegExp]"===H.call(t);var e=q(t,"lastIndex");return!(!e||!C(e,"value"))&&function(t){try{var e=t.lastIndex;return t.lastIndex=0,_.call(t),!0}catch(t){return!1}finally{t.lastIndex=e}}(t)},G="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),J=Object.prototype.toString,V=Array.prototype.concat,X=Object.defineProperty,Y=X&&function(){var t={};try{for(var e in X(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}();W.supportsDescriptors=!!Y;var K=W,Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(t,e){return t(e={exports:{}},e.exports),e.exports}function tt(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0}function et(){return"function"==typeof ot&&("function"==typeof Symbol&&("symbol"==typeof ot("foo")&&("symbol"==typeof Symbol("bar")&&tt())))}var rt,ot=Q.Symbol,nt=TypeError,pt=Object.getOwnPropertyDescriptor;if(pt)try{pt({},"")}catch(t){pt=null}function it(){throw new nt}function at(t,e){if("string"!=typeof t||0===t.length)throw new TypeError("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof e)throw new TypeError('"allowMissing" argument must be a boolean');for(var n,r=(n=[],dt(t,bt,function(t,e,r,o){n[n.length]=r?dt(o,gt,"$1"):e||t}),n),o=function(t,e){if(!(t in st))throw new SyntaxError("intrinsic "+t+" does not exist!");if(void 0===st[t]&&!e)throw new nt("intrinsic "+t+" exists, but is not available. Please file an issue!");return st[t]}("%"+(0<r.length?r[0]:"")+"%",e),p=1;p<r.length;p+=1)if(null!=o)if(pt&&p+1>=r.length){var i=pt(o,r[p]);if(!(e||r[p]in o))throw new nt("base intrinsic for "+t+" exists, but the property is not available.");o=i?i.get||i.value:o[r[p]]}else o=o[r[p]];return o}function ft(){return B.apply(vt,arguments)}var ut=pt?function(){try{return it}catch(t){try{return pt(arguments,"callee").get}catch(t){return it}}}():it,ct=et(),yt=Object.getPrototypeOf||function(t){return t.__proto__},lt="undefined"==typeof Uint8Array?rt:yt(Uint8Array),st={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?rt:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?rt:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":ct?yt([][Symbol.iterator]()):rt,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":rt,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":rt,"%AsyncGenerator%":rt,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":rt,"%AsyncIteratorPrototype%":rt,"%Atomics%":"undefined"==typeof Atomics?rt:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?rt:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?rt:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?rt:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?rt:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?rt:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?rt:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":rt,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":rt,"%Int8Array%":"undefined"==typeof Int8Array?rt:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?rt:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?rt:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?rt:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?rt:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?rt:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ct?yt(yt([][Symbol.iterator]())):rt,"%JSON%":"object"==typeof JSON?JSON:rt,"%JSONParse%":"object"==typeof JSON?JSON.parse:rt,"%Map%":"undefined"==typeof Map?rt:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ct?yt((new Map)[Symbol.iterator]()):rt,"%MapPrototype%":"undefined"==typeof Map?rt:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?rt:Promise,"%PromisePrototype%":"undefined"==typeof Promise?rt:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?rt:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?rt:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?rt:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?rt:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?rt:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?rt:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?rt:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ct?yt((new Set)[Symbol.iterator]()):rt,"%SetPrototype%":"undefined"==typeof Set?rt:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?rt:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?rt:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":ct?yt(""[Symbol.iterator]()):rt,"%StringPrototype%":String.prototype,"%Symbol%":ct?Symbol:rt,"%SymbolPrototype%":ct?Symbol.prototype:rt,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":ut,"%TypedArray%":lt,"%TypedArrayPrototype%":lt?lt.prototype:rt,"%TypeError%":nt,"%TypeErrorPrototype%":nt.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?rt:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?rt:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?rt:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?rt:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?rt:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?rt:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?rt:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?rt:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?rt:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?rt:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?rt:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?rt:WeakSet.prototype},dt=B.call(Function.call,String.prototype.replace),bt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gt=/\\(\\)?/g,ht=at("%Function%"),mt=ht.apply,vt=ht.call;ft.apply=function(){return B.apply(mt,arguments)};function St(){if(null!=this&&this!==Pt(this))throw new At("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}function jt(){if(!Ot)throw new Et("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=wt(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof/a/.dotAll)return t.get}return St}var Pt=Object,At=TypeError,Ot=K.supportsDescriptors,wt=Object.getOwnPropertyDescriptor,Et=TypeError,It=K.supportsDescriptors,Mt=Object.getOwnPropertyDescriptor,xt=Object.defineProperty,kt=TypeError,Rt=Object.getPrototypeOf,Nt=/a/,Ut=ft(St);K(Ut,{getPolyfill:jt,implementation:St,shim:function(){if(!It||!Rt)throw new kt("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=jt(),e=Rt(Nt),r=Mt(e,"flags");return r&&r.get===t||xt(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}});function Wt(t){return"string"==typeof t||"object"==typeof t&&(Vt?function(t){try{return Gt.call(t),!0}catch(t){return!1}}(t):"[object String]"===Jt.call(t))}function Ft(t){return"number"==typeof t||"object"==typeof t&&(Kt?function(t){try{return Xt.call(t),!0}catch(t){return!1}}(t):"[object Number]"===Yt.call(t))}function Dt(t){return"boolean"==typeof t||null!==t&&"object"==typeof t&&(te&&Symbol.toStringTag in t?function(t){try{return Qt.call(t),!0}catch(t){return!1}}(t):"[object Boolean]"===Zt.call(t))}function $t(t,e){var r=at(t,!!e);return"function"==typeof r&&ne(t,".prototype.")?ft(r):r}var Tt,Bt=Ut,Ct={}.toString,_t=Array.isArray||function(t){return"[object Array]"==Ct.call(t)},qt=Date.prototype.getDay,Ht=Object.prototype.toString,Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,zt=function(t){return"object"==typeof t&&null!==t&&(Lt?function(t){try{return qt.call(t),!0}catch(t){return!1}}(t):"[object Date]"===Ht.call(t))},Gt=String.prototype.valueOf,Jt=Object.prototype.toString,Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Xt=Number.prototype.toString,Yt=Object.prototype.toString,Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Qt=Boolean.prototype.toString,Zt=Object.prototype.toString,te="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ee=Z(function(t){var r=Object.prototype.toString;if(et()){var o=Symbol.prototype.toString,n=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==r.call(t))return!1;try{return"symbol"==typeof(e=t).valueOf()&&n.test(o.call(e))}catch(t){return!1}var e}}else t.exports=function(){return!1}}),re=Z(function(t){if("function"==typeof BigInt){var e=BigInt.prototype.valueOf;t.exports=function(t){return null!=t&&"boolean"!=typeof t&&"string"!=typeof t&&"number"!=typeof t&&"symbol"!=typeof t&&"function"!=typeof t&&("bigint"==typeof t||function(t){try{return e.call(t),!0}catch(t){}return!1}(t))}}else t.exports=function(){return!1}}),oe=function(t){return null==t||"object"!=typeof t&&"function"!=typeof t?null:Wt(t)?"String":Ft(t)?"Number":Dt(t)?"Boolean":ee(t)?"Symbol":re(t)?"BigInt":void 0},ne=ft(at("String.prototype.indexOf")),pe="function"==typeof Map&&Map.prototype?Map:null,ie="function"==typeof Set&&Set.prototype?Set:null;pe||(Tt=function(){return!1});var ae=pe?Map.prototype.has:null,fe=ie?Set.prototype.has:null;Tt||ae||(Tt=function(){return!1});var ue,ce=Tt||function(t){if(!t||"object"!=typeof t)return!1;try{if(ae.call(t),fe)try{fe.call(t)}catch(t){return!0}return t instanceof pe}catch(t){}return!1},ye="function"==typeof Map&&Map.prototype?Map:null,le="function"==typeof Set&&Set.prototype?Set:null;le||(ue=function(){return!1});var se=ye?Map.prototype.has:null,de=le?Set.prototype.has:null;ue||de||(ue=function(){return!1});var be,ge=ue||function(t){if(!t||"object"!=typeof t)return!1;try{if(de.call(t),se)try{se.call(t)}catch(t){return!0}return t instanceof le}catch(t){}return!1},he="function"==typeof WeakMap&&WeakMap.prototype?WeakMap:null,me="function"==typeof WeakSet&&WeakSet.prototype?WeakSet:null;he||(be=function(){return!1});var ve=he?he.prototype.has:null,Se=me?me.prototype.has:null;be||ve||(be=function(){return!1});function je(r,t,o,n){var e,p=t||{};if(Xe(p,"quoteStyle")&&"single"!==p.quoteStyle&&"double"!==p.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(void 0===r)return"undefined";if(null===r)return"null";if("boolean"==typeof r)return r?"true":"false";if("string"==typeof r)return e=p,ze(r.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,Ke),"single",e);if("number"==typeof r)return 0===r?0<1/0/r?"0":"-0":String(r);if("bigint"==typeof r)return String(r)+"n";var i,a=void 0===p.depth?5:p.depth;if(void 0===o&&(o=0),a<=o&&0<a&&"object"==typeof r)return"[Object]";if(void 0===n)n=[];else if(0<=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}(n,r))return"[Circular]";function f(t,e){return e&&(n=n.slice()).push(e),je(t,p,o+1,n)}if("function"==typeof r){var u=function(t){if(t.name)return t.name;var e=_e.call(t,/^function\s*([\w$]+)/);if(e)return e[1];return null}(r);return"[Function"+(u?": "+u:"")+"]"}if(Je(r)){var c=Symbol.prototype.toString.call(r);return"object"==typeof r?Qe(c):c}if(function(t){if(!t||"object"!=typeof t)return;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return 1;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(r)){for(var y="<"+String(r.nodeName).toLowerCase(),l=r.attributes||[],s=0;s<l.length;s++)y+=" "+l[s].name+"="+ze((i=l[s].value,String(i).replace(/"/g,"&quot;")),"double",p);return y+=">",r.childNodes&&r.childNodes.length&&(y+="..."),y+="</"+String(r.nodeName).toLowerCase()+">"}if(Ge(r))return 0===r.length?"[]":"[ "+er(r,f).join(", ")+" ]";if("[object Error]"===Ye(r)){var d=er(r,f);return 0===d.length?"["+String(r)+"]":"{ ["+String(r)+"] "+d.join(", ")+" }"}if("object"==typeof r){if(Le&&"function"==typeof r[Le])return r[Le]();if("function"==typeof r.inspect)return r.inspect()}if(function(t){if(!Re||!t||"object"!=typeof t)return;try{Re.call(t);try{Fe.call(t)}catch(t){return 1}return t instanceof Map}catch(t){}return}(r)){var b=[];return Ne.call(r,function(t,e){b.push(f(e,r)+" => "+f(t,r))}),tr("Map",Re.call(r),b)}if(function(t){if(!Fe||!t||"object"!=typeof t)return;try{Fe.call(t);try{Re.call(t)}catch(t){return 1}return t instanceof Set}catch(t){}return}(r)){var g=[];return De.call(r,function(t){g.push(f(t,r))}),tr("Set",Fe.call(r),g)}if(function(t){if(!$e||!t||"object"!=typeof t)return;try{$e.call(t,$e);try{Te.call(t,Te)}catch(t){return 1}return t instanceof WeakMap}catch(t){}return}(r))return Ze("WeakMap");if(function(t){if(!Te||!t||"object"!=typeof t)return;try{Te.call(t,Te);try{$e.call(t,$e)}catch(t){return 1}return t instanceof WeakSet}catch(t){}return}(r))return Ze("WeakSet");if("[object Number]"===Ye(r))return Qe(f(Number(r)));if("[object BigInt]"===Ye(r))return Qe(f(qe.call(r)));if("[object Boolean]"===Ye(r))return Qe(Be.call(r));if("[object String]"===Ye(r))return Qe(f(String(r)));if("[object Date]"===Ye(r)||"[object RegExp]"===Ye(r))return String(r);var h=er(r,f);return 0===h.length?"{}":"{ "+h.join(", ")+" }"}var Pe=be||function(t){if(!t||"object"!=typeof t)return!1;try{if(ve.call(t,ve),Se)try{Se.call(t,Se)}catch(t){return!0}return t instanceof he}catch(t){}return!1},Ae=Z(function(t){var e,r="function"==typeof WeakMap&&WeakMap.prototype?WeakMap:null,o="function"==typeof WeakSet&&WeakSet.prototype?WeakSet:null;r||(e=function(){return!1});var n=r?r.prototype.has:null,p=o?o.prototype.has:null;e||p||(t.exports=function(){return!1}),t.exports=e||function(t){if(!t||"object"!=typeof t)return!1;try{if(p.call(t,p),n)try{n.call(t,n)}catch(t){return!0}return t instanceof o}catch(t){}return!1}}),Oe=function(t){if(t&&"object"==typeof t){if(ce(t))return"Map";if(ge(t))return"Set";if(Pe(t))return"WeakMap";if(Ae(t))return"WeakSet"}return!1},we={}.toString,Ee=Array.isArray||function(t){return"[object Array]"==we.call(t)},Ie=Z(function(t){if(et()||tt()){var e=Symbol.iterator;t.exports=function(t){return null!=t&&void 0!==t[e]?t[e]():F(t)?Array.prototype[e].call(t):void 0}}else{var n=Ee,p=Wt,r=at,o=r("%Map%",!0),i=r("%Set%",!0),a=$t,f=a("Array.prototype.push"),u=a("String.prototype.charCodeAt"),c=a("String.prototype.slice"),y=function(r){var o=0;return{next:function(){var t,e=o>=r.length;return e||(t=r[o],o+=1),{done:e,value:t}}}},l=function(r){if(n(r)||F(r))return y(r);if(p(r)){var o=0;return{next:function(){var t=function(t,e){if(t.length<=e+1)return e+1;var r=u(t,e);if(r<55296||56319<r)return e+1;var o=u(t,e+1);return o<56320||57343<o?e+1:e+2}(r,o),e=c(r,o,t);return{done:(o=t)>r.length,value:e}}}}};if(o||i){var s=ce,d=ge,b=a("Map.prototype.forEach",!0),g=a("Set.prototype.forEach",!0);if("undefined"==typeof process||!process.versions||!process.versions.node)var h=a("Map.prototype.iterator",!0),m=a("Set.prototype.iterator",!0),v=function(t){var e=!1;return{next:function(){try{return{done:e,value:e?void 0:t.next()}}catch(t){return{done:e=!0,value:void 0}}}}};var S=a("Map.prototype.@@iterator",!0)||a("Map.prototype._es6-shim iterator_",!0),j=a("Set.prototype.@@iterator",!0)||a("Set.prototype._es6-shim iterator_",!0);t.exports=function(t){return function(t){if(s(t)){if(h)return v(h(t));if(S)return S(t);if(b){var r=[];return b(t,function(t,e){f(r,[e,t])}),y(r)}}if(d(t)){if(m)return v(m(t));if(j)return j(t);if(g){var e=[];return g(t,function(t){f(e,t)}),y(e)}}}(t)||l(t)}}else t.exports=l}}),Me=e.inspect,xe="function"==typeof Map&&Map.prototype,ke=Object.getOwnPropertyDescriptor&&xe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Re=xe&&ke&&"function"==typeof ke.get?ke.get:null,Ne=xe&&Map.prototype.forEach,Ue="function"==typeof Set&&Set.prototype,We=Object.getOwnPropertyDescriptor&&Ue?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fe=Ue&&We&&"function"==typeof We.get?We.get:null,De=Ue&&Set.prototype.forEach,$e="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Te="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Be=Boolean.prototype.valueOf,Ce=Object.prototype.toString,_e=String.prototype.match,qe="function"==typeof BigInt?BigInt.prototype.valueOf:null,He=Me.custom,Le=He&&Je(He)?He:null;function ze(t,e,r){var o="double"===(r.quoteStyle||e)?'"':"'";return o+t+o}function Ge(t){return"[object Array]"===Ye(t)}function Je(t){return"[object Symbol]"===Ye(t)}var Ve=Object.prototype.hasOwnProperty||function(t){return t in this};function Xe(t,e){return Ve.call(t,e)}function Ye(t){return Ce.call(t)}function Ke(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+e.toString(16)}function Qe(t){return"Object("+t+")"}function Ze(t){return t+" { ? }"}function tr(t,e,r){return t+" ("+e+") {"+r.join(", ")+"}"}function er(t,e){var r=Ge(t),o=[];if(r){o.length=t.length;for(var n=0;n<t.length;n++)o[n]=Xe(t,n)?e(t[n],t):""}for(var p in t)Xe(t,p)&&(r&&String(Number(p))===p&&p<t.length||(/[^\w$]/.test(p)?o.push(e(p,t)+": "+e(t[p],t)):o.push(p+": "+e(t[p],t))));return o}function rr(){var r,o,n,e={assert:function(t){if(!e.has(t))throw new or("Side channel does not contain "+je(t))},get:function(t){if(nr&&t&&("object"==typeof t||"function"==typeof t)){if(r)return ar(r,t)}else if(pr){if(o)return cr(o,t)}else if(n)return function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].key===e)return t[r].value}(n,t)},has:function(t){if(nr&&t&&("object"==typeof t||"function"==typeof t)){if(r)return ur(r,t)}else if(pr){if(o)return lr(o,t)}else if(n)return function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].key===e)return!0;return!1}(n,t);return!1},set:function(t,e){nr&&t&&("object"==typeof t||"function"==typeof t)?(r=r||new nr,fr(r,t,e)):pr?(o=o||new pr,yr(o,t,e)):function(t,e,r){for(var o=0;o<t.length;o+=1)if(t[o].key===e)return t[o].value=r;ir(t,{key:e,value:r})}(n=n||[],t,e)}};return e}var or=at("%TypeError%"),nr=at("%WeakMap%",!0),pr=at("%Map%",!0),ir=$t("Array.prototype.push"),ar=$t("WeakMap.prototype.get",!0),fr=$t("WeakMap.prototype.set",!0),ur=$t("WeakMap.prototype.has",!0),cr=$t("Map.prototype.get",!0),yr=$t("Map.prototype.set",!0),lr=$t("Map.prototype.has",!0),sr=$t("Date.prototype.getTime"),dr=Object.getPrototypeOf,br=$t("Object.prototype.toString"),gr=at("%Set%",!0),hr=$t("Map.prototype.has",!0),mr=$t("Map.prototype.get",!0),vr=$t("Map.prototype.size",!0),Sr=$t("Set.prototype.add",!0),jr=$t("Set.prototype.delete",!0),Pr=$t("Set.prototype.has",!0),Ar=$t("Set.prototype.size",!0);function Or(t,e,r,o){for(var n,p=Ie(t);(n=p.next())&&!n.done;)if(Mr(e,n.value,r,o))return jr(t,n.value),1}function wr(t){return void 0===t?null:"object"!=typeof t?"symbol"!=typeof t&&("string"!=typeof t&&"number"!=typeof t||+t==+t):void 0}function Er(t,e,r,o,n){var p=wr(r);if(null!=p)return p;var i=mr(e,p);return(void 0!==i||hr(e,p))&&Mr(o,i,!1,n)&&(!hr(t,p)&&Mr(o,i,!1,n))}function Ir(t,e,r,o,n,p){for(var i,a,f=Ie(t);(i=f.next())&&!i.done;)if(Mr(r,a=i.value,n,p)&&Mr(o,mr(e,a),n,p))return jr(t,a),1}function Mr(t,e,r,o){var n=r||{};if(n.strict?D(t,e):t===e)return!0;if(oe(t)!==oe(e))return!1;if(!t||!e||"object"!=typeof t&&"object"!=typeof e)return!(!1===t&&e||t&&!1===e)&&(n.strict?D(t,e):t==e);var p,i=o.has(t),a=o.has(e);if(i&&a){if(o.get(t)===o.get(e))return!0}else p={};return i||o.set(t,p),a||o.set(e,p),function(t,e,r,o){var n,p;if(typeof t!=typeof e)return!1;if(null==t||null==e)return!1;if(t.prototype!==e.prototype)return!1;if(br(t)!==br(e))return!1;if(F(t)!==F(e))return!1;var i=_t(t),a=_t(e);if(i!==a)return!1;var f=t instanceof Error,u=e instanceof Error;if(f!=u)return!1;if((f||u)&&(t.name!==e.name||t.message!==e.message))return!1;var c=z(t),y=z(e);if(c!==y)return!1;if((c||y)&&(t.source!==e.source||Bt(t)!==Bt(e)))return!1;var l=zt(t),s=zt(e);if(l!==s)return!1;if((l||s)&&sr(t)!==sr(e))return!1;if(r.strict&&dr&&dr(t)!==dr(e))return!1;var d=xr(t),b=xr(e);if(d!==b)return!1;if(d||b){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}if(typeof t!=typeof e)return!1;try{var g=M(t),h=M(e)}catch(t){return!1}if(g.length!==h.length)return!1;for(g.sort(),h.sort(),n=g.length-1;0<=n;n--)if(g[n]!=h[n])return!1;for(n=g.length-1;0<=n;n--)if(p=g[n],!Mr(t[p],e[p],r,o))return!1;var m=Oe(t),v=Oe(e);return m===v&&("Set"!==m&&"Set"!==v?"Map"!==m||function(t,e,r,o){if(vr(t)!==vr(e))return!1;var n,p,i,a,f,u,c=Ie(t),y=Ie(e);for(;(n=c.next())&&!n.done;)if(a=n.value[0],f=n.value[1],a&&"object"==typeof a)i=i||new gr,Sr(i,a);else if(void 0===(u=mr(e,a))&&!hr(e,a)||!Mr(f,u,r.strict,o)){if(r.strict)return!1;if(!Er(t,e,a,f,o))return!1;i=i||new gr,Sr(i,a)}if(i){for(;(p=y.next())&&!p.done;)if(a=p.value[0],f=p.value[1],a&&"object"==typeof a){if(!Ir(i,t,a,f,r.strict,o))return!1}else if(!(r.strict||t.has(a)&&Mr(mr(t,a),f,!1,o)||Ir(i,t,a,f,!1,o)))return!1;return 0===Ar(i)}return!0}(t,e,r,o):function(t,e,r,o){if(Ar(t)!==Ar(e))return!1;var n,p,i,a=Ie(t),f=Ie(e);for(;(n=a.next())&&!n.done;)if(n.value&&"object"==typeof n.value)i=i||new gr,Sr(i,n.value);else if(!Pr(e,n.value)){if(r.strict)return!1;if(u=t,c=e,y=n.value,!(null!=(l=wr(y))?l:Pr(c,l)&&!Pr(u,l)))return!1;i=i||new gr,Sr(i,n.value)}var u,c,y,l;if(i){for(;(p=f.next())&&!p.done;)if(p.value&&"object"==typeof p.value){if(!Or(i,p.value,r.strict,o))return!1}else if(!r.strict&&!Pr(t,p.value)&&!Or(i,p.value,r.strict,o))return!1;return 0===Ar(i)}return!0}(t,e,r,o))}(t,e,n,o)}function xr(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(0<t.length&&"number"!=typeof t[0]))}function kr(t){return Array.isArray(t)?t[0]:t}function Rr(t){if("function"==typeof t){for(var e=arguments.length,r=new Array(1<e?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return t.apply(void 0,r)}}function Nr(t,e){if("function"==typeof t)return Rr(t,e);null!=t&&(t.current=e)}var Ur=o.createContext(),Wr=o.createContext(),Fr=function(n){function t(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return p(f(e=n.call.apply(n,[this].concat(r))||this),"referenceNode",void 0),p(f(e),"setReferenceNode",function(t){t&&e.referenceNode!==t&&(e.referenceNode=t,e.forceUpdate())}),e}r(t,n);var e=t.prototype;return e.componentWillUnmount=function(){this.referenceNode=null},e.render=function(){return o.createElement(Ur.Provider,{value:this.referenceNode},o.createElement(Wr.Provider,{value:this.setReferenceNode},this.props.children))},t}(o.Component),Dr={top:0,left:0,opacity:0,pointerEvents:"none"},$r={},Tr=function(o){function t(){for(var a,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return p(f(a=o.call.apply(o,[this].concat(e))||this),"state",{placement:void 0,styles:void 0,isReferenceHidden:void 0,hasPopperEscaped:void 0}),p(f(a),"popperInstance",void 0),p(f(a),"popperNode",null),p(f(a),"arrowNode",null),p(f(a),"setPopperNode",function(t){t&&a.popperNode!==t&&(Nr(a.props.innerRef,t),a.popperNode=t,a.updatePopperInstance())}),p(f(a),"setArrowNode",function(t){a.arrowNode=t}),p(f(a),"updateStateModifier",{name:"reactPopperState",enabled:!0,phase:"write",fn:function(t){var e,r,o=t.state,n=o.placement,p=o.styles,i=o.modifiersData;i.hide&&(e=i.hide.isReferenceHidden,r=i.hide.hasPopperEscaped),a.setState({placement:n,styles:p,isReferenceHidden:e,hasPopperEscaped:r})}}),p(f(a),"getOptions",function(){var t=a.props.modifiers,e=void 0===t?[]:t,r=e.find(function(t){return"arrow"===t.name});return{placement:a.props.placement,strategy:a.props.strategy,modifiers:[].concat(e.filter(function(t){return"arrow"!==t.name}),[{name:"arrow",enabled:!!a.arrowNode,options:i({},r&&r.options,{element:a.arrowNode})},{name:"applyStyles",enabled:!1},a.updateStateModifier]),onFirstUpdate:a.props.onFirstUpdate}}),p(f(a),"getPopperStyle",function(){var t=i({},Dr,{position:"fixed"===a.props.strategy?"fixed":"absolute"});return a.popperNode&&a.state.styles?a.state.styles.popper:t}),p(f(a),"getArrowStyle",function(){return a.arrowNode&&a.state.styles?a.state.styles.arrow:$r}),p(f(a),"destroyPopperInstance",function(){a.popperInstance&&(a.popperInstance.destroy(),a.popperInstance=null)}),p(f(a),"updatePopperInstance",function(){a.destroyPopperInstance();var t=f(a).popperNode,e=a.props.referenceElement;e&&t&&(a.popperInstance=n.createPopper(e,t,a.getOptions()))}),p(f(a),"update",function(){return a.popperInstance?a.popperInstance.update():Promise.resolve(null)}),a}r(t,o);var e=t.prototype;return e.componentDidUpdate=function(t,e){var r,o;this.props.referenceElement!==t.referenceElement&&this.updatePopperInstance(),this.props.placement===t.placement&&this.props.strategy===t.strategy&&(r=this.props.modifiers,o=t.modifiers,Mr(r,o,{strict:!0},rr()))||this.popperInstance&&this.popperInstance.setOptions(this.getOptions()),e.placement!==this.state.placement&&this.update()},e.componentWillUnmount=function(){Nr(this.props.innerRef,null),this.destroyPopperInstance()},e.render=function(){var t=this.state,e=t.placement,r=t.isReferenceHidden,o=t.hasPopperEscaped;return kr(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:e,isReferenceHidden:r,hasPopperEscaped:o,update:this.update,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},t}(o.Component);p(Tr,"defaultProps",{placement:"bottom",strategy:"absolute",modifiers:[],referenceElement:void 0});var Br=function(){},Cr=function(n){function t(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return p(f(e=n.call.apply(n,[this].concat(r))||this),"refHandler",function(t){Nr(e.props.innerRef,t),Rr(e.props.setReferenceNode,t)}),e}r(t,n);var e=t.prototype;return e.componentWillUnmount=function(){Nr(this.props.innerRef,null)},e.render=function(){return Br(Boolean(this.props.setReferenceNode)),kr(this.props.children)({ref:this.refHandler})},t}(o.Component);t.Manager=Fr,t.Popper=function(t){var e=t.referenceElement,r=function(t,e){if(null==t)return{};var r,o,n={},p=Object.keys(t);for(o=0;o<p.length;o++)r=p[o],0<=e.indexOf(r)||(n[r]=t[r]);return n}(t,["referenceElement"]);return o.createElement(Ur.Consumer,null,function(t){return o.createElement(Tr,{referenceElement:void 0!==e?e:t,children:r.children,innerRef:r.innerRef,modifiers:r.modifiers,placement:r.placement,strategy:r.strategy,onFirstUpdate:r.onFirstUpdate})})},t.Reference=function(e){return o.createElement(Wr.Consumer,null,function(t){return o.createElement(Cr,{setReferenceNode:t,innerRef:e.innerRef,children:e.children})})},Object.defineProperty(t,"__esModule",{value:!0})});

@@ -21,44 +21,43 @@ "use strict";

return _react.default.createElement(_.Manager, null, _react.default.createElement(_.Reference, null), _react.default.createElement(_.Reference, null, function (_ref) {
return /*#__PURE__*/_react["default"].createElement(_.Manager, null, /*#__PURE__*/_react["default"].createElement(_.Reference, null), /*#__PURE__*/_react["default"].createElement(_.Reference, null, function (_ref) {
var ref = _ref.ref;
return _react.default.createElement("div", {
return /*#__PURE__*/_react["default"].createElement("div", {
ref: ref
});
}), _react.default.createElement(_.Popper // $FlowExpectError: should be boolean
}), /*#__PURE__*/_react["default"].createElement(_.Popper // $FlowExpectError: should be one of allowed placements
, (_React$createElement = {
eventsEnabled: "foo"
}, _React$createElement["eventsEnabled"] = true, _React$createElement.positionFixed = 2, _React$createElement["positionFixed"] = true, _React$createElement.modifiers = {
flip: {
enabled: 'bar',
order: 'foo'
}
}, _React$createElement["modifiers"] = {
flip: {
enabled: false
}
}, _React$createElement), function (_ref2) {
placement: "custom"
}, _React$createElement["placement"] = "top", _React$createElement.strategy = "custom", _React$createElement["strategy"] = "fixed", _React$createElement.modifiers = [{
name: 'flip',
enabled: 'bar',
order: 'foo'
}], _React$createElement["modifiers"] = [{
name: 'flip',
enabled: false
}], _React$createElement), function (_ref2) {
var ref = _ref2.ref,
style = _ref2.style,
placement = _ref2.placement,
outOfBoundaries = _ref2.outOfBoundaries,
scheduleUpdate = _ref2.scheduleUpdate,
isReferenceHidden = _ref2.isReferenceHidden,
hasPopperEscaped = _ref2.hasPopperEscaped,
update = _ref2.update,
arrowProps = _ref2.arrowProps;
return _react.default.createElement("div", {
return /*#__PURE__*/_react["default"].createElement("div", {
ref: ref,
style: (0, _extends2.default)({}, style, {
opacity: outOfBoundaries ? 0 : 1
style: (0, _extends2["default"])({}, style, {
opacity: isReferenceHidden || hasPopperEscaped ? 0 : 1
}),
"data-placement": placement,
onClick: function onClick() {
return scheduleUpdate();
return update();
}
}, "Popper", _react.default.createElement("div", {
}, "Popper", /*#__PURE__*/_react["default"].createElement("div", {
ref: arrowProps.ref,
style: arrowProps.style
}));
}), _react.default.createElement(_.Popper, null, function (_ref3) {
}), /*#__PURE__*/_react["default"].createElement(_.Popper, null, function (_ref3) {
var ref = _ref3.ref,
style = _ref3.style,
placement = _ref3.placement;
return _react.default.createElement("div", {
return /*#__PURE__*/_react["default"].createElement("div", {
ref: ref,

@@ -65,0 +64,0 @@ style: style,

@@ -5,4 +5,2 @@ "use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {

@@ -14,15 +12,9 @@ value: true

get: function get() {
return _Popper.default;
return _Popper["default"];
}
});
Object.defineProperty(exports, "placements", {
enumerable: true,
get: function get() {
return _Popper.placements;
}
});
Object.defineProperty(exports, "Manager", {
enumerable: true,
get: function get() {
return _Manager.default;
return _Manager["default"];
}

@@ -33,7 +25,7 @@ });

get: function get() {
return _Reference.default;
return _Reference["default"];
}
});
var _Popper = _interopRequireWildcard(require("./Popper"));
var _Popper = _interopRequireDefault(require("./Popper"));

@@ -40,0 +32,0 @@ var _Manager = _interopRequireDefault(require("./Manager"));

@@ -10,6 +10,10 @@ "use strict";

});
exports.default = exports.ManagerReferenceNodeSetterContext = exports.ManagerReferenceNodeContext = void 0;
exports["default"] = exports.ManagerReferenceNodeSetterContext = exports.ManagerReferenceNodeContext = void 0;
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));

@@ -21,14 +25,16 @@

var _createReactContext = _interopRequireDefault(require("create-react-context"));
function _createSuper(Derived) { return function () { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
var ManagerReferenceNodeContext = (0, _createReactContext.default)();
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var ManagerReferenceNodeContext = React.createContext();
exports.ManagerReferenceNodeContext = ManagerReferenceNodeContext;
var ManagerReferenceNodeSetterContext = (0, _createReactContext.default)();
var ManagerReferenceNodeSetterContext = React.createContext();
exports.ManagerReferenceNodeSetterContext = ManagerReferenceNodeSetterContext;
var Manager =
/*#__PURE__*/
function (_React$Component) {
(0, _inheritsLoose2.default)(Manager, _React$Component);
var Manager = /*#__PURE__*/function (_React$Component) {
(0, _inheritsLoose2["default"])(Manager, _React$Component);
var _super = _createSuper(Manager);
function Manager() {

@@ -42,4 +48,4 @@ var _this;

_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "referenceNode", void 0);
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setReferenceNode", function (newReferenceNode) {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "referenceNode", void 0);
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setReferenceNode", function (newReferenceNode) {
if (newReferenceNode && _this.referenceNode !== newReferenceNode) {

@@ -61,5 +67,5 @@ _this.referenceNode = newReferenceNode;

_proto.render = function render() {
return React.createElement(ManagerReferenceNodeContext.Provider, {
return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Provider, {
value: this.referenceNode
}, React.createElement(ManagerReferenceNodeSetterContext.Provider, {
}, /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Provider, {
value: this.setReferenceNode

@@ -72,2 +78,2 @@ }, this.props.children));

exports.default = Manager;
exports["default"] = Manager;

@@ -10,4 +10,4 @@ "use strict";

});
exports.default = Popper;
exports.placements = exports.InnerPopper = void 0;
exports["default"] = Popper;
exports.InnerPopper = void 0;

@@ -20,2 +20,6 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));

var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));

@@ -29,3 +33,3 @@

var _popper = _interopRequireDefault(require("popper.js"));
var _core = require("@popperjs/core");

@@ -36,4 +40,7 @@ var _Manager = require("./Manager");

var initialStyle = {
position: 'absolute',
function _createSuper(Derived) { return function () { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var initialPopperStyle = {
top: 0,

@@ -46,7 +53,7 @@ left: 0,

var InnerPopper =
/*#__PURE__*/
function (_React$Component) {
(0, _inheritsLoose2.default)(InnerPopper, _React$Component);
var InnerPopper = /*#__PURE__*/function (_React$Component) {
(0, _inheritsLoose2["default"])(InnerPopper, _React$Component);
var _super = _createSuper(InnerPopper);
function InnerPopper() {

@@ -60,10 +67,12 @@ var _this;

_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
data: undefined,
placement: undefined
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
placement: undefined,
styles: undefined,
isReferenceHidden: undefined,
hasPopperEscaped: undefined
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "popperInstance", void 0);
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "popperNode", null);
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "arrowNode", null);
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setPopperNode", function (popperNode) {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "popperInstance", void 0);
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "popperNode", null);
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "arrowNode", null);
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setPopperNode", function (popperNode) {
if (!popperNode || _this.popperNode === popperNode) return;

@@ -75,51 +84,64 @@ (0, _utils.setRef)(_this.props.innerRef, popperNode);

});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setArrowNode", function (arrowNode) {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setArrowNode", function (arrowNode) {
_this.arrowNode = arrowNode;
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateStateModifier", {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "updateStateModifier", {
name: 'reactPopperState',
enabled: true,
order: 900,
fn: function fn(data) {
var placement = data.placement;
phase: 'write',
fn: function fn(_ref) {
var state = _ref.state;
var placement = state.placement,
styles = state.styles,
modifiersData = state.modifiersData;
var isReferenceHidden;
var hasPopperEscaped;
if (modifiersData.hide) {
isReferenceHidden = modifiersData.hide.isReferenceHidden;
hasPopperEscaped = modifiersData.hide.hasPopperEscaped;
}
_this.setState({
data: data,
placement: placement
placement: placement,
styles: styles,
isReferenceHidden: isReferenceHidden,
hasPopperEscaped: hasPopperEscaped
});
return data;
}
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getOptions", function () {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getOptions", function () {
var _this$props$modifiers = _this.props.modifiers,
modifiers = _this$props$modifiers === void 0 ? [] : _this$props$modifiers;
var arrowModifier = modifiers.find(function (modifier) {
return modifier.name === 'arrow';
});
return {
placement: _this.props.placement,
eventsEnabled: _this.props.eventsEnabled,
positionFixed: _this.props.positionFixed,
modifiers: (0, _extends2.default)({}, _this.props.modifiers, {
arrow: (0, _extends2.default)({}, _this.props.modifiers && _this.props.modifiers.arrow, {
enabled: !!_this.arrowNode,
strategy: _this.props.strategy,
modifiers: [].concat(modifiers.filter(function (modifier) {
return modifier.name !== 'arrow';
}), [{
name: 'arrow',
enabled: !!_this.arrowNode,
options: (0, _extends2["default"])({}, arrowModifier && arrowModifier.options, {
element: _this.arrowNode
}),
applyStyle: {
enabled: false
},
updateStateModifier: _this.updateStateModifier
})
})
}, {
name: 'applyStyles',
enabled: false
}, _this.updateStateModifier]),
onFirstUpdate: _this.props.onFirstUpdate
};
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getPopperStyle", function () {
return !_this.popperNode || !_this.state.data ? initialStyle : (0, _extends2.default)({
position: _this.state.data.offsets.popper.position
}, _this.state.data.styles);
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPopperStyle", function () {
var computedInitialStyle = (0, _extends2["default"])({}, initialPopperStyle, {
position: _this.props.strategy === 'fixed' ? 'fixed' : 'absolute'
});
return !_this.popperNode || !_this.state.styles ? computedInitialStyle : _this.state.styles.popper;
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getPopperPlacement", function () {
return !_this.state.data ? undefined : _this.state.placement;
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getArrowStyle", function () {
return !_this.arrowNode || !_this.state.styles ? initialArrowStyle : _this.state.styles.arrow;
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getArrowStyle", function () {
return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getOutOfBoundariesState", function () {
return _this.state.data ? _this.state.data.hide : undefined;
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "destroyPopperInstance", function () {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "destroyPopperInstance", function () {
if (!_this.popperInstance) return;

@@ -131,6 +153,6 @@

});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updatePopperInstance", function () {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "updatePopperInstance", function () {
_this.destroyPopperInstance();
var _assertThisInitialize = (0, _assertThisInitialized2.default)(_this),
var _assertThisInitialize = (0, _assertThisInitialized2["default"])(_this),
popperNode = _assertThisInitialize.popperNode;

@@ -140,7 +162,9 @@

if (!referenceElement || !popperNode) return;
_this.popperInstance = new _popper.default(referenceElement, popperNode, _this.getOptions());
_this.popperInstance = (0, _core.createPopper)(referenceElement, popperNode, _this.getOptions());
});
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scheduleUpdate", function () {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "update", function () {
if (_this.popperInstance) {
_this.popperInstance.scheduleUpdate();
return _this.popperInstance.update();
} else {
return Promise.resolve(null);
}

@@ -154,4 +178,9 @@ });

_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
// If the Popper.js options have changed, update the instance (destroy + create)
if (this.props.placement !== prevProps.placement || this.props.referenceElement !== prevProps.referenceElement || this.props.positionFixed !== prevProps.positionFixed || !(0, _deepEqual.default)(this.props.modifiers, prevProps.modifiers, {
// If the Popper.js reference element has changed, update the instance (destroy + create)
if (this.props.referenceElement !== prevProps.referenceElement) {
this.updatePopperInstance();
} // If the Popper.js options have changed, set options
if (this.props.placement !== prevProps.placement || this.props.strategy !== prevProps.strategy || !(0, _deepEqual["default"])(this.props.modifiers, prevProps.modifiers, {
strict: true

@@ -166,5 +195,5 @@ })) {

this.updatePopperInstance();
} else if (this.props.eventsEnabled !== prevProps.eventsEnabled && this.popperInstance) {
this.props.eventsEnabled ? this.popperInstance.enableEventListeners() : this.popperInstance.disableEventListeners();
if (this.popperInstance) {
this.popperInstance.setOptions(this.getOptions());
}
} // A placement difference in state means popper determined a new placement

@@ -177,3 +206,3 @@ // apart from the props value. By the time the popper element is rendered with

if (prevState.placement !== this.state.placement) {
this.scheduleUpdate();
this.update();
}

@@ -188,8 +217,13 @@ };

_proto.render = function render() {
var _this$state = this.state,
placement = _this$state.placement,
isReferenceHidden = _this$state.isReferenceHidden,
hasPopperEscaped = _this$state.hasPopperEscaped;
return (0, _utils.unwrapArray)(this.props.children)({
ref: this.setPopperNode,
style: this.getPopperStyle(),
placement: this.getPopperPlacement(),
outOfBoundaries: this.getOutOfBoundariesState(),
scheduleUpdate: this.scheduleUpdate,
placement: placement,
isReferenceHidden: isReferenceHidden,
hasPopperEscaped: hasPopperEscaped,
update: this.update,
arrowProps: {

@@ -206,19 +240,23 @@ ref: this.setArrowNode,

exports.InnerPopper = InnerPopper;
(0, _defineProperty2.default)(InnerPopper, "defaultProps", {
(0, _defineProperty2["default"])(InnerPopper, "defaultProps", {
placement: 'bottom',
eventsEnabled: true,
referenceElement: undefined,
positionFixed: false
strategy: 'absolute',
modifiers: [],
referenceElement: undefined
});
var placements = _popper.default.placements;
exports.placements = placements;
function Popper(_ref) {
var referenceElement = _ref.referenceElement,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, ["referenceElement"]);
return React.createElement(_Manager.ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {
return React.createElement(InnerPopper, (0, _extends2.default)({
referenceElement: referenceElement !== undefined ? referenceElement : referenceNode
}, props));
function Popper(_ref2) {
var referenceElement = _ref2.referenceElement,
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref2, ["referenceElement"]);
return /*#__PURE__*/React.createElement(_Manager.ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {
return /*#__PURE__*/React.createElement(InnerPopper, {
referenceElement: referenceElement !== undefined ? referenceElement : referenceNode,
children: props.children,
innerRef: props.innerRef,
modifiers: props.modifiers,
placement: props.placement,
strategy: props.strategy,
onFirstUpdate: props.onFirstUpdate
});
});
}

@@ -10,8 +10,10 @@ "use strict";

});
exports.default = Reference;
exports["default"] = Reference;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));

@@ -29,7 +31,11 @@

var InnerReference =
/*#__PURE__*/
function (_React$Component) {
(0, _inheritsLoose2.default)(InnerReference, _React$Component);
function _createSuper(Derived) { return function () { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var InnerReference = /*#__PURE__*/function (_React$Component) {
(0, _inheritsLoose2["default"])(InnerReference, _React$Component);
var _super = _createSuper(InnerReference);
function InnerReference() {

@@ -43,3 +49,3 @@ var _this;

_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "refHandler", function (node) {
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "refHandler", function (node) {
(0, _utils.setRef)(_this.props.innerRef, node);

@@ -58,3 +64,3 @@ (0, _utils.safeInvoke)(_this.props.setReferenceNode, node);

_proto.render = function render() {
(0, _warning.default)(Boolean(this.props.setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');
(0, _warning["default"])(Boolean(this.props.setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');
return (0, _utils.unwrapArray)(this.props.children)({

@@ -69,7 +75,9 @@ ref: this.refHandler

function Reference(props) {
return React.createElement(_Manager.ManagerReferenceNodeSetterContext.Consumer, null, function (setReferenceNode) {
return React.createElement(InnerReference, (0, _extends2.default)({
setReferenceNode: setReferenceNode
}, props));
return /*#__PURE__*/React.createElement(_Manager.ManagerReferenceNodeSetterContext.Consumer, null, function (setReferenceNode) {
return /*#__PURE__*/React.createElement(InnerReference, {
setReferenceNode: setReferenceNode,
innerRef: props.innerRef,
children: props.children
});
});
}

@@ -41,13 +41,8 @@ "use strict";

var shallowEqual = function shallowEqual(objA, objB) {
var aKeys = Object.keys(objA);
var bKeys = Object.keys(objB);
if (bKeys.length !== aKeys.length) {
if (objA.length !== objB.length) {
return false;
}
for (var i = 0; i < bKeys.length; i++) {
var key = aKeys[i];
if (objA[key] !== objB[key]) {
for (var i = 0; i < objB.length; i++) {
if (objA[i] !== objB[i]) {
return false;

@@ -54,0 +49,0 @@ }

@@ -9,44 +9,43 @@ import _extends from "@babel/runtime/helpers/extends";

return React.createElement(Manager, null, React.createElement(Reference, null), React.createElement(Reference, null, function (_ref) {
return /*#__PURE__*/React.createElement(Manager, null, /*#__PURE__*/React.createElement(Reference, null), /*#__PURE__*/React.createElement(Reference, null, function (_ref) {
var ref = _ref.ref;
return React.createElement("div", {
return /*#__PURE__*/React.createElement("div", {
ref: ref
});
}), React.createElement(Popper // $FlowExpectError: should be boolean
}), /*#__PURE__*/React.createElement(Popper // $FlowExpectError: should be one of allowed placements
, (_React$createElement = {
eventsEnabled: "foo"
}, _React$createElement["eventsEnabled"] = true, _React$createElement.positionFixed = 2, _React$createElement["positionFixed"] = true, _React$createElement.modifiers = {
flip: {
enabled: 'bar',
order: 'foo'
}
}, _React$createElement["modifiers"] = {
flip: {
enabled: false
}
}, _React$createElement), function (_ref2) {
placement: "custom"
}, _React$createElement["placement"] = "top", _React$createElement.strategy = "custom", _React$createElement["strategy"] = "fixed", _React$createElement.modifiers = [{
name: 'flip',
enabled: 'bar',
order: 'foo'
}], _React$createElement["modifiers"] = [{
name: 'flip',
enabled: false
}], _React$createElement), function (_ref2) {
var ref = _ref2.ref,
style = _ref2.style,
placement = _ref2.placement,
outOfBoundaries = _ref2.outOfBoundaries,
scheduleUpdate = _ref2.scheduleUpdate,
isReferenceHidden = _ref2.isReferenceHidden,
hasPopperEscaped = _ref2.hasPopperEscaped,
update = _ref2.update,
arrowProps = _ref2.arrowProps;
return React.createElement("div", {
return /*#__PURE__*/React.createElement("div", {
ref: ref,
style: _extends({}, style, {
opacity: outOfBoundaries ? 0 : 1
opacity: isReferenceHidden || hasPopperEscaped ? 0 : 1
}),
"data-placement": placement,
onClick: function onClick() {
return scheduleUpdate();
return update();
}
}, "Popper", React.createElement("div", {
}, "Popper", /*#__PURE__*/React.createElement("div", {
ref: arrowProps.ref,
style: arrowProps.style
}));
}), React.createElement(Popper, null, function (_ref3) {
}), /*#__PURE__*/React.createElement(Popper, null, function (_ref3) {
var ref = _ref3.ref,
style = _ref3.style,
placement = _ref3.placement;
return React.createElement("div", {
return /*#__PURE__*/React.createElement("div", {
ref: ref,

@@ -53,0 +52,0 @@ style: style,

// Public components
import Popper, { placements } from './Popper';
import Popper from './Popper';
import Manager from './Manager';
import Reference from './Reference';
export { Popper, placements, Manager, Reference }; // Public types
export { Popper, Manager, Reference }; // Public types
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
import * as React from 'react';
import createContext from 'create-react-context';
export var ManagerReferenceNodeContext = createContext();
export var ManagerReferenceNodeSetterContext = createContext();
export var ManagerReferenceNodeContext = React.createContext();
export var ManagerReferenceNodeSetterContext = React.createContext();
var Manager =
/*#__PURE__*/
function (_React$Component) {
var Manager = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(Manager, _React$Component);
var _super = _createSuper(Manager);
function Manager() {

@@ -43,5 +49,5 @@ var _this;

_proto.render = function render() {
return React.createElement(ManagerReferenceNodeContext.Provider, {
return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Provider, {
value: this.referenceNode
}, React.createElement(ManagerReferenceNodeSetterContext.Provider, {
}, /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Provider, {
value: this.setReferenceNode

@@ -48,0 +54,0 @@ }, this.props.children));

import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/extends";
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
import deepEqual from "deep-equal";
import * as React from 'react';
import PopperJS from 'popper.js';
import { createPopper } from '@popperjs/core';
import { ManagerReferenceNodeContext } from './Manager';
import { unwrapArray, setRef, shallowEqual } from './utils';
var initialStyle = {
position: 'absolute',
var initialPopperStyle = {
top: 0,

@@ -19,7 +25,7 @@ left: 0,

var initialArrowStyle = {};
export var InnerPopper =
/*#__PURE__*/
function (_React$Component) {
export var InnerPopper = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(InnerPopper, _React$Component);
var _super = _createSuper(InnerPopper);
function InnerPopper() {

@@ -35,4 +41,6 @@ var _this;

_defineProperty(_assertThisInitialized(_this), "state", {
data: undefined,
placement: undefined
placement: undefined,
styles: undefined,
isReferenceHidden: undefined,
hasPopperEscaped: undefined
});

@@ -59,13 +67,24 @@

_defineProperty(_assertThisInitialized(_this), "updateStateModifier", {
name: 'reactPopperState',
enabled: true,
order: 900,
fn: function fn(data) {
var placement = data.placement;
phase: 'write',
fn: function fn(_ref) {
var state = _ref.state;
var placement = state.placement,
styles = state.styles,
modifiersData = state.modifiersData;
var isReferenceHidden;
var hasPopperEscaped;
if (modifiersData.hide) {
isReferenceHidden = modifiersData.hide.isReferenceHidden;
hasPopperEscaped = modifiersData.hide.hasPopperEscaped;
}
_this.setState({
data: data,
placement: placement
placement: placement,
styles: styles,
isReferenceHidden: isReferenceHidden,
hasPopperEscaped: hasPopperEscaped
});
return data;
}

@@ -75,16 +94,23 @@ });

_defineProperty(_assertThisInitialized(_this), "getOptions", function () {
var _this$props$modifiers = _this.props.modifiers,
modifiers = _this$props$modifiers === void 0 ? [] : _this$props$modifiers;
var arrowModifier = modifiers.find(function (modifier) {
return modifier.name === 'arrow';
});
return {
placement: _this.props.placement,
eventsEnabled: _this.props.eventsEnabled,
positionFixed: _this.props.positionFixed,
modifiers: _extends({}, _this.props.modifiers, {
arrow: _extends({}, _this.props.modifiers && _this.props.modifiers.arrow, {
enabled: !!_this.arrowNode,
strategy: _this.props.strategy,
modifiers: [].concat(modifiers.filter(function (modifier) {
return modifier.name !== 'arrow';
}), [{
name: 'arrow',
enabled: !!_this.arrowNode,
options: _extends({}, arrowModifier && arrowModifier.options, {
element: _this.arrowNode
}),
applyStyle: {
enabled: false
},
updateStateModifier: _this.updateStateModifier
})
})
}, {
name: 'applyStyles',
enabled: false
}, _this.updateStateModifier]),
onFirstUpdate: _this.props.onFirstUpdate
};

@@ -94,19 +120,13 @@ });

_defineProperty(_assertThisInitialized(_this), "getPopperStyle", function () {
return !_this.popperNode || !_this.state.data ? initialStyle : _extends({
position: _this.state.data.offsets.popper.position
}, _this.state.data.styles);
});
var computedInitialStyle = _extends({}, initialPopperStyle, {
position: _this.props.strategy === 'fixed' ? 'fixed' : 'absolute'
});
_defineProperty(_assertThisInitialized(_this), "getPopperPlacement", function () {
return !_this.state.data ? undefined : _this.state.placement;
return !_this.popperNode || !_this.state.styles ? computedInitialStyle : _this.state.styles.popper;
});
_defineProperty(_assertThisInitialized(_this), "getArrowStyle", function () {
return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;
return !_this.arrowNode || !_this.state.styles ? initialArrowStyle : _this.state.styles.arrow;
});
_defineProperty(_assertThisInitialized(_this), "getOutOfBoundariesState", function () {
return _this.state.data ? _this.state.data.hide : undefined;
});
_defineProperty(_assertThisInitialized(_this), "destroyPopperInstance", function () {

@@ -128,8 +148,10 @@ if (!_this.popperInstance) return;

if (!referenceElement || !popperNode) return;
_this.popperInstance = new PopperJS(referenceElement, popperNode, _this.getOptions());
_this.popperInstance = createPopper(referenceElement, popperNode, _this.getOptions());
});
_defineProperty(_assertThisInitialized(_this), "scheduleUpdate", function () {
_defineProperty(_assertThisInitialized(_this), "update", function () {
if (_this.popperInstance) {
_this.popperInstance.scheduleUpdate();
return _this.popperInstance.update();
} else {
return Promise.resolve(null);
}

@@ -144,4 +166,9 @@ });

_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
// If the Popper.js options have changed, update the instance (destroy + create)
if (this.props.placement !== prevProps.placement || this.props.referenceElement !== prevProps.referenceElement || this.props.positionFixed !== prevProps.positionFixed || !deepEqual(this.props.modifiers, prevProps.modifiers, {
// If the Popper.js reference element has changed, update the instance (destroy + create)
if (this.props.referenceElement !== prevProps.referenceElement) {
this.updatePopperInstance();
} // If the Popper.js options have changed, set options
if (this.props.placement !== prevProps.placement || this.props.strategy !== prevProps.strategy || !deepEqual(this.props.modifiers, prevProps.modifiers, {
strict: true

@@ -156,5 +183,5 @@ })) {

this.updatePopperInstance();
} else if (this.props.eventsEnabled !== prevProps.eventsEnabled && this.popperInstance) {
this.props.eventsEnabled ? this.popperInstance.enableEventListeners() : this.popperInstance.disableEventListeners();
if (this.popperInstance) {
this.popperInstance.setOptions(this.getOptions());
}
} // A placement difference in state means popper determined a new placement

@@ -167,3 +194,3 @@ // apart from the props value. By the time the popper element is rendered with

if (prevState.placement !== this.state.placement) {
this.scheduleUpdate();
this.update();
}

@@ -178,8 +205,13 @@ };

_proto.render = function render() {
var _this$state = this.state,
placement = _this$state.placement,
isReferenceHidden = _this$state.isReferenceHidden,
hasPopperEscaped = _this$state.hasPopperEscaped;
return unwrapArray(this.props.children)({
ref: this.setPopperNode,
style: this.getPopperStyle(),
placement: this.getPopperPlacement(),
outOfBoundaries: this.getOutOfBoundariesState(),
scheduleUpdate: this.scheduleUpdate,
placement: placement,
isReferenceHidden: isReferenceHidden,
hasPopperEscaped: hasPopperEscaped,
update: this.update,
arrowProps: {

@@ -197,18 +229,22 @@ ref: this.setArrowNode,

placement: 'bottom',
eventsEnabled: true,
referenceElement: undefined,
positionFixed: false
strategy: 'absolute',
modifiers: [],
referenceElement: undefined
});
var placements = PopperJS.placements;
export { placements };
export default function Popper(_ref) {
var referenceElement = _ref.referenceElement,
props = _objectWithoutPropertiesLoose(_ref, ["referenceElement"]);
export default function Popper(_ref2) {
var referenceElement = _ref2.referenceElement,
props = _objectWithoutPropertiesLoose(_ref2, ["referenceElement"]);
return React.createElement(ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {
return React.createElement(InnerPopper, _extends({
referenceElement: referenceElement !== undefined ? referenceElement : referenceNode
}, props));
return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {
return /*#__PURE__*/React.createElement(InnerPopper, {
referenceElement: referenceElement !== undefined ? referenceElement : referenceNode,
children: props.children,
innerRef: props.innerRef,
modifiers: props.modifiers,
placement: props.placement,
strategy: props.strategy,
onFirstUpdate: props.onFirstUpdate
});
});
}

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

import _extends from "@babel/runtime/helpers/extends";
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
import * as React from 'react';

@@ -10,7 +16,7 @@ import warning from 'warning';

var InnerReference =
/*#__PURE__*/
function (_React$Component) {
var InnerReference = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(InnerReference, _React$Component);
var _super = _createSuper(InnerReference);
function InnerReference() {

@@ -50,7 +56,9 @@ var _this;

export default function Reference(props) {
return React.createElement(ManagerReferenceNodeSetterContext.Consumer, null, function (setReferenceNode) {
return React.createElement(InnerReference, _extends({
setReferenceNode: setReferenceNode
}, props));
return /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Consumer, null, function (setReferenceNode) {
return /*#__PURE__*/React.createElement(InnerReference, {
setReferenceNode: setReferenceNode,
innerRef: props.innerRef,
children: props.children
});
});
}

@@ -28,13 +28,8 @@ /**

export var shallowEqual = function shallowEqual(objA, objB) {
var aKeys = Object.keys(objA);
var bKeys = Object.keys(objB);
if (bKeys.length !== aKeys.length) {
if (objA.length !== objB.length) {
return false;
}
for (var i = 0; i < bKeys.length; i++) {
var key = aKeys[i];
if (objA[key] !== objB[key]) {
for (var i = 0; i < objB.length; i++) {
if (objA[i] !== objB[i]) {
return false;

@@ -41,0 +36,0 @@ }

{
"name": "react-popper",
"version": "1.3.7",
"description": "React wrapper around Popper.js",
"version": "2.0.0",
"description": "Official library to use Popper on React projects",
"license": "MIT",
"author": "Travis Arnold <travis@souporserious.com> (http://souporserious.com)",
"homepage": "https://github.com/souporserious/react-popper",
"contributors": [
"Federico Zivolo <federico.zivolo@gmail.com> (https://fezvrasta.github.io)"
],
"homepage": "https://github.com/popperjs/react-popper",
"main": "lib/cjs/index.js",

@@ -18,3 +21,3 @@ "module": "lib/esm/index.js",

"scripts": {
"build": "npm run build:clean && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:flow",
"build": "yarn build:clean && yarn build:esm && yarn build:cjs && yarn build:umd && yarn build:flow",
"build:clean": "rimraf dist/ && rimraf lib/",

@@ -24,7 +27,7 @@ "build:umd": "rollup -c && rimraf dist/index.esm.js",

"build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir lib/cjs",
"build:flow": "flow-copy-source --ignore '{__mocks__/*,*.test}.js' src lib/cjs",
"build:flow": "flow-copy-source --ignore '{__typings__/*,*.test}.js' src lib/cjs",
"demo:dev": "parcel --out-dir demo/dist demo/index.html",
"demo:build": "parcel build --out-dir demo/dist demo/index.html --public-url=/react-popper",
"demo:deploy": "yarn demo:build && gh-pages -d demo/dist",
"test": "npm run test:eslint && npm run test:flow && npm run test:ts && npm run test:jest",
"test": "yarn test:eslint && yarn test:flow && yarn test:ts && yarn test:jest",
"test:ts": "tsc --project ./typings/tests",

@@ -34,3 +37,3 @@ "test:flow": "flow check",

"test:eslint": "eslint src",
"prepare": "npm run build",
"prepare": "yarn build",
"precommit": "pretty-quick --staged && test",

@@ -49,6 +52,6 @@ "prepublishOnly": "git-branch-is master"

"type": "git",
"url": "https://github.com/souporserious/react-popper"
"url": "https://github.com/popperjs/react-popper"
},
"bugs": {
"url": "https://github.com/souporserious/react-popper/issues"
"url": "https://github.com/popperjs/react-popper/issues"
},

@@ -65,61 +68,61 @@ "keywords": [

"peerDependencies": {
"react": "0.14.x || ^15.0.0 || ^16.0.0"
"@popperjs/core": "^2.0.0",
"react": "^16.8.0"
},
"dependencies": {
"@babel/runtime": "^7.1.2",
"create-react-context": "^0.3.0",
"deep-equal": "^1.1.1",
"popper.js": "^1.14.4",
"@babel/runtime": "^7.9.2",
"deep-equal": "^2.0.1",
"prop-types": "^15.6.1",
"typed-styles": "^0.0.7",
"warning": "^4.0.2"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-stage-2": "^7.0.0",
"@types/react": "^16.1.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.0.0",
"cross-env": "^5.1.4",
"emotion": "^9.1.1",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.4.0",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-flowtype": "^2.46.1",
"eslint-plugin-jest": "^21.15.0",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-react": "^7.7.0",
"flow-bin": "^0.69.0",
"flow-copy-source": "^1.3.0",
"gh-pages": "^1.1.0",
"git-branch-is": "^0.1.0",
"jest": "^24.0.0",
"parcel-bundler": "^1.10.1",
"prettier": "^1.11.1",
"pretty-quick": "^1.4.1",
"react": "16.9.0",
"react-dom": "^16.9.0",
"react-emotion": "^9.1.1",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/plugin-external-helpers": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-transform-modules-commonjs": "^7.9.0",
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/polyfill": "^7.8.7",
"@babel/preset-env": "^7.9.0",
"@babel/preset-flow": "^7.9.0",
"@babel/preset-react": "^7.9.4",
"@babel/preset-stage-2": "^7.8.3",
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"@popperjs/core": "^2.1.1",
"@types/react": "^16.9.29",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.2.4",
"cross-env": "^7.0.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-to-json": "^3.4.4",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.19.0",
"flow-bin": "^0.121.0",
"flow-copy-source": "^2.0.9",
"gh-pages": "^2.2.0",
"git-branch-is": "^3.1.0",
"jest": "^25.2.4",
"parcel-bundler": "^1.12.4",
"prettier": "^2.0.2",
"pretty-quick": "^2.0.1",
"react": "16.13.1",
"react-dom": "^16.13.1",
"react-spring": "^8.0.27",
"recompose": "^0.26.0",
"rimraf": "^2.6.2",
"rollup": "^0.60.0",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-size-snapshot": "^0.5.1",
"rollup-plugin-uglify": "^4.0.0",
"typescript": "^2.8.1"
"recompose": "^0.30.0",
"rimraf": "^3.0.2",
"rollup": "^2.3.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-size-snapshot": "^0.11.0",
"rollup-plugin-uglify": "^6.0.4",
"typescript": "^3.8.3"
}
}
## React Popper
[![Build Status](https://travis-ci.org/FezVrasta/react-popper.svg?branch=master)](https://travis-ci.org/FezVrasta/react-popper)
[![Build Status](https://travis-ci.org/popperjs/react-popper.svg?branch=master)](https://travis-ci.org/popperjs/react-popper)
[![npm version](https://img.shields.io/npm/v/react-popper.svg)](https://www.npmjs.com/package/react-popper)

@@ -133,2 +133,4 @@ [![npm downloads](https://img.shields.io/npm/dm/react-popper.svg)](https://www.npmjs.com/package/react-popper)

##### `outOfBoundaries`
```js

@@ -135,0 +137,0 @@ outOfBoundaries: ?boolean;

import * as React from "react";
import * as PopperJS from "popper.js";
import * as PopperJS from "@popperjs/core";

@@ -28,8 +28,11 @@ interface ManagerProps {

export interface PopperChildrenProps {
arrowProps: PopperArrowProps;
outOfBoundaries: boolean | null;
placement: PopperJS.Placement;
ref: React.Ref<any>;
scheduleUpdate: () => void;
style: React.CSSProperties;
placement: PopperJS.Placement;
isReferenceHidden?: boolean,
hasPopperEscaped?: boolean,
update: () => Promise<null | Partial<PopperJS.State>>;
arrowProps: PopperArrowProps;
}

@@ -39,9 +42,9 @@

children: (props: PopperChildrenProps) => React.ReactNode;
eventsEnabled?: boolean;
innerRef?: React.Ref<any>;
modifiers?: PopperJS.Modifiers;
modifiers?: Array<Partial<PopperJS.Modifier<any>>>;
placement?: PopperJS.Placement;
positionFixed?: boolean;
referenceElement?: PopperJS.ReferenceObject;
strategy?: PopperJS.PositioningStrategy;
referenceElement?: HTMLElement | PopperJS.VirtualElement;
onFirstUpdate?: (state: Partial<PopperJS.State>) => void
}
export class Popper extends React.Component<PopperProps, {}> { }

Sorry, the diff of this file is too big to display

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