UNPKG

omim

Version:

Material Design for Omi.

1,014 lines (959 loc) 367 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("omi")); else if(typeof define === 'function' && define.amd) define(["omi"], factory); else if(typeof exports === 'object') exports["MSelect"] = factory(require("omi")); else root["MSelect"] = factory(root["Omi"]); })(window, function(__WEBPACK_EXTERNAL_MODULE_omi__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/select/index.tsx"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@material/base/component.js": /*!**************************************************!*\ !*** ./node_modules/@material/base/component.js ***! \**************************************************/ /*! exports provided: MDCComponent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCComponent", function() { return MDCComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/base/foundation.js"); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCComponent = /** @class */ (function () { function MDCComponent(root, foundation) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } this.root_ = root; this.initialize.apply(this, tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"](args)); // Note that we initialize foundation here and not within the constructor's default param so that // this.root_ is defined and can be used within the foundation class. this.foundation_ = foundation === undefined ? this.getDefaultFoundation() : foundation; this.foundation_.init(); this.initialSyncWithDOM(); } MDCComponent.attachTo = function (root) { // Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and // returns an instantiated component with its root set to that element. Also note that in the cases of // subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized // from getDefaultFoundation(). return new MDCComponent(root, new _foundation__WEBPACK_IMPORTED_MODULE_1__["MDCFoundation"]({})); }; /* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */ MDCComponent.prototype.initialize = function () { var _args = []; for (var _i = 0; _i < arguments.length; _i++) { _args[_i] = arguments[_i]; } // Subclasses can override this to do any additional setup work that would be considered part of a // "constructor". Essentially, it is a hook into the parent constructor before the foundation is // initialized. Any additional arguments besides root and foundation will be passed in here. }; MDCComponent.prototype.getDefaultFoundation = function () { // Subclasses must override this method to return a properly configured foundation class for the // component. throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' + 'foundation class'); }; MDCComponent.prototype.initialSyncWithDOM = function () { // Subclasses should override this method if they need to perform work to synchronize with a host DOM // object. An example of this would be a form control wrapper that needs to synchronize its internal state // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor. }; MDCComponent.prototype.destroy = function () { // Subclasses may implement this method to release any resources / deregister any listeners they have // attached. An example of this might be deregistering a resize event from the window object. this.foundation_.destroy(); }; MDCComponent.prototype.listen = function (evtType, handler) { this.root_.addEventListener(evtType, handler); }; MDCComponent.prototype.unlisten = function (evtType, handler) { this.root_.removeEventListener(evtType, handler); }; /** * Fires a cross-browser-compatible custom event from the component root of the given type, with the given data. */ MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) { if (shouldBubble === void 0) { shouldBubble = false; } var evt; if (typeof CustomEvent === 'function') { evt = new CustomEvent(evtType, { bubbles: shouldBubble, detail: evtData, }); } else { evt = document.createEvent('CustomEvent'); evt.initCustomEvent(evtType, shouldBubble, false, evtData); } this.root_.dispatchEvent(evt); }; return MDCComponent; }()); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCComponent); //# sourceMappingURL=component.js.map /***/ }), /***/ "./node_modules/@material/base/foundation.js": /*!***************************************************!*\ !*** ./node_modules/@material/base/foundation.js ***! \***************************************************/ /*! exports provided: MDCFoundation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFoundation", function() { return MDCFoundation; }); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCFoundation = /** @class */ (function () { function MDCFoundation(adapter) { if (adapter === void 0) { adapter = {}; } this.adapter_ = adapter; } Object.defineProperty(MDCFoundation, "cssClasses", { get: function () { // Classes extending MDCFoundation should implement this method to return an object which exports every // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'} return {}; }, enumerable: true, configurable: true }); Object.defineProperty(MDCFoundation, "strings", { get: function () { // Classes extending MDCFoundation should implement this method to return an object which exports all // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'} return {}; }, enumerable: true, configurable: true }); Object.defineProperty(MDCFoundation, "numbers", { get: function () { // Classes extending MDCFoundation should implement this method to return an object which exports all // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350} return {}; }, enumerable: true, configurable: true }); Object.defineProperty(MDCFoundation, "defaultAdapter", { get: function () { // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter // validation. return {}; }, enumerable: true, configurable: true }); MDCFoundation.prototype.init = function () { // Subclasses should override this method to perform initialization routines (registering events, etc.) }; MDCFoundation.prototype.destroy = function () { // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.) }; return MDCFoundation; }()); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCFoundation); //# sourceMappingURL=foundation.js.map /***/ }), /***/ "./node_modules/@material/dom/ponyfill.js": /*!************************************************!*\ !*** ./node_modules/@material/dom/ponyfill.js ***! \************************************************/ /*! exports provided: closest, matches */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closest", function() { return closest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matches", function() { return matches; }); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain. * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC. */ function closest(element, selector) { if (element.closest) { return element.closest(selector); } var el = element; while (el) { if (matches(el, selector)) { return el; } el = el.parentElement; } return null; } function matches(element, selector) { var nativeMatches = element.matches || element.webkitMatchesSelector || element.msMatchesSelector; return nativeMatches.call(element, selector); } //# sourceMappingURL=ponyfill.js.map /***/ }), /***/ "./node_modules/@material/floating-label/component.js": /*!************************************************************!*\ !*** ./node_modules/@material/floating-label/component.js ***! \************************************************************/ /*! exports provided: MDCFloatingLabel */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFloatingLabel", function() { return MDCFloatingLabel; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_base_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/component */ "./node_modules/@material/base/component.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/floating-label/foundation.js"); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCFloatingLabel = /** @class */ (function (_super) { tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MDCFloatingLabel, _super); function MDCFloatingLabel() { return _super !== null && _super.apply(this, arguments) || this; } MDCFloatingLabel.attachTo = function (root) { return new MDCFloatingLabel(root); }; /** * Styles the label to produce the label shake for errors. * @param shouldShake If true, shakes the label by adding a CSS class; otherwise, stops shaking by removing the class. */ MDCFloatingLabel.prototype.shake = function (shouldShake) { this.foundation_.shake(shouldShake); }; /** * Styles the label to float/dock. * @param shouldFloat If true, floats the label by adding a CSS class; otherwise, docks it by removing the class. */ MDCFloatingLabel.prototype.float = function (shouldFloat) { this.foundation_.float(shouldFloat); }; MDCFloatingLabel.prototype.getWidth = function () { return this.foundation_.getWidth(); }; MDCFloatingLabel.prototype.getDefaultFoundation = function () { var _this = this; // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>. // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable. // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. var adapter = { addClass: function (className) { return _this.root_.classList.add(className); }, removeClass: function (className) { return _this.root_.classList.remove(className); }, getWidth: function () { return _this.root_.scrollWidth; }, registerInteractionHandler: function (evtType, handler) { return _this.listen(evtType, handler); }, deregisterInteractionHandler: function (evtType, handler) { return _this.unlisten(evtType, handler); }, }; // tslint:enable:object-literal-sort-keys return new _foundation__WEBPACK_IMPORTED_MODULE_2__["MDCFloatingLabelFoundation"](adapter); }; return MDCFloatingLabel; }(_material_base_component__WEBPACK_IMPORTED_MODULE_1__["MDCComponent"])); //# sourceMappingURL=component.js.map /***/ }), /***/ "./node_modules/@material/floating-label/constants.js": /*!************************************************************!*\ !*** ./node_modules/@material/floating-label/constants.js ***! \************************************************************/ /*! exports provided: cssClasses */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssClasses", function() { return cssClasses; }); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var cssClasses = { LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above', LABEL_SHAKE: 'mdc-floating-label--shake', ROOT: 'mdc-floating-label', }; //# sourceMappingURL=constants.js.map /***/ }), /***/ "./node_modules/@material/floating-label/foundation.js": /*!*************************************************************!*\ !*** ./node_modules/@material/floating-label/foundation.js ***! \*************************************************************/ /*! exports provided: MDCFloatingLabelFoundation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFloatingLabelFoundation", function() { return MDCFloatingLabelFoundation; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_base_foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/foundation */ "./node_modules/@material/base/foundation.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./node_modules/@material/floating-label/constants.js"); /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCFloatingLabelFoundation = /** @class */ (function (_super) { tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MDCFloatingLabelFoundation, _super); function MDCFloatingLabelFoundation(adapter) { var _this = _super.call(this, tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, MDCFloatingLabelFoundation.defaultAdapter, adapter)) || this; _this.shakeAnimationEndHandler_ = function () { return _this.handleShakeAnimationEnd_(); }; return _this; } Object.defineProperty(MDCFloatingLabelFoundation, "cssClasses", { get: function () { return _constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"]; }, enumerable: true, configurable: true }); Object.defineProperty(MDCFloatingLabelFoundation, "defaultAdapter", { /** * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types. */ get: function () { // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. return { addClass: function () { return undefined; }, removeClass: function () { return undefined; }, getWidth: function () { return 0; }, registerInteractionHandler: function () { return undefined; }, deregisterInteractionHandler: function () { return undefined; }, }; // tslint:enable:object-literal-sort-keys }, enumerable: true, configurable: true }); MDCFloatingLabelFoundation.prototype.init = function () { this.adapter_.registerInteractionHandler('animationend', this.shakeAnimationEndHandler_); }; MDCFloatingLabelFoundation.prototype.destroy = function () { this.adapter_.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler_); }; /** * Returns the width of the label element. */ MDCFloatingLabelFoundation.prototype.getWidth = function () { return this.adapter_.getWidth(); }; /** * Styles the label to produce a shake animation to indicate an error. * @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class. */ MDCFloatingLabelFoundation.prototype.shake = function (shouldShake) { var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE; if (shouldShake) { this.adapter_.addClass(LABEL_SHAKE); } else { this.adapter_.removeClass(LABEL_SHAKE); } }; /** * Styles the label to float or dock. * @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label. */ MDCFloatingLabelFoundation.prototype.float = function (shouldFloat) { var _a = MDCFloatingLabelFoundation.cssClasses, LABEL_FLOAT_ABOVE = _a.LABEL_FLOAT_ABOVE, LABEL_SHAKE = _a.LABEL_SHAKE; if (shouldFloat) { this.adapter_.addClass(LABEL_FLOAT_ABOVE); } else { this.adapter_.removeClass(LABEL_FLOAT_ABOVE); this.adapter_.removeClass(LABEL_SHAKE); } }; MDCFloatingLabelFoundation.prototype.handleShakeAnimationEnd_ = function () { var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE; this.adapter_.removeClass(LABEL_SHAKE); }; return MDCFloatingLabelFoundation; }(_material_base_foundation__WEBPACK_IMPORTED_MODULE_1__["MDCFoundation"])); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCFloatingLabelFoundation); //# sourceMappingURL=foundation.js.map /***/ }), /***/ "./node_modules/@material/line-ripple/component.js": /*!*********************************************************!*\ !*** ./node_modules/@material/line-ripple/component.js ***! \*********************************************************/ /*! exports provided: MDCLineRipple */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCLineRipple", function() { return MDCLineRipple; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_base_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/component */ "./node_modules/@material/base/component.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/line-ripple/foundation.js"); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCLineRipple = /** @class */ (function (_super) { tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MDCLineRipple, _super); function MDCLineRipple() { return _super !== null && _super.apply(this, arguments) || this; } MDCLineRipple.attachTo = function (root) { return new MDCLineRipple(root); }; /** * Activates the line ripple */ MDCLineRipple.prototype.activate = function () { this.foundation_.activate(); }; /** * Deactivates the line ripple */ MDCLineRipple.prototype.deactivate = function () { this.foundation_.deactivate(); }; /** * Sets the transform origin given a user's click location. * The `rippleCenter` is the x-coordinate of the middle of the ripple. */ MDCLineRipple.prototype.setRippleCenter = function (xCoordinate) { this.foundation_.setRippleCenter(xCoordinate); }; MDCLineRipple.prototype.getDefaultFoundation = function () { var _this = this; // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>. // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable. // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. var adapter = { addClass: function (className) { return _this.root_.classList.add(className); }, removeClass: function (className) { return _this.root_.classList.remove(className); }, hasClass: function (className) { return _this.root_.classList.contains(className); }, setStyle: function (propertyName, value) { return _this.root_.style.setProperty(propertyName, value); }, registerEventHandler: function (evtType, handler) { return _this.listen(evtType, handler); }, deregisterEventHandler: function (evtType, handler) { return _this.unlisten(evtType, handler); }, }; // tslint:enable:object-literal-sort-keys return new _foundation__WEBPACK_IMPORTED_MODULE_2__["MDCLineRippleFoundation"](adapter); }; return MDCLineRipple; }(_material_base_component__WEBPACK_IMPORTED_MODULE_1__["MDCComponent"])); //# sourceMappingURL=component.js.map /***/ }), /***/ "./node_modules/@material/line-ripple/constants.js": /*!*********************************************************!*\ !*** ./node_modules/@material/line-ripple/constants.js ***! \*********************************************************/ /*! exports provided: cssClasses */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cssClasses", function() { return cssClasses; }); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var cssClasses = { LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active', LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating', }; //# sourceMappingURL=constants.js.map /***/ }), /***/ "./node_modules/@material/line-ripple/foundation.js": /*!**********************************************************!*\ !*** ./node_modules/@material/line-ripple/foundation.js ***! \**********************************************************/ /*! exports provided: MDCLineRippleFoundation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCLineRippleFoundation", function() { return MDCLineRippleFoundation; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_base_foundation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/foundation */ "./node_modules/@material/base/foundation.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./node_modules/@material/line-ripple/constants.js"); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCLineRippleFoundation = /** @class */ (function (_super) { tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MDCLineRippleFoundation, _super); function MDCLineRippleFoundation(adapter) { var _this = _super.call(this, tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, MDCLineRippleFoundation.defaultAdapter, adapter)) || this; _this.transitionEndHandler_ = function (evt) { return _this.handleTransitionEnd(evt); }; return _this; } Object.defineProperty(MDCLineRippleFoundation, "cssClasses", { get: function () { return _constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"]; }, enumerable: true, configurable: true }); Object.defineProperty(MDCLineRippleFoundation, "defaultAdapter", { /** * See {@link MDCLineRippleAdapter} for typing information on parameters and return types. */ get: function () { // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface. return { addClass: function () { return undefined; }, removeClass: function () { return undefined; }, hasClass: function () { return false; }, setStyle: function () { return undefined; }, registerEventHandler: function () { return undefined; }, deregisterEventHandler: function () { return undefined; }, }; // tslint:enable:object-literal-sort-keys }, enumerable: true, configurable: true }); MDCLineRippleFoundation.prototype.init = function () { this.adapter_.registerEventHandler('transitionend', this.transitionEndHandler_); }; MDCLineRippleFoundation.prototype.destroy = function () { this.adapter_.deregisterEventHandler('transitionend', this.transitionEndHandler_); }; MDCLineRippleFoundation.prototype.activate = function () { this.adapter_.removeClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].LINE_RIPPLE_DEACTIVATING); this.adapter_.addClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].LINE_RIPPLE_ACTIVE); }; MDCLineRippleFoundation.prototype.setRippleCenter = function (xCoordinate) { this.adapter_.setStyle('transform-origin', xCoordinate + "px center"); }; MDCLineRippleFoundation.prototype.deactivate = function () { this.adapter_.addClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].LINE_RIPPLE_DEACTIVATING); }; MDCLineRippleFoundation.prototype.handleTransitionEnd = function (evt) { // Wait for the line ripple to be either transparent or opaque // before emitting the animation end event var isDeactivating = this.adapter_.hasClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].LINE_RIPPLE_DEACTIVATING); if (evt.propertyName === 'opacity') { if (isDeactivating) { this.adapter_.removeClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].LINE_RIPPLE_ACTIVE); this.adapter_.removeClass(_constants__WEBPACK_IMPORTED_MODULE_2__["cssClasses"].LINE_RIPPLE_DEACTIVATING); } } }; return MDCLineRippleFoundation; }(_material_base_foundation__WEBPACK_IMPORTED_MODULE_1__["MDCFoundation"])); // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier. /* harmony default export */ __webpack_exports__["default"] = (MDCLineRippleFoundation); //# sourceMappingURL=foundation.js.map /***/ }), /***/ "./node_modules/@material/list/component.js": /*!**************************************************!*\ !*** ./node_modules/@material/list/component.js ***! \**************************************************/ /*! exports provided: MDCList */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCList", function() { return MDCList; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _material_base_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material/base/component */ "./node_modules/@material/base/component.js"); /* harmony import */ var _material_dom_ponyfill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material/dom/ponyfill */ "./node_modules/@material/dom/ponyfill.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./node_modules/@material/list/constants.js"); /* harmony import */ var _foundation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation */ "./node_modules/@material/list/foundation.js"); /** * @license * Copyright 2018 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var MDCList = /** @class */ (function (_super) { tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MDCList, _super); function MDCList() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(MDCList.prototype, "vertical", { set: function (value) { this.foundation_.setVerticalOrientation(value); }, enumerable: true, configurable: true }); Object.defineProperty(MDCList.prototype, "listElements", { get: function () { return [].slice.call(this.root_.querySelectorAll("." + _constants__WEBPACK_IMPORTED_MODULE_3__["cssClasses"].LIST_ITEM_CLASS)); }, enumerable: true, configurable: true }); Object.defineProperty(MDCList.prototype, "wrapFocus", { set: function (value) { this.foundation_.setWrapFocus(value); }, enumerable: true, configurable: true }); Object.defineProperty(MDCList.prototype, "singleSelection", { set: function (isSingleSelectionList) { this.foundation_.setSingleSelection(isSingleSelectionList); }, enumerable: true, configurable: true }); Object.defineProperty(MDCList.prototype, "selectedIndex", { get: function () { return this.foundation_.getSelectedIndex(); }, set: function (index) { this.foundation_.setSelectedIndex(index); }, enumerable: true, configurable: true }); MDCList.attachTo = function (root) { return new MDCList(root); }; MDCList.prototype.initialSyncWithDOM = function () { this.handleClick_ = this.handleClickEvent_.bind(this); this.handleKeydown_ = this.handleKeydownEvent_.bind(this); this.focusInEventListener_ = this.handleFocusInEvent_.bind(this); this.focusOutEventListener_ = this.handleFocusOutEvent_.bind(this); this.listen('keydown', this.handleKeydown_); this.listen('click', this.handleClick_); this.listen('focusin', this.focusInEventListener_); this.listen('focusout', this.focusOutEventListener_); this.layout(); this.initializeListType(); }; MDCList.prototype.destroy = function () { this.unlisten('keydown', this.handleKeydown_); this.unlisten('click', this.handleClick_); this.unlisten('focusin', this.focusInEventListener_); this.unlisten('focusout', this.focusOutEventListener_); }; MDCList.prototype.layout = function () { var direction = this.root_.getAttribute(_constants__WEBPACK_IMPORTED_MODULE_3__["strings"].ARIA_ORIENTATION); this.vertical = direction !== _constants__WEBPACK_IMPORTED_MODULE_3__["strings"].ARIA_ORIENTATION_HORIZONTAL; // List items need to have at least tabindex=-1 to be focusable. [].slice.call(this.root_.querySelectorAll('.mdc-list-item:not([tabindex])')) .forEach(function (el) { el.setAttribute('tabindex', '-1'); }); // Child button/a elements are not tabbable until the list item is focused. [].slice.call(this.root_.querySelectorAll(_constants__WEBPACK_IMPORTED_MODULE_3__["strings"].FOCUSABLE_CHILD_ELEMENTS)) .forEach(function (el) { return el.setAttribute('tabindex', '-1'); }); this.foundation_.layout(); }; /** * Initialize selectedIndex value based on pre-selected checkbox list items, single selection or radio. */ MDCList.prototype.initializeListType = function () { var _this = this; var checkboxListItems = this.root_.querySelectorAll(_constants__WEBPACK_IMPORTED_MODULE_3__["strings"].ARIA_ROLE_CHECKBOX_SELECTOR); var singleSelectedListItem = this.root_.querySelector("\n ." + _constants__WEBPACK_IMPORTED_MODULE_3__["cssClasses"].LIST_ITEM_ACTIVATED_CLASS + ",\n ." + _constants__WEBPACK_IMPORTED_MODULE_3__["cssClasses"].LIST_ITEM_SELECTED_CLASS + "\n "); var radioSelectedListItem = this.root_.querySelector(_constants__WEBPACK_IMPORTED_MODULE_3__["strings"].ARIA_CHECKED_RADIO_SELECTOR); if (checkboxListItems.length) { var preselectedItems = this.root_.querySelectorAll(_constants__WEBPACK_IMPORTED_MODULE_3__["strings"].ARIA_CHECKED_CHECKBOX_SELECTOR); this.selectedIndex = [].map.call(preselectedItems, function (listItem) { return _this.listElements.indexOf(listItem); }); } else if (singleSelectedListItem) { if (singleSelectedListItem.classList.contains(_constants__WEBPACK_IMPORTED_MODULE_3__["cssClasses"].LIST_ITEM_ACTIVATED_CLASS)) { this.foundation_.setUseActivatedClass(true); } this.singleSelection = true; this.selectedIndex = this.listElements.indexOf(singleSelectedListItem); } else if (radioSelectedListItem) { this.selectedIndex = this.listElements.indexOf(radioSelectedListItem); } }; MDCList.prototype.getDefaultFoundation = function () { var _this = this; // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>. // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable. var adapter = { addClassForElementIndex: function (index, className) { var element = _this.listElements[index]; if (element) { element.classList.add(className); } }, focusItemAtIndex: function (index) { var element = _this.listElements[index]; if (element) { element.focus(); } }, getAttributeForElementIndex: function (index, attr) { return _this.listElements[index].getAttribute(attr); }, getFocusedElementIndex: function () { return _this.listElements.indexOf(document.activeElement); }, getListItemCount: function () { return _this.listElements.length; }, hasCheckboxAtIndex: function (index) { var listItem = _this.listElements[index]; return !!listItem.querySelector(_constants__WEBPACK_IMPORTED_MODULE_3__["string