@material/linear-progress
Advanced tools
Comparing version 0.27.0 to 0.28.0
/*! | ||
Material Components for the web | ||
Copyright (c) 2017 Google Inc. | ||
Copyright (c) 2018 Google Inc. | ||
License: Apache-2.0 | ||
@@ -78,3 +78,3 @@ */ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 69); | ||
/******/ return __webpack_require__(__webpack_require__.s = 77); | ||
/******/ }) | ||
@@ -394,6 +394,6 @@ /************************************************************************/ | ||
/***/ 69: | ||
/***/ 77: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(70); | ||
module.exports = __webpack_require__(78); | ||
@@ -403,3 +403,3 @@ | ||
/***/ 70: | ||
/***/ 78: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -411,3 +411,3 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(4); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(71); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(79); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCLinearProgressFoundation", function() { return __WEBPACK_IMPORTED_MODULE_1__foundation__["a"]; }); | ||
@@ -520,3 +520,3 @@ 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; }; }(); | ||
/***/ 71: | ||
/***/ 79: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -527,3 +527,3 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__material_animation__ = __webpack_require__(8); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(72); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(80); | ||
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; }; | ||
@@ -585,3 +585,3 @@ | ||
removeClass: function removeClass() /* className: string */{}, | ||
setStyle: function setStyle() /* el: Element, styleProperty: string, value: number */{} | ||
setStyle: function setStyle() /* el: Element, styleProperty: string, value: string */{} | ||
}; | ||
@@ -602,2 +602,3 @@ } | ||
this.reverse_ = this.adapter_.hasClass(__WEBPACK_IMPORTED_MODULE_2__constants__["a" /* cssClasses */].REVERSED_CLASS); | ||
this.progress_ = 0; | ||
} | ||
@@ -610,2 +611,3 @@ }, { | ||
this.adapter_.removeClass(__WEBPACK_IMPORTED_MODULE_2__constants__["a" /* cssClasses */].INDETERMINATE_CLASS); | ||
this.setScale_(this.adapter_.getPrimaryBar(), this.progress_); | ||
} else { | ||
@@ -620,2 +622,3 @@ this.adapter_.addClass(__WEBPACK_IMPORTED_MODULE_2__constants__["a" /* cssClasses */].INDETERMINATE_CLASS); | ||
value: function setProgress(value) { | ||
this.progress_ = value; | ||
if (this.determinate_) { | ||
@@ -671,37 +674,2 @@ this.setScale_(this.adapter_.getPrimaryBar(), value); | ||
/***/ 72: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cssClasses; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return strings; }); | ||
/** | ||
* 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 cssClasses = { | ||
CLOSED_CLASS: 'mdc-linear-progress--closed', | ||
INDETERMINATE_CLASS: 'mdc-linear-progress--indeterminate', | ||
REVERSED_CLASS: 'mdc-linear-progress--reversed' | ||
}; | ||
var strings = { | ||
PRIMARY_BAR_SELECTOR: '.mdc-linear-progress__primary-bar', | ||
BUFFER_SELECTOR: '.mdc-linear-progress__buffer' | ||
}; | ||
/***/ }), | ||
/***/ 8: | ||
@@ -857,2 +825,37 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/***/ }), | ||
/***/ 80: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cssClasses; }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return strings; }); | ||
/** | ||
* 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 cssClasses = { | ||
CLOSED_CLASS: 'mdc-linear-progress--closed', | ||
INDETERMINATE_CLASS: 'mdc-linear-progress--indeterminate', | ||
REVERSED_CLASS: 'mdc-linear-progress--reversed' | ||
}; | ||
var strings = { | ||
PRIMARY_BAR_SELECTOR: '.mdc-linear-progress__primary-bar', | ||
BUFFER_SELECTOR: '.mdc-linear-progress__buffer' | ||
}; | ||
/***/ }) | ||
@@ -859,0 +862,0 @@ |
/*! | ||
Material Components for the web | ||
Copyright (c) 2017 Google Inc. | ||
Copyright (c) 2018 Google Inc. | ||
License: Apache-2.0 | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.linearProgress=t():(e.mdc=e.mdc||{},e.mdc.linearProgress=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,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=69)}({0: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 o=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 o(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=i},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 o=n(0),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}}(),a=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 o=arguments.length,i=Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];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 o.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=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(e,{detail:t,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,n,!1,t)),this.root_.dispatchEvent(r)}}]),e}();t.a=a},4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1);n.d(t,"MDCFoundation",function(){return r.a}),n.d(t,"MDCComponent",function(){return o.a})},69:function(e,t,n){e.exports=n(70)},70: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 o(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)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCLinearProgress",function(){return f});var a=n(4),u=n(71);n.d(t,"MDCLinearProgressFoundation",function(){return u.a});var s=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}}(),f=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"open",value:function(){this.foundation_.open()}},{key:"close",value:function(){this.foundation_.close()}},{key:"getDefaultFoundation",value:function(){var e=this;return new u.a({addClass:function(t){return e.root_.classList.add(t)},getPrimaryBar:function(){return e.root_.querySelector(u.a.strings.PRIMARY_BAR_SELECTOR)},getBuffer:function(){return e.root_.querySelector(u.a.strings.BUFFER_SELECTOR)},hasClass:function(t){return e.root_.classList.contains(t)},removeClass:function(t){return e.root_.classList.remove(t)},setStyle:function(e,t,n){return e.style[t]=n}})}},{key:"determinate",set:function(e){this.foundation_.setDeterminate(e)}},{key:"progress",set:function(e){this.foundation_.setProgress(e)}},{key:"buffer",set:function(e){this.foundation_.setBuffer(e)}},{key:"reverse",set:function(e){this.foundation_.setReverse(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(a.MDCComponent)},71: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 o(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 a=n(4),u=n(8),s=n(72),f=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}}(),l=function(e){function t(e){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f(t.defaultAdapter,e)))}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(){},getPrimaryBar:function(){},getBuffer:function(){},hasClass:function(){return!1},removeClass:function(){},setStyle:function(){}}}}]),c(t,[{key:"init",value:function(){this.determinate_=!this.adapter_.hasClass(s.a.INDETERMINATE_CLASS),this.reverse_=this.adapter_.hasClass(s.a.REVERSED_CLASS)}},{key:"setDeterminate",value:function(e){this.determinate_=e,this.determinate_?this.adapter_.removeClass(s.a.INDETERMINATE_CLASS):(this.adapter_.addClass(s.a.INDETERMINATE_CLASS),this.setScale_(this.adapter_.getPrimaryBar(),1),this.setScale_(this.adapter_.getBuffer(),1))}},{key:"setProgress",value:function(e){this.determinate_&&this.setScale_(this.adapter_.getPrimaryBar(),e)}},{key:"setBuffer",value:function(e){this.determinate_&&this.setScale_(this.adapter_.getBuffer(),e)}},{key:"setReverse",value:function(e){this.reverse_=e,this.reverse_?this.adapter_.addClass(s.a.REVERSED_CLASS):this.adapter_.removeClass(s.a.REVERSED_CLASS)}},{key:"open",value:function(){this.adapter_.removeClass(s.a.CLOSED_CLASS)}},{key:"close",value:function(){this.adapter_.addClass(s.a.CLOSED_CLASS)}},{key:"setScale_",value:function(e,t){var n=this,r="scaleX("+t+")";u.transformStyleProperties.forEach(function(t){n.adapter_.setStyle(e,t,r)})}}]),t}(a.MDCFoundation);t.a=l},72:function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var r={CLOSED_CLASS:"mdc-linear-progress--closed",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed"},o={PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar",BUFFER_SELECTOR:".mdc-linear-progress__buffer"}},8:function(e,t,n){"use strict";function r(e){return void 0!==e.document&&"function"==typeof e.document.createElement}function o(e){return e in f||e in c}function i(e,t,n){return t[e].styleProperty in n.style?t[e].noPrefix:t[e].webkitPrefix}function a(e,t){if(!r(e)||!o(t))return t;var n=t in f?f:c,a=e.document.createElement("div");return n===f?i(t,n,a):n[t].noPrefix in a.style?n[t].noPrefix:n[t].webkitPrefix}function u(e,t){return a(e,t)}function s(e,t){return a(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"transformStyleProperties",function(){return l}),n.d(t,"getCorrectEventName",function(){return u}),n.d(t,"getCorrectPropertyName",function(){return s});/** | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.linearProgress=t():(e.mdc=e.mdc||{},e.mdc.linearProgress=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,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=77)}({0: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 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(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.adapter_=t}return i(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),i(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=o},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 i=n(0),o=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}}(),a=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 i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];this.initialize.apply(this,o),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return o(e,null,[{key:"attachTo",value:function(t){return new e(t,new i.a)}}]),o(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=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(e,{detail:t,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,n,!1,t)),this.root_.dispatchEvent(r)}}]),e}();t.a=a},4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1);n.d(t,"MDCFoundation",function(){return r.a}),n.d(t,"MDCComponent",function(){return i.a})},77:function(e,t,n){e.exports=n(78)},78: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 i(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCLinearProgress",function(){return f});var a=n(4),u=n(79);n.d(t,"MDCLinearProgressFoundation",function(){return u.a});var s=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}}(),f=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"open",value:function(){this.foundation_.open()}},{key:"close",value:function(){this.foundation_.close()}},{key:"getDefaultFoundation",value:function(){var e=this;return new u.a({addClass:function(t){return e.root_.classList.add(t)},getPrimaryBar:function(){return e.root_.querySelector(u.a.strings.PRIMARY_BAR_SELECTOR)},getBuffer:function(){return e.root_.querySelector(u.a.strings.BUFFER_SELECTOR)},hasClass:function(t){return e.root_.classList.contains(t)},removeClass:function(t){return e.root_.classList.remove(t)},setStyle:function(e,t,n){return e.style[t]=n}})}},{key:"determinate",set:function(e){this.foundation_.setDeterminate(e)}},{key:"progress",set:function(e){this.foundation_.setProgress(e)}},{key:"buffer",set:function(e){this.foundation_.setBuffer(e)}},{key:"reverse",set:function(e){this.foundation_.setReverse(e)}}],[{key:"attachTo",value:function(e){return new t(e)}}]),t}(a.MDCComponent)},79: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 i(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 o(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 a=n(4),u=n(8),s=n(80),f=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}}(),l=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f(t.defaultAdapter,e)))}return o(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(){},getPrimaryBar:function(){},getBuffer:function(){},hasClass:function(){return!1},removeClass:function(){},setStyle:function(){}}}}]),c(t,[{key:"init",value:function(){this.determinate_=!this.adapter_.hasClass(s.a.INDETERMINATE_CLASS),this.reverse_=this.adapter_.hasClass(s.a.REVERSED_CLASS),this.progress_=0}},{key:"setDeterminate",value:function(e){this.determinate_=e,this.determinate_?(this.adapter_.removeClass(s.a.INDETERMINATE_CLASS),this.setScale_(this.adapter_.getPrimaryBar(),this.progress_)):(this.adapter_.addClass(s.a.INDETERMINATE_CLASS),this.setScale_(this.adapter_.getPrimaryBar(),1),this.setScale_(this.adapter_.getBuffer(),1))}},{key:"setProgress",value:function(e){this.progress_=e,this.determinate_&&this.setScale_(this.adapter_.getPrimaryBar(),e)}},{key:"setBuffer",value:function(e){this.determinate_&&this.setScale_(this.adapter_.getBuffer(),e)}},{key:"setReverse",value:function(e){this.reverse_=e,this.reverse_?this.adapter_.addClass(s.a.REVERSED_CLASS):this.adapter_.removeClass(s.a.REVERSED_CLASS)}},{key:"open",value:function(){this.adapter_.removeClass(s.a.CLOSED_CLASS)}},{key:"close",value:function(){this.adapter_.addClass(s.a.CLOSED_CLASS)}},{key:"setScale_",value:function(e,t){var n=this,r="scaleX("+t+")";u.transformStyleProperties.forEach(function(t){n.adapter_.setStyle(e,t,r)})}}]),t}(a.MDCFoundation);t.a=l},8:function(e,t,n){"use strict";function r(e){return void 0!==e.document&&"function"==typeof e.document.createElement}function i(e){return e in f||e in c}function o(e,t,n){return t[e].styleProperty in n.style?t[e].noPrefix:t[e].webkitPrefix}function a(e,t){if(!r(e)||!i(t))return t;var n=t in f?f:c,a=e.document.createElement("div");return n===f?o(t,n,a):n[t].noPrefix in a.style?n[t].noPrefix:n[t].webkitPrefix}function u(e,t){return a(e,t)}function s(e,t){return a(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"transformStyleProperties",function(){return l}),n.d(t,"getCorrectEventName",function(){return u}),n.d(t,"getCorrectPropertyName",function(){return s});/** | ||
* @license | ||
@@ -22,2 +22,2 @@ * Copyright 2016 Google Inc. All Rights Reserved. | ||
*/ | ||
var f={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart",styleProperty:"animation"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd",styleProperty:"animation"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration",styleProperty:"animation"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd",styleProperty:"transition"}},c={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}},l=["transform","WebkitTransform","MozTransform","OTransform","MSTransform"]}})}); | ||
var f={animationstart:{noPrefix:"animationstart",webkitPrefix:"webkitAnimationStart",styleProperty:"animation"},animationend:{noPrefix:"animationend",webkitPrefix:"webkitAnimationEnd",styleProperty:"animation"},animationiteration:{noPrefix:"animationiteration",webkitPrefix:"webkitAnimationIteration",styleProperty:"animation"},transitionend:{noPrefix:"transitionend",webkitPrefix:"webkitTransitionEnd",styleProperty:"transition"}},c={animation:{noPrefix:"animation",webkitPrefix:"-webkit-animation"},transform:{noPrefix:"transform",webkitPrefix:"-webkit-transform"},transition:{noPrefix:"transition",webkitPrefix:"-webkit-transition"}},l=["transform","WebkitTransform","MozTransform","OTransform","MSTransform"]},80:function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i});var r={CLOSED_CLASS:"mdc-linear-progress--closed",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed"},i={PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar",BUFFER_SELECTOR:".mdc-linear-progress__buffer"}}})}); |
@@ -38,3 +38,3 @@ /** | ||
removeClass: (/* className: string */) => {}, | ||
setStyle: (/* el: Element, styleProperty: string, value: number */) => {}, | ||
setStyle: (/* el: Element, styleProperty: string, value: string */) => {}, | ||
}; | ||
@@ -50,2 +50,3 @@ } | ||
this.reverse_ = this.adapter_.hasClass(cssClasses.REVERSED_CLASS); | ||
this.progress_ = 0; | ||
} | ||
@@ -57,2 +58,3 @@ | ||
this.adapter_.removeClass(cssClasses.INDETERMINATE_CLASS); | ||
this.setScale_(this.adapter_.getPrimaryBar(), this.progress_); | ||
} else { | ||
@@ -66,2 +68,3 @@ this.adapter_.addClass(cssClasses.INDETERMINATE_CLASS); | ||
setProgress(value) { | ||
this.progress_ = value; | ||
if (this.determinate_) { | ||
@@ -68,0 +71,0 @@ this.setScale_(this.adapter_.getPrimaryBar(), value); |
{ | ||
"name": "@material/linear-progress", | ||
"description": "The Material Components for the web linear progress indicator component", | ||
"version": "0.27.0", | ||
"version": "0.28.0", | ||
"license": "Apache-2.0", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
"@material/base": "^0.24.0", | ||
"@material/theme": "^0.27.0" | ||
"@material/theme": "^0.28.0" | ||
}, | ||
@@ -21,0 +21,0 @@ "publishConfig": { |
@@ -62,2 +62,3 @@ <!--docs: | ||
| `mdc-linear-progress--reversed` | Reverses the direction of the linear progress indicator. | | ||
| `mdc-linear-progress--closed` | Hides the linear progress indicator. | | ||
@@ -84,3 +85,3 @@ ### Sass Mixins | ||
| `getBuffer() => Element` | Returns the buffer element. | | ||
| `setTransform(el: Element, value: string) => void` | Sets the css transform property on the given element. | | ||
| `setStyle(el: Element, styleProperty: string, value: string) => void` | Sets the inline style on the given element. | | ||
@@ -87,0 +88,0 @@ ### MDCLinearProgressFoundation API |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90864
1286
111
+ Added@material/theme@0.28.0(transitive)
- Removed@material/theme@0.27.0(transitive)
Updated@material/theme@^0.28.0