UNPKG

w-ui

Version:

A Vue.js 2.0 UI Toolkit for mobile

1 lines 15.5 kB
module.exports=function(n){function t(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:i})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=363)}({0:function(n,t){n.exports=function(n,t,e,i,a,r){var o,s=n=n||{},c=typeof n.default;"object"!==c&&"function"!==c||(o=n,s=n.default);var l="function"==typeof s?s.options:s;t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0),e&&(l.functional=!0),a&&(l._scopeId=a);var u;if(r?(u=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),i&&i.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(r)},l._ssrRegister=u):i&&(u=i),u){var A=l.functional,f=A?l.render:l.beforeCreate;A?(l._injectStyles=u,l.render=function(n,t){return u.call(t),f(n,t)}):l.beforeCreate=f?[].concat(f,u):[u]}return{esModule:o,exports:s,options:l}}},1:function(n,t,e){"use strict";function i(n,t){var e=n[1]||"",i=n[3];if(!i)return e;if(t&&"function"==typeof btoa){var r=a(i);return[e].concat(i.sources.map(function(n){return"/*# sourceURL="+i.sourceRoot+n+" */"})).concat([r]).join("\n")}return[e].join("\n")}function a(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var t=[];return t.toString=function(){return this.map(function(t){var e=i(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},t.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var i={},a=0;a<this.length;a++){var r=this[a][0];"number"==typeof r&&(i[r]=!0)}for(a=0;a<n.length;a++){var o=n[a];"number"==typeof o[0]&&i[o[0]]||(e&&!o[2]?o[2]=e:e&&(o[2]="("+o[2]+") and ("+e+")"),t.push(o))}},t}},2:function(n,t,e){function i(n){for(var t=0;t<n.length;t++){var e=n[t],i=u[e.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](e.parts[a]);for(;a<e.parts.length;a++)i.parts.push(r(e.parts[a]));i.parts.length>e.parts.length&&(i.parts.length=e.parts.length)}else{for(var o=[],a=0;a<e.parts.length;a++)o.push(r(e.parts[a]));u[e.id]={id:e.id,refs:1,parts:o}}}}function a(){var n=document.createElement("style");return n.type="text/css",A.appendChild(n),n}function r(n){var t,e,i=document.querySelector("style["+g+'~="'+n.id+'"]');if(i){if(d)return b;i.parentNode.removeChild(i)}if(h){var r=p++;i=f||(f=a()),t=o.bind(null,i,r,!1),e=o.bind(null,i,r,!0)}else i=a(),t=s.bind(null,i),e=function(){i.parentNode.removeChild(i)};return t(n),function(i){if(i){if(i.css===n.css&&i.media===n.media&&i.sourceMap===n.sourceMap)return;t(n=i)}else e()}}function o(n,t,e,i){var a=e?"":i.css;if(n.styleSheet)n.styleSheet.cssText=y(t,a);else{var r=document.createTextNode(a),o=n.childNodes;o[t]&&n.removeChild(o[t]),o.length?n.insertBefore(r,o[t]):n.appendChild(r)}}function s(n,t){var e=t.css,i=t.media,a=t.sourceMap;if(i&&n.setAttribute("media",i),m.ssrId&&n.setAttribute(g,t.id),a&&(e+="\n/*# sourceURL="+a.sources[0]+" */",e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}var c="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!c)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=e(3),u={},A=c&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,d=!1,b=function(){},m=null,g="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());n.exports=function(n,t,e,a){d=e,m=a||{};var r=l(n,t);return i(r),function(t){for(var e=[],a=0;a<r.length;a++){var o=r[a],s=u[o.id];s.refs--,e.push(s)}t?(r=l(n,t),i(r)):r=[];for(var a=0;a<e.length;a++){var s=e[a];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete u[s.id]}}}};var y=function(){var n=[];return function(t,e){return n[t]=e,n.filter(Boolean).join("\n")}}()},3:function(n,t,e){"use strict";n.exports=function(n,t){for(var e=[],i={},a=0;a<t.length;a++){var r=t[a],o=r[0],s=r[1],c=r[2],l=r[3],u={id:n+":"+a,css:s,media:c,sourceMap:l};i[o]?i[o].parts.push(u):e.push(i[o]={id:o,parts:[u]})}return e}},314:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"NoticeBar",data:function(){return{shouldAnimate:!1,duration:9,typeClass:null,actionClass:null}},props:{speed:{type:Number,validator:function(n){return n>=30},default:30},delay:{type:Number,default:2},type:{type:String,default:"notice"},action:{type:String,default:"close"},onDismiss:Function},computed:{styleObj:function(){return{animationDuration:this.duration+"s",animationDelay:this.delay+"s"}},noticeBarWrapElement:function(){return this.$refs.noticeBarWrap},noticeBarContentElement:function(){return this.$refs.noticeBarContent}},methods:{close:function(){this.onDismiss&&this.onDismiss(),this.$el.remove()}},created:function(){switch(this.type){case"notice":this.typeClass="icon-notice";break;case"warn":this.typeClass="icon-warn";break;case"hide":this.typeClass="";break;default:this.typeClass=""}switch(this.action){case"close":this.actionClass="icon-close";break;case"right":this.actionClass="icon-right";break;case"hide":this.actionClass="";break;default:this.actionClass=""}},mounted:function(){var n=this.noticeBarWrapElement.getBoundingClientRect(),t=this.noticeBarContentElement.getBoundingClientRect();t.width>n.width&&(this.shouldAnimate=!0),this.duration=.87*t.width/this.speed>>0},components:{}}},363:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Noticebar=void 0;var i=e(364),a=function(n){return n&&n.__esModule?n:{default:n}}(i);t.Noticebar=a.default},364:function(n,t,e){"use strict";function i(n){c||e(365)}Object.defineProperty(t,"__esModule",{value:!0});var a=e(314),r=e.n(a);for(var o in a)"default"!==o&&function(n){e.d(t,n,function(){return a[n]})}(o);var s=e(371),c=!1,l=e(0),u=i,A=l(r.a,s.a,!1,u,null,null);A.options.__file="packages/noticebar/src/noticebar.vue",t.default=A.exports},365:function(n,t,e){var i=e(366);"string"==typeof i&&(i=[[n.i,i,""]]),i.locals&&(n.exports=i.locals);e(2)("3ab61722",i,!1,{})},366:function(n,t,e){var i=e(6);t=n.exports=e(1)(!1),t.push([n.i,"\n.wui-noticebar {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n height: 35px;\n padding: 0 3px;\n background: #fff9db;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.wui-noticebar .wui-noticebar-wrap {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n overflow: hidden;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n.wui-noticebar .wui-noticebar-wrap .wui-noticebar-content {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n font-size: 14px;\n white-space: nowrap;\n opacity: 1;\n -webkit-transition: opacity ease 100ms;\n transition: opacity ease 100ms;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.wui-noticebar .wui-noticebar-wrap .wui-noticebar-content.animate {\n -webkit-animation-name: animations;\n animation-name: animations;\n /* 检索或设置对象动画在循环中是否反向运动 */\n -webkit-animation-fill-mode: none;\n animation-fill-mode: none;\n /* 检索或设置对象动画时间之外的状态 */\n -webkit-animation-play-state: running;\n animation-play-state: running;\n /* 检索或设置对象所应用的动画名称 */\n /* animation-duration: 9s; */\n /* 检索或设置对象动画的持续时间 */\n -webkit-animation-timing-function: linear;\n animation-timing-function: linear;\n /* 检索或设置对象动画的过渡类型 */\n /* animation-delay: 2s; */\n /* 检索或设置对象动画延迟的时间 */\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n /* 检索或设置对象动画的循环次数 */\n -webkit-animation-direction: normal;\n animation-direction: normal;\n}\n@-webkit-keyframes animations {\n0% {\n opacity: 1;\n -webkit-transform: translate(0);\n transform: translate(0);\n}\n10% {\n opacity: 1;\n -webkit-transform: translate(0);\n transform: translate(0);\n}\n97% {\n opacity: 1;\n -webkit-transform: translate(-110%);\n transform: translate(-110%);\n}\n97.000001% {\n display: none;\n visibility: hidden;\n opacity: 0;\n}\n98.9999999999% {\n -webkit-transform: translate(0);\n transform: translate(0);\n}\n99% {\n display: block;\n visibility: visible;\n opacity: 0;\n}\n100% {\n opacity: 1;\n}\n}\n@keyframes animations {\n0% {\n opacity: 1;\n -webkit-transform: translate(0);\n transform: translate(0);\n}\n10% {\n opacity: 1;\n -webkit-transform: translate(0);\n transform: translate(0);\n}\n97% {\n opacity: 1;\n -webkit-transform: translate(-110%);\n transform: translate(-110%);\n}\n97.000001% {\n display: none;\n visibility: hidden;\n opacity: 0;\n}\n98.9999999999% {\n -webkit-transform: translate(0);\n transform: translate(0);\n}\n99% {\n display: block;\n visibility: visible;\n opacity: 0;\n}\n100% {\n opacity: 1;\n}\n}\n.wui-noticebar .icon,\n.wui-noticebar .wui-action {\n top: 0;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n height: 35px;\n color: #ef4644;\n -webkit-box-flex: 0;\n -webkit-flex: 0 0 26px;\n -ms-flex: 0 0 26px;\n flex: 0 0 26px;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.wui-noticebar .icon {\n left: 0;\n}\n.wui-noticebar .wui-action {\n right: 0;\n}\n.wui-noticebar .icon-notice {\n background: url("+i(e(367))+") no-repeat center center / 15px 15px;\n}\n.wui-noticebar .icon-warn {\n background: url("+i(e(368))+") no-repeat center center / 15px 15px;\n}\n.wui-noticebar .icon-right {\n background: url("+i(e(369))+") no-repeat center center / 15px 15px;\n}\n.wui-noticebar .icon-close {\n background: url("+i(e(370))+") no-repeat center center / 15px 15px;\n}\n",""])},367:function(n,t){n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA2UExURUxpcexGRO9FQ+9FRO9FRO9FQ+5GQ+9GRO9FQ+9GQ+9FQ+9FRO9FQ+9FQ+9GQ+9FQ+9FQ+9GRF1tQD0AAAARdFJOUwAKjV8lmRZ7plG9Oc/mRm/1TGQrzgAAAi9JREFUWMOll1eChSAMRVGKFH3K/jc7FoKJoDIxn8o9AqkK0WLKxp/4YHNcrePr+00fHVfe2V0fe6bejPETwMT4CaDiN0A49VEz9C5pByZgTnrFBBzuj4sRPEBy/7hGIAfQ+UPvtwhmAMyEr54Cu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ADpSURBVEjH7dWxDYMwEIVhYIJUniBJnSp1kiITRNQgJO8/QgQ2cPfe3UmRUuLOlv0V+Aea5hj/HN3nRGuXl5hc80hnchaHejWrZ/JDbRgJyIPaDsS8ctunbQZiBia5kIAAgAgCkCAACAPQhAEowgQkYQKCcICdcICNcIGVcIFKBEAhkg8UIgIKEQCVmKK8Uwwsz4ADh5A4cAAiYgbuAbE8xDYgyi0kl6i34BPrNXrEdo0esXdgE6IDm5AhWYQKySJ0iUxAiUxgykhQykjwuwBETyW2+ivXc4kJPoOTEbg407055fPz+If9Mr5Mu3o5Kj2emwAAAABJRU5ErkJggg=="},371:function(n,t,e){"use strict";var i=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"wui-noticebar"},[n.typeClass?e("div",{staticClass:"icon",class:n.typeClass}):n._e(),n._v(" "),e("div",{ref:"noticeBarWrap",staticClass:"wui-noticebar-wrap"},[e("div",{ref:"noticeBarContent",staticClass:"wui-noticebar-content",class:{animate:n.shouldAnimate},style:n.styleObj},[n._t("default")],2)]),n._v(" "),n.actionClass?e("div",{staticClass:"wui-action",class:n.actionClass,on:{click:n.close}}):n._e()])},a=[];i._withStripped=!0;var r={render:i,staticRenderFns:a};t.a=r},6:function(n,t,e){"use strict";n.exports=function(n){return"string"!=typeof n?n:(/^['"].*['"]$/.test(n)&&(n=n.slice(1,-1)),/["'() \t\n]/.test(n)?'"'+n.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':n)}}});