@material/form-field
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -81,3 +81,3 @@ /*! | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 65); | ||
/******/ return __webpack_require__(__webpack_require__.s = 72); | ||
/******/ }) | ||
@@ -200,98 +200,2 @@ /************************************************************************/ | ||
/***/ 19: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(41); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFormFieldFoundation", function() { return __WEBPACK_IMPORTED_MODULE_1__foundation__["a"]; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFormField", function() { return MDCFormField; }); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
/** | ||
* Copyright 2017 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 MDCFormField = function (_MDCComponent) { | ||
_inherits(MDCFormField, _MDCComponent); | ||
function MDCFormField() { | ||
_classCallCheck(this, MDCFormField); | ||
return _possibleConstructorReturn(this, (MDCFormField.__proto__ || Object.getPrototypeOf(MDCFormField)).apply(this, arguments)); | ||
} | ||
_createClass(MDCFormField, [{ | ||
key: 'getDefaultFoundation', | ||
value: function getDefaultFoundation() { | ||
var _this2 = this; | ||
return new __WEBPACK_IMPORTED_MODULE_1__foundation__["a" /* default */]({ | ||
registerInteractionHandler: function registerInteractionHandler(type, handler) { | ||
return _this2.label_.addEventListener(type, handler); | ||
}, | ||
deregisterInteractionHandler: function deregisterInteractionHandler(type, handler) { | ||
return _this2.label_.removeEventListener(type, handler); | ||
}, | ||
activateInputRipple: function activateInputRipple() { | ||
if (_this2.input_ && _this2.input_.ripple) { | ||
_this2.input_.ripple.activate(); | ||
} | ||
}, | ||
deactivateInputRipple: function deactivateInputRipple() { | ||
if (_this2.input_ && _this2.input_.ripple) { | ||
_this2.input_.ripple.deactivate(); | ||
} | ||
} | ||
}); | ||
} | ||
}, { | ||
key: 'input', | ||
set: function set(input) { | ||
this.input_ = input; | ||
}, | ||
get: function get() { | ||
return this.input_; | ||
} | ||
}, { | ||
key: 'label_', | ||
get: function get() { | ||
return this.root_.querySelector(__WEBPACK_IMPORTED_MODULE_1__foundation__["a" /* default */].strings.LABEL_SELECTOR); | ||
} | ||
}], [{ | ||
key: 'attachTo', | ||
value: function attachTo(root) { | ||
return new MDCFormField(root); | ||
} | ||
}]); | ||
return MDCFormField; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base__["MDCComponent"]); | ||
/***/ }), | ||
/***/ 2: | ||
@@ -409,8 +313,13 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
value: function emit(evtType, evtData) { | ||
var shouldBubble = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
var evt = void 0; | ||
if (typeof CustomEvent === 'function') { | ||
evt = new CustomEvent(evtType, { detail: evtData }); | ||
evt = new CustomEvent(evtType, { | ||
detail: evtData, | ||
bubbles: shouldBubble | ||
}); | ||
} else { | ||
evt = document.createEvent('CustomEvent'); | ||
evt.initCustomEvent(evtType, false, false, evtData); | ||
evt.initCustomEvent(evtType, shouldBubble, false, evtData); | ||
} | ||
@@ -429,6 +338,102 @@ | ||
/***/ 40: | ||
/***/ 22: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFormField", function() { return MDCFormField; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(45); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCFormFieldFoundation", function() { return __WEBPACK_IMPORTED_MODULE_1__foundation__["a"]; }); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
/** | ||
* Copyright 2017 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 MDCFormField = function (_MDCComponent) { | ||
_inherits(MDCFormField, _MDCComponent); | ||
function MDCFormField() { | ||
_classCallCheck(this, MDCFormField); | ||
return _possibleConstructorReturn(this, (MDCFormField.__proto__ || Object.getPrototypeOf(MDCFormField)).apply(this, arguments)); | ||
} | ||
_createClass(MDCFormField, [{ | ||
key: 'getDefaultFoundation', | ||
value: function getDefaultFoundation() { | ||
var _this2 = this; | ||
return new __WEBPACK_IMPORTED_MODULE_1__foundation__["a" /* default */]({ | ||
registerInteractionHandler: function registerInteractionHandler(type, handler) { | ||
return _this2.label_.addEventListener(type, handler); | ||
}, | ||
deregisterInteractionHandler: function deregisterInteractionHandler(type, handler) { | ||
return _this2.label_.removeEventListener(type, handler); | ||
}, | ||
activateInputRipple: function activateInputRipple() { | ||
if (_this2.input_ && _this2.input_.ripple) { | ||
_this2.input_.ripple.activate(); | ||
} | ||
}, | ||
deactivateInputRipple: function deactivateInputRipple() { | ||
if (_this2.input_ && _this2.input_.ripple) { | ||
_this2.input_.ripple.deactivate(); | ||
} | ||
} | ||
}); | ||
} | ||
}, { | ||
key: 'input', | ||
set: function set(input) { | ||
this.input_ = input; | ||
}, | ||
get: function get() { | ||
return this.input_; | ||
} | ||
}, { | ||
key: 'label_', | ||
get: function get() { | ||
return this.root_.querySelector(__WEBPACK_IMPORTED_MODULE_1__foundation__["a" /* default */].strings.LABEL_SELECTOR); | ||
} | ||
}], [{ | ||
key: 'attachTo', | ||
value: function attachTo(root) { | ||
return new MDCFormField(root); | ||
} | ||
}]); | ||
return MDCFormField; | ||
}(__WEBPACK_IMPORTED_MODULE_0__material_base__["MDCComponent"]); | ||
/***/ }), | ||
/***/ 44: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cssClasses; }); | ||
@@ -462,3 +467,3 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return strings; }); | ||
/***/ 41: | ||
/***/ 45: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -468,3 +473,3 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__(40); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__constants__ = __webpack_require__(44); | ||
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; }; | ||
@@ -564,6 +569,6 @@ | ||
/***/ 65: | ||
/***/ 72: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(19); | ||
module.exports = __webpack_require__(22); | ||
@@ -570,0 +575,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.formField=e():(t.mdc=t.mdc||{},t.mdc.formField=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.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=65)}({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 o=n(2);n.d(e,"MDCComponent",function(){return o.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 o=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}}(),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return o(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=i},19: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 o(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 i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),a=n(41);n.d(e,"MDCFormFieldFoundation",function(){return a.a}),n.d(e,"MDCFormField",function(){return f});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}}(),f=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),c(e,[{key:"getDefaultFoundation",value:function(){var t=this;return new a.a({registerInteractionHandler:function(e,n){return t.label_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.label_.removeEventListener(e,n)},activateInputRipple:function(){t.input_&&t.input_.ripple&&t.input_.ripple.activate()},deactivateInputRipple:function(){t.input_&&t.input_.ripple&&t.input_.ripple.deactivate()}})}},{key:"input",set:function(t){this.input_=t},get:function(){return this.input_}},{key:"label_",get:function(){return this.root_.querySelector(a.a.strings.LABEL_SELECTOR)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(u.MDCComponent)},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 o=n(1),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}}(),u=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 o=arguments.length,i=Array(o>2?o-2:0),u=2;u<o;u++)i[u-2]=arguments[u];this.initialize.apply(this,i),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return i(t,null,[{key:"attachTo",value:function(e){return new t(e,new o.a)}}]),i(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=u},40:function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return o});var r={ROOT:"mdc-form-field"},o={LABEL_SELECTOR:".mdc-form-field > label"}},41: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 o(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 i(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 u=n(0),a=n(40),c=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},f=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}}(),l=function(t){function e(t){r(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.clickHandler_=function(t){return n.handleClick_(t)},n}return i(e,t),f(e,null,[{key:"cssClasses",get:function(){return a.a}},{key:"strings",get:function(){return a.b}},{key:"defaultAdapter",get:function(){return{registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},activateInputRipple:function(){},deactivateInputRipple:function(){}}}}]),f(e,[{key:"init",value:function(){this.adapter_.registerInteractionHandler("click",this.clickHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterInteractionHandler("click",this.clickHandler_)}},{key:"handleClick_",value:function(){var t=this;this.adapter_.activateInputRipple(),requestAnimationFrame(function(){return t.adapter_.deactivateInputRipple()})}}]),e}(u.MDCFoundation);e.a=l},65:function(t,e,n){t.exports=n(19)}})}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.formField=e():(t.mdc=t.mdc||{},t.mdc.formField=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.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=72)}({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 o=n(2);n.d(e,"MDCComponent",function(){return o.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 o=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}}(),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return o(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=i},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 o=n(1),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}}(),u=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 o=arguments.length,i=Array(o>2?o-2:0),u=2;u<o;u++)i[u-2]=arguments[u];this.initialize.apply(this,i),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return i(t,null,[{key:"attachTo",value:function(e){return new t(e,new o.a)}}]),i(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=u},22: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 o(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 i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"MDCFormField",function(){return f});var u=n(0),a=n(45);n.d(e,"MDCFormFieldFoundation",function(){return a.a});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}}(),f=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),c(e,[{key:"getDefaultFoundation",value:function(){var t=this;return new a.a({registerInteractionHandler:function(e,n){return t.label_.addEventListener(e,n)},deregisterInteractionHandler:function(e,n){return t.label_.removeEventListener(e,n)},activateInputRipple:function(){t.input_&&t.input_.ripple&&t.input_.ripple.activate()},deactivateInputRipple:function(){t.input_&&t.input_.ripple&&t.input_.ripple.deactivate()}})}},{key:"input",set:function(t){this.input_=t},get:function(){return this.input_}},{key:"label_",get:function(){return this.root_.querySelector(a.a.strings.LABEL_SELECTOR)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(u.MDCComponent)},44:function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return o});var r={ROOT:"mdc-form-field"},o={LABEL_SELECTOR:".mdc-form-field > label"}},45: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 o(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 i(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 u=n(0),a=n(44),c=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},f=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}}(),l=function(t){function e(t){r(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c(e.defaultAdapter,t)));return n.clickHandler_=function(t){return n.handleClick_(t)},n}return i(e,t),f(e,null,[{key:"cssClasses",get:function(){return a.a}},{key:"strings",get:function(){return a.b}},{key:"defaultAdapter",get:function(){return{registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},activateInputRipple:function(){},deactivateInputRipple:function(){}}}}]),f(e,[{key:"init",value:function(){this.adapter_.registerInteractionHandler("click",this.clickHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterInteractionHandler("click",this.clickHandler_)}},{key:"handleClick_",value:function(){var t=this;this.adapter_.activateInputRipple(),requestAnimationFrame(function(){return t.adapter_.deactivateInputRipple()})}}]),e}(u.MDCFoundation);e.a=l},72:function(t,e,n){t.exports=n(22)}})}); |
{ | ||
"name": "@material/form-field", | ||
"description": "Material Components for the web wrapper for laying out form fields and labels next to one another", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"license": "Apache-2.0", | ||
@@ -17,7 +17,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@material/base": "^0.1.2", | ||
"@material/rtl": "^0.1.3", | ||
"@material/theme": "^0.1.4", | ||
"@material/typography": "^0.2.1" | ||
"@material/base": "^0.1.3", | ||
"@material/rtl": "^0.1.4", | ||
"@material/theme": "^0.1.5", | ||
"@material/typography": "^0.2.2" | ||
} | ||
} |
@@ -1,3 +0,10 @@ | ||
# MDC Form Field | ||
<!--docs: | ||
title: "Form Fields" | ||
layout: detail | ||
section: components | ||
path: /catalog/input-controls/form-fields/ | ||
--> | ||
# Form Fields | ||
MDC Form Field provides an `mdc-form-field` helper class for easily making theme-aware, RTL-aware | ||
@@ -4,0 +11,0 @@ form field + label combos. It also provides an `MDCFormField` class for easily making input ripples |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
50338
883
157
Updated@material/base@^0.1.3
Updated@material/rtl@^0.1.4
Updated@material/theme@^0.1.5
Updated@material/typography@^0.2.2