systema-dropdown
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.dropdown=t(require("react")):e.dropdown=t(e.react)}(this,function(e){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="./example/index.js")}({"../../node_modules/popper.js/dist/esm/popper.js":function(e,t,n){"use strict";function o(e){var t=!1,n=0,o=document.createElement("span");return new MutationObserver(function(){e(),t=!1}).observe(o,{attributes:!0}),function(){t||(t=!0,o.setAttribute("x-index",n),n+=1)}}function r(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},ue))}}function i(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function l(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=a(e),n=t.overflow,o=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+o)?e:s(l(e))}function f(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===a(t,"position")?f(t):t:window.document.documentElement}function u(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||f(e.firstElementChild)===e)}function c(e){return null!==e.parentNode?c(e.parentNode):e}function p(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||o.contains(r))return u(a)?a:f(a);var l=c(e);return l.host?p(l.host,t):p(e,c(t).host)}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var r=window.document.documentElement;return(window.document.scrollingElement||r)[n]}return e[n]}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=d(t,"top"),r=d(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function m(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+o+"Width"].split("px")[0]}function b(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],me()?n["offset"+e]+o["margin"+("Height"===e?"Top":"Left")]+o["margin"+("Height"===e?"Bottom":"Right")]:0)}function v(){var e=window.document.body,t=window.document.documentElement,n=me()&&window.getComputedStyle(t);return{height:b("Height",e,t,n),width:b("Width",e,t,n)}}function y(e){return we({},e,{right:e.left+e.width,bottom:e.top+e.height})}function w(e){var t={};if(me())try{t=e.getBoundingClientRect();var n=d(e,"top"),o=d(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}catch(e){}else t=e.getBoundingClientRect();var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?v():{},l=i.width||e.clientWidth||r.right-r.left,s=i.height||e.clientHeight||r.bottom-r.top,f=e.offsetWidth-l,u=e.offsetHeight-s;if(f||u){var c=a(e);f-=m(c,"x"),u-=m(c,"y"),r.width-=f,r.height-=u}return y(r)}function g(e,t){var n=me(),o="HTML"===t.nodeName,r=w(e),i=w(t),l=s(e),f=a(t),u=+f.borderTopWidth.split("px")[0],c=+f.borderLeftWidth.split("px")[0],p=y({top:r.top-i.top-u,left:r.left-i.left-c,width:r.width,height:r.height});if(p.marginTop=0,p.marginLeft=0,!n&&o){var d=+f.marginTop.split("px")[0],m=+f.marginLeft.split("px")[0];p.top-=u-d,p.bottom-=u-d,p.left-=c-m,p.right-=c-m,p.marginTop=d,p.marginLeft=m}return(n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=h(p,t)),p}function E(e){var t=window.document.documentElement,n=g(e,t),o=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),i=d(t),a=d(t,"left");return y({top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:o,height:r})}function x(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===a(e,"position")||x(l(e)))}function O(e,t,n,o){var r={top:0,left:0},i=p(e,t);if("viewport"===o)r=E(i);else{var a=void 0;"scrollParent"===o?(a=s(l(e)),"BODY"===a.nodeName&&(a=window.document.documentElement)):a="window"===o?window.document.documentElement:o;var f=g(a,i);if("HTML"!==a.nodeName||x(i))r=f;else{var u=v(),c=u.height,d=u.width;r.top+=f.top-f.marginTop,r.bottom=c+f.top,r.left+=f.left-f.marginLeft,r.right=d+f.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function _(e){return e.width*e.height}function j(e,t,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=O(n,o,i,r),l={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},s=Object.keys(l).map(function(e){return we({key:e},l[e],{area:_(l[e])})}).sort(function(e,t){return t.area-e.area}),f=s.filter(function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight}),u=f.length>0?f[0].key:s[0].key,c=e.split("-")[1];return u+(c?"-"+c:"")}function P(e,t,n){return g(n,p(t,n))}function S(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function C(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function M(e,t,n){n=n.split("-")[0];var o=S(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",l=i?"left":"top",s=i?"height":"width",f=i?"width":"height";return r[a]=t[a]+t[s]/2-o[s]/2,r[l]=n===l?t[l]-o[f]:t[C(l)],r}function L(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function k(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var o=L(e,function(e){return e[t]===n});return e.indexOf(o)}function R(e,t,n){return(void 0===n?e:e.slice(0,k(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=y(t.offsets.popper),t.offsets.reference=y(t.offsets.reference),t=n(t,e))}),t}function T(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=P(this.state,this.popper,this.reference),e.placement=j(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=R(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function N(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function A(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length-1;o++){var r=t[o],i=r?""+r+n:e;if(void 0!==window.document.body.style[i])return i}return null}function D(){return this.state.isDestroyed=!0,N(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[A("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function W(e,t,n,o){var r="BODY"===e.nodeName,i=r?window:e;i.addEventListener(t,n,{passive:!0}),r||W(s(i.parentNode),t,n,o),o.push(i)}function H(e,t,n,o){n.updateBound=o,window.addEventListener("resize",n.updateBound,{passive:!0});var r=s(e);return W(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function B(){this.state.eventsEnabled||(this.state=H(this.reference,this.options,this.state,this.scheduleUpdate))}function F(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function I(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=F(this.reference,this.state))}function U(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Y(e,t){Object.keys(t).forEach(function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&U(t[n])&&(o="px"),e.style[n]=t[n]+o})}function q(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function K(e){return Y(e.instance.popper,e.styles),q(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Y(e.arrowElement,e.arrowStyles),e}function G(e,t,n,o,r){var i=P(r,t,e),a=j(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),Y(t,{position:"absolute"}),n}function V(e,t){var n=t.x,o=t.y,r=e.offsets.popper,i=L(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,l=f(e.instance.popper),s=w(l),u={position:r.position},c={left:Math.floor(r.left),top:Math.floor(r.top),bottom:Math.floor(r.bottom),right:Math.floor(r.right)},p="bottom"===n?"top":"bottom",d="right"===o?"left":"right",h=A("transform"),m=void 0,b=void 0;if(b="bottom"===p?-s.height+c.bottom:c.top,m="right"===d?-s.width+c.right:c.left,a&&h)u[h]="translate3d("+m+"px, "+b+"px, 0)",u[p]=0,u[d]=0,u.willChange="transform";else{var v="bottom"===p?-1:1,y="right"===d?-1:1;u[p]=b*v,u[d]=m*y,u.willChange=p+", "+d}var g={"x-placement":e.placement};return e.attributes=we({},g,e.attributes),e.styles=we({},u,e.styles),e.arrowStyles=we({},e.offsets.arrow,e.arrowStyles),e}function z(e,t,n){var o=L(e,function(e){return e.name===t}),r=!!o&&e.some(function(e){return e.name===n&&e.enabled&&e.order<o.order});if(!r){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}function X(e,t){if(!z(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],r=e.offsets,i=r.popper,l=r.reference,s=-1!==["left","right"].indexOf(o),f=s?"height":"width",u=s?"Top":"Left",c=u.toLowerCase(),p=s?"left":"top",d=s?"bottom":"right",h=S(n)[f];l[d]-h<i[c]&&(e.offsets.popper[c]-=i[c]-(l[d]-h)),l[c]+h>i[d]&&(e.offsets.popper[c]+=l[c]+h-i[d]);var m=l[c]+l[f]/2-h/2,b=a(e.instance.popper,"margin"+u).replace("px",""),v=m-y(e.offsets.popper)[c]-b;return v=Math.max(Math.min(i[f]-h,v),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[c]=Math.round(v),e.offsets.arrow[p]="",e}function J(e){return"end"===e?"start":"start"===e?"end":e}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Ee.indexOf(e),o=Ee.slice(n+1).concat(Ee.slice(0,n));return t?o.reverse():o}function Z(e,t){if(N(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=O(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),o=e.placement.split("-")[0],r=C(o),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case xe.FLIP:a=[o,r];break;case xe.CLOCKWISE:a=Q(o);break;case xe.COUNTERCLOCKWISE:a=Q(o,!0);break;default:a=t.behavior}return a.forEach(function(l,s){if(o!==l||a.length===s+1)return e;o=e.placement.split("-")[0],r=C(o);var f=e.offsets.popper,u=e.offsets.reference,c=Math.floor,p="left"===o&&c(f.right)>c(u.left)||"right"===o&&c(f.left)<c(u.right)||"top"===o&&c(f.bottom)>c(u.top)||"bottom"===o&&c(f.top)<c(u.bottom),d=c(f.left)<c(n.left),h=c(f.right)>c(n.right),m=c(f.top)<c(n.top),b=c(f.bottom)>c(n.bottom),v="left"===o&&d||"right"===o&&h||"top"===o&&m||"bottom"===o&&b,y=-1!==["top","bottom"].indexOf(o),w=!!t.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&b);(p||v||w)&&(e.flipped=!0,(p||v)&&(o=a[s+1]),w&&(i=J(i)),e.placement=o+(i?"-"+i:""),e.offsets.popper=we({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=R(e.instance.modifiers,e,"flip"))}),e}function $(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(r),l=a?"right":"bottom",s=a?"left":"top",f=a?"width":"height";return n[l]<i(o[s])&&(e.offsets.popper[s]=i(o[s])-n[f]),n[s]>i(o[l])&&(e.offsets.popper[s]=i(o[l])),e}function ee(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return e;if(0===a.indexOf("%")){var l=void 0;switch(a){case"%p":l=n;break;case"%":case"%r":default:l=o}return y(l)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}function te(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),l=a.indexOf(L(a,function(e){return-1!==e.search(/,|\s/)}));a[l]&&-1===a[l].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,f=-1!==l?[a.slice(0,l).concat([a[l].split(s)[0]]),[a[l].split(s)[1]].concat(a.slice(l+1))]:[a];return f=f.map(function(e,o){var r=(1===o?!i:i)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return ee(e,r,t,n)})}),f.forEach(function(e,t){e.forEach(function(n,o){U(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))})}),r}function ne(e,t){var n=t.offset,o=e.placement,r=e.offsets,i=r.popper,a=r.reference,l=o.split("-")[0],s=void 0;return s=U(+n)?[+n,0]:te(n,i,a,l),"left"===l?(i.top+=s[0],i.left-=s[1]):"right"===l?(i.top+=s[0],i.left+=s[1]):"top"===l?(i.left+=s[0],i.top-=s[1]):"bottom"===l&&(i.left+=s[0],i.top+=s[1]),e.popper=i,e}function oe(e,t){var n=t.boundariesElement||f(e.instance.popper);e.instance.reference===n&&(n=f(n));var o=O(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=o;var r=t.priority,i=e.offsets.popper,a={primary:function(e){var n=i[e];return i[e]<o[e]&&!t.escapeWithReference&&(n=Math.max(i[e],o[e])),ye({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=i[n];return i[e]>o[e]&&!t.escapeWithReference&&(r=Math.min(i[n],o[e]-("right"===e?i.width:i.height))),ye({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";i=we({},i,a[t](e))}),e.offsets.popper=i,e}function re(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var r=e.offsets,i=r.reference,a=r.popper,l=-1!==["bottom","top"].indexOf(n),s=l?"left":"top",f=l?"width":"height",u={start:ye({},s,i[s]),end:ye({},s,i[s]+i[f]-a[f])};e.offsets.popper=we({},a,u[o])}return e}function ie(e){if(!z(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=L(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function ae(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),l=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(l?r[a?"width":"height"]:0),e.placement=C(t),e.offsets.popper=y(r),e}Object.defineProperty(t,"__esModule",{value:!0});for(var le=["native code","[object MutationObserverConstructor]"],se="undefined"!=typeof window,fe=["Edge","Trident","Firefox"],ue=0,ce=0;ce<fe.length;ce+=1)if(se&&navigator.userAgent.indexOf(fe[ce])>=0){ue=1;break}var pe=se&&function(e){return le.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),de=pe?o:r,he=void 0,me=function(){return void 0===he&&(he=-1!==navigator.appVersion.indexOf("MSIE 10")),he},be=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ve=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}}(),ye=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},we=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},ge=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Ee=ge.slice(3),xe={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Oe={shift:{order:100,enabled:!0,fn:re},offset:{order:200,enabled:!0,fn:ne,offset:0},preventOverflow:{order:300,enabled:!0,fn:oe,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:$},arrow:{order:500,enabled:!0,fn:X,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Z,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ae},hide:{order:800,enabled:!0,fn:ie},computeStyle:{order:850,enabled:!0,fn:V,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:K,onLoad:G,gpuAcceleration:void 0}},_e={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Oe},je=function(){function e(t,n){var o=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};be(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=de(this.update.bind(this)),this.options=we({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=n.jquery?n[0]:n,this.options.modifiers={},Object.keys(we({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){o.options.modifiers[t]=we({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return we({name:e},o.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&i(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return ve(e,[{key:"update",value:function(){return T.call(this)}},{key:"destroy",value:function(){return D.call(this)}},{key:"enableEventListeners",value:function(){return B.call(this)}},{key:"disableEventListeners",value:function(){return I.call(this)}}]),e}();je.Utils=("undefined"!=typeof window?window:global).PopperUtils,je.placements=ge,je.Defaults=_e,t.default=je},"../../node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"../attach/index.js":function(e,t,n){"use strict";(function(e){var o,r,i,a="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};!function(l,s){"object"==a(t)&&"object"==a(e)?e.exports=s(n(0),n("../../node_modules/popper.js/dist/esm/popper.js")):(r=[n(0),n("../../node_modules/popper.js/dist/esm/popper.js")],o=s,void 0!==(i="function"==typeof o?o.apply(t,r):o)&&(e.exports=i))}(0,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="../attach/src/index.js")}({"../attach/src/index.js":function(e,t,n){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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(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 s=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(0),u=o(f),c=n(1),p=o(c),d=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.updateStateModifier={enabled:!0,order:900,fn:function(e){return this.setState({styles:e.styles,arrowStyles:e.arrowStyles,placement:e.placement}),e}},n.state={styles:{},arrowStyles:{},placement:"bottom"},n}return l(t,e),s(t,[{key:"componentWillMount",value:function(){this.setContentRef=this.setContentRef.bind(this),this.setArrowRef=this.setArrowRef.bind(this),this.updateStateModifier.fn=this.updateStateModifier.fn.bind(this)}},{key:"componentDidMount",value:function(){this.props.to&&this.createPopper(this.props.to)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.to,n=e.to;n&&n!==t&&(this.popper&&this.popper.destroy(),this.createPopper(n))}},{key:"componentWillUnmount",value:function(){this.popper&&this.popper.destroy()}},{key:"createPopper",value:function(e){var t={applyStyle:{enabled:!1},updateState:this.updateStateModifier};this.arrow&&(t.arrow={element:this.arrow}),this.popper=new p.default(e,this.content,{placement:this.props.placement,modifiers:t}),this.popper.scheduleUpdate()}},{key:"setContentRef",value:function(e){this.content=e}},{key:"setArrowRef",value:function(e){this.arrow=e}},{key:"render",value:function(){var e={arrowStyles:this.state.arrowStyles,contentStyles:this.state.styles,setArrowRef:this.setArrowRef,setContentRef:this.setContentRef,placement:this.state.placement};return u.default.cloneElement(this.props.children,e)}}]),t}(f.Component);d.displayName="Attach",d.defaultProps={placement:"bottom"},t.default=d,e.exports=t.default},0:function(e,t){e.exports=n(0)},1:function(e,t){e.exports=n("../../node_modules/popper.js/dist/esm/popper.js")}})})}).call(t,n("../../node_modules/webpack/buildin/module.js")(e))},"./example/index.js":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 i(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 a(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 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}}(),s=n(0),f=o(s),u=n("./src/index.js"),c=o(u),p=n("./example/styles.css"),d=o(p),h=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={anchor:void 0},n}return a(t,e),l(t,[{key:"componentWillMount",value:function(){this.setAnchorRef=this.setAnchorRef.bind(this)}},{key:"setAnchorRef",value:function(e){this.setState({anchor:e})}},{key:"render",value:function(){var e=this.state.anchor;return f.default.createElement("div",{"data-snapshot":this.props.placement},f.default.createElement("div",{className:d.default.example},f.default.createElement("a",{className:d.default.anchor,ref:this.setAnchorRef},"anchor for drop-down"),e&&f.default.createElement(c.default,{anchor:e,placement:this.props.placement},f.default.createElement("div",{className:d.default.dropdownContent},"Content ",this.props.placement))))}}]),t}(s.Component),m=function(){return f.default.createElement("div",{className:d.default.page},f.default.createElement("h1",null,"Dropdown"),f.default.createElement("p",null,"A component to show drop down. It uses the systema-attach component for positioning and adds basic styling."),f.default.createElement("h2",null,"Dropdown component"),f.default.createElement("p",null),f.default.createElement("table",{width:"100%"},f.default.createElement("thead",null,f.default.createElement("tr",null,f.default.createElement("th",{width:"20%"},"Prop"),f.default.createElement("th",null,"Description"))),f.default.createElement("tbody",null,f.default.createElement("tr",null,f.default.createElement("td",null,f.default.createElement("code",null,"anchor")," (required)"),f.default.createElement("td",null,"Dom element to be used for positioning the dropdown")),f.default.createElement("tr",null,f.default.createElement("td",null,f.default.createElement("code",null,"placement")),f.default.createElement("td",null,"Determines the positioning of the dropdown (",f.default.createElement("code",null,"bottom")," is the default value). Valid values are:",f.default.createElement("code",null,"auto-start"),", ",f.default.createElement("code",null,"auto"),", ",f.default.createElement("code",null,"auto-end"),","," ",f.default.createElement("code",null,"top-start"),", ",f.default.createElement("code",null,"top"),", ",f.default.createElement("code",null,"top-end"),","," ",f.default.createElement("code",null,"right-start"),", ",f.default.createElement("code",null,"right"),", ",f.default.createElement("code",null,"right-end"),","," ",f.default.createElement("code",null,"bottom-end"),", ",f.default.createElement("code",null,"bottom"),","," ",f.default.createElement("code",null,"bottom-start"),", ",f.default.createElement("code",null,"left-end"),", ",f.default.createElement("code",null,"left")," ","and ",f.default.createElement("code",null,"left-start"))),f.default.createElement("tr",null,f.default.createElement("td",null,f.default.createElement("code",null,"children")),f.default.createElement("td",null,"Content to be rendered.")))),f.default.createElement("h3",null,"Example"),f.default.createElement("pre",null,f.default.createElement("code",null,'\n// Example component that shows a dropdown attached to an element.\nclass Example extends Component {\n constructor(props) {\n super(props);\n this.state = {\n anchor: undefined,\n };\n this.setAnchorRef = this.setAnchorRef.bind(this);\n }\n\n setAnchorRef(ref) {\n this.setState({\n anchor: ref,\n });\n }\n\n render() {\n const {\n anchor\n } = this.state;\n return (\n <div className={styles.example}>\n <a className={styles.anchor} ref={this.setAnchorRef}>\n anchor for drop-down\n </a>\n {anchor && <Dropdown anchor={anchor}>\n <div className={styles.dropdownContent} placement="bottom">\n Content {this.props.placement}\n </div>\n </Dropdown>}\n </div>\n )\n }\n}\n')),f.default.createElement("p",null,"Here is a similar component in action:"),f.default.createElement(h,{placement:"top"}),f.default.createElement(h,{placement:"right"}),f.default.createElement(h,{placement:"left"}),f.default.createElement(h,{placement:"bottom"}))};m.displayName="dropdown-example",t.default=m,e.exports=t.default},"./example/styles.css":function(e,t){e.exports={page:"_1oyee12R",example:"_19xrO_1O",dropdownContent:"pNTdDUyp"}},"./src/arrow/index.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(r),a=n("./src/arrow/styles.css"),l=o(a),s=function(e){return-1!==e.indexOf("top")?l.default.top:-1!==e.indexOf("left")?l.default.left:-1!==e.indexOf("right")?l.default.right:l.default.bottom},f=function(e){var t=s(e.placement);return i.default.createElement("div",{className:t,style:e.style,ref:e.setRef})};f.displayName="DropdownArrow",t.default=f,e.exports=t.default},"./src/arrow/styles.css":function(e,t){e.exports={arrow:"tGRunOoS",bottom:"ptpf9cjK tGRunOoS",left:"_2yfDicBM tGRunOoS",top:"_3tnFEAch tGRunOoS",right:"_14B83tTL tGRunOoS"}},"./src/content/index.js":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 i(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 a(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 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}}(),s=n(0),f=o(s),u=n("./src/arrow/index.js"),c=o(u),p=n("./src/content/styles.css"),d=o(p),h=function(e){return-1!==e.indexOf("top")?d.default.top:-1!==e.indexOf("left")?d.default.left:-1!==e.indexOf("right")?d.default.right:d.default.bottom},m=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(){var e=h(this.props.placement);return f.default.createElement("div",{ref:this.props.setContentRef,style:this.props.contentStyles,className:e},f.default.createElement(c.default,{setRef:this.props.setArrowRef,style:this.props.arrowStyles,placement:this.props.placement}),this.props.children)}}]),t}(s.Component);t.default=m,e.exports=t.default},"./src/content/styles.css":function(e,t){e.exports={content:"_3x_FieL9",top:"_21KYDCKa _3x_FieL9",right:"_3FxlnKXH _3x_FieL9",bottom:"FRV48PTT _3x_FieL9",left:"_3HK6wtnr _3x_FieL9"}},"./src/index.js":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 i(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 a(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 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}}(),s=n(0),f=o(s),u=n("../attach/index.js"),c=o(u),p=n("./src/content/index.js"),d=o(p),h=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(){return f.default.createElement(c.default,{to:this.props.anchor,placement:this.props.placement},f.default.createElement(d.default,null,this.props.children))}}]),t}(s.Component);h.displayName="Dropdown",h.defaultProps={placement:"bottom"},t.default=h,e.exports=t.default},0:function(e,t){e.exports=require("react")}})}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.dropdown=t(require("react")):e.dropdown=t(e.react)}(this,function(e){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="./example/index.js")}({"../../node_modules/popper.js/dist/esm/popper.js":function(e,t,n){"use strict";function o(e){var t=!1,n=0,o=document.createElement("span");return new MutationObserver(function(){e(),t=!1}).observe(o,{attributes:!0}),function(){t||(t=!0,o.setAttribute("x-index",n),n+=1)}}function r(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},ue))}}function i(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function l(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e||-1!==["HTML","BODY","#document"].indexOf(e.nodeName))return window.document.body;var t=a(e),n=t.overflow,o=t.overflowX;return/(auto|scroll)/.test(n+t.overflowY+o)?e:s(l(e))}function f(e){var t=e&&e.offsetParent,n=t&&t.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===a(t,"position")?f(t):t:window.document.documentElement}function u(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||f(e.firstElementChild)===e)}function c(e){return null!==e.parentNode?c(e.parentNode):e}function p(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var a=i.commonAncestorContainer;if(e!==a&&t!==a||o.contains(r))return u(a)?a:f(a);var l=c(e);return l.host?p(l.host,t):p(e,c(t).host)}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",o=e.nodeName;if("BODY"===o||"HTML"===o){var r=window.document.documentElement;return(window.document.scrollingElement||r)[n]}return e[n]}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=d(t,"top"),r=d(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function m(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+o+"Width"].split("px")[0]}function b(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],me()?n["offset"+e]+o["margin"+("Height"===e?"Top":"Left")]+o["margin"+("Height"===e?"Bottom":"Right")]:0)}function v(){var e=window.document.body,t=window.document.documentElement,n=me()&&window.getComputedStyle(t);return{height:b("Height",e,t,n),width:b("Width",e,t,n)}}function y(e){return we({},e,{right:e.left+e.width,bottom:e.top+e.height})}function w(e){var t={};if(me())try{t=e.getBoundingClientRect();var n=d(e,"top"),o=d(e,"left");t.top+=n,t.left+=o,t.bottom+=n,t.right+=o}catch(e){}else t=e.getBoundingClientRect();var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?v():{},l=i.width||e.clientWidth||r.right-r.left,s=i.height||e.clientHeight||r.bottom-r.top,f=e.offsetWidth-l,u=e.offsetHeight-s;if(f||u){var c=a(e);f-=m(c,"x"),u-=m(c,"y"),r.width-=f,r.height-=u}return y(r)}function g(e,t){var n=me(),o="HTML"===t.nodeName,r=w(e),i=w(t),l=s(e),f=a(t),u=+f.borderTopWidth.split("px")[0],c=+f.borderLeftWidth.split("px")[0],p=y({top:r.top-i.top-u,left:r.left-i.left-c,width:r.width,height:r.height});if(p.marginTop=0,p.marginLeft=0,!n&&o){var d=+f.marginTop.split("px")[0],m=+f.marginLeft.split("px")[0];p.top-=u-d,p.bottom-=u-d,p.left-=c-m,p.right-=c-m,p.marginTop=d,p.marginLeft=m}return(n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=h(p,t)),p}function E(e){var t=window.document.documentElement,n=g(e,t),o=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),i=d(t),a=d(t,"left");return y({top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:o,height:r})}function x(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===a(e,"position")||x(l(e)))}function O(e,t,n,o){var r={top:0,left:0},i=p(e,t);if("viewport"===o)r=E(i);else{var a=void 0;"scrollParent"===o?(a=s(l(e)),"BODY"===a.nodeName&&(a=window.document.documentElement)):a="window"===o?window.document.documentElement:o;var f=g(a,i);if("HTML"!==a.nodeName||x(i))r=f;else{var u=v(),c=u.height,d=u.width;r.top+=f.top-f.marginTop,r.bottom=c+f.top,r.left+=f.left-f.marginLeft,r.right=d+f.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function _(e){return e.width*e.height}function j(e,t,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=O(n,o,i,r),l={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},s=Object.keys(l).map(function(e){return we({key:e},l[e],{area:_(l[e])})}).sort(function(e,t){return t.area-e.area}),f=s.filter(function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight}),u=f.length>0?f[0].key:s[0].key,c=e.split("-")[1];return u+(c?"-"+c:"")}function P(e,t,n){return g(n,p(t,n))}function S(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function M(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function C(e,t,n){n=n.split("-")[0];var o=S(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",l=i?"left":"top",s=i?"height":"width",f=i?"width":"height";return r[a]=t[a]+t[s]/2-o[s]/2,r[l]=n===l?t[l]-o[f]:t[M(l)],r}function L(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function T(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var o=L(e,function(e){return e[t]===n});return e.indexOf(o)}function N(e,t,n){return(void 0===n?e:e.slice(0,T(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&i(n)&&(t.offsets.popper=y(t.offsets.popper),t.offsets.reference=y(t.offsets.reference),t=n(t,e))}),t}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=P(this.state,this.popper,this.reference),e.placement=j(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=C(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=N(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function R(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function D(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<t.length-1;o++){var r=t[o],i=r?""+r+n:e;if(void 0!==window.document.body.style[i])return i}return null}function A(){return this.state.isDestroyed=!0,R(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[D("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function W(e,t,n,o){var r="BODY"===e.nodeName,i=r?window:e;i.addEventListener(t,n,{passive:!0}),r||W(s(i.parentNode),t,n,o),o.push(i)}function H(e,t,n,o){n.updateBound=o,window.addEventListener("resize",n.updateBound,{passive:!0});var r=s(e);return W(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function B(){this.state.eventsEnabled||(this.state=H(this.reference,this.options,this.state,this.scheduleUpdate))}function F(e,t){return window.removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function I(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=F(this.reference,this.state))}function U(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Y(e,t){Object.keys(t).forEach(function(n){var o="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&U(t[n])&&(o="px"),e.style[n]=t[n]+o})}function q(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}function K(e){return Y(e.instance.popper,e.styles),q(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Y(e.arrowElement,e.arrowStyles),e}function G(e,t,n,o,r){var i=P(r,t,e),a=j(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),Y(t,{position:"absolute"}),n}function V(e,t){var n=t.x,o=t.y,r=e.offsets.popper,i=L(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,l=f(e.instance.popper),s=w(l),u={position:r.position},c={left:Math.floor(r.left),top:Math.floor(r.top),bottom:Math.floor(r.bottom),right:Math.floor(r.right)},p="bottom"===n?"top":"bottom",d="right"===o?"left":"right",h=D("transform"),m=void 0,b=void 0;if(b="bottom"===p?-s.height+c.bottom:c.top,m="right"===d?-s.width+c.right:c.left,a&&h)u[h]="translate3d("+m+"px, "+b+"px, 0)",u[p]=0,u[d]=0,u.willChange="transform";else{var v="bottom"===p?-1:1,y="right"===d?-1:1;u[p]=b*v,u[d]=m*y,u.willChange=p+", "+d}var g={"x-placement":e.placement};return e.attributes=we({},g,e.attributes),e.styles=we({},u,e.styles),e.arrowStyles=we({},e.offsets.arrow,e.arrowStyles),e}function z(e,t,n){var o=L(e,function(e){return e.name===t}),r=!!o&&e.some(function(e){return e.name===n&&e.enabled&&e.order<o.order});if(!r){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}function X(e,t){if(!z(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],r=e.offsets,i=r.popper,l=r.reference,s=-1!==["left","right"].indexOf(o),f=s?"height":"width",u=s?"Top":"Left",c=u.toLowerCase(),p=s?"left":"top",d=s?"bottom":"right",h=S(n)[f];l[d]-h<i[c]&&(e.offsets.popper[c]-=i[c]-(l[d]-h)),l[c]+h>i[d]&&(e.offsets.popper[c]+=l[c]+h-i[d]);var m=l[c]+l[f]/2-h/2,b=a(e.instance.popper,"margin"+u).replace("px",""),v=m-y(e.offsets.popper)[c]-b;return v=Math.max(Math.min(i[f]-h,v),0),e.arrowElement=n,e.offsets.arrow={},e.offsets.arrow[c]=Math.round(v),e.offsets.arrow[p]="",e}function J(e){return"end"===e?"start":"start"===e?"end":e}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Ee.indexOf(e),o=Ee.slice(n+1).concat(Ee.slice(0,n));return t?o.reverse():o}function Z(e,t){if(R(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=O(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),o=e.placement.split("-")[0],r=M(o),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case xe.FLIP:a=[o,r];break;case xe.CLOCKWISE:a=Q(o);break;case xe.COUNTERCLOCKWISE:a=Q(o,!0);break;default:a=t.behavior}return a.forEach(function(l,s){if(o!==l||a.length===s+1)return e;o=e.placement.split("-")[0],r=M(o);var f=e.offsets.popper,u=e.offsets.reference,c=Math.floor,p="left"===o&&c(f.right)>c(u.left)||"right"===o&&c(f.left)<c(u.right)||"top"===o&&c(f.bottom)>c(u.top)||"bottom"===o&&c(f.top)<c(u.bottom),d=c(f.left)<c(n.left),h=c(f.right)>c(n.right),m=c(f.top)<c(n.top),b=c(f.bottom)>c(n.bottom),v="left"===o&&d||"right"===o&&h||"top"===o&&m||"bottom"===o&&b,y=-1!==["top","bottom"].indexOf(o),w=!!t.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&b);(p||v||w)&&(e.flipped=!0,(p||v)&&(o=a[s+1]),w&&(i=J(i)),e.placement=o+(i?"-"+i:""),e.offsets.popper=we({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=N(e.instance.modifiers,e,"flip"))}),e}function $(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(r),l=a?"right":"bottom",s=a?"left":"top",f=a?"width":"height";return n[l]<i(o[s])&&(e.offsets.popper[s]=i(o[s])-n[f]),n[s]>i(o[l])&&(e.offsets.popper[s]=i(o[l])),e}function ee(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return e;if(0===a.indexOf("%")){var l=void 0;switch(a){case"%p":l=n;break;case"%":case"%r":default:l=o}return y(l)[t]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}function te(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),l=a.indexOf(L(a,function(e){return-1!==e.search(/,|\s/)}));a[l]&&-1===a[l].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,f=-1!==l?[a.slice(0,l).concat([a[l].split(s)[0]]),[a[l].split(s)[1]].concat(a.slice(l+1))]:[a];return f=f.map(function(e,o){var r=(1===o?!i:i)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return ee(e,r,t,n)})}),f.forEach(function(e,t){e.forEach(function(n,o){U(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))})}),r}function ne(e,t){var n=t.offset,o=e.placement,r=e.offsets,i=r.popper,a=r.reference,l=o.split("-")[0],s=void 0;return s=U(+n)?[+n,0]:te(n,i,a,l),"left"===l?(i.top+=s[0],i.left-=s[1]):"right"===l?(i.top+=s[0],i.left+=s[1]):"top"===l?(i.left+=s[0],i.top-=s[1]):"bottom"===l&&(i.left+=s[0],i.top+=s[1]),e.popper=i,e}function oe(e,t){var n=t.boundariesElement||f(e.instance.popper);e.instance.reference===n&&(n=f(n));var o=O(e.instance.popper,e.instance.reference,t.padding,n);t.boundaries=o;var r=t.priority,i=e.offsets.popper,a={primary:function(e){var n=i[e];return i[e]<o[e]&&!t.escapeWithReference&&(n=Math.max(i[e],o[e])),ye({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=i[n];return i[e]>o[e]&&!t.escapeWithReference&&(r=Math.min(i[n],o[e]-("right"===e?i.width:i.height))),ye({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";i=we({},i,a[t](e))}),e.offsets.popper=i,e}function re(e){var t=e.placement,n=t.split("-")[0],o=t.split("-")[1];if(o){var r=e.offsets,i=r.reference,a=r.popper,l=-1!==["bottom","top"].indexOf(n),s=l?"left":"top",f=l?"width":"height",u={start:ye({},s,i[s]),end:ye({},s,i[s]+i[f]-a[f])};e.offsets.popper=we({},a,u[o])}return e}function ie(e){if(!z(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=L(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function ae(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),l=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(l?r[a?"width":"height"]:0),e.placement=M(t),e.offsets.popper=y(r),e}Object.defineProperty(t,"__esModule",{value:!0});for(var le=["native code","[object MutationObserverConstructor]"],se="undefined"!=typeof window,fe=["Edge","Trident","Firefox"],ue=0,ce=0;ce<fe.length;ce+=1)if(se&&navigator.userAgent.indexOf(fe[ce])>=0){ue=1;break}var pe=se&&function(e){return le.some(function(t){return(e||"").toString().indexOf(t)>-1})}(window.MutationObserver),de=pe?o:r,he=void 0,me=function(){return void 0===he&&(he=-1!==navigator.appVersion.indexOf("MSIE 10")),he},be=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ve=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}}(),ye=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},we=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},ge=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Ee=ge.slice(3),xe={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Oe={shift:{order:100,enabled:!0,fn:re},offset:{order:200,enabled:!0,fn:ne,offset:0},preventOverflow:{order:300,enabled:!0,fn:oe,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:$},arrow:{order:500,enabled:!0,fn:X,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Z,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:ae},hide:{order:800,enabled:!0,fn:ie},computeStyle:{order:850,enabled:!0,fn:V,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:K,onLoad:G,gpuAcceleration:void 0}},_e={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Oe},je=function(){function e(t,n){var o=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};be(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=de(this.update.bind(this)),this.options=we({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t.jquery?t[0]:t,this.popper=n.jquery?n[0]:n,this.options.modifiers={},Object.keys(we({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){o.options.modifiers[t]=we({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return we({name:e},o.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&i(e.onLoad)&&e.onLoad(o.reference,o.popper,o.options,e,o.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return ve(e,[{key:"update",value:function(){return k.call(this)}},{key:"destroy",value:function(){return A.call(this)}},{key:"enableEventListeners",value:function(){return B.call(this)}},{key:"disableEventListeners",value:function(){return I.call(this)}}]),e}();je.Utils=("undefined"!=typeof window?window:global).PopperUtils,je.placements=ge,je.Defaults=_e,t.default=je},"../../node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"../attach/index.js":function(e,t,n){"use strict";(function(e){var o,r,i,a="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};!function(l,s){"object"==a(t)&&"object"==a(e)?e.exports=s(n(0),n("../../node_modules/popper.js/dist/esm/popper.js")):(r=[n(0),n("../../node_modules/popper.js/dist/esm/popper.js")],o=s,void 0!==(i="function"==typeof o?o.apply(t,r):o)&&(e.exports=i))}(0,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="../attach/src/index.js")}({"../attach/src/index.js":function(e,t,n){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 i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(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 s=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(0),u=o(f),c=n(1),p=o(c),d=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.updateStateModifier={enabled:!0,order:900,fn:function(e){return this.setState({styles:e.styles,arrowStyles:e.arrowStyles,placement:e.placement}),e}},n.setContentRef=function(e){n.content=e},n.setArrowRef=function(e){n.arrow=e},n.state={styles:{},arrowStyles:{},placement:"bottom"},n}return l(t,e),s(t,[{key:"componentWillMount",value:function(){this.updateStateModifier.fn=this.updateStateModifier.fn.bind(this)}},{key:"componentDidMount",value:function(){this.props.to&&this.createPopper(this.props.to)}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.to,n=e.to;n&&n!==t&&(this.popper&&this.popper.destroy(),this.createPopper(n))}},{key:"componentWillUnmount",value:function(){this.popper&&this.popper.destroy()}},{key:"createPopper",value:function(e){var t={applyStyle:{enabled:!1},updateState:this.updateStateModifier};this.arrow&&(t.arrow={element:this.arrow}),this.popper=new p.default(e,this.content,{placement:this.props.placement,modifiers:t}),this.popper.scheduleUpdate()}},{key:"render",value:function(){var e={arrowStyles:this.state.arrowStyles,contentStyles:this.state.styles,setArrowRef:this.setArrowRef,setContentRef:this.setContentRef,placement:this.state.placement};return u.default.cloneElement(this.props.children,e)}}]),t}(f.Component);d.displayName="Attach",d.defaultProps={placement:"bottom"},t.default=d,e.exports=t.default},0:function(e,t){e.exports=n(0)},1:function(e,t){e.exports=n("../../node_modules/popper.js/dist/esm/popper.js")}})})}).call(t,n("../../node_modules/webpack/buildin/module.js")(e))},"./example/index.js":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 i(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 a(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 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}}(),s=n(0),f=o(s),u=n("./src/index.js"),c=o(u),p=n("./example/styles.css"),d=o(p),h=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setAnchorRef=function(e){n.setState({anchor:e})},n.state={anchor:void 0},n}return a(t,e),l(t,[{key:"render",value:function(){var e=this.state.anchor;return f.default.createElement("div",{"data-snapshot":this.props.placement},f.default.createElement("div",{className:d.default.example},f.default.createElement("a",{className:d.default.anchor,ref:this.setAnchorRef},"anchor for drop-down"),e&&f.default.createElement(c.default,{anchor:e,placement:this.props.placement},f.default.createElement("div",{className:d.default.dropdownContent},"Content ",this.props.placement))))}}]),t}(s.Component),m=function(){return f.default.createElement("div",{className:d.default.page},f.default.createElement("h1",null,"Dropdown"),f.default.createElement("p",null,"A component to show drop down. It uses the systema-attach component for positioning and adds basic styling."),f.default.createElement("h2",null,"Dropdown component"),f.default.createElement("p",null),f.default.createElement("table",{width:"100%"},f.default.createElement("thead",null,f.default.createElement("tr",null,f.default.createElement("th",{width:"20%"},"Prop"),f.default.createElement("th",null,"Description"))),f.default.createElement("tbody",null,f.default.createElement("tr",null,f.default.createElement("td",null,f.default.createElement("code",null,"anchor")," (required)"),f.default.createElement("td",null,"Dom element to be used for positioning the dropdown")),f.default.createElement("tr",null,f.default.createElement("td",null,f.default.createElement("code",null,"placement")),f.default.createElement("td",null,"Determines the positioning of the dropdown (",f.default.createElement("code",null,"bottom")," is the default value). Valid values are:",f.default.createElement("code",null,"auto-start"),", ",f.default.createElement("code",null,"auto"),", ",f.default.createElement("code",null,"auto-end"),","," ",f.default.createElement("code",null,"top-start"),", ",f.default.createElement("code",null,"top"),", ",f.default.createElement("code",null,"top-end"),","," ",f.default.createElement("code",null,"right-start"),", ",f.default.createElement("code",null,"right"),", ",f.default.createElement("code",null,"right-end"),","," ",f.default.createElement("code",null,"bottom-end"),", ",f.default.createElement("code",null,"bottom"),","," ",f.default.createElement("code",null,"bottom-start"),", ",f.default.createElement("code",null,"left-end"),", ",f.default.createElement("code",null,"left")," ","and ",f.default.createElement("code",null,"left-start"))),f.default.createElement("tr",null,f.default.createElement("td",null,f.default.createElement("code",null,"children")),f.default.createElement("td",null,"Content to be rendered.")))),f.default.createElement("h3",null,"Example"),f.default.createElement("pre",null,f.default.createElement("code",null,'\n// Example component that shows a dropdown attached to an element.\nclass Example extends Component {\n constructor(props) {\n super(props);\n this.state = {\n anchor: undefined,\n };\n }\n\n setAnchorRef = (ref) => {\n this.setState({\n anchor: ref,\n });\n }\n\n render() {\n const {\n anchor\n } = this.state;\n return (\n <div className={styles.example}>\n <a className={styles.anchor} ref={this.setAnchorRef}>\n anchor for drop-down\n </a>\n {anchor && <Dropdown anchor={anchor}>\n <div className={styles.dropdownContent} placement="bottom">\n Content {this.props.placement}\n </div>\n </Dropdown>}\n </div>\n )\n }\n}\n')),f.default.createElement("p",null,"Here is a similar component in action:"),f.default.createElement(h,{placement:"top"}),f.default.createElement(h,{placement:"right"}),f.default.createElement(h,{placement:"left"}),f.default.createElement(h,{placement:"bottom"}))};m.displayName="dropdown-example",t.default=m,e.exports=t.default},"./example/styles.css":function(e,t){e.exports={page:"_1oyee12R",example:"_19xrO_1O",dropdownContent:"pNTdDUyp"}},"./src/arrow/index.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=o(r),a=n("./src/arrow/styles.css"),l=o(a),s=function(e){return-1!==e.indexOf("top")?l.default.top:-1!==e.indexOf("left")?l.default.left:-1!==e.indexOf("right")?l.default.right:l.default.bottom},f=function(e){var t=s(e.placement);return i.default.createElement("div",{className:t,style:e.style,ref:e.setRef})};f.displayName="DropdownArrow",t.default=f,e.exports=t.default},"./src/arrow/styles.css":function(e,t){e.exports={arrow:"tGRunOoS",bottom:"ptpf9cjK tGRunOoS",left:"_2yfDicBM tGRunOoS",top:"_3tnFEAch tGRunOoS",right:"_14B83tTL tGRunOoS"}},"./src/content/index.js":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 i(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 a(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 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}}(),s=n(0),f=o(s),u=n("./src/arrow/index.js"),c=o(u),p=n("./src/content/styles.css"),d=o(p),h=function(e){return-1!==e.indexOf("top")?d.default.top:-1!==e.indexOf("left")?d.default.left:-1!==e.indexOf("right")?d.default.right:d.default.bottom},m=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(){var e=h(this.props.placement);return f.default.createElement("div",{ref:this.props.setContentRef,style:this.props.contentStyles,className:e},f.default.createElement(c.default,{setRef:this.props.setArrowRef,style:this.props.arrowStyles,placement:this.props.placement}),this.props.children)}}]),t}(s.Component);t.default=m,e.exports=t.default},"./src/content/styles.css":function(e,t){e.exports={content:"_3x_FieL9",top:"_21KYDCKa _3x_FieL9",right:"_3FxlnKXH _3x_FieL9",bottom:"FRV48PTT _3x_FieL9",left:"_3HK6wtnr _3x_FieL9"}},"./src/index.js":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 i(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 a(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 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}}(),s=n(0),f=o(s),u=n("../attach/index.js"),c=o(u),p=n("./src/content/index.js"),d=o(p),h=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(){return f.default.createElement(c.default,{to:this.props.anchor,placement:this.props.placement},f.default.createElement(d.default,null,this.props.children))}}]),t}(s.Component);h.displayName="Dropdown",h.defaultProps={placement:"bottom"},t.default=h,e.exports=t.default},0:function(e,t){e.exports=require("react")}})}); |
{ | ||
"name": "systema-dropdown", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.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 not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2515471