@material/linear-progress
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -81,3 +81,3 @@ /*! | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 81); | ||
/******/ return __webpack_require__(__webpack_require__.s = 84); | ||
/******/ }) | ||
@@ -394,3 +394,3 @@ /************************************************************************/ | ||
/***/ 25: | ||
/***/ 26: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -402,3 +402,3 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(52); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation__ = __webpack_require__(54); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MDCLinearProgressFoundation", function() { return __WEBPACK_IMPORTED_MODULE_1__foundation__["a"]; }); | ||
@@ -511,6 +511,154 @@ 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; }; }(); | ||
/***/ 51: | ||
/***/ 4: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformStyleProperties", function() { return transformStyleProperties; }); | ||
/* harmony export (immutable) */ __webpack_exports__["getCorrectEventName"] = getCorrectEventName; | ||
/* harmony export (immutable) */ __webpack_exports__["getCorrectPropertyName"] = getCorrectPropertyName; | ||
/** | ||
* Copyright 2016 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* @typedef {{ | ||
* noPrefix: string, | ||
* webkitPrefix: string | ||
* }} | ||
*/ | ||
var VendorPropertyMapType = void 0; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var eventTypeMap = { | ||
'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' | ||
} | ||
}; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var cssPropertyMap = { | ||
'animation': { | ||
noPrefix: 'animation', | ||
webkitPrefix: '-webkit-animation' | ||
}, | ||
'transform': { | ||
noPrefix: 'transform', | ||
webkitPrefix: '-webkit-transform' | ||
}, | ||
'transition': { | ||
noPrefix: 'transition', | ||
webkitPrefix: '-webkit-transition' | ||
} | ||
}; | ||
/** | ||
* @param {!Object} windowObj | ||
* @return {boolean} | ||
*/ | ||
function hasProperShape(windowObj) { | ||
return windowObj['document'] !== undefined && typeof windowObj['document']['createElement'] === 'function'; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @return {boolean} | ||
*/ | ||
function eventFoundInMaps(eventType) { | ||
return eventType in eventTypeMap || eventType in cssPropertyMap; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @param {!Object<string, !VendorPropertyMapType>} map | ||
* @param {!Element} el | ||
* @return {string} | ||
*/ | ||
function getJavaScriptEventName(eventType, map, el) { | ||
return map[eventType].styleProperty in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
/** | ||
* Helper function to determine browser prefix for CSS3 animation events | ||
* and property names. | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getAnimationName(windowObj, eventType) { | ||
if (!hasProperShape(windowObj) || !eventFoundInMaps(eventType)) { | ||
return eventType; | ||
} | ||
var map = /** @type {!Object<string, !VendorPropertyMapType>} */eventType in eventTypeMap ? eventTypeMap : cssPropertyMap; | ||
var el = windowObj['document']['createElement']('div'); | ||
var eventName = ''; | ||
if (map === eventTypeMap) { | ||
eventName = getJavaScriptEventName(eventType, map, el); | ||
} else { | ||
eventName = map[eventType].noPrefix in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
return eventName; | ||
} | ||
// Public functions to access getAnimationName() for JavaScript events or CSS | ||
// property names. | ||
var transformStyleProperties = ['transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'MSTransform']; | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectEventName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectPropertyName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/***/ }), | ||
/***/ 53: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cssClasses; }); | ||
@@ -547,3 +695,3 @@ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return strings; }); | ||
/***/ 52: | ||
/***/ 54: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -553,4 +701,4 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__material_base__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__material_animation__ = __webpack_require__(7); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(51); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__material_animation__ = __webpack_require__(4); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__constants__ = __webpack_require__(53); | ||
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; }; | ||
@@ -694,154 +842,6 @@ | ||
/***/ 7: | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformStyleProperties", function() { return transformStyleProperties; }); | ||
/* harmony export (immutable) */ __webpack_exports__["getCorrectEventName"] = getCorrectEventName; | ||
/* harmony export (immutable) */ __webpack_exports__["getCorrectPropertyName"] = getCorrectPropertyName; | ||
/** | ||
* Copyright 2016 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* @typedef {{ | ||
* noPrefix: string, | ||
* webkitPrefix: string | ||
* }} | ||
*/ | ||
var VendorPropertyMapType = void 0; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var eventTypeMap = { | ||
'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' | ||
} | ||
}; | ||
/** @const {Object<string, !VendorPropertyMapType>} */ | ||
var cssPropertyMap = { | ||
'animation': { | ||
noPrefix: 'animation', | ||
webkitPrefix: '-webkit-animation' | ||
}, | ||
'transform': { | ||
noPrefix: 'transform', | ||
webkitPrefix: '-webkit-transform' | ||
}, | ||
'transition': { | ||
noPrefix: 'transition', | ||
webkitPrefix: '-webkit-transition' | ||
} | ||
}; | ||
/** | ||
* @param {!Object} windowObj | ||
* @return {boolean} | ||
*/ | ||
function hasProperShape(windowObj) { | ||
return windowObj['document'] !== undefined && typeof windowObj['document']['createElement'] === 'function'; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @return {boolean} | ||
*/ | ||
function eventFoundInMaps(eventType) { | ||
return eventType in eventTypeMap || eventType in cssPropertyMap; | ||
} | ||
/** | ||
* @param {string} eventType | ||
* @param {!Object<string, !VendorPropertyMapType>} map | ||
* @param {!Element} el | ||
* @return {string} | ||
*/ | ||
function getJavaScriptEventName(eventType, map, el) { | ||
return map[eventType].styleProperty in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
/** | ||
* Helper function to determine browser prefix for CSS3 animation events | ||
* and property names. | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getAnimationName(windowObj, eventType) { | ||
if (!hasProperShape(windowObj) || !eventFoundInMaps(eventType)) { | ||
return eventType; | ||
} | ||
var map = /** @type {!Object<string, !VendorPropertyMapType>} */eventType in eventTypeMap ? eventTypeMap : cssPropertyMap; | ||
var el = windowObj['document']['createElement']('div'); | ||
var eventName = ''; | ||
if (map === eventTypeMap) { | ||
eventName = getJavaScriptEventName(eventType, map, el); | ||
} else { | ||
eventName = map[eventType].noPrefix in el.style ? map[eventType].noPrefix : map[eventType].webkitPrefix; | ||
} | ||
return eventName; | ||
} | ||
// Public functions to access getAnimationName() for JavaScript events or CSS | ||
// property names. | ||
var transformStyleProperties = ['transform', 'WebkitTransform', 'MozTransform', 'OTransform', 'MSTransform']; | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectEventName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/** | ||
* @param {!Object} windowObj | ||
* @param {string} eventType | ||
* @return {string} | ||
*/ | ||
function getCorrectPropertyName(windowObj, eventType) { | ||
return getAnimationName(windowObj, eventType); | ||
} | ||
/***/ }), | ||
/***/ 81: | ||
/***/ 84: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(25); | ||
module.exports = __webpack_require__(26); | ||
@@ -848,0 +848,0 @@ |
@@ -6,2 +6,2 @@ /*! | ||
*/ | ||
!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.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/assets/",t(t.s=81)}({0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);n.d(t,"MDCFoundation",function(){return r.a});var o=n(2);n.d(t,"MDCComponent",function(){return o.a})},1:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var 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},2:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(1),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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},25: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(0),u=n(52);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)},51: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"}},52: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(0),u=n(7),s=n(51),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},7: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}),t.getCorrectEventName=u,t.getCorrectPropertyName=s;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"]},81:function(e,t,n){e.exports=n(25)}})}); | ||
!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.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/assets/",t(t.s=84)}({0:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);n.d(t,"MDCFoundation",function(){return r.a});var o=n(2);n.d(t,"MDCComponent",function(){return o.a})},1:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var 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},2:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(1),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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},26: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(0),u=n(54);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)},4: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}),t.getCorrectEventName=u,t.getCorrectPropertyName=s;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"]},53: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"}},54: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(0),u=n(4),s=n(53),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},84:function(e,t,n){e.exports=n(26)}})}); |
{ | ||
"name": "@material/linear-progress", | ||
"description": "The Material Components for the web linear progress indicator component", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ <!--docs: | ||
excerpt: "Material Design-styled linear progress indicators." | ||
iconId: linear-progress | ||
iconId: progress_linear | ||
path: /catalog/linear-progress/ | ||
@@ -15,3 +15,4 @@ --> | ||
<a class="article__asset-link" | ||
href="https://material-components-web.appspot.com/linear-progress.html"> | ||
href="https://material-components-web.appspot.com/linear-progress.html"> | ||
<img src="{{ site.rootpath }}/images/mdc_web_screenshots/linear-progress.png" width="586" alt="Linear progress screenshot"> | ||
</a> | ||
@@ -25,2 +26,19 @@ </div>--> | ||
<ul class="icon-list"> | ||
<li class="icon-list-item icon-list-item--spec"> | ||
<a href="https://material.io/guidelines/components/progress-activity.html">Guidelines</a> | ||
</li> | ||
<li class="icon-list-item icon-list-item--link"> | ||
<a href="https://material-components-web.appspot.com/linear-progress.html">Demo</a> | ||
</li> | ||
</ul> | ||
## Installation | ||
``` | ||
npm install --save @material/linear-progress | ||
``` | ||
## Usage | ||
```html | ||
@@ -39,10 +57,2 @@ <div role="progressbar" class="mdc-linear-progress"> | ||
## Installation | ||
``` | ||
npm install --save @material/linear-progress | ||
``` | ||
## Usage | ||
### CSS Modifiers | ||
@@ -49,0 +59,0 @@ |
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
89058
104
1