UNPKG

material-components-vue

Version:
2 lines 10.1 kB
/*! For license information please see notched-outline.min.js.LICENSE */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return n={},t.m=e={0:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return s}));var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}},16:function(t,e,n){"use strict";var o=n(0),r=n(3),i={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"};n.d(e,"a",(function(){return u}));var a,u=(a=r.a,o.b(s,a),Object.defineProperty(s,"cssClasses",{get:function(){return i},enumerable:!0,configurable:!0}),Object.defineProperty(s,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),s.prototype.init=function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},s.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},s.prototype.getWidth=function(){return this.adapter_.getWidth()},s.prototype.shake=function(t){var e=s.cssClasses.LABEL_SHAKE;t?this.adapter_.addClass(e):this.adapter_.removeClass(e)},s.prototype.float=function(t){var e=s.cssClasses,n=e.LABEL_FLOAT_ABOVE,o=e.LABEL_SHAKE;t?this.adapter_.addClass(n):(this.adapter_.removeClass(n),this.adapter_.removeClass(o))},s.prototype.handleShakeAnimationEnd_=function(){var t=s.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(t)},s);function s(t){var e=a.call(this,o.a({},s.defaultAdapter,t))||this;return e.shakeAnimationEndHandler_=function(){return e.handleShakeAnimationEnd_()},e}},2:function(t,e,n){"use strict";var o={inheritAttrs:!1},r=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],i={props:{theming:{type:String,default:""}},mounted:function(){-1<r.indexOf(this.theming)&&this.$el.classList.add("mdc-theme--"+this.theming)}};n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i}))},22:function(t,e,n){"use strict";var o,r=n(0),i=n(5),a=n(16),u={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},s={NOTCH_ELEMENT_PADDING:8},c={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},d=n(3),l=(o=d.a,r.b(f,o),Object.defineProperty(f,"strings",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(f,"cssClasses",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(f,"numbers",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(f,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),f.prototype.notch=function(t){var e=f.cssClasses.OUTLINE_NOTCHED;0<t&&(t+=s.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(e)},f.prototype.closeNotch=function(){var t=f.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.removeNotchWidthProperty()},f);function f(t){return o.call(this,r.a({},f.defaultAdapter,t))||this}n.d(e,"a",(function(){return h}));var p,h=(p=i.a,r.b(y,p),y.attachTo=function(t){return new y(t)},y.prototype.initialSyncWithDOM=function(){this.notchElement_=this.root_.querySelector(u.NOTCH_ELEMENT_SELECTOR);var t=this.root_.querySelector("."+a.a.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root_.classList.add(c.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root_.classList.add(c.NO_LABEL)},y.prototype.notch=function(t){this.foundation_.notch(t)},y.prototype.closeNotch=function(){this.foundation_.closeNotch()},y.prototype.getDefaultFoundation=function(){var t=this;return new l({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},setNotchWidthProperty:function(e){return t.notchElement_.style.setProperty("width",e+"px")},removeNotchWidthProperty:function(){return t.notchElement_.style.removeProperty("width")}})},y);function y(){return null!==p&&p.apply(this,arguments)||this}},3:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=(Object.defineProperty(r,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),r.prototype.init=function(){},r.prototype.destroy=function(){},r);function r(t){void 0===t&&(t={}),this.adapter_=t}},4:function(t,e,n){"use strict";function o(t,e,n,o,r,i,a,u){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),a?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=s):r&&(s=u?function(){r.call(this,this.$root.$options.shadowRoot)}:r),s)if(c.functional){c._injectStyles=s;var d=c.render;c.render=function(t,e){return s.call(e),d(t,e)}}else{var l=c.beforeCreate;c.beforeCreate=l?[].concat(l,s):[s]}return{exports:t,options:c}}n.d(e,"a",(function(){return o}))},45:function(t,e,n){},5:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var o=n(0),r=n(3),i=(a.attachTo=function(t){return new a(t,new r.a({}))},a.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},a.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},a.prototype.initialSyncWithDOM=function(){},a.prototype.destroy=function(){this.foundation_.destroy()},a.prototype.listen=function(t,e,n){this.root_.addEventListener(t,e,n)},a.prototype.unlisten=function(t,e,n){this.root_.removeEventListener(t,e,n)},a.prototype.emit=function(t,e,n){var o;void 0===n&&(n=!1),"function"==typeof CustomEvent?o=new CustomEvent(t,{bubbles:n,detail:e}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(o)},a);function a(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];this.root_=t,this.initialize.apply(this,o.d(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}},7:function(t,e,n){"use strict";function o(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}n.d(e,"a",(function(){return o}))},83:function(t,e,n){"use strict";n.r(e);var o=n(22),r=n(2),i={mixins:[r.a,r.b],data:function(){return{mdcNotchedOutline:void 0}},mounted:function(){this.mdcNotchedOutline=o.a.attachTo(this.$el)},beforeDestroy:function(){void 0!==this.mdcNotchedOutline&&this.mdcNotchedOutline.destroy()}},a=n(4),u=Object(a.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mdc-notched-outline"},[n("div",{staticClass:"mdc-notched-outline__leading"}),t._v(" "),n("div",{staticClass:"mdc-notched-outline__notch"},[t._t("default")],2),t._v(" "),n("div",{staticClass:"mdc-notched-outline__trailing"})])}),[],!1,null,null,null).exports,s=(n(45),n(7)),c={install:function(t){t.component("m-notched-outline",u)}};e.default=c,Object(s.a)(c)}},t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(t){return e[t]}.bind(null,r));return o},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(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=83);function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e,n}));