diff --git a/docs/assets/css/index.90df3929.chunk.css b/docs/assets/css/index.90df3929.chunk.css deleted file mode 100644 index e88bb62..0000000 --- a/docs/assets/css/index.90df3929.chunk.css +++ /dev/null @@ -1 +0,0 @@ -@import url(https://fonts.googleapis.com/css?family=Oxygen&display=swap);.month-picker__container{width:400px;position:relative;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.1);border-radius:5px}.month-picker__container.year-picker{width:20rem}.month-picker{box-sizing:border-box;flex:1;width:auto;display:flex;flex-direction:row;flex-wrap:wrap;box-shadow:1px 2px 5px rgba(0,0,0,.1);font-family:sans-serif;border-radius:5px;overflow:hidden;display:grid;grid-template-columns:1fr 1fr 1fr}.month-picker__year{padding:.2rem;background-color:#fcfcfc;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.1)}.month-picker__year p{width:100%;font-weight:600;letter-spacing:1px;font-size:1.2rem;margin:1rem 0}.month-picker__year input{padding:0;font-weight:600;border-radius:5px 5px 0 0;outline:none;border:none;font-size:1.2rem;width:auto;text-align:center;box-sizing:border-box;width:100%;height:3.5rem;position:relative;z-index:1}.month-picker__year input:focus{border:1px solid #55b0f2}.month-picker__year button,.month-picker__year div,.month-picker__year p{text-align:center;flex:1}.month-picker__year button{background-color:#f4f4f4;position:absolute;width:5rem;height:2.75rem;font-size:2rem;border-radius:5px;outline:none;top:.5rem;border:1px solid #e8e8e8;z-index:2;color:#686868}.month-picker__year button:hover{background-color:rgba(0,0,0,.025)}.month-picker__year button:active{background-color:rgba(0,0,0,.04)}.month-picker__year button:first-child{left:10px}.month-picker__year button:last-child{right:10px}.month-picker__month{flex-basis:calc(33.333% - 10px);padding:.75rem .25rem;cursor:pointer;text-align:center;border:1px solid hsla(0,0%,96.1%,.75);transition:all .25s cubic-bezier(.165,.84,.44,1);background-color:#fefefe;user-select:none;position:relative}.month-picker__month:hover:after{display:block;content:"";position:absolute;width:95%;height:95%;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 10px rgba(0,0,0,.1);z-index:10}.month-picker__month.selected,.month-picker__month.selected-range-first,.month-picker__month.selected-range-second{background-color:#55b0f2;color:#fff;border-radius:5px;box-shadow:inset 0 0 3px #3490d2,0 2px 5px rgba(85,176,242,.2);text-shadow:0 2px 4px rgba(0,0,0,.25)}.month-picker__month.selected-range-first,.month-picker__month.selected-range-second{border-color:transparent}.month-picker__month.selected-range{background-color:#7eb9e2;color:#fff;border-color:transparent}.month-picker__month.inactive{background-color:#f0f0f0;color:#8a8a8a;cursor:not-allowed;box-shadow:none;text-shadow:none}.month-picker__month.inactive:hover{box-shadow:none}.month-picker--dark{background-color:#5f5f5f}.month-picker--dark .month-picker__year{background-color:#2f2f30}.month-picker--dark .month-picker__year input,.month-picker--dark .month-picker__year p{color:#ebebeb}.month-picker--dark .month-picker__year input{background-color:#5f5f5f}.month-picker--dark .month-picker__year button{background-color:#505050;color:#c9c9c9;border-color:#1e1e1e}.month-picker--dark .month-picker__year button:hover{background-color:rgba(0,0,0,.3)}.month-picker--dark .month-picker__year button:active{background-color:rgba(0,0,0,.6)}.month-picker--dark .month-picker__month{background-color:#2f2f30;border-color:hsla(0,0%,96.1%,.15);color:#c9c9c9}.month-picker--dark .month-picker__month.selected,.month-picker--dark .month-picker__month.selected-range-first,.month-picker--dark .month-picker__month.selected-range-second{background-color:#505050;box-shadow:inset 0 0 3px #505050,0 2px 5px #505050;color:#fff;border-color:#1d1b1b}.month-picker--dark .month-picker__month.selected-range{background-color:#636363;color:#fff;border-color:transparent}.month-picker--dark .month-picker__month:hover{box-shadow:0 0 6px rgba(0,0,0,.8);z-index:10}.month-picker--dark .month-picker__month.inactive{background-color:#3f3f3f;color:#8a8a8a;cursor:not-allowed;box-shadow:none;text-shadow:none}@media only screen and (max-width:768px){.month-picker__container{width:100%}}.month-picker-input-container[data-v-4455fe98]{position:relative;width:180px;min-width:140px}.month-picker-input[data-v-4455fe98]{padding:1em 1.5em;font-size:.85em;border-radius:5px;outline:none;border:1px solid rgba(0,0,0,.15);transition:all .35s cubic-bezier(.165,.84,.44,1)}.month-picker-input[data-v-4455fe98]:focus{border-color:rgba(0,0,0,.25);box-shadow:0 1px 2px rgba(0,0,0,.1)}.month-picker__container[data-v-4455fe98]{position:absolute;top:3.5em}:root{background-color:#efefef}.content[data-v-4d992784]{max-width:800px;margin:0 auto;font-family:Oxygen,sans-serif;padding-bottom:20rem}.content__grid[data-v-4d992784]{display:grid;grid-template-columns:.5fr 1fr;gap:4rem}.content h1[data-v-4d992784]{margin-bottom:2em;letter-spacing:2px;text-shadow:2px 4px 10px #e4e4e4}.github-corner:hover .octo-arm[data-v-4d992784]{animation:octocat-wave-4d992784 .56s ease-in-out}.form__container[data-v-4d992784]{padding:.25rem 0}.form__label[data-v-4d992784]{display:grid;grid-template-columns:3fr 2fr;width:20rem;padding:.25rem;border-radius:5px}.form__label input[type=checkbox][data-v-4d992784]{width:1rem;height:1rem}.form__label[data-v-4d992784]:hover{background-color:#f7f7f7}.form__label select[data-v-4d992784]{padding:0 2rem}pre[data-v-4d992784]{font-family:monospace;font-size:1rem;font-weight:600;color:#313131}@keyframes octocat-wave-4d992784{0%{transform:rotate(0deg)}20%{transform:rotate(-25deg)}40%{transform:rotate(10deg)}60%{transform:rotate(-25deg)}80%{transform:rotate(10deg)}to{transform:rotate(0deg)}}@media (max-width:500px){.github-corner:hover .octo-arm[data-v-4d992784]{animation:none}.github-corner .octo-arm[data-v-4d992784]{animation:octocat-wave-4d992784 .56s ease-in-out}} \ No newline at end of file diff --git a/docs/assets/js/chunk-vendors.69cce7e2.chunk.js b/docs/assets/js/chunk-vendors.69cce7e2.chunk.js deleted file mode 100644 index 2a010a5..0000000 --- a/docs/assets/js/chunk-vendors.69cce7e2.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see chunk-vendors.69cce7e2.chunk.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},,,,,function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return Kn}));var o=Object.freeze({}),i=Array.isArray;function a(t){return void 0===t||null===t}function s(t){return void 0!==t&&null!==t}function c(t){return!0===t}function u(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function l(t){return"function"===typeof t}function f(t){return null!==t&&"object"===typeof t}var d=Object.prototype.toString;function p(t){return"[object Object]"===d.call(t)}function v(t){return"[object RegExp]"===d.call(t)}function h(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function m(t){return s(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function y(t){return null==t?"":Array.isArray(t)||p(t)&&t.toString===d?JSON.stringify(t,null,2):String(t)}function _(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var $=Object.prototype.hasOwnProperty;function C(t,e){return $.call(t,e)}function x(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var k=/-(\w)/g,O=x((function(t){return t.replace(k,(function(t,e){return e?e.toUpperCase():""}))})),S=x((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),T=/\B([A-Z])/g,A=x((function(t){return t.replace(T,"-$1").toLowerCase()}));var I=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function E(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function j(t,e){for(var n in e)t[n]=e[n];return t}function P(t){for(var e={},n=0;n0,Y=X&&X.indexOf("edge/")>0;X&&X.indexOf("android");var tt=X&&/iphone|ipad|ipod|ios/.test(X);X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X);var et,nt=X&&X.match(/firefox\/(\d+)/),rt={}.watch,ot=!1;if(J)try{var it={};Object.defineProperty(it,"passive",{get:function(){ot=!0}}),window.addEventListener("test-passive",null,it)}catch(ni){}var at=function(){return void 0===et&&(et=!J&&"undefined"!==typeof t&&(t.process&&"server"===t.process.env.VUE_ENV)),et},st=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ct(t){return"function"===typeof t&&/native code/.test(t.toString())}var ut,lt="undefined"!==typeof Symbol&&ct(Symbol)&&"undefined"!==typeof Reflect&&ct(Reflect.ownKeys);ut="undefined"!==typeof Set&&ct(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ft=null;function dt(t){void 0===t&&(t=null),t||ft&&ft._scope.off(),ft=t,t&&t._scope.on()}var pt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),vt=function(t){void 0===t&&(t="");var e=new pt;return e.text=t,e.isComment=!0,e};function ht(t){return new pt(void 0,void 0,void 0,String(t))}function mt(t){var e=new pt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var yt=0,_t=function(){function t(){this.id=yt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){w(this.subs,t)},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){var e=this.subs.slice();for(var n=0,r=e.length;n0&&(Jt((o=t(o,"".concat(n||"","_").concat(r)))[0])&&Jt(f)&&(d[l]=ht(f.text+o[0].text),o.shift()),d.push.apply(d,o)):u(o)?Jt(f)?d[l]=ht(f.text+o):""!==o&&d.push(ht(o)):Jt(o)&&Jt(f)?d[l]=ht(f.text+o.text):(c(e._isVList)&&s(o.tag)&&a(o.key)&&s(n)&&(o.key="__vlist".concat(n,"_").concat(r,"__")),d.push(o)));return d}(t):void 0}function Jt(t){return s(t)&&s(t.text)&&!1===t.isComment}function Xt(t,e){var n,r,o,a,c=null;if(i(t)||"string"===typeof t)for(c=new Array(t.length),n=0,r=t.length;n0,s=e?!!e.$stable:!a,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&r&&r!==o&&c===r.$key&&!a&&!r.$hasNormal)return r;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=he(t,n,u,e[u]))}else i={};for(var l in n)l in i||(i[l]=me(n,l));return e&&Object.isExtensible(e)&&(e._normalized=i),K(i,"$stable",s),K(i,"$key",c),K(i,"$hasNormal",a),i}function he(t,e,n,r){var o=function(){var e=ft;dt(t);var n=arguments.length?r.apply(null,arguments):r({}),o=(n=n&&"object"===typeof n&&!i(n)?[n]:Gt(n))&&n[0];return dt(e),n&&(!o||1===n.length&&o.isComment&&!pe(o))?void 0:n};return r.proxy&&Object.defineProperty(e,n,{get:o,enumerable:!0,configurable:!0}),o}function me(t,e){return function(){return t[e]}}function ye(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};K(e,"_v_attr_proxy",!0),_e(e,t.$attrs,o,t,"$attrs")}return t._attrsProxy},get listeners(){t._listenersProxy||_e(t._listenersProxy={},t.$listeners,o,t,"$listeners");return t._listenersProxy},get slots(){return function(t){t._slotsProxy||be(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(t)},emit:I(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach((function(n){return Rt(t,e,n)}))}}}function _e(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,ge(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function ge(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function be(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}var we=null;function $e(t,e){return(t.__esModule||lt&&"Module"===t[Symbol.toStringTag])&&(t=t.default),f(t)?e.extend(t):t}function Ce(t){if(i(t))for(var e=0;edocument.createEvent("Event").timeStamp&&(cn=function(){return un.now()})}var ln=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function fn(){var t,e;for(sn=cn(),on=!0,tn.sort(ln),an=0;anan&&tn[n].id>t.id;)n--;tn.splice(n+1,0,t)}else tn.push(t);rn||(rn=!0,Fe(fn))}}function pn(t,e){if(t){for(var n=Object.create(null),r=lt?Reflect.ownKeys(t):Object.keys(t),o=0;o-1)if(i&&!C(o,"default"))a=!1;else if(""===a||a===A(t)){var c=Nn(String,o.type);(c<0||s-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!v(t)&&t.test(e)}function Xn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&Zn(n,i,r,o)}}}function Zn(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,w(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=zn++,e._isVue=!0,e.__v_skip=!0,e._scope=new Vt(!0),e._scope._vm=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=An(Wn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Ge(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,r=n&&n.context;t.$slots=fe(e._renderChildren,r),t.$scopedSlots=n?ve(t.$parent,n.data.scopedSlots,t.$slots):o,t._c=function(e,n,r,o){return xe(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return xe(t,e,n,r,o,!0)};var i=n&&n.data;Et(t,"$attrs",i&&i.attrs||o,null,!0),Et(t,"$listeners",e._parentListeners||o,null,!0)}(e),Ye(e,"beforeCreate",void 0,!1),function(t){var e=pn(t.$options.inject,t);e&&(St(!1),Object.keys(e).forEach((function(n){Et(t,n,e[n])})),St(!0))}(e),Fn(e),function(t){var e=t.$options.provide;if(e){var n=l(e)?e.call(t):e;if(!f(n))return;for(var r=Ht(t),o=lt?Reflect.ownKeys(n):Object.keys(n),i=0;i1?E(n):n;for(var r=E(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;iparseInt(this.max)&&Zn(t,e[0],e,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Zn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Xn(t,(function(t){return Jn(e,t)}))})),this.$watch("exclude",(function(e){Xn(t,(function(t){return!Jn(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Ce(t),n=e&&e.componentOptions;if(n){var r=Gn(n),o=this.include,i=this.exclude;if(o&&(!r||!Jn(o,r))||i&&r&&Jn(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,w(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:$n,extend:j,mergeOptions:An,defineReactive:Et},t.set=jt,t.delete=Pt,t.nextTick=Fe,t.observable=function(t){return It(t),t},t.options=Object.create(null),V.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,j(t.options.components,Yn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=E(arguments,1);return n.unshift(this),l(t.install)?t.install.apply(t,n):l(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=An(this.options,t),this}}(t),qn(t),function(t){V.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&p(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&l(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Kn),Object.defineProperty(Kn.prototype,"$isServer",{get:at}),Object.defineProperty(Kn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Kn,"FunctionalRenderContext",{value:vn}),Kn.version="2.7.10";var tr=g("style,class"),er=g("input,textarea,option,select,progress"),nr=g("contenteditable,draggable,spellcheck"),rr=g("events,caret,typing,plaintext-only"),or=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),ir="http://www.w3.org/1999/xlink",ar=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},sr=function(t){return ar(t)?t.slice(6,t.length):""},cr=function(t){return null==t||!1===t};function ur(t){for(var e=t.data,n=t,r=t;s(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=lr(r.data,e));for(;s(n=n.parent);)n&&n.data&&(e=lr(e,n.data));return function(t,e){if(s(t)||s(e))return fr(t,dr(e));return""}(e.staticClass,e.class)}function lr(t,e){return{staticClass:fr(t.staticClass,e.staticClass),class:s(t.class)?[t.class,e.class]:e.class}}function fr(t,e){return t?e?t+" "+e:t:e||""}function dr(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?Lr(t,e,n):or(e)?cr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):nr(e)?t.setAttribute(e,function(t,e){return cr(e)||"false"===e?"false":"contenteditable"===t&&rr(e)?e:"true"}(e,n)):ar(e)?cr(n)?t.removeAttributeNS(ir,sr(e)):t.setAttributeNS(ir,e,n):Lr(t,e,n)}function Lr(t,e,n){if(cr(n))t.removeAttribute(e);else{if(Z&&!Q&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Mr={create:Dr,update:Dr};function Fr(t,e){var n=e.elm,r=e.data,o=t.data;if(!(a(r.staticClass)&&a(r.class)&&(a(o)||a(o.staticClass)&&a(o.class)))){var i=ur(e),c=n._transitionClasses;s(c)&&(i=fr(i,dr(c))),i!==n._prevClass&&(n.setAttribute("class",i),n._prevClass=i)}}var Rr,Ur={create:Fr,update:Fr};function Vr(t,e,n){var r=Rr;return function o(){var i=e.apply(null,arguments);null!==i&&zr(t,o,n,r)}}var Hr=Ie&&!(nt&&Number(nt[1])<=53);function Br(t,e,n,r){if(Hr){var o=sn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Rr.addEventListener(t,e,ot?{capture:n,passive:r}:n)}function zr(t,e,n,r){(r||Rr).removeEventListener(t,e._wrapper||e,n)}function Wr(t,e){if(!a(t.data.on)||!a(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Rr=e.elm||t.elm,function(t){if(s(t.__r)){var e=Z?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}s(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),Wt(n,r,Br,zr,Vr,e.context),Rr=void 0}}var Kr,qr={create:Wr,update:Wr,destroy:function(t){return Wr(t,Cr)}};function Gr(t,e){if(!a(t.data.domProps)||!a(e.data.domProps)){var n,r,o=e.elm,i=t.data.domProps||{},u=e.data.domProps||{};for(n in(s(u.__ob__)||c(u._v_attr_proxy))&&(u=e.data.domProps=j({},u)),i)n in u||(o[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===i[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var l=a(r)?"":String(r);Jr(o,l)&&(o.value=l)}else if("innerHTML"===n&&hr(o.tagName)&&a(o.innerHTML)){(Kr=Kr||document.createElement("div")).innerHTML="".concat(r,"");for(var f=Kr.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;f.firstChild;)o.appendChild(f.firstChild)}else if(r!==i[n])try{o[n]=r}catch(ni){}}}}function Jr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(ni){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(s(r)){if(r.number)return _(n)!==_(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Xr={create:Gr,update:Gr},Zr=x((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Qr(t){var e=Yr(t.style);return t.staticStyle?j(t.staticStyle,e):e}function Yr(t){return Array.isArray(t)?P(t):"string"===typeof t?Zr(t):t}var to,eo=/^--/,no=/\s*!important$/,ro=function(t,e,n){if(eo.test(e))t.style.setProperty(e,n);else if(no.test(n))t.style.setProperty(A(e),n.replace(no,""),"important");else{var r=io(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(co).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function lo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(co).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function fo(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&j(e,po(t.name||"v")),j(e,t),e}return"string"===typeof t?po(t):void 0}}var po=x((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),vo=J&&!Q,ho="transition",mo="transitionend",yo="animation",_o="animationend";vo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ho="WebkitTransition",mo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(yo="WebkitAnimation",_o="webkitAnimationEnd"));var go=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function bo(t){go((function(){go(t)}))}function wo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),uo(t,e))}function $o(t,e){t._transitionClasses&&w(t._transitionClasses,e),lo(t,e)}function Co(t,e,n){var r=ko(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s="transition"===o?mo:_o,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n="transition",l=a,f=i.length):"animation"===e?u>0&&(n="animation",l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:"transition"===n&&xo.test(r[ho+"Property"])}}function Oo(t,e){for(;t.length1}function jo(t,e){!0!==e.data.show&&To(e)}var Po=function(t){var e,n,r={},o=t.modules,l=t.nodeOps;for(e=0;ev?b(t,a(n[y+1])?null:n[y+1].elm,n,p,y,r):p>y&&$(e,f,v)}(f,h,y,n,u):s(y)?(s(t.text)&&l.setTextContent(f,""),b(f,null,y,0,y.length-1,n)):s(h)?$(h,0,h.length-1):s(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),s(v)&&s(p=v.hook)&&s(p=p.postpatch)&&p(t,e)}}}function O(t,e,n){if(c(n)&&s(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==i&&(a.selected=i);else if(M(Fo(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Mo(t,e){return e.every((function(e){return!M(e,t)}))}function Fo(t){return"_value"in t?t._value:t.value}function Ro(t){t.target.composing=!0}function Uo(t){t.target.composing&&(t.target.composing=!1,Vo(t.target,"input"))}function Vo(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Ho(t){return!t.componentInstance||t.data&&t.data.transition?t:Ho(t.componentInstance._vnode)}var Bo={model:Do,show:{bind:function(t,e,n){var r=e.value,o=(n=Ho(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,To(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!==!e.oldValue&&((n=Ho(n)).data&&n.data.transition?(n.data.show=!0,r?To(n,(function(){t.style.display=t.__vOriginalDisplay})):Ao(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},zo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Wo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Wo(Ce(e.children)):t}function Ko(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[O(r)]=o[r];return e}function qo(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Go=function(t){return t.tag||pe(t)},Jo=function(t){return"show"===t.name},Xo={name:"transition",props:zo,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Go)).length){0;var r=this.mode;0;var o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var i=Wo(o);if(!i)return o;if(this._leaving)return qo(t,o);var a="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?a+"comment":a+i.tag:u(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=Ko(this),c=this._vnode,l=Wo(c);if(i.data.directives&&i.data.directives.some(Jo)&&(i.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(i,l)&&!pe(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=j({},s);if("out-in"===r)return this._leaving=!0,Kt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),qo(t,o);if("in-out"===r){if(pe(i))return c;var d,p=function(){d()};Kt(s,"afterEnter",p),Kt(s,"enterCancelled",p),Kt(f,"delayLeave",(function(t){d=t}))}}return o}}},Zo=j({tag:String,moveClass:String},zo);function Qo(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Yo(t){t.data.newPos=t.elm.getBoundingClientRect()}function ti(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}delete Zo.mode;var ei={Transition:Xo,TransitionGroup:{props:Zo,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Xe(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Ko(this),s=0;s-1?yr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:yr[t]=/HTMLUnknownElement/.test(e.toString())},j(Kn.options.directives,Bo),j(Kn.options.components,ei),Kn.prototype.__patch__=J?Po:D,Kn.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=vt),Ye(t,"beforeMount"),r=function(){t._update(t._render(),n)},new ze(t,r,D,{before:function(){t._isMounted&&!t._isDestroyed&&Ye(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(13),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(1))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,o=1,i={},a=!1,s=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){l(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"===typeof n.data&&0===n.data.indexOf(e)&&l(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),r=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){l(t.data)},r=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;r=function(e){var n=s.createElement("script");n.onreadystatechange=function(){l(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():r=function(t){setTimeout(l,0,t)},c.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;ne.length)&&(t=e.length);for(var a=0,n=new Array(t);ae.length)&&(t=e.length);for(var a=0,n=new Array(t);a1&&void 0!==arguments[1]&&arguments[1];if(!this.isInactive(e)){if(this.range)return this.selectMonthRange(e,t);var a=this.currentMonthIndex===e;if(this.clearable&&a)return this.currentMonthIndex=null,void this.$emit("clear");this.isAlreadySelected||(this.currentMonthIndex=e,this.onChange(),t&&this.$emit("input",this.date))}},selectMonthRange:function(e,t){if(null!==this.firstRangeMonthIndex)return null!==this.firstRangeMonthIndex&&null!==this.secondRangeMonthIndex?(this.firstRangeMonthIndex=e,void(this.secondRangeMonthIndex=null)):e>=this.firstRangeMonthIndex?(this.secondRangeMonthIndex=e,this.onChange(),void(t&&this.$emit("input",this.date))):void(this.firstRangeMonthIndex=e);this.firstRangeMonthIndex=e},setDefaultMonthRange:function(){if(null!==this.defaultMonthRange&&2===this.defaultMonthRange.length){var e=u(this.defaultMonthRange,2),t=e[0],a=e[1];a<=t||(this.firstRangeMonthIndex=t,this.secondRangeMonthIndex=a)}},changeYear:function(e){console.log(this.year),this.year+=e,this.isInactive(e)||(this.onChange(),this.$emit("change-year",this.year))},isInactive:function(e){var t=e;if(null===this.minDate&&null===this.maxDate)return!1;Number.isInteger(t)&&(t=this.monthsByLang[t]);var a=this.monthsByLang.indexOf(t)+1,n=new Date("".concat(this.year,"/").concat(a,"/01")),r=function(e){return null!==e&&e instanceof Date};return!!(r(this.minDate)&&nthis.maxDate)}}},d=(a(8),a(0)),m=Object(d.a)(h,(function(){var e,t=this,a=t._self._c;return a("div",{staticClass:"month-picker__container",class:(e={},i(e,"month-picker--".concat(t.variant),!0),i(e,"year-picker",t.yearOnly),e)},[t.showYear?a("div",{staticClass:"month-picker__year"},[a("button",{attrs:{type:"button"},on:{click:function(e){return t.changeYear(-1)}}},[t._v("\u2039")]),t._v(" "),t.editableYear?a("input",{directives:[{name:"model",rawName:"v-model.number",value:t.year,expression:"year",modifiers:{number:!0}}],attrs:{type:"text"},domProps:{value:t.year},on:{change:function(e){return t.onChange()},input:function(e){e.target.composing||(t.year=t._n(e.target.value))},blur:function(e){return t.$forceUpdate()}}}):a("p",[t._v("\n "+t._s(t.year)+"\n ")]),t._v(" "),a("button",{attrs:{type:"button"},on:{click:function(e){return t.changeYear(1)}}},[t._v("\u203a")])]):t._e(),t._v(" "),t.yearOnly?t._e():a("div",{staticClass:"month-picker"},t._l(t.monthsByLang,(function(e,n){return a("div",{key:e,staticClass:"month-picker__month",class:{inactive:t.isInactive(e),clearable:t.clearable,selected:t.highlightExactDate&&!t.range&&t.showYear&&t.currentMonthIndex===n&&t.year===t.selectedYear||!t.range&&!t.showYear&&t.currentMonthIndex==n||!t.highlightExactDate&&!t.range&&t.currentMonthIndex===n},on:{click:function(e){return t.selectMonth(n,!0)}}},[t._v("\n "+t._s(e)+"\n ")])})),0)])}),[],!1,null,null,null).exports,g={name:"MonthPickerInput",directives:{clickOutside:{bind:function(e,t,a){e.event=function(n){e===n.target||e.contains(n.target)||a.context[t.expression](n)},document.body.addEventListener("click",e.event)},unbind:function(e){document.body.removeEventListener("click",e.event)},beforeMount:function(e,t){e.clickOutsideEvent=function(a){e==a.target||e.contains(a.target)||t.value()},document.addEventListener("click",e.clickOutsideEvent)},unmounted:function(e){document.removeEventListener("click",e.clickOutsideEvent)}}},components:{MonthPicker:m},mixins:[s],props:{placeholder:{type:String,default:null}},emits:["change","input"],data:function(){return{monthPickerVisible:!1,selectedDate:null}},watch:{defaultYear:{immediate:!0,handler:function(e){e&&this.inputPreFilled&&(this.selectedDate=this.dateFormat.replace("%n",this.monthsByLang[this.defaultMonth-1]).replace("%Y",e))}},defaultMonth:{immediate:!0,handler:function(e){e&&this.inputPreFilled&&(this.selectedDate=this.dateFormat.replace("%n",this.monthsByLang[e-1]).replace("%Y",this.defaultYear))}}},methods:{populateInput:function(e){this.range?this.selectedDate="".concat(e.rangeFromMonth," - ").concat(e.rangeToMonth,", ").concat(e.year):this.selectedDate=this.dateFormat.replace("%n",e.month).replace("%Y",e.year),this.monthPickerVisible=!1,this.$emit("input",e)},showMonthPicker:function(){this.monthPickerVisible=!this.monthPickerVisible},hide:function(){this.monthPickerVisible=!1},updateDate:function(e){this.range?this.selectedDate="".concat(e.rangeFromMonth," - ").concat(e.rangeToMonth,", ").concat(e.year):this.selectedDate=this.dateFormat.replace("%n",e.month).replace("%Y",e.year),this.$emit("change",e)}}},f=(a(9),{components:{MonthPicker:m,MonthPickerInput:Object(d.a)(g,(function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hide,expression:"hide"}],staticClass:"month-picker-input-container"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedDate,expression:"selectedDate"}],staticClass:"month-picker-input",attrs:{type:"text",placeholder:e.placeholder,readonly:""},domProps:{value:e.selectedDate},on:{click:function(t){return e.showMonthPicker()},input:function(t){t.target.composing||(e.selectedDate=t.target.value)}}}),e._v(" "),t("month-picker",{directives:[{name:"show",rawName:"v-show",value:e.monthPickerVisible,expression:"monthPickerVisible"}],attrs:{"default-year":e.defaultYear,"default-month":e.defaultMonth,lang:e.lang,months:e.months,"no-default":e.noDefault,"show-year":e.showYear,"highlight-exact-date":e.highlightExactDate,clearable:e.clearable,variant:e.variant,"editable-year":e.editableYear,"max-date":e.maxDate,"min-date":e.minDate,"year-only":e.yearOnly,range:e.range},on:{input:e.populateInput,change:e.updateDate}})],1)}),[],!1,null,"4455fe98",null).exports},data:function(){return{clearEmittedText:null,showYear:!0,isYearOnly:!1,isRange:!1,isMonthPickerVisible:!1,isClearable:!1,isEditableYear:!1,dateFormat:"%n, %Y",highlightExactDate:!1,maxDate:null,minDate:null,maxToday:null,variants:["default","dark"],selectedVariant:"default",selectedDate:null,selectedLang:"en",year:0,date:{from:null,to:null,month:null,year:null}}},computed:{languages:function(){return r}},methods:{showClearText:function(){var e=this;this.clearEmittedText="emitted",window.setTimeout((function(){e.clearEmittedText=null}),1e3)},showDate:function(e){this.date=e}}}),v=(a(10),a(11),Object(d.a)(f,(function(){var e=this,t=e._self._c;return t("div",[t("a",{staticClass:"github-corner",attrs:{href:"https://github.com/kleinrein/vue-month-picker"}},[t("svg",{staticStyle:{position:"absolute",top:"0",left:"0"},attrs:{xmlns:"http://www.w3.org/2000/svg",width:"80",height:"80",viewBox:"0 0 250 250",fill:"#151513"}},[t("path",{attrs:{fill:"#000",d:"M250 0L135 115h-15l-12 27L0 250V0z"}}),e._v(" "),t("path",{staticClass:"octo-arm",staticStyle:{"-webkit-transform-origin":"120px 144px","transform-origin":"120px 144px"},attrs:{fill:"#fff",d:"M122 109c15-9 9-19 9-19-3-7-2-11-2-11 1-7-3-2-3-2-4 5-2 11-2 11 3 10-5 15-9 16"}}),e._v(" "),t("path",{staticClass:"octo-body",attrs:{fill:"#fff",d:"M135 115s-4 2-5 0l-14-14c-3-2-6-3-8-3 8-11 15-24-2-41-5-5-10-7-16-7-1-2-3-7-12-11 0 0-5 3-7 16-4 2-8 5-12 9s-7 8-9 12c-14 4-17 9-17 9 4 8 9 11 11 11 0 6 2 11 7 16 16 16 30 10 41 2 0 3 1 7 5 11l12 11c1 2-1 6-1 6z"}})])]),e._v(" "),t("div",{staticClass:"content"},[t("h1",[e._v("vue-month-picker")]),e._v(" "),t("div",{staticClass:"content__grid"},[t("div",[t("h2",[e._v("Parameters")]),e._v(" "),t("div",{staticClass:"form__container"},[t("label",{staticClass:"form__label"},[e._v("\n show-year\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.showYear,expression:"showYear"}],staticClass:"form__input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.showYear)?e._i(e.showYear,null)>-1:e.showYear},on:{change:function(t){var a=e.showYear,n=t.target,r=!!n.checked;if(Array.isArray(a)){var i=e._i(a,null);n.checked?i<0&&(e.showYear=a.concat([null])):i>-1&&(e.showYear=a.slice(0,i).concat(a.slice(i+1)))}else e.showYear=r}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n clearable\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.isClearable,expression:"isClearable"}],staticClass:"form__input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.isClearable)?e._i(e.isClearable,null)>-1:e.isClearable},on:{change:function(t){var a=e.isClearable,n=t.target,r=!!n.checked;if(Array.isArray(a)){var i=e._i(a,null);n.checked?i<0&&(e.isClearable=a.concat([null])):i>-1&&(e.isClearable=a.slice(0,i).concat(a.slice(i+1)))}else e.isClearable=r}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n editable-year\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.isEditableYear,expression:"isEditableYear"}],staticClass:"form__input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.isEditableYear)?e._i(e.isEditableYear,null)>-1:e.isEditableYear},on:{change:function(t){var a=e.isEditableYear,n=t.target,r=!!n.checked;if(Array.isArray(a)){var i=e._i(a,null);n.checked?i<0&&(e.isEditableYear=a.concat([null])):i>-1&&(e.isEditableYear=a.slice(0,i).concat(a.slice(i+1)))}else e.isEditableYear=r}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n year-only\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.isYearOnly,expression:"isYearOnly"}],staticClass:"form__input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.isYearOnly)?e._i(e.isYearOnly,null)>-1:e.isYearOnly},on:{change:function(t){var a=e.isYearOnly,n=t.target,r=!!n.checked;if(Array.isArray(a)){var i=e._i(a,null);n.checked?i<0&&(e.isYearOnly=a.concat([null])):i>-1&&(e.isYearOnly=a.slice(0,i).concat(a.slice(i+1)))}else e.isYearOnly=r}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n range\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.isRange,expression:"isRange"}],staticClass:"form__input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.isRange)?e._i(e.isRange,null)>-1:e.isRange},on:{change:function(t){var a=e.isRange,n=t.target,r=!!n.checked;if(Array.isArray(a)){var i=e._i(a,null);n.checked?i<0&&(e.isRange=a.concat([null])):i>-1&&(e.isRange=a.slice(0,i).concat(a.slice(i+1)))}else e.isRange=r}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n max date\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.maxDate,expression:"maxDate"}],staticClass:"form__input",attrs:{type:"date"},domProps:{value:e.maxDate},on:{input:function(t){t.target.composing||(e.maxDate=t.target.value)}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n min date\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.minDate,expression:"minDate"}],staticClass:"form__input",attrs:{type:"date"},domProps:{value:e.minDate},on:{input:function(t){t.target.composing||(e.minDate=t.target.value)}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n max today\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.maxToday,expression:"maxToday"}],staticClass:"form__input",attrs:{type:"date"},domProps:{value:e.maxToday},on:{input:function(t){t.target.composing||(e.maxToday=t.target.value)}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n highlight exact date\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.highlightExactDate,expression:"highlightExactDate"}],staticClass:"form__input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.highlightExactDate)?e._i(e.highlightExactDate,null)>-1:e.highlightExactDate},on:{change:function(t){var a=e.highlightExactDate,n=t.target,r=!!n.checked;if(Array.isArray(a)){var i=e._i(a,null);n.checked?i<0&&(e.highlightExactDate=a.concat([null])):i>-1&&(e.highlightExactDate=a.slice(0,i).concat(a.slice(i+1)))}else e.highlightExactDate=r}}})]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n date format\n "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.dateFormat,expression:"dateFormat"}],staticClass:"form__input",attrs:{type:"text"},domProps:{value:e.dateFormat},on:{input:function(t){t.target.composing||(e.dateFormat=t.target.value)}}})]),e._v(" "),t("br"),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n variant\n "),t("div",e._l(e.variants,(function(a){return t("div",{key:"variant-".concat(a)},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedVariant,expression:"selectedVariant"}],attrs:{id:a,type:"radio",name:"variant"},domProps:{value:a,checked:e._q(e.selectedVariant,a)},on:{change:function(t){e.selectedVariant=a}}}),e._v(" "),t("label",{attrs:{for:a}},[e._v(e._s(a))])])})),0)]),e._v(" "),t("label",{staticClass:"form__label"},[e._v("\n lang\n "),t("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedLang,expression:"selectedLang"}],staticClass:"form__input",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.selectedLang=t.target.multiple?a:a[0]}}},e._l(e.languages,(function(a,n){return t("option",{key:"language-".concat(n),domProps:{value:n}},[e._v("\n "+e._s(n)+"\n ")])})),0)])]),e._v(" "),t("h3",[e._v("Inline")]),e._v(" "),t("strong",[e._v("@change: string date")]),e._v(" "),t("div",[t("pre",[e._v(e._s(e.date))])])]),e._v(" "),t("div",[t("strong",[e._v("\n @clear\n "),t("em",[e._v(e._s(e.clearEmittedText))])]),e._v(" "),t("br"),e._v(" "),t("br"),e._v(" "),t("month-picker",{attrs:{lang:e.selectedLang,clearable:e.isClearable,"editable-year":e.isEditableYear,variant:e.selectedVariant,"show-year":e.showYear,"highlight-exact-date":e.highlightExactDate,"max-date":null!==e.maxDate?new Date(e.maxDate):null,"min-date":null!==e.minDate?new Date(e.minDate):null,"year-only":e.isYearOnly,range:e.isRange,"default-month-range":[2,4]},on:{change:e.showDate,"change-year":function(t){return e.year=t},clear:e.showClearText}}),e._v(" "),t("br"),e._v(" "),t("br"),e._v(" "),t("h3",[e._v("Input")]),e._v(" "),t("month-picker-input",{attrs:{lang:e.selectedLang,clearable:e.isClearable,"editable-year":e.isEditableYear,variant:e.selectedVariant,"show-year":e.showYear,"max-date":null!==e.maxDate?new Date(e.maxDate):null,"min-date":null!==e.minDate?new Date(e.minDate):null,"year-only":e.isYearOnly,"default-month":8,"date-format":e.dateFormat,"default-year":2020,"input-pre-filled":!0,range:e.isRange},on:{change:e.showDate}})],1)])])])}),[],!1,null,"4d992784",null).exports);new n.a({el:"#app",render:function(e){return e(v)}})}],[[7,2,0]]]); \ No newline at end of file diff --git a/docs/assets/js/runtime~index.647a2504.js b/docs/assets/js/runtime~index.647a2504.js deleted file mode 100644 index 0b0159b..0000000 --- a/docs/assets/js/runtime~index.647a2504.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c - - - - - - vue-month-picker - - - - - -
- - - - - diff --git a/example/App.vue b/example/App.vue deleted file mode 100644 index e89e99d..0000000 --- a/example/App.vue +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - diff --git a/example/index.js b/example/index.js deleted file mode 100644 index 13e507e..0000000 --- a/example/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from 'vue' -import App from './App.vue' - -new Vue({ - el: '#app', - render: (h) => h(App), -}) diff --git a/index.html b/index.html new file mode 100644 index 0000000..399963d --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite + Vue + TS + + +
+ + + diff --git a/package.json b/package.json index cd8499e..87e866a 100644 --- a/package.json +++ b/package.json @@ -1,39 +1,20 @@ { - "name": "vue-month-picker", - "version": "1.7.1", - "main": "src/index.js", - "description": "A simple and elegant month picker for Vue", + "name": "vue-month-picker-v2", + "private": true, + "version": "0.0.0", + "type": "module", "scripts": { - "build": "poi --prod", - "dev": "poi --serve" + "dev": "vite", + "build": "vue-tsc && vite build", + "preview": "vite preview" }, - "homepage": "https://github.com/kleinrein/vue-month-picker", - "keywords": [ - "vue", - "month", - "year", - "picker" - ], - "author": { - "name": "Andreas Rein", - "email": "rein@live.no", - "url": "https://www.andreasrein.net/" + "dependencies": { + "vue": "^3.4.21" }, - "repository": { - "type": "git", - "url": "git+https://github.com/kleinrein/vue-month-picker.git" - }, - "license": "MIT", "devDependencies": { - "@vue/eslint-config-prettier": "^6.0.0", - "eslint": "^7.7.0", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-vue": "^7.0.0-beta.2", - "poi": "^12.10.3", - "vue": "^2.6.10", - "vue-template-compiler": "^2.6.10", - "@poi/plugin-eslint": "^12.1.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.22.0" + "@vitejs/plugin-vue": "^5.0.4", + "typescript": "^5.2.2", + "vite": "^5.2.0", + "vue-tsc": "^2.0.6" } } diff --git a/poi.config.js b/poi.config.js deleted file mode 100644 index fdc3881..0000000 --- a/poi.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - entry: 'example/index', - plugins: [ - { - resolve: '@poi/plugin-eslint', - }, - ], -} diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..7babcae --- /dev/null +++ b/src/App.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/MonthPicker.vue b/src/MonthPicker.vue deleted file mode 100644 index c4228e7..0000000 --- a/src/MonthPicker.vue +++ /dev/null @@ -1,554 +0,0 @@ - - - - - diff --git a/src/MonthPickerInput.vue b/src/MonthPickerInput.vue deleted file mode 100644 index 9383ae6..0000000 --- a/src/MonthPickerInput.vue +++ /dev/null @@ -1,171 +0,0 @@ - - - - diff --git a/src/assets/vue.svg b/src/assets/vue.svg new file mode 100644 index 0000000..770e9d3 --- /dev/null +++ b/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/MonthPicker.vue b/src/components/MonthPicker.vue new file mode 100644 index 0000000..d7fa34f --- /dev/null +++ b/src/components/MonthPicker.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/src/components/MonthPickerInput.vue b/src/components/MonthPickerInput.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 2f3187e..0000000 --- a/src/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import MonthPicker from './MonthPicker.vue' -import MonthPickerInput from './MonthPickerInput.vue' - -function plugin (Vue) { - Vue.component('month-picker', MonthPicker) - Vue.component('month-picker-input', MonthPickerInput) -} - -// Install by default if using the script tag -if (typeof window !== 'undefined' && window.Vue) { - window.Vue.use(plugin) -} - -export default plugin - -export { - MonthPicker, - MonthPickerInput -} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/languages.js b/src/languages.ts similarity index 100% rename from src/languages.js rename to src/languages.ts diff --git a/src/main.js b/src/main.js deleted file mode 100644 index 2f3187e..0000000 --- a/src/main.js +++ /dev/null @@ -1,19 +0,0 @@ -import MonthPicker from './MonthPicker.vue' -import MonthPickerInput from './MonthPickerInput.vue' - -function plugin (Vue) { - Vue.component('month-picker', MonthPicker) - Vue.component('month-picker-input', MonthPickerInput) -} - -// Install by default if using the script tag -if (typeof window !== 'undefined' && window.Vue) { - window.Vue.use(plugin) -} - -export default plugin - -export { - MonthPicker, - MonthPickerInput -} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..fe5bae3 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue' +import App from './App.vue' +import './style.css' + +createApp(App).mount('#app') diff --git a/src/month-picker.js b/src/month-picker.ts similarity index 85% rename from src/month-picker.js rename to src/month-picker.ts index cca492a..c18638e 100644 --- a/src/month-picker.js +++ b/src/month-picker.ts @@ -1,11 +1,11 @@ import languages from './languages' -export default { - props: { +export function monthPickerProps() { + return { lang: { type: String, default: 'en', - validator: function (value) { + validator: function (value: string) { return Object.keys(languages).some((l) => Object.is(l, value)) }, required: false, @@ -13,7 +13,7 @@ export default { months: { type: Array, default: null, - validator: function (value) { + validator: function (value: string) { return value.length === 12 }, required: false, @@ -76,7 +76,7 @@ export default { type: Array, default: null, required: false, - validator: function (value) { + validator: function (value: string) { if (value === null || value.length !== 2) { return false } @@ -93,7 +93,7 @@ export default { type: String, default: 'default', required: false, - validator: function (value) { + validator: function (value: string) { return ['default', 'dark'].includes(value) }, }, @@ -106,13 +106,5 @@ export default { default: false, required: false, }, - }, - computed: { - monthsByLang: function () { - if (this.months !== null && this.months.length === 12) { - return this.months - } - return languages[this.lang] - }, - }, + } } diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..bb131d6 --- /dev/null +++ b/src/style.css @@ -0,0 +1,79 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..9e03e60 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 0000000..97ede7e --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["vite.config.ts"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..05c1740 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue()], +})