@mcwv/drawer
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -16,3 +16,3 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.drawer=e():(t.mcwv=t.mcwv||{},t.mcwv.drawer=e())}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=39)}({0:function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"c",function(){return o}); | ||
***************************************************************************** */ | ||
var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,a=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return s}},1:function(t,e,n){"use strict";function i(t,e,n,i,r,a,s,o){var c,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),a&&(d._scopeId="data-v-"+a),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},d._ssrRegister=c):r&&(c=o?function(){r.call(this,this.$root.$options.shadowRoot)}:r),c)if(d.functional){d._injectStyles=c;var u=d.render;d.render=function(t,e){return c.call(e),u(t,e)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:d}}n.d(e,"a",function(){return i})},10:function(t,e,n){"use strict";n.d(e,"a",function(){return i});const i={props:{event:String,"event-target":Object,"event-args":Array},methods:{dispatchEvent(t){if(t&&this.$emit(t.type,t),this.event){let t=this.eventTarget||this.$root,e=this.eventArgs||[];t.$emit(this.event,...e)}}},computed:{listeners(){return{...this.$listeners,click:t=>this.dispatchEvent(t)}}}}},17:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return r});const i={name:"custom-link",functional:!0,props:{tag:{type:String,default:"a"},link:Object},render(t,e){let n,i=Object.assign({},e.data);return e.props.link&&e.parent.$router?(n=e.parent.$root.$options.components.RouterLink,i.props=Object.assign({tag:e.props.tag},e.props.link),i.on.click&&(i.nativeOn={click:i.on.click})):n=e.props.tag,t(n,i,e.children)}},r={props:{to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomLink:i}}},19:function(t,e,n){var i,r=n(23),a=n(21),s=(i=[],{activateTrap:function(t){if(i.length>0){var e=i[i.length-1];e!==t&&e.pause()}var n=i.indexOf(t);-1===n?i.push(t):(i.splice(n,1),i.push(t))},deactivateTrap:function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1),i.length>0&&i[i.length-1].unpause()}});function o(t){return setTimeout(t,0)}t.exports=function(t,e){var n=document,i="string"==typeof t?n.querySelector(t):t,c=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},e),d={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},u={activate:function(t){if(!d.active){E(),d.active=!0,d.paused=!1,d.nodeFocusedBeforeActivation=n.activeElement;var e=t&&t.onActivate?t.onActivate:c.onActivate;return e&&e(),p(),u}},deactivate:l,pause:function(){!d.paused&&d.active&&(d.paused=!0,h())},unpause:function(){d.paused&&d.active&&(d.paused=!1,E(),p())}};return u;function l(t){if(d.active){h(),d.active=!1,d.paused=!1,s.deactivateTrap(u);var e=t&&void 0!==t.onDeactivate?t.onDeactivate:c.onDeactivate;return e&&e(),(t&&void 0!==t.returnFocus?t.returnFocus:c.returnFocusOnDeactivate)&&o(function(){C(d.nodeFocusedBeforeActivation)}),u}}function p(){if(d.active)return s.activateTrap(u),o(function(){C(_())}),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",m,{capture:!0,passive:!1}),n.addEventListener("touchstart",m,{capture:!0,passive:!1}),n.addEventListener("click",y,{capture:!0,passive:!1}),n.addEventListener("keydown",g,{capture:!0,passive:!1}),u}function h(){if(d.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",m,!0),n.removeEventListener("touchstart",m,!0),n.removeEventListener("click",y,!0),n.removeEventListener("keydown",g,!0),u}function f(t){var e=c[t],i=e;if(!e)return null;if("string"==typeof e&&!(i=n.querySelector(e)))throw new Error("`"+t+"` refers to no known node");if("function"==typeof e&&!(i=e()))throw new Error("`"+t+"` did not return a node");return i}function _(){var t;if(!(t=null!==f("initialFocus")?f("initialFocus"):i.contains(n.activeElement)?n.activeElement:d.firstTabbableNode||f("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return t}function m(t){i.contains(t.target)||(c.clickOutsideDeactivates?l({returnFocus:!r.isFocusable(t.target)}):t.preventDefault())}function v(t){i.contains(t.target)||t.target instanceof Document||(t.stopImmediatePropagation(),C(d.mostRecentlyFocusedNode||_()))}function g(t){if(!1!==c.escapeDeactivates&&function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t))return t.preventDefault(),void l();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){if(E(),t.shiftKey&&t.target===d.firstTabbableNode)return t.preventDefault(),void C(d.lastTabbableNode);t.shiftKey||t.target!==d.lastTabbableNode||(t.preventDefault(),C(d.firstTabbableNode))}(t)}function y(t){c.clickOutsideDeactivates||i.contains(t.target)||(t.preventDefault(),t.stopImmediatePropagation())}function E(){var t=r(i);d.firstTabbableNode=t[0]||_(),d.lastTabbableNode=t[t.length-1]||_()}function C(t){t!==n.activeElement&&(t&&t.focus?(t.focus(),d.mostRecentlyFocusedNode=t,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(t)&&t.select()):C(_()))}}},2:function(t,e,n){"use strict";n.d(e,"a",function(){return i}); | ||
var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,a=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return s}},1:function(t,e,n){"use strict";function i(t,e,n,i,r,a,s,o){var c,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=n,d._compiled=!0),i&&(d.functional=!0),a&&(d._scopeId="data-v-"+a),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},d._ssrRegister=c):r&&(c=o?function(){r.call(this,this.$root.$options.shadowRoot)}:r),c)if(d.functional){d._injectStyles=c;var u=d.render;d.render=function(t,e){return c.call(e),u(t,e)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:d}}n.d(e,"a",function(){return i})},10:function(t,e,n){"use strict";n.d(e,"a",function(){return i});const i={props:{event:String,"event-target":Object,"event-args":Array},methods:{dispatchEvent(t){if(t&&this.$emit(t.type,t),this.event){let t=this.eventTarget||this.$root,e=this.eventArgs||[];t.$emit(this.event,...e)}}},computed:{listeners(){return{...this.$listeners,click:t=>this.dispatchEvent(t)}}}}},17:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return r});const i={name:"custom-link",functional:!0,props:{tag:{type:String,default:"a"},link:Object},render(t,e){let n,i=Object.assign({},e.data);return e.props.link&&e.parent.$router?(n=e.parent.$root.$options.components.RouterLink,i.props=Object.assign({tag:e.props.tag},e.props.link),i.on.click&&(i.nativeOn={click:i.on.click})):n=e.props.tag,t(n,i,e.children)}},r={props:{to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String},computed:{link(){return this.to&&{to:this.to,exact:this.exact,append:this.append,replace:this.replace,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass}}},components:{CustomLink:i}}},19:function(t,e,n){var i,r=n(23),a=n(21),s=(i=[],{activateTrap:function(t){if(i.length>0){var e=i[i.length-1];e!==t&&e.pause()}var n=i.indexOf(t);-1===n?i.push(t):(i.splice(n,1),i.push(t))},deactivateTrap:function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1),i.length>0&&i[i.length-1].unpause()}});function o(t){return setTimeout(t,0)}t.exports=function(t,e){var n=document,i="string"==typeof t?n.querySelector(t):t,c=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},e),d={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},u={activate:function(t){if(!d.active){I(),d.active=!0,d.paused=!1,d.nodeFocusedBeforeActivation=n.activeElement;var e=t&&t.onActivate?t.onActivate:c.onActivate;return e&&e(),p(),u}},deactivate:l,pause:function(){!d.paused&&d.active&&(d.paused=!0,h())},unpause:function(){d.paused&&d.active&&(d.paused=!1,I(),p())}};return u;function l(t){if(d.active){h(),d.active=!1,d.paused=!1,s.deactivateTrap(u);var e=t&&void 0!==t.onDeactivate?t.onDeactivate:c.onDeactivate;return e&&e(),(t&&void 0!==t.returnFocus?t.returnFocus:c.returnFocusOnDeactivate)&&o(function(){y(d.nodeFocusedBeforeActivation)}),u}}function p(){if(d.active)return s.activateTrap(u),o(function(){y(_())}),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",m,{capture:!0,passive:!1}),n.addEventListener("touchstart",m,{capture:!0,passive:!1}),n.addEventListener("click",g,{capture:!0,passive:!1}),n.addEventListener("keydown",E,{capture:!0,passive:!1}),u}function h(){if(d.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",m,!0),n.removeEventListener("touchstart",m,!0),n.removeEventListener("click",g,!0),n.removeEventListener("keydown",E,!0),u}function f(t){var e=c[t],i=e;if(!e)return null;if("string"==typeof e&&!(i=n.querySelector(e)))throw new Error("`"+t+"` refers to no known node");if("function"==typeof e&&!(i=e()))throw new Error("`"+t+"` did not return a node");return i}function _(){var t;if(!(t=null!==f("initialFocus")?f("initialFocus"):i.contains(n.activeElement)?n.activeElement:d.firstTabbableNode||f("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return t}function m(t){i.contains(t.target)||(c.clickOutsideDeactivates?l({returnFocus:!r.isFocusable(t.target)}):t.preventDefault())}function v(t){i.contains(t.target)||t.target instanceof Document||(t.stopImmediatePropagation(),y(d.mostRecentlyFocusedNode||_()))}function E(t){if(!1!==c.escapeDeactivates&&function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t))return t.preventDefault(),void l();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){if(I(),t.shiftKey&&t.target===d.firstTabbableNode)return t.preventDefault(),void y(d.lastTabbableNode);t.shiftKey||t.target!==d.lastTabbableNode||(t.preventDefault(),y(d.firstTabbableNode))}(t)}function g(t){c.clickOutsideDeactivates||i.contains(t.target)||(t.preventDefault(),t.stopImmediatePropagation())}function I(){var t=r(i);d.firstTabbableNode=t[0]||_(),d.lastTabbableNode=t[t.length-1]||_()}function y(t){t!==n.activeElement&&(t&&t.focus?(t.focus(),d.mostRecentlyFocusedNode=t,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(t)&&t.select()):y(_()))}}},2:function(t,e,n){"use strict";n.d(e,"a",function(){return i}); | ||
/** | ||
@@ -86,3 +86,3 @@ * @license | ||
*/ | ||
var f=["touchstart","pointerdown","mousedown","keydown"],_=["touchend","pointerup","mouseup","contextmenu"],m=[],v=function(t){function e(n){var i=t.call(this,c.a({},e.defaultAdapter,n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(t){return i.activate_(t)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return c.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=e.cssClasses,r=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(r),t.adapter_.isUnbounded()&&(t.adapter_.addClass(a),t.layoutInternal_())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(r),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(f.forEach(function(t){e.adapter_.registerInteractionHandler(t,e.activateHandler_)}),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):_.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;f.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),_.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},e.prototype.removeCssVars_=function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})},e.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(i&&void 0!==t&&i.type!==t.type))n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&m.length>0&&m.some(function(t){return e.adapter_.containsEventTarget(t)})?this.resetActivationState_():(void 0!==t&&(m.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){m=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive_(t),n.wasElementMadeActive&&e.animateActivation_()),n.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())}))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,a=e.cssClasses,s=a.FG_DEACTIVATION,o=a.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var d="",u="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),p=l.startPoint,h=l.endPoint;d=p.x+"px, "+p.y+"px",u=h.x+"px, "+h.y+"px"}this.adapter_.updateCssVariable(i,d),this.adapter_.updateCssVariable(r,u),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(s),this.adapter_.computeBoundingRect(),this.adapter_.addClass(o),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,r,a=e.x,s=e.y,o=a+n.left,c=s+n.top;if("touchstart"===t.type){var d=t;i=d.changedTouches[0].pageX-o,r=d.changedTouches[0].pageY-c}else{var u=t;i=u.pageX-o,r=u.pageY-c}return{x:i,y:r}}(n,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:t.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState_,r=i.hasDeactivationUXRun,a=i.isActivated;(r||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},p.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=c.a({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()}))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING,this.initialSize_=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,r=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(a,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(r,this.unboundedCoords_.top+"px"))},e}(d.a),g=n(4);class y extends v{static get MATCHES(){return y._matches||(y._matches=Object(g.b)(HTMLElement.prototype))}static isSurfaceActive(t){return t[y.MATCHES](":active")}constructor(t,e){super(Object.assign({browserSupportsCssVars:()=>(function(t,e){void 0===e&&(e=!1);var n=t.CSS,i=a;if("boolean"==typeof a&&!e)return a;if(!n||"function"!=typeof n.supports)return!1;var r=n.supports("--css-vars","yes"),s=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=!(!r&&!s||function(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var i=t.getComputedStyle(n),r=null!==i&&"solid"===i.borderTopStyle;return n.remove(),r}(t)),e||(a=i),i})(window),isUnbounded:()=>!1,isSurfaceActive:()=>t.$el[y.MATCHES](":active"),isSurfaceDisabled:()=>t.disabled,addClass(e){t.$set(t.classes,e,!0)},removeClass(e){t.$delete(t.classes,e)},containsEventTarget:e=>t.$el.contains(e),registerInteractionHandler:(e,n)=>{t.$el.addEventListener(e,n,h())},deregisterInteractionHandler:(e,n)=>{t.$el.removeEventListener(e,n,h())},registerDocumentInteractionHandler:(t,e)=>document.documentElement.addEventListener(t,e,h()),deregisterDocumentInteractionHandler:(t,e)=>document.documentElement.removeEventListener(t,e,h()),registerResizeHandler:t=>window.addEventListener("resize",t),deregisterResizeHandler:t=>window.removeEventListener("resize",t),updateCssVariable:(e,n)=>{t.$set(t.styles,e,n)},computeBoundingRect:()=>t.$el.getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})},e))}}const E={data:()=>({classes:{},styles:{}}),mounted(){this.ripple=new y(this),this.ripple.init()},beforeDestroy(){this.ripple.destroy()}};var C={name:"mdc-ripple",mixins:[o.b,E],props:{tag:String}},b=n(1),I=Object(b.a)(C,r,[],!1,null,null,null);I.options.__file="packages/mcwv-ripple/mdc-ripple.vue";var A=I.exports;n.d(e,"RippleBase",function(){return y}),n.d(e,"RippleMixin",function(){return E}),n.d(e,"mdcRipple",function(){return A});e.default=Object(i.a)({mdcRipple:A})},6:function(t,e,n){"use strict";function i(t){return{version:"__VERSION__",install:e=>{for(let n in t){let i=t[n];e.component(i.name,i)}},components:t}}n.d(e,"a",function(){return i})},7:function(t,e,n){"use strict";var i=n(0),r=n(2),a={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",ROOT:"mdc-list"},s={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)',CHECKBOX_SELECTOR:'input[type="checkbox"]:not(:disabled)',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+a.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+a.LIST_ITEM_CLASS+" a\n ",ENABLED_ITEMS_SELECTOR:".mdc-list-item:not(.mdc-list-item--disabled)",FOCUSABLE_CHILD_ELEMENTS:"\n ."+a.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+a.LIST_ITEM_CLASS+" a,\n ."+a.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+a.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]:not(:disabled)'};n.d(e,"a",function(){return c}); | ||
var f=["touchstart","pointerdown","mousedown","keydown"],_=["touchend","pointerup","mouseup","contextmenu"],m=[],v=function(t){function e(n){var i=t.call(this,c.a({},e.defaultAdapter,n))||this;return i.activationAnimationHasEnded_=!1,i.activationTimer_=0,i.fgDeactivationRemovalTimer_=0,i.fgScale_="0",i.frame_={width:0,height:0},i.initialSize_=0,i.layoutFrame_=0,i.maxRadius_=0,i.unboundedCoords_={left:0,top:0},i.activationState_=i.defaultActivationState_(),i.activationTimerCallback_=function(){i.activationAnimationHasEnded_=!0,i.runDeactivationUXLogicIfReady_()},i.activateHandler_=function(t){return i.activate_(t)},i.deactivateHandler_=function(){return i.deactivate_()},i.focusHandler_=function(){return i.handleFocus()},i.blurHandler_=function(){return i.handleBlur()},i.resizeHandler_=function(){return i.layout()},i}return c.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=e.cssClasses,r=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(r),t.adapter_.isUnbounded()&&(t.adapter_.addClass(a),t.layoutInternal_())})}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(r),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter_.addClass(n):this.adapter_.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},e.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers_=function(t){var e=this;t&&(f.forEach(function(t){e.adapter_.registerInteractionHandler(t,e.activateHandler_)}),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_)},e.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):_.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;f.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)},e.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),_.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},e.prototype.removeCssVars_=function(){var t=this,n=e.strings;Object.keys(n).forEach(function(e){0===e.indexOf("VAR_")&&t.adapter_.updateCssVariable(n[e],null)})},e.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(i&&void 0!==t&&i.type!==t.type))n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&m.length>0&&m.some(function(t){return e.adapter_.containsEventTarget(t)})?this.resetActivationState_():(void 0!==t&&(m.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){m=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive_(t),n.wasElementMadeActive&&e.animateActivation_()),n.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())}))}}},e.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},e.prototype.animateActivation_=function(){var t=this,n=e.strings,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,a=e.cssClasses,s=a.FG_DEACTIVATION,o=a.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var d="",u="";if(!this.adapter_.isUnbounded()){var l=this.getFgTranslationCoordinates_(),p=l.startPoint,h=l.endPoint;d=p.x+"px, "+p.y+"px",u=h.x+"px, "+h.y+"px"}this.adapter_.updateCssVariable(i,d),this.adapter_.updateCssVariable(r,u),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(s),this.adapter_.computeBoundingRect(),this.adapter_.addClass(o),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var i,r,a=e.x,s=e.y,o=a+n.left,c=s+n.top;if("touchstart"===t.type){var d=t;i=d.changedTouches[0].pageX-o,r=d.changedTouches[0].pageY-c}else{var u=t;i=u.pageX-o,r=u.pageY-c}return{x:i,y:r}}(n,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2}).x-this.initialSize_/2,y:t.y-this.initialSize_/2},endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}},e.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,i=this.activationState_,r=i.hasDeactivationUXRun,a=i.isActivated;(r||!a)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(n)},p.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses_=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},e.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=c.a({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(n)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(n),t.resetActivationState_()}))}},e.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady_()},e.prototype.layoutInternal_=function(){var t=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING,this.initialSize_=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,r=t.VAR_TOP,a=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(a,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(r,this.unboundedCoords_.top+"px"))},e}(d.a),E=n(4);class g extends v{static get MATCHES(){return g._matches||(g._matches=Object(E.b)(HTMLElement.prototype))}static isSurfaceActive(t){return t[g.MATCHES](":active")}constructor(t,e){super(Object.assign({browserSupportsCssVars:()=>(function(t,e){void 0===e&&(e=!1);var n=t.CSS,i=a;if("boolean"==typeof a&&!e)return a;if(!n||"function"!=typeof n.supports)return!1;var r=n.supports("--css-vars","yes"),s=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=!(!r&&!s||function(t){var e=t.document,n=e.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(n);var i=t.getComputedStyle(n),r=null!==i&&"solid"===i.borderTopStyle;return n.remove(),r}(t)),e||(a=i),i})(window),isUnbounded:()=>!1,isSurfaceActive:()=>t.$el[g.MATCHES](":active"),isSurfaceDisabled:()=>t.disabled,addClass(e){t.$set(t.classes,e,!0)},removeClass(e){t.$delete(t.classes,e)},containsEventTarget:e=>t.$el.contains(e),registerInteractionHandler:(e,n)=>{t.$el.addEventListener(e,n,h())},deregisterInteractionHandler:(e,n)=>{t.$el.removeEventListener(e,n,h())},registerDocumentInteractionHandler:(t,e)=>document.documentElement.addEventListener(t,e,h()),deregisterDocumentInteractionHandler:(t,e)=>document.documentElement.removeEventListener(t,e,h()),registerResizeHandler:t=>window.addEventListener("resize",t),deregisterResizeHandler:t=>window.removeEventListener("resize",t),updateCssVariable:(e,n)=>{t.$set(t.styles,e,n)},computeBoundingRect:()=>t.$el.getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})},e))}}const I={data:()=>({classes:{},styles:{}}),mounted(){this.ripple=new g(this),this.ripple.init()},beforeDestroy(){this.ripple.destroy()}};var y={name:"mdc-ripple",mixins:[o.b,I],props:{tag:String}},C=n(1),b=Object(C.a)(y,r,[],!1,null,null,null);b.options.__file="packages/mcwv-ripple/mdc-ripple.vue";var A=b.exports;n.d(e,"RippleBase",function(){return g}),n.d(e,"RippleMixin",function(){return I}),n.d(e,"mdcRipple",function(){return A});e.default=Object(i.a)({mdcRipple:A})},6:function(t,e,n){"use strict";function i(t){return{version:"__VERSION__",install:e=>{for(let n in t){let i=t[n];e.component(i.name,i)}},components:t}}n.d(e,"a",function(){return i})},7:function(t,e,n){"use strict";var i=n(0),r=n(2),a={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",ROOT:"mdc-list"},s={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)',CHECKBOX_SELECTOR:'input[type="checkbox"]:not(:disabled)',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+a.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+a.LIST_ITEM_CLASS+" a\n ",ENABLED_ITEMS_SELECTOR:".mdc-list-item:not(.mdc-list-item--disabled)",FOCUSABLE_CHILD_ELEMENTS:"\n ."+a.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+a.LIST_ITEM_CLASS+" a,\n ."+a.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+a.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]:not(:disabled)'},o={UNSET_INDEX:-1};n.d(e,"a",function(){return d}); | ||
/** | ||
@@ -110,3 +110,3 @@ * @license | ||
*/ | ||
var o=["input","button","textarea","select"];var c=function(t){function e(n){var r=t.call(this,i.a({},e.defaultAdapter,n))||this;return r.wrapFocus_=!1,r.isVertical_=!0,r.isSingleSelectionList_=!1,r.selectedIndex_=-1,r.focusedItemIndex_=-1,r.useActivatedClass_=!1,r.isCheckboxList_=!1,r.isRadioList_=!1,r}return i.b(e,t),Object.defineProperty(e,"strings",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){}}},enumerable:!0,configurable:!0}),e.prototype.layout=function(){0!==this.adapter_.getListItemCount()&&(this.adapter_.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter_.hasRadioAtIndex(0)&&(this.isRadioList_=!0))},e.prototype.setWrapFocus=function(t){this.wrapFocus_=t},e.prototype.setVerticalOrientation=function(t){this.isVertical_=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t},e.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex_},e.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},e.prototype.handleFocusIn=function(t,e){e>=0&&this.adapter_.setTabIndexForListItemChildren(e,"0")},e.prototype.handleFocusOut=function(t,e){var n=this;e>=0&&this.adapter_.setTabIndexForListItemChildren(e,"-1"),setTimeout(function(){n.adapter_.isFocusInsideList()||n.setTabindexToFirstSelectedItem_()},0)},e.prototype.handleKeydown=function(t,e,n){var i="ArrowLeft"===t.key||37===t.keyCode,r="ArrowUp"===t.key||38===t.keyCode,a="ArrowRight"===t.key||39===t.keyCode,s="ArrowDown"===t.key||40===t.keyCode,o="Home"===t.key||36===t.keyCode,c="End"===t.key||35===t.keyCode,d="Enter"===t.key||13===t.keyCode,u="Space"===t.key||32===t.keyCode,l=this.adapter_.getFocusedElementIndex(),p=-1;if(!(-1===l&&(l=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)this.preventDefaultEvent_(t),p=this.focusNextElement(l);else if(this.isVertical_&&r||!this.isVertical_&&i)this.preventDefaultEvent_(t),p=this.focusPrevElement(l);else if(o)this.preventDefaultEvent_(t),p=this.focusFirstElement();else if(c)this.preventDefaultEvent_(t),p=this.focusLastElement();else if((d||u)&&e){var h=t.target;if(h&&"A"===h.tagName&&d)return;this.preventDefaultEvent_(t),this.isSelectableList_()&&this.setSelectedIndexOnAction_(l),this.adapter_.notifyAction(l)}this.focusedItemIndex_=l,p>=0&&(this.setTabindexAtIndex_(p),this.focusedItemIndex_=p)}},e.prototype.handleClick=function(t,e){-1!==t&&(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter_.notifyAction(t),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)},e.prototype.focusNextElement=function(t){var e=t+1;if(e>=this.adapter_.getListItemCount()){if(!this.wrapFocus_)return t;e=0}return this.adapter_.focusItemAtIndex(e),e},e.prototype.focusPrevElement=function(t){var e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter_.getListItemCount()-1}return this.adapter_.focusItemAtIndex(e),e},e.prototype.focusFirstElement=function(){return this.adapter_.focusItemAtIndex(0),0},e.prototype.focusLastElement=function(){var t=this.adapter_.getListItemCount()-1;return this.adapter_.focusItemAtIndex(t),t},e.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===o.indexOf(e)&&t.preventDefault()},e.prototype.setSingleSelectionAtIndex_=function(t){var e=a.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=a.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_>=0&&this.selectedIndex_!==t&&(this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.setAttributeForElementIndex(this.selectedIndex_,s.ARIA_SELECTED,"false")),this.adapter_.addClassForElementIndex(t,e),this.adapter_.setAttributeForElementIndex(t,s.ARIA_SELECTED,"true"),this.selectedIndex_=t},e.prototype.setRadioAtIndex_=function(t){this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_>=0&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,s.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,s.ARIA_CHECKED,"true"),this.selectedIndex_=t},e.prototype.setCheckboxAtIndex_=function(t){for(var e=0;e<this.adapter_.getListItemCount();e++){var n=!1;t.indexOf(e)>=0&&(n=!0),this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n),this.adapter_.setAttributeForElementIndex(e,s.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},e.prototype.setTabindexAtIndex_=function(t){-1===this.focusedItemIndex_&&0!==t?this.adapter_.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex_>=0&&this.focusedItemIndex_!==t&&this.adapter_.setAttributeForElementIndex(this.focusedItemIndex_,"tabindex","-1"),this.adapter_.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},e.prototype.setTabindexToFirstSelectedItem_=function(){var t=0;this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&-1!==this.selectedIndex_?t=this.selectedIndex_:this.selectedIndex_ instanceof Array&&this.selectedIndex_.length>0&&(t=this.selectedIndex_.reduce(function(t,e){return Math.min(t,e)}))),this.setTabindexAtIndex_(t)},e.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some(function(t){return e.isIndexInRange_(t)})}if("number"==typeof t){if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)}return!1},e.prototype.isIndexInRange_=function(t){var e=this.adapter_.getListItemCount();return t>=0&&t<e},e.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},e.prototype.toggleCheckboxAtIndex_=function(t,e){var n=this.adapter_.isCheckboxCheckedAtIndex(t);e&&(n=!n,this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,n)),this.adapter_.setAttributeForElementIndex(t,s.ARIA_CHECKED,n?"true":"false");var i=-1===this.selectedIndex_?[]:this.selectedIndex_.slice();n?i.push(t):i=i.filter(function(e){return e!==t}),this.selectedIndex_=i},e}(r.a);e.b=c},8:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return r});const i={functional:!0,render:(t,e)=>t(e.props.is||e.props.tag||"div",e.data,e.children)},r={components:{CustomElement:i}}},91:function(t,e,n){"use strict";n.r(e);var i=n(6),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("aside",{ref:"drawer",staticClass:"mdc-drawer mdc-drawer--modal",class:t.classes},[t.$slots.header?t._t("header"):t._e(),t._v(" "),n("div",{staticClass:"mdc-drawer__content"},[t._t("default")],2)],2),t._v(" "),n("div",{staticClass:"mdc-drawer-scrim"}),t._v(" "),t.toolbarSpacer?n("div",{staticClass:"mdc-top-app-bar--fixed-adjust"}):t._e()])};r._withStripped=!0;var a=n(0),s=n(2),o={ANIMATE:"mdc-drawer--animate",CLOSING:"mdc-drawer--closing",DISMISSIBLE:"mdc-drawer--dismissible",MODAL:"mdc-drawer--modal",OPEN:"mdc-drawer--open",OPENING:"mdc-drawer--opening",ROOT:"mdc-drawer"},c={APP_CONTENT_SELECTOR:".mdc-drawer-app-content",CLOSE_EVENT:"MDCDrawer:closed",OPEN_EVENT:"MDCDrawer:opened",SCRIM_SELECTOR:".mdc-drawer-scrim"},d=function(t){function e(n){var i=t.call(this,a.a({},e.defaultAdapter,n))||this;return i.animationFrame_=0,i.animationTimer_=0,i}return a.b(e,t),Object.defineProperty(e,"strings",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},elementHasClass:function(){return!1},notifyClose:function(){},notifyOpen:function(){},saveFocus:function(){},restoreFocus:function(){},focusActiveNavigationItem:function(){},trapFocus:function(){},releaseFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.animationFrame_&&cancelAnimationFrame(this.animationFrame_),this.animationTimer_&&clearTimeout(this.animationTimer_)},e.prototype.open=function(){var t=this;this.isOpen()||this.isOpening()||this.isClosing()||(this.adapter_.addClass(o.OPEN),this.adapter_.addClass(o.ANIMATE),this.runNextAnimationFrame_(function(){t.adapter_.addClass(o.OPENING)}),this.adapter_.saveFocus())},e.prototype.close=function(){!this.isOpen()||this.isOpening()||this.isClosing()||this.adapter_.addClass(o.CLOSING)},e.prototype.isOpen=function(){return this.adapter_.hasClass(o.OPEN)},e.prototype.isOpening=function(){return this.adapter_.hasClass(o.OPENING)||this.adapter_.hasClass(o.ANIMATE)},e.prototype.isClosing=function(){return this.adapter_.hasClass(o.CLOSING)},e.prototype.handleKeydown=function(t){var e=t.keyCode;("Escape"===t.key||27===e)&&this.close()},e.prototype.handleTransitionEnd=function(t){var e=o.OPENING,n=o.CLOSING,i=o.OPEN,r=o.ANIMATE,a=o.ROOT;this.isElement_(t.target)&&this.adapter_.elementHasClass(t.target,a)&&(this.isClosing()?(this.adapter_.removeClass(i),this.closed_(),this.adapter_.restoreFocus(),this.adapter_.notifyClose()):(this.adapter_.focusActiveNavigationItem(),this.opened_(),this.adapter_.notifyOpen()),this.adapter_.removeClass(r),this.adapter_.removeClass(e),this.adapter_.removeClass(n))},e.prototype.opened_=function(){},e.prototype.closed_=function(){},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame(function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)})},e.prototype.isElement_=function(t){return Boolean(t.classList)},e}(s.a),u=d,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a.b(e,t),e.prototype.handleScrimClick=function(){this.close()},e.prototype.opened_=function(){this.adapter_.trapFocus()},e.prototype.closed_=function(){this.adapter_.releaseFocus()},e}(d),p=n(7),h=n(19),f=n.n(h);new class{get small(){return this._small||(this._small=window.matchMedia("(max-width: 839px)"))}get large(){return this._large||(this._large=window.matchMedia("(min-width: 1200px)"))}};var _={name:"mdc-drawer",model:{prop:"open",event:"change"},props:{modal:Boolean,open:Boolean,toolbarSpacer:Boolean,toggleOn:String,toggleOnSource:{type:Object,required:!1},openOn:String,openOnSource:{type:Object,required:!1},closeOn:String,closeOnSource:{type:Object,required:!1}},provide(){return{mdcDrawer:this}},data:()=>({classes:{}}),computed:{type(){},isModal(){return this.modal}},watch:{open:"onOpen_"},mounted(){this.drawer_=this.$refs.drawer;const t={addClass:t=>this.$set(this.classes,t,!0),removeClass:t=>this.$delete(this.classes,t),hasClass:t=>this.drawer_.classList.contains(t),elementHasClass:(t,e)=>t.classList.contains(e),saveFocus:()=>{this.previousFocus_=document.activeElement},restoreFocus:()=>{const t=this.previousFocus_&&this.previousFocus_.focus;this.drawer_.contains(document.activeElement)&&t&&this.previousFocus_.focus()},focusActiveNavigationItem:()=>{const t=this.drawer_.querySelector(`.${p.b.cssClasses.LIST_ITEM_ACTIVATED_CLASS}`);t&&t.focus()},notifyClose:()=>{this.$emit("change",!1),this.$emit("close")},notifyOpen:()=>{this.$emit("change",!0),this.$emit("open")},trapFocus:()=>this.focusTrap_.activate(),releaseFocus:()=>this.focusTrap_.deactivate()},{DISMISSIBLE:e,MODAL:n}=u.cssClasses;if(this.drawer_.classList.contains(e))this.foundation=new u(t);else{if(!this.drawer_.classList.contains(n))throw new Error(`MDCDrawer: Failed to instantiate component. Supported variants are ${e} and ${n}.`);this.foundation=new l(t)}this.foundation&&this.foundation.init(),this.initialSyncWithDOM(),this.toggleOn&&(this.toggleOnEventSource=this.toggleOnSource||this.$root,this.toggleOnEventSource.$on(this.toggleOn,this.toggle)),this.openOn&&(this.openOnEventSource=this.openOnSource||this.$root,this.openOnEventSource.$on(this.openOn,this.show)),this.closeOn&&(this.closeOnEventSource=this.closeOnSource||this.$root,this.closeOnEventSource.$on(this.closeOn,this.close))},beforeDestroy(){this.foundation&&this.foundation.destroy(),this.foundation=null,this.toggleOnEventSource&&this.toggleOnEventSource.$off(this.toggleOn,this.toggle),this.openOnEventSource&&this.openOnEventSource.$off(this.openOn,this.show),this.closeOnEventSource&&this.closeOnEventSource.$off(this.closeOn,this.close)},methods:{initialSyncWithDOM(){const{MODAL:t}=u.cssClasses;if(this.drawer_.classList.contains(t)){const{SCRIM_SELECTOR:t}=u.strings;this.scrim_=this.drawer_.parentElement.querySelector(t),this.handleScrimClick_=(()=>this.foundation.handleScrimClick()),this.scrim_.addEventListener("click",this.handleScrimClick_),this.focusTrap_=function(t,e=f.a){return e(t,{clickOutsideDeactivates:!0,initialFocus:!1,escapeDeactivates:!1,returnFocusOnDeactivate:!1})}(this.drawer_,this.focusTrapFactory_)}this.handleKeydown_=(t=>this.foundation.handleKeydown(t)),this.handleTransitionEnd_=(t=>this.foundation.handleTransitionEnd(t)),this.$el.addEventListener("keydown",this.handleKeydown_),this.$el.addEventListener("transitionend",this.handleTransitionEnd_)},onOpen_(t){this.open?this.foundation&&this.foundation.open():this.foundation&&this.foundation.close()},onChange(t){this.$emit("change",t),this.$root.$emit("vma:layout")},show(){this.foundation.open()},close(){this.foundation.close()},toggle(){this.foundation.isOpen()?this.foundation.close():this.foundation.open()},isOpen(){return this.foundation.isOpen()},refreshMedia(){}}},m=n(1),v=Object(m.a)(_,r,[],!1,null,null,null);v.options.__file="packages/mcwv-drawer/mdc-drawer.vue";var g=v.exports,y=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"mdc-drawer-header mdc-drawer__header"},[this._t("default")],2)};y._withStripped=!0;var E={name:"mdc-drawer-header"},C=Object(m.a)(E,y,[],!1,null,null,null);C.options.__file="packages/mcwv-drawer/mdc-drawer-header.vue";var b=C.exports,I=function(){var t=this.$createElement;return(this._self._c||t)("nav",{staticClass:"mdc-drawer-list mdc-list",class:this.classes},[this._t("default")],2)};I._withStripped=!0;var A={name:"mdc-drawer-list",props:{dense:Boolean},data(){return{classes:{"mdc-list--dense":this.dense}}}},S=Object(m.a)(A,I,[],!1,null,null,null);S.options.__file="packages/mcwv-drawer/mdc-drawer-list.vue";var O=S.exports,T=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("custom-link",t._g({staticClass:"mdc-drawer-item mdc-list-item",class:[t.classes,t.itemClasses],style:t.styles,attrs:{link:t.link}},t.mylisteners),[t.hasStartDetail?n("span",{staticClass:"mdc-list-item__graphic"},[t._t("start-detail",[n("i",{staticClass:"material-icons",attrs:{"aria-hidden":"true"}},[t._v(t._s(t.startIcon))])])],2):t._e(),t._v(" "),t._t("default")],2)};T._withStripped=!0;var x=n(10),w=n(17),L=n(5),D={name:"mdc-drawer-item",inject:["mdcDrawer"],mixins:[x.a,w.b],props:{startIcon:String,modalClose:{type:Boolean,default:!0},activated:Boolean,exactActiveClass:{type:String,default:"mdc-list-item--activated"}},data:()=>({classes:{},styles:{}}),computed:{mylisteners(){return{...this.$listeners,click:t=>{this.mdcDrawer.isModal&&this.modalClose&&this.mdcDrawer.close(),this.dispatchEvent(t)}}},itemClasses(){return{"mdc-list-item--activated":this.activated}},hasStartDetail(){return this.startIcon||this.$slots["start-detail"]}},mounted(){this.ripple=new L.RippleBase(this),this.ripple.init()},beforeDestroy(){this.ripple&&this.ripple.destroy(),this.ripple=null}},R=Object(m.a)(D,T,[],!1,null,null,null);R.options.__file="packages/mcwv-drawer/mdc-drawer-item.vue";var F=R.exports,k=function(){var t=this.$createElement;return(this._self._c||t)("hr",{staticClass:"mdc-list-divider"})};k._withStripped=!0;var N={name:"mdc-drawer-divider"},M=Object(m.a)(N,k,[],!1,null,null,null);M.options.__file="packages/mcwv-drawer/mdc-drawer-divider.vue";var H=M.exports;n.d(e,"mdcDrawer",function(){return g}),n.d(e,"mdcDrawerHeader",function(){return b}),n.d(e,"mdcDrawerList",function(){return O}),n.d(e,"mdcDrawerItem",function(){return F}),n.d(e,"mdcDrawerDivider",function(){return H});e.default=Object(i.a)({mdcDrawer:g,mdcDrawerHeader:b,mdcDrawerList:O,mdcDrawerItem:F,mdcDrawerDivider:H})}})}); | ||
var c=["input","button","textarea","select"];var d=function(t){function e(n){var r=t.call(this,i.a({},e.defaultAdapter,n))||this;return r.wrapFocus_=!1,r.isVertical_=!0,r.isSingleSelectionList_=!1,r.selectedIndex_=o.UNSET_INDEX,r.focusedItemIndex_=o.UNSET_INDEX,r.useActivatedClass_=!1,r.ariaCurrentAttrValue_=null,r.isCheckboxList_=!1,r.isRadioList_=!1,r}return i.b(e,t),Object.defineProperty(e,"strings",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){}}},enumerable:!0,configurable:!0}),e.prototype.layout=function(){0!==this.adapter_.getListItemCount()&&(this.adapter_.hasCheckboxAtIndex(0)?this.isCheckboxList_=!0:this.adapter_.hasRadioAtIndex(0)&&(this.isRadioList_=!0))},e.prototype.setWrapFocus=function(t){this.wrapFocus_=t},e.prototype.setVerticalOrientation=function(t){this.isVertical_=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t},e.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex_},e.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},e.prototype.handleFocusIn=function(t,e){e>=0&&this.adapter_.setTabIndexForListItemChildren(e,"0")},e.prototype.handleFocusOut=function(t,e){var n=this;e>=0&&this.adapter_.setTabIndexForListItemChildren(e,"-1"),setTimeout(function(){n.adapter_.isFocusInsideList()||n.setTabindexToFirstSelectedItem_()},0)},e.prototype.handleKeydown=function(t,e,n){var i="ArrowLeft"===t.key||37===t.keyCode,r="ArrowUp"===t.key||38===t.keyCode,a="ArrowRight"===t.key||39===t.keyCode,s="ArrowDown"===t.key||40===t.keyCode,c="Home"===t.key||36===t.keyCode,d="End"===t.key||35===t.keyCode,u="Enter"===t.key||13===t.keyCode,l="Space"===t.key||32===t.keyCode,p=this.adapter_.getFocusedElementIndex(),h=o.UNSET_INDEX;if(!(p===o.UNSET_INDEX&&(p=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&a)this.preventDefaultEvent_(t),h=this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&i)this.preventDefaultEvent_(t),h=this.focusPrevElement(p);else if(c)this.preventDefaultEvent_(t),h=this.focusFirstElement();else if(d)this.preventDefaultEvent_(t),h=this.focusLastElement();else if((u||l)&&e){var f=t.target;if(f&&"A"===f.tagName&&u)return;this.preventDefaultEvent_(t),this.isSelectableList_()&&this.setSelectedIndexOnAction_(p),this.adapter_.notifyAction(p)}this.focusedItemIndex_=p,h>=0&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}},e.prototype.handleClick=function(t,e){t!==o.UNSET_INDEX&&(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter_.notifyAction(t),this.setTabindexAtIndex_(t),this.focusedItemIndex_=t)},e.prototype.focusNextElement=function(t){var e=t+1;if(e>=this.adapter_.getListItemCount()){if(!this.wrapFocus_)return t;e=0}return this.adapter_.focusItemAtIndex(e),e},e.prototype.focusPrevElement=function(t){var e=t-1;if(e<0){if(!this.wrapFocus_)return t;e=this.adapter_.getListItemCount()-1}return this.adapter_.focusItemAtIndex(e),e},e.prototype.focusFirstElement=function(){return this.adapter_.focusItemAtIndex(0),0},e.prototype.focusLastElement=function(){var t=this.adapter_.getListItemCount()-1;return this.adapter_.focusItemAtIndex(t),t},e.prototype.preventDefaultEvent_=function(t){var e=(""+t.target.tagName).toLowerCase();-1===c.indexOf(e)&&t.preventDefault()},e.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=a.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=a.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==o.UNSET_INDEX&&this.adapter_.removeClassForElementIndex(this.selectedIndex_,e),this.adapter_.addClassForElementIndex(t,e),this.setAriaForSingleSelectionAtIndex_(t),this.selectedIndex_=t}},e.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===o.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter_.getAttributeForElementIndex(t,s.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?s.ARIA_CURRENT:s.ARIA_SELECTED;this.selectedIndex_!==o.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,n,"false");var i=e?this.ariaCurrentAttrValue_:"true";this.adapter_.setAttributeForElementIndex(t,n,i)},e.prototype.setRadioAtIndex_=function(t){this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==o.UNSET_INDEX&&this.adapter_.setAttributeForElementIndex(this.selectedIndex_,s.ARIA_CHECKED,"false"),this.adapter_.setAttributeForElementIndex(t,s.ARIA_CHECKED,"true"),this.selectedIndex_=t},e.prototype.setCheckboxAtIndex_=function(t){for(var e=0;e<this.adapter_.getListItemCount();e++){var n=!1;t.indexOf(e)>=0&&(n=!0),this.adapter_.setCheckedCheckboxOrRadioAtIndex(e,n),this.adapter_.setAttributeForElementIndex(e,s.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=t},e.prototype.setTabindexAtIndex_=function(t){this.focusedItemIndex_===o.UNSET_INDEX&&0!==t?this.adapter_.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex_>=0&&this.focusedItemIndex_!==t&&this.adapter_.setAttributeForElementIndex(this.focusedItemIndex_,"tabindex","-1"),this.adapter_.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},e.prototype.setTabindexToFirstSelectedItem_=function(){var t=0;this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==o.UNSET_INDEX?t=this.selectedIndex_:this.selectedIndex_ instanceof Array&&this.selectedIndex_.length>0&&(t=this.selectedIndex_.reduce(function(t,e){return Math.min(t,e)}))),this.setTabindexAtIndex_(t)},e.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some(function(t){return e.isIndexInRange_(t)})}if("number"==typeof t){if(this.isCheckboxList_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)}return!1},e.prototype.isIndexInRange_=function(t){var e=this.adapter_.getListItemCount();return t>=0&&t<e},e.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},e.prototype.toggleCheckboxAtIndex_=function(t,e){var n=this.adapter_.isCheckboxCheckedAtIndex(t);e&&(n=!n,this.adapter_.setCheckedCheckboxOrRadioAtIndex(t,n)),this.adapter_.setAttributeForElementIndex(t,s.ARIA_CHECKED,n?"true":"false");var i=this.selectedIndex_===o.UNSET_INDEX?[]:this.selectedIndex_.slice();n?i.push(t):i=i.filter(function(e){return e!==t}),this.selectedIndex_=i},e}(r.a);e.b=d},8:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return r});const i={functional:!0,render:(t,e)=>t(e.props.is||e.props.tag||"div",e.data,e.children)},r={components:{CustomElement:i}}},91:function(t,e,n){"use strict";n.r(e);var i=n(6),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("aside",{ref:"drawer",staticClass:"mdc-drawer mdc-drawer--modal",class:t.classes},[t.$slots.header?t._t("header"):t._e(),t._v(" "),n("div",{staticClass:"mdc-drawer__content"},[t._t("default")],2)],2),t._v(" "),n("div",{staticClass:"mdc-drawer-scrim"}),t._v(" "),t.toolbarSpacer?n("div",{staticClass:"mdc-top-app-bar--fixed-adjust"}):t._e()])};r._withStripped=!0;var a=n(0),s=n(2),o={ANIMATE:"mdc-drawer--animate",CLOSING:"mdc-drawer--closing",DISMISSIBLE:"mdc-drawer--dismissible",MODAL:"mdc-drawer--modal",OPEN:"mdc-drawer--open",OPENING:"mdc-drawer--opening",ROOT:"mdc-drawer"},c={APP_CONTENT_SELECTOR:".mdc-drawer-app-content",CLOSE_EVENT:"MDCDrawer:closed",OPEN_EVENT:"MDCDrawer:opened",SCRIM_SELECTOR:".mdc-drawer-scrim"},d=function(t){function e(n){var i=t.call(this,a.a({},e.defaultAdapter,n))||this;return i.animationFrame_=0,i.animationTimer_=0,i}return a.b(e,t),Object.defineProperty(e,"strings",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},elementHasClass:function(){return!1},notifyClose:function(){},notifyOpen:function(){},saveFocus:function(){},restoreFocus:function(){},focusActiveNavigationItem:function(){},trapFocus:function(){},releaseFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.animationFrame_&&cancelAnimationFrame(this.animationFrame_),this.animationTimer_&&clearTimeout(this.animationTimer_)},e.prototype.open=function(){var t=this;this.isOpen()||this.isOpening()||this.isClosing()||(this.adapter_.addClass(o.OPEN),this.adapter_.addClass(o.ANIMATE),this.runNextAnimationFrame_(function(){t.adapter_.addClass(o.OPENING)}),this.adapter_.saveFocus())},e.prototype.close=function(){!this.isOpen()||this.isOpening()||this.isClosing()||this.adapter_.addClass(o.CLOSING)},e.prototype.isOpen=function(){return this.adapter_.hasClass(o.OPEN)},e.prototype.isOpening=function(){return this.adapter_.hasClass(o.OPENING)||this.adapter_.hasClass(o.ANIMATE)},e.prototype.isClosing=function(){return this.adapter_.hasClass(o.CLOSING)},e.prototype.handleKeydown=function(t){var e=t.keyCode;("Escape"===t.key||27===e)&&this.close()},e.prototype.handleTransitionEnd=function(t){var e=o.OPENING,n=o.CLOSING,i=o.OPEN,r=o.ANIMATE,a=o.ROOT;this.isElement_(t.target)&&this.adapter_.elementHasClass(t.target,a)&&(this.isClosing()?(this.adapter_.removeClass(i),this.closed_(),this.adapter_.restoreFocus(),this.adapter_.notifyClose()):(this.adapter_.focusActiveNavigationItem(),this.opened_(),this.adapter_.notifyOpen()),this.adapter_.removeClass(r),this.adapter_.removeClass(e),this.adapter_.removeClass(n))},e.prototype.opened_=function(){},e.prototype.closed_=function(){},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame(function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)})},e.prototype.isElement_=function(t){return Boolean(t.classList)},e}(s.a),u=d,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a.b(e,t),e.prototype.handleScrimClick=function(){this.close()},e.prototype.opened_=function(){this.adapter_.trapFocus()},e.prototype.closed_=function(){this.adapter_.releaseFocus()},e}(d),p=n(7),h=n(19),f=n.n(h);new class{get small(){return this._small||(this._small=window.matchMedia("(max-width: 839px)"))}get large(){return this._large||(this._large=window.matchMedia("(min-width: 1200px)"))}};var _={name:"mdc-drawer",model:{prop:"open",event:"change"},props:{modal:Boolean,open:Boolean,toolbarSpacer:Boolean,toggleOn:String,toggleOnSource:{type:Object,required:!1},openOn:String,openOnSource:{type:Object,required:!1},closeOn:String,closeOnSource:{type:Object,required:!1}},provide(){return{mdcDrawer:this}},data:()=>({classes:{}}),computed:{type(){},isModal(){return this.modal}},watch:{open:"onOpen_"},mounted(){this.drawer_=this.$refs.drawer;const t={addClass:t=>this.$set(this.classes,t,!0),removeClass:t=>this.$delete(this.classes,t),hasClass:t=>this.drawer_.classList.contains(t),elementHasClass:(t,e)=>t.classList.contains(e),saveFocus:()=>{this.previousFocus_=document.activeElement},restoreFocus:()=>{const t=this.previousFocus_&&this.previousFocus_.focus;this.drawer_.contains(document.activeElement)&&t&&this.previousFocus_.focus()},focusActiveNavigationItem:()=>{const t=this.drawer_.querySelector(`.${p.b.cssClasses.LIST_ITEM_ACTIVATED_CLASS}`);t&&t.focus()},notifyClose:()=>{this.$emit("change",!1),this.$emit("close")},notifyOpen:()=>{this.$emit("change",!0),this.$emit("open")},trapFocus:()=>this.focusTrap_.activate(),releaseFocus:()=>this.focusTrap_.deactivate()},{DISMISSIBLE:e,MODAL:n}=u.cssClasses;if(this.drawer_.classList.contains(e))this.foundation=new u(t);else{if(!this.drawer_.classList.contains(n))throw new Error(`MDCDrawer: Failed to instantiate component. Supported variants are ${e} and ${n}.`);this.foundation=new l(t)}this.foundation&&this.foundation.init(),this.initialSyncWithDOM(),this.toggleOn&&(this.toggleOnEventSource=this.toggleOnSource||this.$root,this.toggleOnEventSource.$on(this.toggleOn,this.toggle)),this.openOn&&(this.openOnEventSource=this.openOnSource||this.$root,this.openOnEventSource.$on(this.openOn,this.show)),this.closeOn&&(this.closeOnEventSource=this.closeOnSource||this.$root,this.closeOnEventSource.$on(this.closeOn,this.close))},beforeDestroy(){this.foundation&&this.foundation.destroy(),this.foundation=null,this.toggleOnEventSource&&this.toggleOnEventSource.$off(this.toggleOn,this.toggle),this.openOnEventSource&&this.openOnEventSource.$off(this.openOn,this.show),this.closeOnEventSource&&this.closeOnEventSource.$off(this.closeOn,this.close)},methods:{initialSyncWithDOM(){const{MODAL:t}=u.cssClasses;if(this.drawer_.classList.contains(t)){const{SCRIM_SELECTOR:t}=u.strings;this.scrim_=this.drawer_.parentElement.querySelector(t),this.handleScrimClick_=(()=>this.foundation.handleScrimClick()),this.scrim_.addEventListener("click",this.handleScrimClick_),this.focusTrap_=function(t,e=f.a){return e(t,{clickOutsideDeactivates:!0,initialFocus:!1,escapeDeactivates:!1,returnFocusOnDeactivate:!1})}(this.drawer_,this.focusTrapFactory_)}this.handleKeydown_=(t=>this.foundation.handleKeydown(t)),this.handleTransitionEnd_=(t=>this.foundation.handleTransitionEnd(t)),this.$el.addEventListener("keydown",this.handleKeydown_),this.$el.addEventListener("transitionend",this.handleTransitionEnd_)},onOpen_(t){this.open?this.foundation&&this.foundation.open():this.foundation&&this.foundation.close()},onChange(t){this.$emit("change",t),this.$root.$emit("vma:layout")},show(){this.foundation.open()},close(){this.foundation.close()},toggle(){this.foundation.isOpen()?this.foundation.close():this.foundation.open()},isOpen(){return this.foundation.isOpen()},refreshMedia(){}}},m=n(1),v=Object(m.a)(_,r,[],!1,null,null,null);v.options.__file="packages/mcwv-drawer/mdc-drawer.vue";var E=v.exports,g=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"mdc-drawer-header mdc-drawer__header"},[this._t("default")],2)};g._withStripped=!0;var I={name:"mdc-drawer-header"},y=Object(m.a)(I,g,[],!1,null,null,null);y.options.__file="packages/mcwv-drawer/mdc-drawer-header.vue";var C=y.exports,b=function(){var t=this.$createElement;return(this._self._c||t)("nav",{staticClass:"mdc-drawer-list mdc-list",class:this.classes},[this._t("default")],2)};b._withStripped=!0;var A={name:"mdc-drawer-list",props:{dense:Boolean},data(){return{classes:{"mdc-list--dense":this.dense}}}},S=Object(m.a)(A,b,[],!1,null,null,null);S.options.__file="packages/mcwv-drawer/mdc-drawer-list.vue";var T=S.exports,O=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("custom-link",t._g({staticClass:"mdc-drawer-item mdc-list-item",class:[t.classes,t.itemClasses],style:t.styles,attrs:{link:t.link}},t.mylisteners),[t.hasStartDetail?n("span",{staticClass:"mdc-list-item__graphic"},[t._t("start-detail",[n("i",{staticClass:"material-icons",attrs:{"aria-hidden":"true"}},[t._v(t._s(t.startIcon))])])],2):t._e(),t._v(" "),t._t("default")],2)};O._withStripped=!0;var x=n(10),w=n(17),D=n(5),L={name:"mdc-drawer-item",inject:["mdcDrawer"],mixins:[x.a,w.b],props:{startIcon:String,modalClose:{type:Boolean,default:!0},activated:Boolean,exactActiveClass:{type:String,default:"mdc-list-item--activated"}},data:()=>({classes:{},styles:{}}),computed:{mylisteners(){return{...this.$listeners,click:t=>{this.mdcDrawer.isModal&&this.modalClose&&this.mdcDrawer.close(),this.dispatchEvent(t)}}},itemClasses(){return{"mdc-list-item--activated":this.activated}},hasStartDetail(){return this.startIcon||this.$slots["start-detail"]}},mounted(){this.ripple=new D.RippleBase(this),this.ripple.init()},beforeDestroy(){this.ripple&&this.ripple.destroy(),this.ripple=null}},R=Object(m.a)(L,O,[],!1,null,null,null);R.options.__file="packages/mcwv-drawer/mdc-drawer-item.vue";var N=R.exports,F=function(){var t=this.$createElement;return(this._self._c||t)("hr",{staticClass:"mdc-list-divider"})};F._withStripped=!0;var k={name:"mdc-drawer-divider"},M=Object(m.a)(k,F,[],!1,null,null,null);M.options.__file="packages/mcwv-drawer/mdc-drawer-divider.vue";var H=M.exports;n.d(e,"mdcDrawer",function(){return E}),n.d(e,"mdcDrawerHeader",function(){return C}),n.d(e,"mdcDrawerList",function(){return T}),n.d(e,"mdcDrawerItem",function(){return N}),n.d(e,"mdcDrawerDivider",function(){return H});e.default=Object(i.a)({mdcDrawer:E,mdcDrawerHeader:C,mdcDrawerList:T,mdcDrawerItem:N,mdcDrawerDivider:H})}})}); | ||
//# sourceMappingURL=mcwv.drawer.min.js.map |
{ | ||
"name": "@mcwv/drawer", | ||
"description": "The Vue Material Adapter for the web drawer component", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"license": "MIT", | ||
@@ -18,6 +18,6 @@ "keywords": [ | ||
"@material/drawer": "^1.1.0", | ||
"@mcwv/base": "^0.1.4", | ||
"@mcwv/ripple": "^0.1.5" | ||
"@mcwv/base": "^0.1.6", | ||
"@mcwv/ripple": "^0.1.6" | ||
}, | ||
"gitHead": "3a19c2cafd74fc2e981d6275fc2f4e4e583521df" | ||
"gitHead": "4ca2c711361bbe05abac11e648bdfce177321c7c" | ||
} |
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
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
247662
314
Updated@mcwv/base@^0.1.6
Updated@mcwv/ripple@^0.1.6