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

@material/drawer

Package Overview
Dependencies
Maintainers
8
Versions
1688
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/drawer - npm Package Compare versions

Comparing version 0.1.4 to 0.2.0

285

dist/mdc.drawer.js

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

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 40);
/******/ return __webpack_require__(__webpack_require__.s = 48);
/******/ })

@@ -200,3 +200,3 @@ /************************************************************************/

/***/ 15:
/***/ 13:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -206,5 +206,8 @@

Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__temporary__ = __webpack_require__(26);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCTemporaryDrawer", function() { return __WEBPACK_IMPORTED_MODULE_0__temporary__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCTemporaryDrawerFoundation", function() { return __WEBPACK_IMPORTED_MODULE_0__temporary__["b"]; });
/* harmony export (immutable) */ __webpack_exports__["remapEvent"] = remapEvent;
/* harmony export (immutable) */ __webpack_exports__["getTransformPropertyName"] = getTransformPropertyName;
/* harmony export (immutable) */ __webpack_exports__["supportsCssCustomProperties"] = supportsCssCustomProperties;
/* harmony export (immutable) */ __webpack_exports__["applyPassive"] = applyPassive;
/* harmony export (immutable) */ __webpack_exports__["saveElementTabState"] = saveElementTabState;
/* harmony export (immutable) */ __webpack_exports__["restoreElementTabState"] = restoreElementTabState;
/**

@@ -226,6 +229,127 @@ * Copyright 2016 Google Inc. All Rights Reserved.

var TAB_DATA = 'data-mdc-tabindex';
var TAB_DATA_HANDLED = 'data-mdc-tabindex-handled';
var storedTransformPropertyName_ = void 0;
var supportsPassive_ = void 0;
// Remap touch events to pointer events, if the browser doesn't support touch events.
function remapEvent(eventName) {
var globalObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;
if (!('ontouchstart' in globalObj.document)) {
switch (eventName) {
case 'touchstart':
return 'pointerdown';
case 'touchmove':
return 'pointermove';
case 'touchend':
return 'pointerup';
default:
return eventName;
}
}
return eventName;
}
// Choose the correct transform property to use on the current browser.
function getTransformPropertyName() {
var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (storedTransformPropertyName_ === undefined || forceRefresh) {
var el = globalObj.document.createElement('div');
var transformPropertyName = 'transform' in el.style ? 'transform' : '-webkit-transform';
storedTransformPropertyName_ = transformPropertyName;
}
return storedTransformPropertyName_;
}
// Determine whether the current browser supports CSS properties.
function supportsCssCustomProperties() {
var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
if ('CSS' in globalObj) {
return globalObj.CSS.supports('(--color: red)');
}
return false;
}
// Determine whether the current browser supports passive event listeners, and if so, use them.
function applyPassive() {
var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (supportsPassive_ === undefined || forceRefresh) {
var isSupported = false;
try {
globalObj.document.addEventListener('test', null, { get passive() {
isSupported = true;
} });
} catch (e) {}
supportsPassive_ = isSupported;
}
return supportsPassive_ ? { passive: true } : false;
}
// Save the tab state for an element.
function saveElementTabState(el) {
if (el.hasAttribute('tabindex')) {
el.setAttribute(TAB_DATA, el.getAttribute('tabindex'));
}
el.setAttribute(TAB_DATA_HANDLED, true);
}
// Restore the tab state for an element, if it was saved.
function restoreElementTabState(el) {
// Only modify elements we've already handled, in case anything was dynamically added since we saved state.
if (el.hasAttribute(TAB_DATA_HANDLED)) {
if (el.hasAttribute(TAB_DATA)) {
el.setAttribute('tabindex', el.getAttribute(TAB_DATA));
el.removeAttribute(TAB_DATA);
} else {
el.removeAttribute('tabindex');
}
el.removeAttribute(TAB_DATA_HANDLED);
}
}
/***/ }),
/***/ 17:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__temporary__ = __webpack_require__(32);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCTemporaryDrawer", function() { return __WEBPACK_IMPORTED_MODULE_1__temporary__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCTemporaryDrawerFoundation", function() { return __WEBPACK_IMPORTED_MODULE_1__temporary__["b"]; });
/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "util", function() { return __WEBPACK_IMPORTED_MODULE_0__util__; });
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/***/ }),
/***/ 2:

