Socket
Socket
Sign inDemoInstall

@material/menu-surface

Package Overview
Dependencies
Maintainers
13
Versions
1656
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/menu-surface - npm Package Compare versions

Comparing version 0.41.0 to 0.42.0

4

dist/mdc.menuSurface.min.js

@@ -6,3 +6,3 @@ /*!

*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.menuSurface=e():(t.mdc=t.mdc||{},t.mdc.menuSurface=e())}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=34)}({0:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=r},1:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(0),r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;o(this,t),this.root_=e;for(var i=arguments.length,r=Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];this.initialize.apply(this,r),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return r(t,null,[{key:"attachTo",value:function(e){return new t(e,new i.a)}}]),r(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=void 0;"function"==typeof CustomEvent?o=new CustomEvent(t,{detail:e,bubbles:n}):(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(o)}}]),t}();e.a=s},16:function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"b",function(){return h}),n.d(e,"a",function(){return f});var a=n(0),u=(n(21),n(17)),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),f=void 0,h=function(t){function e(t){i(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.isOpen_=!1,n.openAnimationEndTimerId_=0,n.closeAnimationEndTimerId_=0,n.animationRequestId_=0,n.dimensions_,n.anchorCorner_=u.a.TOP_START,n.anchorMargin_={top:0,right:0,bottom:0,left:0},n.measures_=null,n.quickOpen_=!1,n.hoistedElement_=!1,n.isFixedPosition_=!1,n.position_={x:0,y:0},n}return s(e,t),l(e,null,[{key:"cssClasses",get:function(){return u.c}},{key:"strings",get:function(){return u.e}},{key:"numbers",get:function(){return u.d}},{key:"Corner",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},notifyClose:function(){},notifyOpen:function(){},isElementInContainer:function(){return!1},isRtl:function(){return!1},setTransformOrigin:function(){},isFocused:function(){return!1},saveFocus:function(){},restoreFocus:function(){},isFirstElementFocused:function(){},isLastElementFocused:function(){},focusFirstElement:function(){},focusLastElement:function(){},getInnerDimensions:function(){return{}},getAnchorDimensions:function(){return{}},getWindowDimensions:function(){return{}},getBodyDimensions:function(){return{}},getWindowScroll:function(){return{}},setPosition:function(){},setMaxHeight:function(){}}}}]),l(e,[{key:"init",value:function(){var t=e.cssClasses,n=t.ROOT,o=t.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(o)&&(this.isOpen_=!0)}},{key:"destroy",value:function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)}},{key:"setAnchorCorner",value:function(t){this.anchorCorner_=t}},{key:"setAnchorMargin",value:function(t){this.anchorMargin_.top="number"==typeof t.top?t.top:0,this.anchorMargin_.right="number"==typeof t.right?t.right:0,this.anchorMargin_.bottom="number"==typeof t.bottom?t.bottom:0,this.anchorMargin_.left="number"==typeof t.left?t.left:0}},{key:"setIsHoisted",value:function(t){this.hoistedElement_=t}},{key:"setFixedPosition",value:function(t){this.isFixedPosition_=t}},{key:"setAbsolutePosition",value:function(t,e){this.position_.x=this.typeCheckisFinite_(t)?t:0,this.position_.y=this.typeCheckisFinite_(e)?e:0}},{key:"setQuickOpen",value:function(t){this.quickOpen_=t}},{key:"handleBodyClick",value:function(t){var e=t.target;this.adapter_.isElementInContainer(e)||this.close()}},{key:"handleKeydown",value:function(t){var e=t.keyCode,n=t.key,o=t.shiftKey,i="Escape"===n||27===e,r="Tab"===n||9===e;i?this.close():r&&(this.adapter_.isLastElementFocused()&&!o?(this.adapter_.focusFirstElement(),t.preventDefault()):this.adapter_.isFirstElementFocused()&&o&&(this.adapter_.focusLastElement(),t.preventDefault()))}},{key:"getAutoLayoutMeasurements_",value:function(){var t=this.adapter_.getAnchorDimensions(),e=this.adapter_.getWindowDimensions(),n=this.adapter_.getBodyDimensions(),o=this.adapter_.getWindowScroll();return t||(t={x:this.position_.x,y:this.position_.y,top:this.position_.y,bottom:this.position_.y,left:this.position_.x,right:this.position_.x,height:0,width:0}),{viewport:e,bodyDimensions:n,windowScroll:o,viewportDistance:{top:t.top,right:e.width-t.right,left:t.left,bottom:e.height-t.bottom},anchorHeight:t.height,anchorWidth:t.width,surfaceHeight:this.dimensions_.height,surfaceWidth:this.dimensions_.width}}},{key:"getOriginCorner_",value:function(){var t=u.a.TOP_LEFT,e=this.measures_,n=e.viewportDistance,o=e.anchorHeight,i=e.anchorWidth,r=e.surfaceHeight,s=e.surfaceWidth,a=Boolean(this.anchorCorner_&u.b.BOTTOM),c=a?n.top+o+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,l=a?n.bottom-this.anchorMargin_.bottom:n.bottom+o-this.anchorMargin_.top,f=r-c,h=r-l;h>0&&f<h&&(t|=u.b.BOTTOM);var d=this.adapter_.isRtl(),_=Boolean(this.anchorCorner_&u.b.FLIP_RTL),m=Boolean(this.anchorCorner_&u.b.RIGHT),p=m&&!d||!m&&_&&d,y=p?n.left+i+this.anchorMargin_.right:n.left+this.anchorMargin_.left,v=p?n.right-this.anchorMargin_.right:n.right+i-this.anchorMargin_.left,g=s-y,O=s-v;return(g<0&&p&&d||m&&!p&&g<0||O>0&&g<O)&&(t|=u.b.RIGHT),t}},{key:"getHorizontalOriginOffset_",value:function(t){var e=this.measures_.anchorWidth,n=Boolean(t&u.b.RIGHT),o=Boolean(this.anchorCorner_&u.b.RIGHT);if(n){var i=o?e-this.anchorMargin_.left:this.anchorMargin_.right;return this.hoistedElement_||this.isFixedPosition_?i-(this.measures_.viewport.width-this.measures_.bodyDimensions.width):i}return o?e-this.anchorMargin_.right:this.anchorMargin_.left}},{key:"getVerticalOriginOffset_",value:function(t){var e=this.measures_.anchorHeight,n=Boolean(t&u.b.BOTTOM),o=Boolean(this.anchorCorner_&u.b.BOTTOM);return n?o?e-this.anchorMargin_.top:-this.anchorMargin_.bottom:o?e+this.anchorMargin_.bottom:this.anchorMargin_.top}},{key:"getMenuSurfaceMaxHeight_",value:function(t){var n=0,o=this.measures_.viewportDistance,i=Boolean(t&u.b.BOTTOM),r=e.numbers.MARGIN_TO_EDGE;return i?(n=o.top+this.anchorMargin_.top-r,this.anchorCorner_&u.b.BOTTOM||(n+=this.measures_.anchorHeight)):(n=o.bottom-this.anchorMargin_.bottom+this.measures_.anchorHeight-r,this.anchorCorner_&u.b.BOTTOM&&(n-=this.measures_.anchorHeight)),n}},{key:"autoPosition_",value:function(){var t;this.measures_=this.getAutoLayoutMeasurements_();var e=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(e),i=e&u.b.BOTTOM?"bottom":"top",r=e&u.b.RIGHT?"right":"left",s=this.getHorizontalOriginOffset_(e),a=this.getVerticalOriginOffset_(e),c=(t={},o(t,r,s||"0"),o(t,i,a||"0"),t),l=this.measures_;l.anchorWidth/l.surfaceWidth>u.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.hoistedElement_||this.isFixedPosition_)&&(c=this.adjustPositionForHoistedElement_(c));for(var f in c)c.hasOwnProperty(f)&&"0"!==c[f]&&(c[f]=parseInt(c[f],10)+"px");this.adapter_.setTransformOrigin(r+" "+i),this.adapter_.setPosition(c),this.adapter_.setMaxHeight(n?n+"px":""),this.measures_=null}},{key:"adjustPositionForHoistedElement_",value:function(t){var e=this.measures_,n=e.windowScroll,o=e.viewportDistance;for(var i in t)t.hasOwnProperty(i)&&(o.hasOwnProperty(i)&&(t[i]=parseInt(t[i],10)+o[i]),this.isFixedPosition_||("top"===i?t[i]=parseInt(t[i],10)+n.y:"bottom"===i?t[i]=parseInt(t[i],10)-n.y:"left"===i?t[i]=parseInt(t[i],10)+n.x:"right"===i&&(t[i]=parseInt(t[i],10)-n.x)));return t}},{key:"open",value:function(){var t=this;this.adapter_.saveFocus(),this.quickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){t.adapter_.addClass(e.cssClasses.OPEN),t.dimensions_=t.adapter_.getInnerDimensions(),t.autoPosition_(),t.quickOpen_?t.adapter_.notifyOpen():t.openAnimationEndTimerId_=setTimeout(function(){t.openAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter_.notifyOpen()},u.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0}},{key:"close",value:function(){var t=this;this.quickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){t.adapter_.removeClass(e.cssClasses.OPEN),t.quickOpen_?t.adapter_.notifyClose():t.closeAnimationEndTimerId_=setTimeout(function(){t.closeAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_CLOSED),t.adapter_.notifyClose()},u.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()}},{key:"maybeRestoreFocus_",value:function(){(this.adapter_.isFocused()||this.adapter_.isElementInContainer(document.activeElement))&&this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"typeCheckisFinite_",value:function(t){return"number"==typeof t&&isFinite(t)}}]),e}(a.a)},17:function(t,e,n){"use strict";n.d(e,"c",function(){return o}),n.d(e,"e",function(){return i}),n.d(e,"d",function(){return r}),n.d(e,"b",function(){return s}),n.d(e,"a",function(){return a});/**
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.menuSurface=e():(t.mdc=t.mdc||{},t.mdc.menuSurface=e())}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=34)}({0:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this.adapter_=e}return i(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=r},1:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(0),r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;o(this,t),this.root_=e;for(var i=arguments.length,r=Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];this.initialize.apply(this,r),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return r(t,null,[{key:"attachTo",value:function(e){return new t(e,new i.a)}}]),r(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=void 0;"function"==typeof CustomEvent?o=new CustomEvent(t,{detail:e,bubbles:n}):(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(o)}}]),t}();e.a=s},18:function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"b",function(){return h}),n.d(e,"a",function(){return f});var a=n(0),u=(n(22),n(19)),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),f=void 0,h=function(t){function e(t){i(this,e);var n=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.isOpen_=!1,n.openAnimationEndTimerId_=0,n.closeAnimationEndTimerId_=0,n.animationRequestId_=0,n.dimensions_,n.anchorCorner_=u.a.TOP_START,n.anchorMargin_={top:0,right:0,bottom:0,left:0},n.measures_=null,n.quickOpen_=!1,n.hoistedElement_=!1,n.isFixedPosition_=!1,n.position_={x:0,y:0},n}return s(e,t),l(e,null,[{key:"cssClasses",get:function(){return u.c}},{key:"strings",get:function(){return u.e}},{key:"numbers",get:function(){return u.d}},{key:"Corner",get:function(){return u.a}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},notifyClose:function(){},notifyOpen:function(){},isElementInContainer:function(){return!1},isRtl:function(){return!1},setTransformOrigin:function(){},isFocused:function(){return!1},saveFocus:function(){},restoreFocus:function(){},isFirstElementFocused:function(){},isLastElementFocused:function(){},focusFirstElement:function(){},focusLastElement:function(){},getInnerDimensions:function(){return{}},getAnchorDimensions:function(){return{}},getWindowDimensions:function(){return{}},getBodyDimensions:function(){return{}},getWindowScroll:function(){return{}},setPosition:function(){},setMaxHeight:function(){}}}}]),l(e,[{key:"init",value:function(){var t=e.cssClasses,n=t.ROOT,o=t.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");this.adapter_.hasClass(o)&&(this.isOpen_=!0)}},{key:"destroy",value:function(){clearTimeout(this.openAnimationEndTimerId_),clearTimeout(this.closeAnimationEndTimerId_),cancelAnimationFrame(this.animationRequestId_)}},{key:"setAnchorCorner",value:function(t){this.anchorCorner_=t}},{key:"setAnchorMargin",value:function(t){this.anchorMargin_.top="number"==typeof t.top?t.top:0,this.anchorMargin_.right="number"==typeof t.right?t.right:0,this.anchorMargin_.bottom="number"==typeof t.bottom?t.bottom:0,this.anchorMargin_.left="number"==typeof t.left?t.left:0}},{key:"setIsHoisted",value:function(t){this.hoistedElement_=t}},{key:"setFixedPosition",value:function(t){this.isFixedPosition_=t}},{key:"setAbsolutePosition",value:function(t,e){this.position_.x=this.typeCheckisFinite_(t)?t:0,this.position_.y=this.typeCheckisFinite_(e)?e:0}},{key:"setQuickOpen",value:function(t){this.quickOpen_=t}},{key:"handleBodyClick",value:function(t){var e=t.target;this.adapter_.isElementInContainer(e)||this.close()}},{key:"handleKeydown",value:function(t){var e=t.keyCode,n=t.key,o=t.shiftKey,i="Escape"===n||27===e,r="Tab"===n||9===e;i?this.close():r&&(this.adapter_.isLastElementFocused()&&!o?(this.adapter_.focusFirstElement(),t.preventDefault()):this.adapter_.isFirstElementFocused()&&o&&(this.adapter_.focusLastElement(),t.preventDefault()))}},{key:"getAutoLayoutMeasurements_",value:function(){var t=this.adapter_.getAnchorDimensions(),e=this.adapter_.getWindowDimensions(),n=this.adapter_.getBodyDimensions(),o=this.adapter_.getWindowScroll();return t||(t={x:this.position_.x,y:this.position_.y,top:this.position_.y,bottom:this.position_.y,left:this.position_.x,right:this.position_.x,height:0,width:0}),{viewport:e,bodyDimensions:n,windowScroll:o,viewportDistance:{top:t.top,right:e.width-t.right,left:t.left,bottom:e.height-t.bottom},anchorHeight:t.height,anchorWidth:t.width,surfaceHeight:this.dimensions_.height,surfaceWidth:this.dimensions_.width}}},{key:"getOriginCorner_",value:function(){var t=u.a.TOP_LEFT,e=this.measures_,n=e.viewportDistance,o=e.anchorHeight,i=e.anchorWidth,r=e.surfaceHeight,s=e.surfaceWidth,a=Boolean(this.anchorCorner_&u.b.BOTTOM),c=a?n.top+o+this.anchorMargin_.bottom:n.top+this.anchorMargin_.top,l=a?n.bottom-this.anchorMargin_.bottom:n.bottom+o-this.anchorMargin_.top,f=r-c,h=r-l;h>0&&f<h&&(t|=u.b.BOTTOM);var d=this.adapter_.isRtl(),_=Boolean(this.anchorCorner_&u.b.FLIP_RTL),m=Boolean(this.anchorCorner_&u.b.RIGHT),p=m&&!d||!m&&_&&d,y=p?n.left+i+this.anchorMargin_.right:n.left+this.anchorMargin_.left,v=p?n.right-this.anchorMargin_.right:n.right+i-this.anchorMargin_.left,g=s-y,O=s-v;return(g<0&&p&&d||m&&!p&&g<0||O>0&&g<O)&&(t|=u.b.RIGHT),t}},{key:"getHorizontalOriginOffset_",value:function(t){var e=this.measures_.anchorWidth,n=Boolean(t&u.b.RIGHT),o=Boolean(this.anchorCorner_&u.b.RIGHT);if(n){var i=o?e-this.anchorMargin_.left:this.anchorMargin_.right;return this.hoistedElement_||this.isFixedPosition_?i-(this.measures_.viewport.width-this.measures_.bodyDimensions.width):i}return o?e-this.anchorMargin_.right:this.anchorMargin_.left}},{key:"getVerticalOriginOffset_",value:function(t){var e=this.measures_.anchorHeight,n=Boolean(t&u.b.BOTTOM),o=Boolean(this.anchorCorner_&u.b.BOTTOM);return n?o?e-this.anchorMargin_.top:-this.anchorMargin_.bottom:o?e+this.anchorMargin_.bottom:this.anchorMargin_.top}},{key:"getMenuSurfaceMaxHeight_",value:function(t){var n=0,o=this.measures_.viewportDistance,i=Boolean(t&u.b.BOTTOM),r=e.numbers.MARGIN_TO_EDGE;return i?(n=o.top+this.anchorMargin_.top-r,this.anchorCorner_&u.b.BOTTOM||(n+=this.measures_.anchorHeight)):(n=o.bottom-this.anchorMargin_.bottom+this.measures_.anchorHeight-r,this.anchorCorner_&u.b.BOTTOM&&(n-=this.measures_.anchorHeight)),n}},{key:"autoPosition_",value:function(){var t;this.measures_=this.getAutoLayoutMeasurements_();var e=this.getOriginCorner_(),n=this.getMenuSurfaceMaxHeight_(e),i=e&u.b.BOTTOM?"bottom":"top",r=e&u.b.RIGHT?"right":"left",s=this.getHorizontalOriginOffset_(e),a=this.getVerticalOriginOffset_(e),c=(t={},o(t,r,s||"0"),o(t,i,a||"0"),t),l=this.measures_;l.anchorWidth/l.surfaceWidth>u.d.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.hoistedElement_||this.isFixedPosition_)&&(c=this.adjustPositionForHoistedElement_(c));for(var f in c)c.hasOwnProperty(f)&&"0"!==c[f]&&(c[f]=parseInt(c[f],10)+"px");this.adapter_.setTransformOrigin(r+" "+i),this.adapter_.setPosition(c),this.adapter_.setMaxHeight(n?n+"px":""),this.measures_=null}},{key:"adjustPositionForHoistedElement_",value:function(t){var e=this.measures_,n=e.windowScroll,o=e.viewportDistance;for(var i in t)t.hasOwnProperty(i)&&(o.hasOwnProperty(i)&&(t[i]=parseInt(t[i],10)+o[i]),this.isFixedPosition_||("top"===i?t[i]=parseInt(t[i],10)+n.y:"bottom"===i?t[i]=parseInt(t[i],10)-n.y:"left"===i?t[i]=parseInt(t[i],10)+n.x:"right"===i&&(t[i]=parseInt(t[i],10)-n.x)));return t}},{key:"open",value:function(){var t=this;this.adapter_.saveFocus(),this.quickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId_=requestAnimationFrame(function(){t.adapter_.addClass(e.cssClasses.OPEN),t.dimensions_=t.adapter_.getInnerDimensions(),t.autoPosition_(),t.quickOpen_?t.adapter_.notifyOpen():t.openAnimationEndTimerId_=setTimeout(function(){t.openAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter_.notifyOpen()},u.d.TRANSITION_OPEN_DURATION)}),this.isOpen_=!0}},{key:"close",value:function(){var t=this;this.quickOpen_||this.adapter_.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){t.adapter_.removeClass(e.cssClasses.OPEN),t.quickOpen_?t.adapter_.notifyClose():t.closeAnimationEndTimerId_=setTimeout(function(){t.closeAnimationEndTimerId_=0,t.adapter_.removeClass(e.cssClasses.ANIMATING_CLOSED),t.adapter_.notifyClose()},u.d.TRANSITION_CLOSE_DURATION)}),this.isOpen_=!1,this.maybeRestoreFocus_()}},{key:"maybeRestoreFocus_",value:function(){(this.adapter_.isFocused()||this.adapter_.isElementInContainer(document.activeElement))&&this.adapter_.restoreFocus()}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"typeCheckisFinite_",value:function(t){return"number"==typeof t&&isFinite(t)}}]),e}(a.a)},19:function(t,e,n){"use strict";n.d(e,"c",function(){return o}),n.d(e,"e",function(){return i}),n.d(e,"d",function(){return r}),n.d(e,"b",function(){return s}),n.d(e,"a",function(){return a});/**
* @license

@@ -29,3 +29,3 @@ * Copyright 2018 Google Inc.

*/
var o={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},i={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},r={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},s={BOTTOM:1,CENTER:2,RIGHT:4,FLIP_RTL:8},a={TOP_LEFT:0,TOP_RIGHT:s.RIGHT,BOTTOM_LEFT:s.BOTTOM,BOTTOM_RIGHT:s.BOTTOM|s.RIGHT,TOP_START:s.FLIP_RTL,TOP_END:s.FLIP_RTL|s.RIGHT,BOTTOM_START:s.BOTTOM|s.FLIP_RTL,BOTTOM_END:s.BOTTOM|s.RIGHT|s.FLIP_RTL}},21:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();!function(){function t(){o(this,t)}i(t,[{key:"addClass",value:function(t){}},{key:"removeClass",value:function(t){}},{key:"hasClass",value:function(t){}},{key:"hasAnchor",value:function(){}},{key:"notifyClose",value:function(){}},{key:"notifyOpen",value:function(){}},{key:"isElementInContainer",value:function(t){}},{key:"isRtl",value:function(){}},{key:"setTransformOrigin",value:function(t){}},{key:"isFocused",value:function(){}},{key:"saveFocus",value:function(){}},{key:"restoreFocus",value:function(){}},{key:"isFirstElementFocused",value:function(){}},{key:"isLastElementFocused",value:function(){}},{key:"focusFirstElement",value:function(){}},{key:"focusLastElement",value:function(){}},{key:"getInnerDimensions",value:function(){}},{key:"getAnchorDimensions",value:function(){}},{key:"getWindowDimensions",value:function(){}},{key:"getBodyDimensions",value:function(){}},{key:"getWindowScroll",value:function(){}},{key:"setPosition",value:function(t){}},{key:"setMaxHeight",value:function(t){}}])}()},34:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCMenuSurface",function(){return d});var s=n(1),a=n(35),u=n(16),c=(n(21),n(17));n.d(e,"MDCMenuSurfaceFoundation",function(){return u.b}),n.d(e,"AnchorMargin",function(){return u.a}),n.d(e,"Corner",function(){return c.a}),n.d(e,"CornerBit",function(){return c.b}),n.d(e,"util",function(){return a});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),h=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var s=i.get;if(void 0!==s)return s.call(o)},d=function(t){function e(){var t;o(this,e);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(r)));return a.previousFocus_,a.anchorElement,a.firstFocusableElement_,a.lastFocusableElement_,a.handleKeydown_,a.handleBodyClick_,a.registerBodyClickListener_,a.deregisterBodyClickListener_,a}return r(e,t),f(e,[{key:"initialSyncWithDOM",value:function(){var t=this;this.root_.parentElement&&this.root_.parentElement.classList.contains(c.c.ANCHOR)&&(this.anchorElement=this.root_.parentElement),this.root_.classList.contains(c.c.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleBodyClick_=function(e){return t.foundation_.handleBodyClick(e)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",t.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",t.handleBodyClick_)},this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.addEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_)}},{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.removeEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"hoistMenuToBody",value:function(){document.body.appendChild(this.root_.parentElement.removeChild(this.root_)),this.setIsHoisted(!0)}},{key:"setIsHoisted",value:function(t){this.foundation_.setIsHoisted(t)}},{key:"setMenuSurfaceAnchorElement",value:function(t){this.anchorElement=t}},{key:"setFixedPosition",value:function(t){t?this.root_.classList.add(c.c.FIXED):this.root_.classList.remove(c.c.FIXED),this.foundation_.setFixedPosition(t)}},{key:"setAbsolutePosition",value:function(t,e){this.foundation_.setAbsolutePosition(t,e),this.setIsHoisted(!0)}},{key:"setAnchorCorner",value:function(t){this.foundation_.setAnchorCorner(t)}},{key:"setAnchorMargin",value:function(t){this.foundation_.setAnchorMargin(t)}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.b(l({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(u.b.strings.CLOSED_EVENT,{})},notifyOpen:function(){return t.emit(u.b.strings.OPENED_EVENT,{})},isElementInContainer:function(e){return t.root_===e||t.root_.contains(e)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},setTransformOrigin:function(e){t.root_.style[a.getTransformPropertyName(window)+"-origin"]=e}},this.getFocusAdapterMethods_(),this.getDimensionAdapterMethods_()))}},{key:"getFocusAdapterMethods_",value:function(){var t=this;return{isFocused:function(){return document.activeElement===t.root_},saveFocus:function(){t.previousFocus_=document.activeElement},restoreFocus:function(){t.root_.contains(document.activeElement)&&t.previousFocus_&&t.previousFocus_.focus&&t.previousFocus_.focus()},isFirstElementFocused:function(){return t.firstFocusableElement_&&t.firstFocusableElement_===document.activeElement},isLastElementFocused:function(){return t.lastFocusableElement_&&t.lastFocusableElement_===document.activeElement},focusFirstElement:function(){return t.firstFocusableElement_&&t.firstFocusableElement_.focus&&t.firstFocusableElement_.focus()},focusLastElement:function(){return t.lastFocusableElement_&&t.lastFocusableElement_.focus&&t.lastFocusableElement_.focus()}}}},{key:"getDimensionAdapterMethods_",value:function(){var t=this;return{getInnerDimensions:function(){return{width:t.root_.offsetWidth,height:t.root_.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement&&t.anchorElement.getBoundingClientRect()},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(e){t.root_.style.left="left"in e?e.left:null,t.root_.style.right="right"in e?e.right:null,t.root_.style.top="top"in e?e.top:null,t.root_.style.bottom="bottom"in e?e.bottom:null},setMaxHeight:function(e){t.root_.style.maxHeight=e}}}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){if(t){var e=this.root_.querySelectorAll(c.e.FOCUSABLE_ELEMENTS);this.firstFocusableElement_=e.length>0?e[0]:null,this.lastFocusableElement_=e.length>0?e[e.length-1]:null,this.foundation_.open()}else this.foundation_.close()}},{key:"quickOpen",set:function(t){this.foundation_.setQuickOpen(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(s.a)},35:function(t,e,n){"use strict";function o(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===i||e){var n=t.document.createElement("div"),o="transform"in n.style?"transform":"webkitTransform";i=o}return i}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"getTransformPropertyName",function(){return o});/**
var o={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},i={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},r={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67},s={BOTTOM:1,CENTER:2,RIGHT:4,FLIP_RTL:8},a={TOP_LEFT:0,TOP_RIGHT:s.RIGHT,BOTTOM_LEFT:s.BOTTOM,BOTTOM_RIGHT:s.BOTTOM|s.RIGHT,TOP_START:s.FLIP_RTL,TOP_END:s.FLIP_RTL|s.RIGHT,BOTTOM_START:s.BOTTOM|s.FLIP_RTL,BOTTOM_END:s.BOTTOM|s.RIGHT|s.FLIP_RTL}},22:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();!function(){function t(){o(this,t)}i(t,[{key:"addClass",value:function(t){}},{key:"removeClass",value:function(t){}},{key:"hasClass",value:function(t){}},{key:"hasAnchor",value:function(){}},{key:"notifyClose",value:function(){}},{key:"notifyOpen",value:function(){}},{key:"isElementInContainer",value:function(t){}},{key:"isRtl",value:function(){}},{key:"setTransformOrigin",value:function(t){}},{key:"isFocused",value:function(){}},{key:"saveFocus",value:function(){}},{key:"restoreFocus",value:function(){}},{key:"isFirstElementFocused",value:function(){}},{key:"isLastElementFocused",value:function(){}},{key:"focusFirstElement",value:function(){}},{key:"focusLastElement",value:function(){}},{key:"getInnerDimensions",value:function(){}},{key:"getAnchorDimensions",value:function(){}},{key:"getWindowDimensions",value:function(){}},{key:"getBodyDimensions",value:function(){}},{key:"getWindowScroll",value:function(){}},{key:"setPosition",value:function(t){}},{key:"setMaxHeight",value:function(t){}}])}()},34:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCMenuSurface",function(){return d});var s=n(1),a=n(35),u=n(18),c=(n(22),n(19));n.d(e,"MDCMenuSurfaceFoundation",function(){return u.b}),n.d(e,"AnchorMargin",function(){return u.a}),n.d(e,"Corner",function(){return c.a}),n.d(e,"CornerBit",function(){return c.b}),n.d(e,"util",function(){return a});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),h=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var r=Object.getPrototypeOf(e);return null===r?void 0:t(r,n,o)}if("value"in i)return i.value;var s=i.get;if(void 0!==s)return s.call(o)},d=function(t){function e(){var t;o(this,e);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(r)));return a.previousFocus_,a.anchorElement,a.firstFocusableElement_,a.lastFocusableElement_,a.handleKeydown_,a.handleBodyClick_,a.registerBodyClickListener_,a.deregisterBodyClickListener_,a}return r(e,t),f(e,[{key:"initialSyncWithDOM",value:function(){var t=this;this.root_.parentElement&&this.root_.parentElement.classList.contains(c.c.ANCHOR)&&(this.anchorElement=this.root_.parentElement),this.root_.classList.contains(c.c.FIXED)&&this.setFixedPosition(!0),this.handleKeydown_=function(e){return t.foundation_.handleKeydown(e)},this.handleBodyClick_=function(e){return t.foundation_.handleBodyClick(e)},this.registerBodyClickListener_=function(){return document.body.addEventListener("click",t.handleBodyClick_)},this.deregisterBodyClickListener_=function(){return document.body.removeEventListener("click",t.handleBodyClick_)},this.root_.addEventListener("keydown",this.handleKeydown_),this.root_.addEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.addEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_)}},{key:"destroy",value:function(){this.root_.removeEventListener("keydown",this.handleKeydown_),this.root_.removeEventListener(c.e.OPENED_EVENT,this.registerBodyClickListener_),this.root_.removeEventListener(c.e.CLOSED_EVENT,this.deregisterBodyClickListener_),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"hoistMenuToBody",value:function(){document.body.appendChild(this.root_.parentElement.removeChild(this.root_)),this.setIsHoisted(!0)}},{key:"setIsHoisted",value:function(t){this.foundation_.setIsHoisted(t)}},{key:"setMenuSurfaceAnchorElement",value:function(t){this.anchorElement=t}},{key:"setFixedPosition",value:function(t){t?this.root_.classList.add(c.c.FIXED):this.root_.classList.remove(c.c.FIXED),this.foundation_.setFixedPosition(t)}},{key:"setAbsolutePosition",value:function(t,e){this.foundation_.setAbsolutePosition(t,e),this.setIsHoisted(!0)}},{key:"setAnchorCorner",value:function(t){this.foundation_.setAnchorCorner(t)}},{key:"setAnchorMargin",value:function(t){this.foundation_.setAnchorMargin(t)}},{key:"getDefaultFoundation",value:function(){var t=this;return new u.b(l({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(u.b.strings.CLOSED_EVENT,{})},notifyOpen:function(){return t.emit(u.b.strings.OPENED_EVENT,{})},isElementInContainer:function(e){return t.root_===e||t.root_.contains(e)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},setTransformOrigin:function(e){t.root_.style[a.getTransformPropertyName(window)+"-origin"]=e}},this.getFocusAdapterMethods_(),this.getDimensionAdapterMethods_()))}},{key:"getFocusAdapterMethods_",value:function(){var t=this;return{isFocused:function(){return document.activeElement===t.root_},saveFocus:function(){t.previousFocus_=document.activeElement},restoreFocus:function(){t.root_.contains(document.activeElement)&&t.previousFocus_&&t.previousFocus_.focus&&t.previousFocus_.focus()},isFirstElementFocused:function(){return t.firstFocusableElement_&&t.firstFocusableElement_===document.activeElement},isLastElementFocused:function(){return t.lastFocusableElement_&&t.lastFocusableElement_===document.activeElement},focusFirstElement:function(){return t.firstFocusableElement_&&t.firstFocusableElement_.focus&&t.firstFocusableElement_.focus()},focusLastElement:function(){return t.lastFocusableElement_&&t.lastFocusableElement_.focus&&t.lastFocusableElement_.focus()}}}},{key:"getDimensionAdapterMethods_",value:function(){var t=this;return{getInnerDimensions:function(){return{width:t.root_.offsetWidth,height:t.root_.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement&&t.anchorElement.getBoundingClientRect()},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(e){t.root_.style.left="left"in e?e.left:null,t.root_.style.right="right"in e?e.right:null,t.root_.style.top="top"in e?e.top:null,t.root_.style.bottom="bottom"in e?e.bottom:null},setMaxHeight:function(e){t.root_.style.maxHeight=e}}}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){if(t){var e=this.root_.querySelectorAll(c.e.FOCUSABLE_ELEMENTS);this.firstFocusableElement_=e.length>0?e[0]:null,this.lastFocusableElement_=e.length>0?e[e.length-1]:null,this.foundation_.open()}else this.foundation_.close()}},{key:"quickOpen",set:function(t){this.foundation_.setQuickOpen(t)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(s.a)},35:function(t,e,n){"use strict";function o(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===i||e){var n=t.document.createElement("div"),o="transform"in n.style?"transform":"webkitTransform";i=o}return i}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"getTransformPropertyName",function(){return o});/**
* @license

@@ -32,0 +32,0 @@ * Copyright 2018 Google Inc.

{
"name": "@material/menu-surface",
"version": "0.41.0",
"version": "0.42.0",
"description": "The Material Components for the web menu surface component",

@@ -20,4 +20,4 @@ "license": "MIT",

"@material/elevation": "^0.41.0",
"@material/rtl": "^0.40.1",
"@material/shape": "^0.41.0",
"@material/rtl": "^0.42.0",
"@material/shape": "^0.42.0",
"@material/theme": "^0.41.0"

@@ -24,0 +24,0 @@ },

@@ -151,2 +151,9 @@ <!--docs:

## Constants & Types
Constant Name | Description
--- | ---
`Corner` | Enum for representing an element corner for positioning the menu-surface. See [constants.js](./constants.js).
`AnchorMargin` | Margin values representing the distance from anchor point that the menu surface should be shown. See [foundation.js](./foundation.js).
## `MDCMenuSurface` Properties and Methods

@@ -153,0 +160,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 too big to display

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