@@ -362,3 +486,3 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

/***/ 24:
/***/ 30:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -402,3 +526,3 @@

/***/ 25:
/***/ 31:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -408,3 +532,3 @@

/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__(24);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__(30);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -733,3 +857,3 @@

/***/ 26:
/***/ 32:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

@@ -739,4 +863,4 @@

/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__(27);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__(13);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__foundation__["a"]; });

@@ -807,12 +931,12 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MDCTemporaryDrawer; });

registerInteractionHandler: function registerInteractionHandler(evt, handler) {
return _this2.root_.addEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["a" /* remapEvent */](evt), handler, __WEBPACK_IMPORTED_MODULE_2__util__["b" /* applyPassive */]());
return _this2.root_.addEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["remapEvent"](evt), handler, __WEBPACK_IMPORTED_MODULE_2__util__["applyPassive"]());
},
deregisterInteractionHandler: function deregisterInteractionHandler(evt, handler) {
return _this2.root_.removeEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["a" /* remapEvent */](evt), handler, __WEBPACK_IMPORTED_MODULE_2__util__["b" /* applyPassive */]());
return _this2.root_.removeEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["remapEvent"](evt), handler, __WEBPACK_IMPORTED_MODULE_2__util__["applyPassive"]());
},
registerDrawerInteractionHandler: function registerDrawerInteractionHandler(evt, handler) {
return _this2.drawer.addEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["a" /* remapEvent */](evt), handler);
return _this2.drawer.addEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["remapEvent"](evt), handler);
},
deregisterDrawerInteractionHandler: function deregisterDrawerInteractionHandler(evt, handler) {
return _this2.drawer.removeEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["a" /* remapEvent */](evt), handler);
return _this2.drawer.removeEventListener(__WEBPACK_IMPORTED_MODULE_2__util__["remapEvent"](evt), handler);
},

@@ -835,6 +959,6 @@ registerTransitionEndHandler: function registerTransitionEndHandler(handler) {

setTranslateX: function setTranslateX(value) {
return _this2.drawer.style.setProperty(__WEBPACK_IMPORTED_MODULE_2__util__["c" /* getTransformPropertyName */](), value === null ? null : 'translateX(' + value + 'px)');
return _this2.drawer.style.setProperty(__WEBPACK_IMPORTED_MODULE_2__util__["getTransformPropertyName"](), value === null ? null : 'translateX(' + value + 'px)');
},
updateCssVariable: function updateCssVariable(value) {
if (__WEBPACK_IMPORTED_MODULE_2__util__["d" /* supportsCssCustomProperties */]()) {
if (__WEBPACK_IMPORTED_MODULE_2__util__["supportsCssCustomProperties"]()) {
_this2.root_.style.setProperty(OPACITY_VAR_NAME, value);

@@ -847,6 +971,6 @@ }

saveElementTabState: function saveElementTabState(el) {
return __WEBPACK_IMPORTED_MODULE_2__util__["e" /* saveElementTabState */](el);
return __WEBPACK_IMPORTED_MODULE_2__util__["saveElementTabState"](el);
},
restoreElementTabState: function restoreElementTabState(el) {
return __WEBPACK_IMPORTED_MODULE_2__util__["f" /* restoreElementTabState */](el);
return __WEBPACK_IMPORTED_MODULE_2__util__["restoreElementTabState"](el);
},

@@ -896,125 +1020,6 @@ makeElementUntabbable: function makeElementUntabbable(el) {

/***/ 27:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = remapEvent;
/* harmony export (immutable) */ __webpack_exports__["c"] = getTransformPropertyName;
/* harmony export (immutable) */ __webpack_exports__["d"] = supportsCssCustomProperties;
/* harmony export (immutable) */ __webpack_exports__["b"] = applyPassive;
/* harmony export (immutable) */ __webpack_exports__["e"] = saveElementTabState;
/* harmony export (immutable) */ __webpack_exports__["f"] = restoreElementTabState;
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var TAB_DATA = 'data-mdc-tabindex';
var TAB_DATA_HANDLED = 'data-mdc-tabindex-handled';
var storedTransformPropertyName_ = void 0;
var supportsPassive_ = void 0;
// Remap touch events to pointer events, if the browser doesn't support touch events.
function remapEvent(eventName) {
var globalObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;
if (!('ontouchstart' in globalObj.document)) {
switch (eventName) {
case 'touchstart':
return 'pointerdown';
case 'touchmove':
return 'pointermove';
case 'touchend':
return 'pointerup';
default:
return eventName;
}
}
return eventName;
}
// Choose the correct transform property to use on the current browser.
function getTransformPropertyName() {
var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (storedTransformPropertyName_ === undefined || forceRefresh) {
var el = globalObj.document.createElement('div');
var transformPropertyName = 'transform' in el.style ? 'transform' : '-webkit-transform';
storedTransformPropertyName_ = transformPropertyName;
}
return storedTransformPropertyName_;
}
// Determine whether the current browser supports CSS properties.
function supportsCssCustomProperties() {
var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
if ('CSS' in globalObj) {
return globalObj.CSS.supports('(--color: red)');
}
return false;
}
// Determine whether the current browser supports passive event listeners, and if so, use them.
function applyPassive() {
var globalObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (supportsPassive_ === undefined || forceRefresh) {
var isSupported = false;
try {
globalObj.document.addEventListener('test', null, { get passive() {
isSupported = true;
} });
} catch (e) {}
supportsPassive_ = isSupported;
}
return supportsPassive_ ? { passive: true } : false;
}
// Save the tab state for an element.
function saveElementTabState(el) {
if (el.hasAttribute('tabindex')) {
el.setAttribute(TAB_DATA, el.getAttribute('tabindex'));
}
el.setAttribute(TAB_DATA_HANDLED, true);
}
// Restore the tab state for an element, if it was saved.
function restoreElementTabState(el) {
// Only modify elements we've already handled, in case anything was dynamically added since we saved state.
if (el.hasAttribute(TAB_DATA_HANDLED)) {
if (el.hasAttribute(TAB_DATA)) {
el.setAttribute('tabindex', el.getAttribute(TAB_DATA));
el.removeAttribute(TAB_DATA);
} else {
el.removeAttribute('tabindex');
}
el.removeAttribute(TAB_DATA_HANDLED);
}
}
/***/ }),
/***/ 40:
/***/ 48:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(15);
module.exports = __webpack_require__(17);

@@ -1021,0 +1026,0 @@

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

*/
!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.mdc=t.mdc||{},t.mdc.drawer=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},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="/assets/",e(e.s=40)}({0:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1);n.d(e,"MDCFoundation",function(){return r.a});var i=n(2);n.d(e,"MDCComponent",function(){return i.a})},1:function(t,e,n){"use strict";function r(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 r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(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=a},15:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(26);n.d(e,"MDCTemporaryDrawer",function(){return r.a}),n.d(e,"MDCTemporaryDrawerFoundation",function(){return r.b})},2:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(1),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this.initialize.apply(this,a),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return a(t,null,[{key:"attachTo",value:function(e){return new t(e,new i.a)}}]),a(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=void 0;"function"==typeof CustomEvent?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(t,!1,!1,e)),this.root_.dispatchEvent(n)}}]),t}();e.a=o},24:function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a});var r="mdc-temporary-drawer",i={ROOT:r,OPEN:r+"--open",ANIMATING:r+"--animating",RIGHT:r+"--right"},a={DRAWER_SELECTOR:"."+r+"__drawer",OPACITY_VAR_NAME:"--"+r+"-opacity",FOCUSABLE_ELEMENTS:"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]"}},25:function(t,e,n){"use strict";function r(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 a(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)}var o=n(0),s=n(24),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u(e.defaultAdapter,t)));return n.transitionEndHandler_=function(t){n.adapter_.isDrawer(t.target)&&(n.adapter_.removeClass(e.cssClasses.ANIMATING),n.adapter_.deregisterTransitionEndHandler(n.transitionEndHandler_))},n.inert_=!1,n.componentClickHandler_=function(){return n.close()},n.drawerClickHandler_=function(t){return t.stopPropagation()},n.componentTouchStartHandler_=function(t){return n.handleTouchStart_(t)},n.componentTouchMoveHandler_=function(t){return n.handleTouchMove_(t)},n.componentTouchEndHandler_=function(t){return n.handleTouchEnd_(t)},n.documentKeydownHandler_=function(t){(t.key&&"Escape"===t.key||27===t.keyCode)&&n.close()},n}return a(e,t),c(e,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){},hasNecessaryDom:function(){return!1},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerDrawerInteractionHandler:function(){},deregisterDrawerInteractionHandler:function(){},registerTransitionEndHandler:function(){},deregisterTransitionEndHandler:function(){},registerDocumentKeydownHandler:function(){},deregisterDocumentKeydownHandler:function(){},setTranslateX:function(){},updateCssVariable:function(){},getFocusableElements:function(){},saveElementTabState:function(){},restoreElementTabState:function(){},makeElementUntabbable:function(){},isRtl:function(){return!1},getDrawerWidth:function(){return 0},isDrawer:function(){return!1}}}}]),c(e,[{key:"init",value:function(){var t=e.cssClasses,n=t.ROOT,r=t.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");if(!this.adapter_.hasNecessaryDom())throw new Error("Required DOM nodes missing in "+n+" component.");this.adapter_.hasClass(r)?this.isOpen_=!0:(this.detabinate_(),this.isOpen_=!1),this.adapter_.updateCssVariable(0),this.adapter_.registerInteractionHandler("click",this.componentClickHandler_),this.adapter_.registerDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.registerDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.registerInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.registerInteractionHandler("touchend",this.componentTouchEndHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterInteractionHandler("click",this.componentClickHandler_),this.adapter_.deregisterDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.deregisterDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.deregisterInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.deregisterInteractionHandler("touchend",this.componentTouchEndHandler_),this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_)}},{key:"open",value:function(){this.adapter_.updateCssVariable(""),this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.registerDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.addClass(e.cssClasses.ANIMATING),this.adapter_.addClass(e.cssClasses.OPEN),this.retabinate_(),this.isOpen_=!0}},{key:"close",value:function(){this.adapter_.updateCssVariable(""),this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.addClass(e.cssClasses.ANIMATING),this.adapter_.removeClass(e.cssClasses.OPEN),this.detabinate_(),this.isOpen_=!1}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"detabinate_",value:function(){if(!this.inert_){var t=this.adapter_.getFocusableElements();if(t)for(var e=0;e<t.length;e++)this.adapter_.saveElementTabState(t[e]),this.adapter_.makeElementUntabbable(t[e]);this.inert_=!0}}},{key:"retabinate_",value:function(){if(this.inert_){var t=this.adapter_.getFocusableElements();if(t)for(var e=0;e<t.length;e++)this.adapter_.restoreElementTabState(t[e]);this.inert_=!1}}},{key:"handleTouchStart_",value:function(t){this.adapter_.hasClass(e.cssClasses.OPEN)&&(t.pointerType&&"touch"!==t.pointerType||(this.direction_=this.adapter_.isRtl()?-1:1,this.drawerWidth_=this.adapter_.getDrawerWidth(),this.startX_=t.touches?t.touches[0].pageX:t.pageX,this.currentX_=this.startX_,this.touchingSideNav_=!0,requestAnimationFrame(this.updateDrawer_.bind(this))))}},{key:"handleTouchMove_",value:function(t){t.pointerType&&"touch"!==t.pointerType||(this.currentX_=t.touches?t.touches[0].pageX:t.pageX)}},{key:"handleTouchEnd_",value:function(t){if(!t.pointerType||"touch"===t.pointerType){this.touchingSideNav_=!1,this.adapter_.setTranslateX(null),this.adapter_.updateCssVariable("");var e=null;e=1===this.direction_?Math.min(0,this.currentX_-this.startX_):Math.max(0,this.currentX_-this.startX_),Math.abs(e/this.drawerWidth_)>=.5?this.close():this.open()}}},{key:"updateDrawer_",value:function(){if(this.touchingSideNav_){requestAnimationFrame(this.updateDrawer_.bind(this));var t=null,e=null;t=1===this.direction_?Math.min(0,this.currentX_-this.startX_):Math.max(0,this.currentX_-this.startX_),e=Math.max(0,1+this.direction_*(t/this.drawerWidth_)),this.adapter_.setTranslateX(t),this.adapter_.updateCssVariable(e)}}}]),e}(o.MDCFoundation);e.a=d},26:function(t,e,n){"use strict";function r(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 a(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)}var o=n(0),s=n(25),u=n(27);n.d(e,"b",function(){return s.a}),n.d(e,"a",function(){return d});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),c(e,[{key:"getDefaultFoundation",value:function(){var t=this,e=s.a.strings,n=e.FOCUSABLE_ELEMENTS,r=e.OPACITY_VAR_NAME;return new s.a({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)},hasNecessaryDom:function(){return Boolean(t.drawer)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(u.a(e),n,u.b())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(u.a(e),n,u.b())},registerDrawerInteractionHandler:function(e,n){return t.drawer.addEventListener(u.a(e),n)},deregisterDrawerInteractionHandler:function(e,n){return t.drawer.removeEventListener(u.a(e),n)},registerTransitionEndHandler:function(e){return t.drawer.addEventListener("transitionend",e)},deregisterTransitionEndHandler:function(e){return t.drawer.removeEventListener("transitionend",e)},registerDocumentKeydownHandler:function(t){return document.addEventListener("keydown",t)},deregisterDocumentKeydownHandler:function(t){return document.removeEventListener("keydown",t)},getDrawerWidth:function(){return t.drawer.offsetWidth},setTranslateX:function(e){return t.drawer.style.setProperty(u.c(),null===e?null:"translateX("+e+"px)")},updateCssVariable:function(e){u.d()&&t.root_.style.setProperty(r,e)},getFocusableElements:function(){return t.drawer.querySelectorAll(n)},saveElementTabState:function(t){return u.e(t)},restoreElementTabState:function(t){return u.f(t)},makeElementUntabbable:function(t){return t.setAttribute("tabindex",-1)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},isDrawer:function(e){return e===t.drawer}})}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()}},{key:"drawer",get:function(){return this.root_.querySelector(s.a.strings.DRAWER_SELECTOR)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(o.MDCComponent)},27:function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(!("ontouchstart"in e.document))switch(t){case"touchstart":return"pointerdown";case"touchmove":return"pointermove";case"touchend":return"pointerup";default:return t}return t}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===l||e){var n=t.document.createElement("div"),r="transform"in n.style?"transform":"-webkit-transform";l=r}return l}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return"CSS"in t&&t.CSS.supports("(--color: red)")}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===f||e){var n=!1;try{t.document.addEventListener("test",null,{get passive(){n=!0}})}catch(t){}f=n}return!!f&&{passive:!0}}function s(t){t.hasAttribute("tabindex")&&t.setAttribute(c,t.getAttribute("tabindex")),t.setAttribute(d,!0)}function u(t){t.hasAttribute(d)&&(t.hasAttribute(c)?(t.setAttribute("tabindex",t.getAttribute(c)),t.removeAttribute(c)):t.removeAttribute("tabindex"),t.removeAttribute(d))}e.a=r,e.c=i,e.d=a,e.b=o,e.e=s,e.f=u;var c="data-mdc-tabindex",d="data-mdc-tabindex-handled",l=void 0,f=void 0},40:function(t,e,n){t.exports=n(15)}})});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.drawer=t():(e.mdc=e.mdc||{},e.mdc.drawer=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/assets/",t(t.s=48)}({0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);n.d(t,"MDCFoundation",function(){return r.a});var a=n(2);n.d(t,"MDCComponent",function(){return a.a})},1:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.adapter_=t}return a(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),a(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=i},13:function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(!("ontouchstart"in t.document))switch(e){case"touchstart":return"pointerdown";case"touchmove":return"pointermove";case"touchend":return"pointerup";default:return e}return e}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===l||t){var n=e.document.createElement("div"),r="transform"in n.style?"transform":"-webkit-transform";l=r}return l}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return"CSS"in e&&e.CSS.supports("(--color: red)")}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===f||t){var n=!1;try{e.document.addEventListener("test",null,{get passive(){n=!0}})}catch(e){}f=n}return!!f&&{passive:!0}}function s(e){e.hasAttribute("tabindex")&&e.setAttribute(c,e.getAttribute("tabindex")),e.setAttribute(d,!0)}function u(e){e.hasAttribute(d)&&(e.hasAttribute(c)?(e.setAttribute("tabindex",e.getAttribute(c)),e.removeAttribute(c)):e.removeAttribute("tabindex"),e.removeAttribute(d))}Object.defineProperty(t,"__esModule",{value:!0}),t.remapEvent=r,t.getTransformPropertyName=a,t.supportsCssCustomProperties=i,t.applyPassive=o,t.saveElementTabState=s,t.restoreElementTabState=u;var c="data-mdc-tabindex",d="data-mdc-tabindex-handled",l=void 0,f=void 0},17:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),a=n(32);n.d(t,"MDCTemporaryDrawer",function(){return a.a}),n.d(t,"MDCTemporaryDrawerFoundation",function(){return a.b}),n.d(t,"util",function(){return r})},2:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=n(1),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,e),this.root_=t;for(var a=arguments.length,i=Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];this.initialize.apply(this,i),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return i(e,null,[{key:"attachTo",value:function(t){return new e(t,new a.a)}}]),i(e,[{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(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n=void 0;"function"==typeof CustomEvent?n=new CustomEvent(e,{detail:t}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!1,!1,t)),this.root_.dispatchEvent(n)}}]),e}();t.a=o},30:function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return i});var r="mdc-temporary-drawer",a={ROOT:r,OPEN:r+"--open",ANIMATING:r+"--animating",RIGHT:r+"--right"},i={DRAWER_SELECTOR:"."+r+"__drawer",OPACITY_VAR_NAME:"--"+r+"-opacity",FOCUSABLE_ELEMENTS:"a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]"}},31:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=n(30),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(e){r(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,u(t.defaultAdapter,e)));return n.transitionEndHandler_=function(e){n.adapter_.isDrawer(e.target)&&(n.adapter_.removeClass(t.cssClasses.ANIMATING),n.adapter_.deregisterTransitionEndHandler(n.transitionEndHandler_))},n.inert_=!1,n.componentClickHandler_=function(){return n.close()},n.drawerClickHandler_=function(e){return e.stopPropagation()},n.componentTouchStartHandler_=function(e){return n.handleTouchStart_(e)},n.componentTouchMoveHandler_=function(e){return n.handleTouchMove_(e)},n.componentTouchEndHandler_=function(e){return n.handleTouchEnd_(e)},n.documentKeydownHandler_=function(e){(e.key&&"Escape"===e.key||27===e.keyCode)&&n.close()},n}return i(t,e),c(t,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){},hasNecessaryDom:function(){return!1},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerDrawerInteractionHandler:function(){},deregisterDrawerInteractionHandler:function(){},registerTransitionEndHandler:function(){},deregisterTransitionEndHandler:function(){},registerDocumentKeydownHandler:function(){},deregisterDocumentKeydownHandler:function(){},setTranslateX:function(){},updateCssVariable:function(){},getFocusableElements:function(){},saveElementTabState:function(){},restoreElementTabState:function(){},makeElementUntabbable:function(){},isRtl:function(){return!1},getDrawerWidth:function(){return 0},isDrawer:function(){return!1}}}}]),c(t,[{key:"init",value:function(){var e=t.cssClasses,n=e.ROOT,r=e.OPEN;if(!this.adapter_.hasClass(n))throw new Error(n+" class required in root element.");if(!this.adapter_.hasNecessaryDom())throw new Error("Required DOM nodes missing in "+n+" component.");this.adapter_.hasClass(r)?this.isOpen_=!0:(this.detabinate_(),this.isOpen_=!1),this.adapter_.updateCssVariable(0),this.adapter_.registerInteractionHandler("click",this.componentClickHandler_),this.adapter_.registerDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.registerDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.registerInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.registerInteractionHandler("touchend",this.componentTouchEndHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterInteractionHandler("click",this.componentClickHandler_),this.adapter_.deregisterDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.deregisterDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.deregisterInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.deregisterInteractionHandler("touchend",this.componentTouchEndHandler_),this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_)}},{key:"open",value:function(){this.adapter_.updateCssVariable(""),this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.registerDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.addClass(t.cssClasses.ANIMATING),this.adapter_.addClass(t.cssClasses.OPEN),this.retabinate_(),this.isOpen_=!0}},{key:"close",value:function(){this.adapter_.updateCssVariable(""),this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.addClass(t.cssClasses.ANIMATING),this.adapter_.removeClass(t.cssClasses.OPEN),this.detabinate_(),this.isOpen_=!1}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"detabinate_",value:function(){if(!this.inert_){var e=this.adapter_.getFocusableElements();if(e)for(var t=0;t<e.length;t++)this.adapter_.saveElementTabState(e[t]),this.adapter_.makeElementUntabbable(e[t]);this.inert_=!0}}},{key:"retabinate_",value:function(){if(this.inert_){var e=this.adapter_.getFocusableElements();if(e)for(var t=0;t<e.length;t++)this.adapter_.restoreElementTabState(e[t]);this.inert_=!1}}},{key:"handleTouchStart_",value:function(e){this.adapter_.hasClass(t.cssClasses.OPEN)&&(e.pointerType&&"touch"!==e.pointerType||(this.direction_=this.adapter_.isRtl()?-1:1,this.drawerWidth_=this.adapter_.getDrawerWidth(),this.startX_=e.touches?e.touches[0].pageX:e.pageX,this.currentX_=this.startX_,this.touchingSideNav_=!0,requestAnimationFrame(this.updateDrawer_.bind(this))))}},{key:"handleTouchMove_",value:function(e){e.pointerType&&"touch"!==e.pointerType||(this.currentX_=e.touches?e.touches[0].pageX:e.pageX)}},{key:"handleTouchEnd_",value:function(e){if(!e.pointerType||"touch"===e.pointerType){this.touchingSideNav_=!1,this.adapter_.setTranslateX(null),this.adapter_.updateCssVariable("");var t=null;t=1===this.direction_?Math.min(0,this.currentX_-this.startX_):Math.max(0,this.currentX_-this.startX_),Math.abs(t/this.drawerWidth_)>=.5?this.close():this.open()}}},{key:"updateDrawer_",value:function(){if(this.touchingSideNav_){requestAnimationFrame(this.updateDrawer_.bind(this));var e=null,t=null;e=1===this.direction_?Math.min(0,this.currentX_-this.startX_):Math.max(0,this.currentX_-this.startX_),t=Math.max(0,1+this.direction_*(e/this.drawerWidth_)),this.adapter_.setTranslateX(e),this.adapter_.updateCssVariable(t)}}}]),t}(o.MDCFoundation);t.a=d},32:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=n(31),u=n(13);n.d(t,"b",function(){return s.a}),n.d(t,"a",function(){return d});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){function t(){return r(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"getDefaultFoundation",value:function(){var e=this,t=s.a.strings,n=t.FOCUSABLE_ELEMENTS,r=t.OPACITY_VAR_NAME;return new s.a({addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},hasClass:function(t){return e.root_.classList.contains(t)},hasNecessaryDom:function(){return Boolean(e.drawer)},registerInteractionHandler:function(t,n){return e.root_.addEventListener(u.remapEvent(t),n,u.applyPassive())},deregisterInteractionHandler:function(t,n){return e.root_.removeEventListener(u.remapEvent(t),n,u.applyPassive())},registerDrawerInteractionHandler:function(t,n){return e.drawer.addEventListener(u.remapEvent(t),n)},deregisterDrawerInteractionHandler:function(t,n){return e.drawer.removeEventListener(u.remapEvent(t),n)},registerTransitionEndHandler:function(t){return e.drawer.addEventListener("transitionend",t)},deregisterTransitionEndHandler:function(t){return e.drawer.removeEventListener("transitionend",t)},registerDocumentKeydownHandler:function(e){return document.addEventListener("keydown",e)},deregisterDocumentKeydownHandler:function(e){return document.removeEventListener("keydown",e)},getDrawerWidth:function(){return e.drawer.offsetWidth},setTranslateX:function(t){return e.drawer.style.setProperty(u.getTransformPropertyName(),null===t?null:"translateX("+t+"px)")},updateCssVariable:function(t){u.supportsCssCustomProperties()&&e.root_.style.setProperty(r,t)},getFocusableElements:function(){return e.drawer.querySelectorAll(n)},saveElementTabState:function(e){return u.saveElementTabState(e)},restoreElementTabState:function(e){return u.restoreElementTabState(e)},makeElementUntabbable:function(e){return e.setAttribute("tabindex",-1)},isRtl:function(){return"rtl"===getComputedStyle(e.root_).getPropertyValue("direction")},isDrawer:function(t){return t===e.drawer}})}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(e){e?this.foundation_.open():this.foundation_.close()}},{key:"drawer",get:function(){return this.root_.querySelector(s.a.strings.DRAWER_SELECTOR)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(o.MDCComponent)},48:function(e,t,n){e.exports=n(17)}})});

@@ -17,2 +17,4 @@ /**

import * as util from './util';
export {MDCTemporaryDrawer, MDCTemporaryDrawerFoundation} from './temporary';
export {util};
{
"name": "@material/drawer",
"version": "0.1.4",
"version": "0.2.0",
"description": "The Material Components Web drawer component",

@@ -22,5 +22,5 @@ "license": "Apache-2.0",

"@material/rtl": "^0.1.2",
"@material/theme": "^0.1.2",
"@material/theme": "^0.1.3",
"@material/typography": "^0.2.0"
}
}

@@ -177,3 +177,3 @@ # MDC Drawer

```javascript
import {MDCTemporaryDrawer, MDCTemporaryDrawerFoundation} from 'mdc-drawer';
import {MDCTemporaryDrawer, MDCTemporaryDrawerFoundation, util} from 'mdc-drawer';
```

@@ -187,2 +187,3 @@

const MDCTemporaryDrawerFoundation = mdcDrawer.MDCTemporaryDrawerFoundation;
const util = mdcDrawer.util;
```

@@ -196,2 +197,3 @@

const MDCTemporaryDrawerFoundation = mdcDrawer.MDCTemporaryDrawerFoundation;
const util = mdcDrawer.util;
});

@@ -205,2 +207,3 @@ ```

const MDCTemporaryDrawerFoundation = mdc.drawer.MDCTemporaryDrawerFoundation;
const util = mdc.drawer.util;
```

@@ -256,1 +259,28 @@

| `isDrawer(el: Element) => boolean` | Returns boolean indicating whether the provided element is the drawer container sub-element. |
### The util API
External frameworks and libraries can use the following utility methods when integrating a component.
#### util.remapEvent(eventName, globalObj = window) => String
Remap touch events to pointer events, if the browser doesn't support touch events.
#### util.getTransformPropertyName(globalObj = window, forceRefresh = false) => String
Choose the correct transform property to use on the current browser.
#### util.supportsCssCustomProperties(globalObj = window) => Boolean
Determine whether the current browser supports CSS properties.
#### util.applyPassive(globalObj = window, forceRefresh = false) => object
Determine whether the current browser supports passive event listeners, and if so, use them.
#### util.saveElementTabState(el) => void
Save the tab state for an element.
#### util.restoreElementTabState(el) => void
Restore the tab state for an element, if it was saved.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc