@archpublicwebsite/rangepicker 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Rangepicker.vue.d.ts.map +1 -1
- package/dist/RangepickerConstraints.stories.js +1 -1
- package/dist/RangepickerFormatting.stories.js +1 -1
- package/dist/RangepickerInput.stories.d.ts +5 -1
- package/dist/RangepickerInput.stories.d.ts.map +1 -1
- package/dist/RangepickerInput.stories.js +48 -7
- package/dist/RangepickerModes.stories.js +1 -1
- package/dist/RangepickerSpecialDates.stories.js +1 -1
- package/dist/RangepickerTheming.stories.js +1 -1
- package/dist/rangepicker.js +15 -14
- package/dist/rangepicker.js.map +1 -1
- package/dist/rangepicker.umd.cjs +1 -1
- package/dist/rangepicker.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/rangepicker.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@vueuse/core"),require("dayjs")):"function"==typeof define&&define.amd?define(["exports","vue","@vueuse/core","dayjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Rangepicker={},e.Vue,e.VueUse,e.dayjs)}(this,function(e,t,a,o){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r={exports:{}};r.exports=function(e,t,a){t.prototype.isBetween=function(e,t,o,n){var r=a(e),l=a(t),i="("===(n=n||"()")[0],s=")"===n[1];return(i?this.isAfter(r,o):!this.isBefore(r,o))&&(s?this.isBefore(l,o):!this.isAfter(l,o))||(i?this.isBefore(r,o):!this.isAfter(r,o))&&(s?this.isAfter(l,o):!this.isBefore(l,o))}};const l=n(r.exports);var i={exports:{}};!function(e){e.exports=function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}(i);const s=n(i.exports);var u={exports:{}};!function(e){e.exports=function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}}(u);const d=n(u.exports);var c={exports:{}};!function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,o=/\d\d/,n=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,l={},i=function(e){return(e=+e)+(e>68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),a=60*t[1]+(+t[2]||0);return 0===a?0:"+"===t[0]?-a:a}(e)}],d=function(e){var t=l[e];return t&&(t.indexOf?t:t.s.concat(t.f))},c=function(e,t){var a,o=l.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){a=n>12;break}}else a=e===(t?"pm":"PM");return a},m={A:[r,function(e){this.afternoon=c(e,!1)}],a:[r,function(e){this.afternoon=c(e,!0)}],Q:[a,function(e){this.month=3*(e-1)+1}],S:[a,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,s("seconds")],ss:[n,s("seconds")],m:[n,s("minutes")],mm:[n,s("minutes")],H:[n,s("hours")],h:[n,s("hours")],HH:[n,s("hours")],hh:[n,s("hours")],D:[n,s("day")],DD:[o,s("day")],Do:[r,function(e){var t=l.ordinal,a=e.match(/\d+/);if(this.day=a[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,s("week")],ww:[o,s("week")],M:[n,s("month")],MM:[o,s("month")],MMM:[r,function(e){var t=d("months"),a=(d("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(a<1)throw new Error;this.month=a%12||a}],MMMM:[r,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[o,function(e){this.year=i(e)}],YYYY:[/\d{4}/,s("year")],Z:u,ZZ:u};function p(a){var o,n;o=a,n=l&&l.formats;for(var r=(a=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,a,o){var r=o&&o.toUpperCase();return a||n[o]||e[o]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,a){return t||a.slice(1)})})).match(t),i=r.length,s=0;s<i;s+=1){var u=r[s],d=m[u],c=d&&d[0],p=d&&d[1];r[s]=p?{regex:c,parser:p}:u.replace(/^\[|\]$/g,"")}return function(e){for(var t={},a=0,o=0;a<i;a+=1){var n=r[a];if("string"==typeof n)o+=n.length;else{var l=n.regex,s=n.parser,u=e.slice(o),d=l.exec(u)[0];s.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var a=e.hours;t?a<12&&(e.hours+=12):12===a&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,a){a.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(i=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,r=e.args;this.$u=o;var i=r[1];if("string"==typeof i){var s=!0===r[2],u=!0===r[3],d=s||u,c=r[2];u&&(c=r[2]),l=this.$locale(),!s&&c&&(l=a.Ls[c]),this.$d=function(e,t,a,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),r=n.year,l=n.month,i=n.day,s=n.hours,u=n.minutes,d=n.seconds,c=n.milliseconds,m=n.zone,f=n.week,v=new Date,h=i||(r||l?1:v.getDate()),y=r||v.getFullYear(),g=0;r&&!l||(g=l>0?l-1:v.getMonth());var k,b=s||0,D=u||0,w=d||0,x=c||0;return m?new Date(Date.UTC(y,g,h,b,D,w,x+60*m.offset*1e3)):a?new Date(Date.UTC(y,g,h,b,D,w,x)):(k=new Date(y,g,h,b,D,w,x),f&&(k=o(k).week(f).toDate()),k)}catch(M){return new Date("")}}(t,i,o,a),this.init(),c&&!0!==c&&(this.$L=this.locale(c).$L),d&&t!=this.format(i)&&(this.$d=new Date("")),l={}}else if(i instanceof Array)for(var m=i.length,f=1;f<=m;f+=1){r[1]=i[f-1];var v=a.apply(this,r);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}f===m&&(this.$d=new Date(""))}else n.call(this,e)}}}()}(c);const m=n(c.exports);function p(e,t=o()){const a=t.add(e,"month").startOf("month"),n=a.day(),r=a.daysInMonth(),l=a.subtract(1,"month").daysInMonth(),i=[];for(let o=n-1;o>=0;o--){const e=a.subtract(1,"month").date(l-o);i.push({date:e,isPrevMonth:!0,isCurrentMonth:!1,isNextMonth:!1})}for(let o=1;o<=r;o++){const e=a.date(o);i.push({date:e,isPrevMonth:!1,isCurrentMonth:!0,isNextMonth:!1})}const s=42-i.length;for(let o=1;o<=s;o++){const e=a.add(1,"month").date(o);i.push({date:e,isPrevMonth:!1,isCurrentMonth:!1,isNextMonth:!0})}return{month:a,days:i}}function f(e,t,a,n,r={}){const{startDate:l=null,endDate:i=null,minDate:s=null,maxDate:u=null,disabledDates:d=[],holidays:c=[]}=r,m=s&&e.isBefore(s,"day")||u&&e.isAfter(u,"day")||d.some(t=>t.isSame(e,"day")),p=c.some(t=>t.isSame(e,"day")),f=l&&e.isSame(l,"day")||i&&e.isSame(i,"day"),v=l&&i&&e.isAfter(l,"day")&&e.isBefore(i,"day"),h=e.isSame(o(),"day"),y=0===e.day()||6===e.day();return{date:e,isPrevMonth:t,isCurrentMonth:a,isNextMonth:n,isDisabled:m,isHoliday:p,isWeekend:y,isSelected:f,isInRange:v,isToday:h}}o.extend(l),o.extend(s),o.extend(d),o.extend(m);const v={key:0,class:"rangepicker-overlay"},h={class:"rangepicker-header"},y={class:"arch-flex arch-items-center arch-justify-between"},g={key:0,class:"arch-text-xs arch-font-medium arch-text-gray-500 arch-mb-1"},k={class:"arch-text-sm arch-font-semibold arch-text-gray-900"},b={key:0,class:"arch-text-xs arch-text-gray-500 arch-mt-1"},D={class:"rangepicker-body"},w={class:"rangepicker-month-grid"},x={class:"rangepicker-month-header"},M=["disabled"],B={key:1,class:"arch-w-8"},V={class:"rangepicker-month-title"},Y=["disabled"],C={key:3,class:"arch-w-8"},S={class:"rangepicker-weekdays"},E={class:"rangepicker-grid"},N=["disabled","aria-label","onClick","onMouseenter"],O={key:0,class:"arch-mt-4 arch-flex arch-items-center arch-justify-end arch-gap-2 arch-border-t arch-border-gray-200 arch-pt-4"},L=["disabled"],$={class:"arch-flex arch-items-center arch-gap-1"},A=(e,t)=>{const a=e.__vccOpts||e;for(const[o,n]of t)a[o]=n;return a},T=A(t.defineComponent({__name:"Rangepicker",props:{modelValue:{},isOpen:{type:Boolean,default:!1},variant:{default:"desktop"},minDate:{},maxDate:{},minDays:{},maxDays:{},close:{type:Boolean},valueOfMonths:{default:2},valueOfColumns:{default:2},disabledDates:{},holidays:{},format:{default:"YYYY-MM-DD"},delimiter:{default:" - "},placeholder:{},label:{},showTooltip:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},position:{default:"auto"},triggerElement:{},colorStyles:{},borderRadius:{default:"0.75rem"}},emits:["update:modelValue","update:isOpen","dateSelected","rangeSelected"],setup(e,{emit:n}){const r=e,l=n,i=a.useBreakpoints(a.breakpointsTailwind).smallerOrEqual("lg"),s=t.computed(()=>i.value?1:r.valueOfMonths);t.computed(()=>i.value?1:r.valueOfColumns);const u=t.ref(null),d=t.ref(!1),c=t.ref(null),m=t.ref(0),A=t.ref(r.isOpen),T=t.ref(null),R=t.ref(null),_=t.computed(()=>r.minDate?o(r.minDate):null),z=t.computed(()=>r.maxDate?o(r.maxDate):null),I=t.computed(()=>{var e;return(null==(e=r.disabledDates)?void 0:e.map(e=>o(e)))||[]}),P=t.computed(()=>{var e;return(null==(e=r.holidays)?void 0:e.map(e=>o(e)))||[]}),j=t.computed(()=>function(e="en",t="short"){const a=o().startOf("week"),n=[];for(let o=0;o<7;o++){const e=a.add(o,"day");n.push("short"===t?e.format("ddd"):e.format("dd"))}return n}("en","narrow")),F=t.computed(()=>"mobile"===r.variant?1:s.value),H=t.computed(()=>function(e,t=0,a={}){const o=[];for(let n=0;n<e;n++){const{month:e,days:r}=p(t+n),l=r.map(e=>f(e.date,e.isPrevMonth,e.isCurrentMonth,e.isNextMonth,a));o.push({month:e,days:l})}return o}(F.value,m.value,{startDate:T.value,endDate:R.value,minDate:_.value,maxDate:z.value,disabledDates:I.value,holidays:P.value})),U=t.computed(()=>T.value&&R.value?R.value.diff(T.value,"day"):0),Z=t.computed(()=>T.value||R.value?T.value&&!R.value?T.value.format(r.format):T.value&&R.value?`${T.value.format(r.format)}${r.delimiter}${R.value.format(r.format)}`:"":""),q=t.computed(()=>{if(!_.value)return!0;return o().add(m.value,"month").startOf("month").isAfter(_.value,"month")}),W=t.computed(()=>{if(!z.value)return!0;return o().add(m.value+F.value-1,"month").endOf("month").isBefore(z.value,"month")}),{width:X}=a.useWindowSize(),Q=t.ref({});function G(){"mobile"!==r.variant?t.nextTick(()=>{const e=function(e,t,a="auto"){if(!e||!t)return{left:0};const o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),r=window.innerHeight,l=window.innerWidth,i=o.top,s=r-o.bottom,u={left:o.left};return"auto"===a?s>=n.height||s>i?u.top=o.bottom+8:u.bottom=r-o.top+8:"top"===a?u.bottom=r-o.top+8:u.top=o.bottom+8,u.left+n.width>l&&(u.left=l-n.width-16),u.left<16&&(u.left=16),u}(r.triggerElement,u.value,r.position);Q.value={left:`${e.left}px`,...void 0!==e.top&&{top:`${e.top}px`},...void 0!==e.bottom&&{bottom:`${e.bottom}px`},...e.transform&&{transform:e.transform},"--border-radius-day":r.borderRadius}}):Q.value={"--border-radius-day":r.borderRadius}}const J=t.ref({}),K=t.computed(()=>{if(!c.value||!T.value)return"";const e=c.value.date.diff(T.value,"day");return e<=0?"":`${e} ${1===e?"night":"nights"}`}),ee=t.computed(()=>r.showTooltip&&c.value&&T.value&&!R.value&&c.value.date.isAfter(T.value,"day"));function te(e){const t=["rangepicker-day"];if(e.isCurrentMonth||t.push("rangepicker-day-other-month"),e.isDisabled&&t.push("rangepicker-day-disabled"),e.isToday&&t.push("rangepicker-day-today"),e.isWeekend&&!e.isSelected&&t.push("rangepicker-day-weekend"),e.isHoliday&&t.push("rangepicker-day-holiday"),e.isSelected&&(T.value&&R.value&&e.date.isSame(T.value,"day")&&e.date.isSame(R.value,"day")?t.push("rangepicker-day-selected-single"):T.value&&e.date.isSame(T.value,"day")?t.push("rangepicker-day-selected-start"):R.value&&e.date.isSame(R.value,"day")?t.push("rangepicker-day-selected-end"):t.push("rangepicker-day-selected")),e.isInRange&&t.push("rangepicker-day-in-range"),T.value&&!R.value&&c.value){const a=T.value,o=c.value.date;e.date.isAfter(a,"day")&&e.date.isBefore(o,"day")?t.push("rangepicker-day-hover-range"):e.date.isSame(o,"day")&&o.isAfter(a,"day")&&t.push("rangepicker-day-hover-end")}return t}function ae(e,t){c.value=e,r.showTooltip&&T.value&&!R.value&&function(e){const t=e.target.getBoundingClientRect();J.value={left:`${t.left+t.width/2}px`,top:t.top-10+"px",transform:"translateX(-50%) translateY(-100%)"}}(t)}function oe(){c.value=null}function ne(){q.value&&m.value--}function re(){W.value&&m.value++}function le(){d.value||(d.value=!0,setTimeout(()=>{A.value=!1,l("update:isOpen",!1),d.value=!1},200))}function ie(){T.value&&R.value&&l("update:modelValue",{startDate:T.value.format(r.format),endDate:R.value.format(r.format)}),le()}function se(){var e,t;(null==(e=r.modelValue)?void 0:e.startDate)?T.value=o(r.modelValue.startDate):T.value=null,(null==(t=r.modelValue)?void 0:t.endDate)?R.value=o(r.modelValue.endDate):R.value=null,le()}function ue(e){A.value&&"Escape"===e.key&&le()}return t.watch(()=>r.isOpen,e=>{A.value=e,e&&G()}),t.watch(()=>r.close,e=>{e&&le()}),t.watch(()=>r.modelValue,e=>{(null==e?void 0:e.startDate)?T.value=o(e.startDate):T.value=null,(null==e?void 0:e.endDate)?R.value=o(e.endDate):R.value=null},{immediate:!0,deep:!0}),t.watch([X,A],()=>{A.value&&G()}),a.onClickOutside(u,()=>{A.value&&"mobile"!==r.variant&&le()}),t.onMounted(()=>{document.addEventListener("keydown",ue),r.isOpen&&G()}),t.onUnmounted(()=>{document.removeEventListener("keydown",ue)}),(a,o)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"mobile"===e.variant?"slide-up":"fade"},{default:t.withCtx(()=>{var a;return[A.value||d.value?(t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",{class:"rangepicker-backdrop",onClick:le}),t.createElementVNode("div",{ref_key:"calendarRef",ref:u,class:t.normalizeClass(["rangepicker-container",["mobile"===e.variant?"rangepicker-mobile":""]]),style:t.normalizeStyle({...Q.value,...e.colorStyles,borderRadius:r.borderRadius})},[t.createElementVNode("div",h,[t.createElementVNode("div",y,[t.createElementVNode("div",null,[e.label?(t.openBlock(),t.createElementBlock("p",g,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),t.createElementVNode("p",k,t.toDisplayString(Z.value||e.placeholder||"Select dates"),1)]),U.value>0?(t.openBlock(),t.createElementBlock("p",b,t.toDisplayString(U.value)+" "+t.toDisplayString(1===U.value?"night":"nights"),1)):t.createCommentVNode("",!0)])]),t.createElementVNode("div",D,[t.createElementVNode("div",w,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(H.value,(a,n)=>(t.openBlock(),t.createElementBlock("div",{key:a.month.format("YYYY-MM"),class:"rangepicker-month"},[t.createElementVNode("div",x,["mobile"===e.variant||0===n?(t.openBlock(),t.createElementBlock("button",{key:0,class:"rangepicker-nav-button",disabled:!q.value,"aria-label":"Previous month",onClick:ne},[...o[0]||(o[0]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"arch-h-5 arch-w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)])],8,M)):(t.openBlock(),t.createElementBlock("div",B)),t.createElementVNode("span",V,t.toDisplayString(a.month.format("MMMM YYYY")),1),"mobile"===e.variant||n===H.value.length-1?(t.openBlock(),t.createElementBlock("button",{key:2,class:"rangepicker-nav-button",disabled:!W.value,"aria-label":"Next month",onClick:re},[...o[1]||(o[1]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"arch-h-5 arch-w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)])],8,Y)):(t.openBlock(),t.createElementBlock("div",C))]),t.createElementVNode("div",S,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j.value,e=>(t.openBlock(),t.createElementBlock("div",{key:e,class:"rangepicker-weekday"},t.toDisplayString(e),1))),128))]),t.createElementVNode("div",E,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.days,e=>(t.openBlock(),t.createElementBlock("button",{key:e.date.unix(),class:t.normalizeClass(te(e)),disabled:e.isDisabled,"aria-label":e.date.format("MMMM D, YYYY"),onClick:t=>function(e,t){if(t.preventDefault(),!e.isDisabled)if(l("dateSelected",e.date),!T.value||T.value&&R.value)T.value=e.date,R.value=null;else{if(e.date.isBefore(T.value,"day")?(R.value=T.value,T.value=e.date):R.value=e.date,r.minDays&&R.value.diff(T.value,"day")<r.minDays)return T.value=e.date,void(R.value=null);if(r.maxDays&&R.value.diff(T.value,"day")>r.maxDays)return T.value=e.date,void(R.value=null);l("rangeSelected",T.value,R.value),r.autoApply&&ie()}}(e,t),onMouseenter:t=>ae(e,t),onMouseleave:oe},[t.createElementVNode("span",null,t.toDisplayString(e.date.date()),1)],42,N))),128))])]))),128))]),e.autoApply?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",O,[t.createElementVNode("button",{class:"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-gray-700 hover:arch-bg-gray-100 arch-rounded-lg arch-transition-colors",onClick:se}," Cancel "),t.createElementVNode("button",{class:"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-white arch-rounded-lg arch-transition-colors disabled:arch-opacity-50 disabled:arch-cursor-not-allowed",style:t.normalizeStyle({backgroundColor:(null==(a=e.colorStyles)?void 0:a["--color-primary"])?`rgb(${e.colorStyles["--color-primary"]})`:"rgb(37 99 235)"}),disabled:!T.value||!R.value,onClick:ie}," Apply ",12,L)]))]),ee.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"rangepicker-tooltip",style:t.normalizeStyle(J.value)},[t.createElementVNode("div",$,t.toDisplayString(K.value),1)],4)):t.createCommentVNode("",!0)],6)])):t.createCommentVNode("",!0)]}),_:1},8,["name"])]))}}),[["__scopeId","data-v-4a1aa705"]]),R={class:"rangepicker-input-container"},_=["id","value","placeholder","readonly","name"],z=A(t.defineComponent({__name:"RangepickerInput",props:{id:{},name:{},placeholder:{default:"Select dates"},readonly:{type:Boolean,default:!0},class:{},modelValue:{},close:{type:Boolean},variant:{default:"desktop"},primaryColor:{},secondaryColor:{},fontFamily:{},borderRadius:{},showClearButton:{type:Boolean,default:!0},autoApply:{type:Boolean},allowRepick:{type:Boolean},dropdowns:{},startDate:{},minDate:{},maxDate:{},format:{},numberOfColumns:{},numberOfMonths:{},singleMode:{type:Boolean},tooltipText:{},tooltipNumber:{},inlineMode:{type:Boolean},minDays:{},maxDays:{},showTooltip:{type:Boolean}},emits:["update:modelValue","focusin"],setup(e,{emit:a}){function o(e){if(3===(e=e.replace(/^#/,"")).length&&(e=e.split("").map(e=>e+e).join("")),6!==e.length)return console.warn(`[Rangepicker] Invalid hex color: ${e}`),null;const t=parseInt(e.substring(0,2),16),a=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16);return isNaN(t)||isNaN(a)||isNaN(o)?null:`${t} ${a} ${o}`}const n=e,r=a,l=t.ref(null),i=t.ref(null),s=t.ref(!1);function u(e){if(!e)return{startDate:"",endDate:""};const t=e.split(" - ");return 2===t.length?{startDate:t[0].trim(),endDate:t[1].trim()}:{startDate:"",endDate:""}}t.watch(()=>null==n?void 0:n.close,e=>{e&&l.value.blur()});const d=t.ref(u(n.modelValue)),c=t.computed(()=>n.modelValue||""),m=t.computed(()=>n.class||"arch-w-full arch-px-3 arch-py-2 arch-border arch-border-gray-300 arch-rounded-lg arch-text-sm arch-text-gray-900 focus:arch-outline-none focus:arch-ring-2 focus:arch-ring-blue-500 focus:arch-border-blue-500");function p(){s.value=!0}function f(){r("focusin"),p()}function v(e){d.value=e;const t=`${e.startDate} - ${e.endDate}`;r("update:modelValue",t)}function h(){d.value={startDate:"",endDate:""},r("update:modelValue",""),s.value=!1}t.watch(()=>n.modelValue,e=>{d.value=u(e)});const y=t.computed(()=>{const e={};if(n.primaryColor){const t=o(n.primaryColor);t&&(e["--color-primary"]=t)}if(n.secondaryColor){const t=o(n.secondaryColor);t&&(e["--color-secondary"]=t)}return n.fontFamily&&(e["--rangepicker-font-family"]=n.fontFamily),e});return(a,o)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperRef",ref:i,class:"rangepicker-input-wrapper",style:t.normalizeStyle(y.value)},[t.createElementVNode("div",R,[t.createElementVNode("input",{id:e.id,ref_key:"inputRef",ref:l,type:"text",value:c.value,placeholder:e.placeholder,readonly:e.readonly,name:e.name,class:t.normalizeClass(m.value),onClick:p,onFocus:f},null,42,_),e.showClearButton&&c.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"rangepicker-clear-button",onClick:t.withModifiers(h,["stop"]),"aria-label":"Clear dates"},[...o[2]||(o[2]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"arch-h-4 arch-w-4",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)])])):t.createCommentVNode("",!0)]),t.createVNode(T,{modelValue:d.value,"onUpdate:modelValue":[o[0]||(o[0]=e=>d.value=e),v],"is-open":s.value,"onUpdate:isOpen":o[1]||(o[1]=e=>s.value=e),"trigger-element":l.value,"min-date":e.minDate,"max-date":e.maxDate,"min-days":e.minDays,"max-days":e.maxDays,"value-of-months":e.numberOfMonths||2,"value-of-columns":e.numberOfColumns||2,format:e.format||"DD MMM YYYY","auto-apply":!1!==e.autoApply,"show-tooltip":!1!==e.showTooltip,variant:e.variant,close:n.close,"color-styles":y.value,"border-radius":e.borderRadius},null,8,["modelValue","is-open","trigger-element","min-date","max-date","min-days","max-days","value-of-months","value-of-columns","format","auto-apply","show-tooltip","variant","close","color-styles","border-radius"])],4))}}),[["__scopeId","data-v-44888cf3"]]);e.Rangepicker=T,e.RangepickerInput=z,e.default=z,e.useRangepicker=function(e,a={}){const o=t.ref(!1),n=t.ref({startDate:"",endDate:""});return{isOpen:o,dateRange:n,open:()=>{o.value=!0},close:()=>{o.value=!1},toggle:()=>{o.value=!o.value},options:a}},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@vueuse/core"),require("dayjs")):"function"==typeof define&&define.amd?define(["exports","vue","@vueuse/core","dayjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Rangepicker={},e.Vue,e.VueUse,e.dayjs)}(this,function(e,t,a,o){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r={exports:{}};r.exports=function(e,t,a){t.prototype.isBetween=function(e,t,o,n){var r=a(e),l=a(t),i="("===(n=n||"()")[0],s=")"===n[1];return(i?this.isAfter(r,o):!this.isBefore(r,o))&&(s?this.isBefore(l,o):!this.isAfter(l,o))||(i?this.isBefore(r,o):!this.isAfter(r,o))&&(s?this.isAfter(l,o):!this.isBefore(l,o))}};const l=n(r.exports);var i={exports:{}};!function(e){e.exports=function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}(i);const s=n(i.exports);var u={exports:{}};!function(e){e.exports=function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}}(u);const d=n(u.exports);var c={exports:{}};!function(e){e.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,o=/\d\d/,n=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,l={},i=function(e){return(e=+e)+(e>68?1900:2e3)},s=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),a=60*t[1]+(+t[2]||0);return 0===a?0:"+"===t[0]?-a:a}(e)}],d=function(e){var t=l[e];return t&&(t.indexOf?t:t.s.concat(t.f))},c=function(e,t){var a,o=l.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){a=n>12;break}}else a=e===(t?"pm":"PM");return a},m={A:[r,function(e){this.afternoon=c(e,!1)}],a:[r,function(e){this.afternoon=c(e,!0)}],Q:[a,function(e){this.month=3*(e-1)+1}],S:[a,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,s("seconds")],ss:[n,s("seconds")],m:[n,s("minutes")],mm:[n,s("minutes")],H:[n,s("hours")],h:[n,s("hours")],HH:[n,s("hours")],hh:[n,s("hours")],D:[n,s("day")],DD:[o,s("day")],Do:[r,function(e){var t=l.ordinal,a=e.match(/\d+/);if(this.day=a[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,s("week")],ww:[o,s("week")],M:[n,s("month")],MM:[o,s("month")],MMM:[r,function(e){var t=d("months"),a=(d("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(a<1)throw new Error;this.month=a%12||a}],MMMM:[r,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,s("year")],YY:[o,function(e){this.year=i(e)}],YYYY:[/\d{4}/,s("year")],Z:u,ZZ:u};function p(a){var o,n;o=a,n=l&&l.formats;for(var r=(a=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,a,o){var r=o&&o.toUpperCase();return a||n[o]||e[o]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,a){return t||a.slice(1)})})).match(t),i=r.length,s=0;s<i;s+=1){var u=r[s],d=m[u],c=d&&d[0],p=d&&d[1];r[s]=p?{regex:c,parser:p}:u.replace(/^\[|\]$/g,"")}return function(e){for(var t={},a=0,o=0;a<i;a+=1){var n=r[a];if("string"==typeof n)o+=n.length;else{var l=n.regex,s=n.parser,u=e.slice(o),d=l.exec(u)[0];s.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var a=e.hours;t?a<12&&(e.hours+=12):12===a&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,a){a.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(i=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,r=e.args;this.$u=o;var i=r[1];if("string"==typeof i){var s=!0===r[2],u=!0===r[3],d=s||u,c=r[2];u&&(c=r[2]),l=this.$locale(),!s&&c&&(l=a.Ls[c]),this.$d=function(e,t,a,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),r=n.year,l=n.month,i=n.day,s=n.hours,u=n.minutes,d=n.seconds,c=n.milliseconds,m=n.zone,f=n.week,v=new Date,h=i||(r||l?1:v.getDate()),y=r||v.getFullYear(),g=0;r&&!l||(g=l>0?l-1:v.getMonth());var k,b=s||0,D=u||0,w=d||0,x=c||0;return m?new Date(Date.UTC(y,g,h,b,D,w,x+60*m.offset*1e3)):a?new Date(Date.UTC(y,g,h,b,D,w,x)):(k=new Date(y,g,h,b,D,w,x),f&&(k=o(k).week(f).toDate()),k)}catch(M){return new Date("")}}(t,i,o,a),this.init(),c&&!0!==c&&(this.$L=this.locale(c).$L),d&&t!=this.format(i)&&(this.$d=new Date("")),l={}}else if(i instanceof Array)for(var m=i.length,f=1;f<=m;f+=1){r[1]=i[f-1];var v=a.apply(this,r);if(v.isValid()){this.$d=v.$d,this.$L=v.$L,this.init();break}f===m&&(this.$d=new Date(""))}else n.call(this,e)}}}()}(c);const m=n(c.exports);function p(e,t=o()){const a=t.add(e,"month").startOf("month"),n=a.day(),r=a.daysInMonth(),l=a.subtract(1,"month").daysInMonth(),i=[];for(let o=n-1;o>=0;o--){const e=a.subtract(1,"month").date(l-o);i.push({date:e,isPrevMonth:!0,isCurrentMonth:!1,isNextMonth:!1})}for(let o=1;o<=r;o++){const e=a.date(o);i.push({date:e,isPrevMonth:!1,isCurrentMonth:!0,isNextMonth:!1})}const s=42-i.length;for(let o=1;o<=s;o++){const e=a.add(1,"month").date(o);i.push({date:e,isPrevMonth:!1,isCurrentMonth:!1,isNextMonth:!0})}return{month:a,days:i}}function f(e,t,a,n,r={}){const{startDate:l=null,endDate:i=null,minDate:s=null,maxDate:u=null,disabledDates:d=[],holidays:c=[]}=r,m=s&&e.isBefore(s,"day")||u&&e.isAfter(u,"day")||d.some(t=>t.isSame(e,"day")),p=c.some(t=>t.isSame(e,"day")),f=l&&e.isSame(l,"day")||i&&e.isSame(i,"day"),v=l&&i&&e.isAfter(l,"day")&&e.isBefore(i,"day"),h=e.isSame(o(),"day"),y=0===e.day()||6===e.day();return{date:e,isPrevMonth:t,isCurrentMonth:a,isNextMonth:n,isDisabled:m,isHoliday:p,isWeekend:y,isSelected:f,isInRange:v,isToday:h}}o.extend(l),o.extend(s),o.extend(d),o.extend(m);const v={key:0,class:"rangepicker-overlay"},h={class:"rangepicker-header"},y={class:"arch-flex arch-items-center arch-justify-between"},g={key:0,class:"arch-text-xs arch-font-medium arch-text-gray-500 arch-mb-1"},k={class:"arch-text-sm arch-font-semibold arch-text-gray-900"},b={key:0,class:"arch-text-xs arch-text-gray-500 arch-mt-1"},D={class:"rangepicker-body"},w={class:"rangepicker-month-grid"},x={class:"rangepicker-month-header"},M=["disabled"],B={key:1,class:"arch-w-8"},V={class:"rangepicker-month-title"},Y=["disabled"],C={key:3,class:"arch-w-8"},S={class:"rangepicker-weekdays"},E=["disabled","aria-label","onClick","onMouseenter"],N={key:0,class:"arch-mt-4 arch-flex arch-items-center arch-justify-end arch-gap-2 arch-border-t arch-border-gray-200 arch-pt-4"},O=["disabled"],L={class:"arch-flex arch-items-center arch-gap-1"},$=(e,t)=>{const a=e.__vccOpts||e;for(const[o,n]of t)a[o]=n;return a},A=$(t.defineComponent({__name:"Rangepicker",props:{modelValue:{},isOpen:{type:Boolean,default:!1},variant:{default:"desktop"},minDate:{},maxDate:{},minDays:{},maxDays:{},close:{type:Boolean},valueOfMonths:{default:2},valueOfColumns:{default:2},disabledDates:{},holidays:{},format:{default:"YYYY-MM-DD"},delimiter:{default:" - "},placeholder:{},label:{},showTooltip:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},position:{default:"auto"},triggerElement:{},colorStyles:{},borderRadius:{default:"0.75rem"}},emits:["update:modelValue","update:isOpen","dateSelected","rangeSelected"],setup(e,{emit:n}){const r=e,l=n,i=a.useBreakpoints(a.breakpointsTailwind).smallerOrEqual("lg"),s=t.computed(()=>i.value?1:r.valueOfMonths);t.computed(()=>i.value?1:r.valueOfColumns);const u=t.ref(null),d=t.ref(!1),c=t.ref(null),m=t.ref(0),$=t.ref(r.isOpen),A=t.ref(null),T=t.ref(null),R=t.computed(()=>r.minDate?o(r.minDate):null),_=t.computed(()=>r.maxDate?o(r.maxDate):null),z=t.computed(()=>{var e;return(null==(e=r.disabledDates)?void 0:e.map(e=>o(e)))||[]}),I=t.computed(()=>{var e;return(null==(e=r.holidays)?void 0:e.map(e=>o(e)))||[]}),P=t.computed(()=>function(e="en",t="short"){const a=o().startOf("week"),n=[];for(let o=0;o<7;o++){const e=a.add(o,"day");n.push("short"===t?e.format("ddd"):e.format("dd"))}return n}("en","narrow")),j=t.computed(()=>"mobile"===r.variant?1:s.value),F=t.computed(()=>function(e,t=0,a={}){const o=[];for(let n=0;n<e;n++){const{month:e,days:r}=p(t+n),l=r.map(e=>f(e.date,e.isPrevMonth,e.isCurrentMonth,e.isNextMonth,a));o.push({month:e,days:l})}return o}(j.value,m.value,{startDate:A.value,endDate:T.value,minDate:R.value,maxDate:_.value,disabledDates:z.value,holidays:I.value})),H=t.computed(()=>A.value&&T.value?T.value.diff(A.value,"day"):0),U=t.computed(()=>A.value||T.value?A.value&&!T.value?A.value.format(r.format):A.value&&T.value?`${A.value.format(r.format)}${r.delimiter}${T.value.format(r.format)}`:"":""),Z=t.computed(()=>{if(!R.value)return!0;return o().add(m.value,"month").startOf("month").isAfter(R.value,"month")}),q=t.computed(()=>{if(!_.value)return!0;return o().add(m.value+j.value-1,"month").endOf("month").isBefore(_.value,"month")}),{width:W}=a.useWindowSize(),X=t.ref({});function Q(){"mobile"!==r.variant?t.nextTick(()=>{const e=function(e,t,a="auto"){if(!e||!t)return{left:0};const o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),r=window.innerHeight,l=window.innerWidth,i=o.top,s=r-o.bottom,u={left:o.left};return"auto"===a?s>=n.height||s>i?u.top=o.bottom+8:u.bottom=r-o.top+8:"top"===a?u.bottom=r-o.top+8:u.top=o.bottom+8,u.left+n.width>l&&(u.left=l-n.width-16),u.left<16&&(u.left=16),u}(r.triggerElement,u.value,r.position);X.value={left:`${e.left}px`,...void 0!==e.top&&{top:`${e.top}px`},...void 0!==e.bottom&&{bottom:`${e.bottom}px`},...e.transform&&{transform:e.transform},"--border-radius-day":r.borderRadius}}):X.value={"--border-radius-day":r.borderRadius}}const G=t.ref({}),J=t.computed(()=>{if(!c.value||!A.value)return"";const e=c.value.date.diff(A.value,"day");return e<=0?"":`${e} ${1===e?"night":"nights"}`}),K=t.computed(()=>r.showTooltip&&c.value&&A.value&&!T.value&&c.value.date.isAfter(A.value,"day"));function ee(e){const t=["rangepicker-day"];if(e.isCurrentMonth||t.push("rangepicker-day-other-month"),e.isDisabled&&t.push("rangepicker-day-disabled"),e.isToday&&t.push("rangepicker-day-today"),e.isWeekend&&!e.isSelected&&t.push("rangepicker-day-weekend"),e.isHoliday&&t.push("rangepicker-day-holiday"),e.isSelected&&(A.value&&T.value&&e.date.isSame(A.value,"day")&&e.date.isSame(T.value,"day")?t.push("rangepicker-day-selected-single"):A.value&&e.date.isSame(A.value,"day")?t.push("rangepicker-day-selected-start"):T.value&&e.date.isSame(T.value,"day")?t.push("rangepicker-day-selected-end"):t.push("rangepicker-day-selected")),e.isInRange&&t.push("rangepicker-day-in-range"),A.value&&!T.value&&c.value){const a=A.value,o=c.value.date;e.date.isAfter(a,"day")&&e.date.isBefore(o,"day")?t.push("rangepicker-day-hover-range"):e.date.isSame(o,"day")&&o.isAfter(a,"day")&&t.push("rangepicker-day-hover-end")}return t}function te(e,t){c.value=e,r.showTooltip&&A.value&&!T.value&&function(e){const t=e.target.getBoundingClientRect();G.value={left:`${t.left+t.width/2}px`,top:t.top-10+"px",transform:"translateX(-50%) translateY(-100%)"}}(t)}function ae(){c.value=null}function oe(){Z.value&&m.value--}function ne(){q.value&&m.value++}function re(){d.value||(d.value=!0,setTimeout(()=>{$.value=!1,l("update:isOpen",!1),d.value=!1},200))}function le(){A.value&&T.value&&l("update:modelValue",{startDate:A.value.format(r.format),endDate:T.value.format(r.format)}),re()}function ie(){var e,t;(null==(e=r.modelValue)?void 0:e.startDate)?A.value=o(r.modelValue.startDate):A.value=null,(null==(t=r.modelValue)?void 0:t.endDate)?T.value=o(r.modelValue.endDate):T.value=null,re()}function se(e){$.value&&"Escape"===e.key&&re()}return t.watch(()=>r.isOpen,e=>{$.value=e,e&&Q()}),t.watch(()=>r.close,e=>{e&&re()}),t.watch(()=>r.modelValue,e=>{(null==e?void 0:e.startDate)?A.value=o(e.startDate):A.value=null,(null==e?void 0:e.endDate)?T.value=o(e.endDate):T.value=null},{immediate:!0,deep:!0}),t.watch([W,$],()=>{$.value&&Q()}),a.onClickOutside(u,()=>{$.value&&"mobile"!==r.variant&&re()}),t.onMounted(()=>{document.addEventListener("keydown",se),r.isOpen&&Q()}),t.onUnmounted(()=>{document.removeEventListener("keydown",se)}),(a,o)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"mobile"===e.variant?"slide-up":"fade"},{default:t.withCtx(()=>{var a;return[$.value||d.value?(t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",{class:"rangepicker-backdrop",onClick:re}),t.createElementVNode("div",{ref_key:"calendarRef",ref:u,class:t.normalizeClass(["rangepicker-container",["mobile"===e.variant?"rangepicker-mobile":""]]),style:t.normalizeStyle({...X.value,...e.colorStyles,borderRadius:r.borderRadius})},[t.createElementVNode("div",h,[t.createElementVNode("div",y,[t.createElementVNode("div",null,[e.label?(t.openBlock(),t.createElementBlock("p",g,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),t.createElementVNode("p",k,t.toDisplayString(U.value||e.placeholder||"Select dates"),1)]),H.value>0?(t.openBlock(),t.createElementBlock("p",b,t.toDisplayString(H.value)+" "+t.toDisplayString(1===H.value?"night":"nights"),1)):t.createCommentVNode("",!0)])]),t.createElementVNode("div",D,[t.createElementVNode("div",w,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(F.value,(a,n)=>(t.openBlock(),t.createElementBlock("div",{key:a.month.format("YYYY-MM"),class:"rangepicker-month"},[t.createElementVNode("div",x,["mobile"===e.variant||0===n?(t.openBlock(),t.createElementBlock("button",{key:0,class:"rangepicker-nav-button",disabled:!Z.value,"aria-label":"Previous month",onClick:oe},[...o[0]||(o[0]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"arch-h-5 arch-w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)])],8,M)):(t.openBlock(),t.createElementBlock("div",B)),t.createElementVNode("span",V,t.toDisplayString(a.month.format("MMMM YYYY")),1),"mobile"===e.variant||n===F.value.length-1?(t.openBlock(),t.createElementBlock("button",{key:2,class:"rangepicker-nav-button",disabled:!q.value,"aria-label":"Next month",onClick:ne},[...o[1]||(o[1]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"arch-h-5 arch-w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)])],8,Y)):(t.openBlock(),t.createElementBlock("div",C))]),t.createElementVNode("div",S,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P.value,e=>(t.openBlock(),t.createElementBlock("div",{key:e,class:"rangepicker-weekday"},t.toDisplayString(e),1))),128))]),t.createElementVNode("div",{class:"rangepicker-grid",onMouseleave:ae},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.days,e=>(t.openBlock(),t.createElementBlock("button",{key:e.date.unix(),class:t.normalizeClass(ee(e)),disabled:e.isDisabled,"aria-label":e.date.format("MMMM D, YYYY"),onClick:t=>function(e,t){if(t.preventDefault(),!e.isDisabled)if(l("dateSelected",e.date),!A.value||A.value&&T.value)A.value=e.date,T.value=null;else{if(e.date.isBefore(A.value,"day")?(T.value=A.value,A.value=e.date):T.value=e.date,r.minDays&&T.value.diff(A.value,"day")<r.minDays)return A.value=e.date,void(T.value=null);if(r.maxDays&&T.value.diff(A.value,"day")>r.maxDays)return A.value=e.date,void(T.value=null);l("rangeSelected",A.value,T.value),r.autoApply&&le()}}(e,t),onMouseenter:t=>te(e,t)},[t.createElementVNode("span",null,t.toDisplayString(e.date.date()),1)],42,E))),128))],32)]))),128))]),e.autoApply?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",N,[t.createElementVNode("button",{class:"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-gray-700 hover:arch-bg-gray-100 arch-rounded-lg arch-transition-colors",onClick:ie}," Cancel "),t.createElementVNode("button",{class:"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-white arch-rounded-lg arch-transition-colors disabled:arch-opacity-50 disabled:arch-cursor-not-allowed",style:t.normalizeStyle({backgroundColor:(null==(a=e.colorStyles)?void 0:a["--color-primary"])?`rgb(${e.colorStyles["--color-primary"]})`:"rgb(37 99 235)"}),disabled:!A.value||!T.value,onClick:le}," Apply ",12,O)]))]),K.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"rangepicker-tooltip",style:t.normalizeStyle(G.value)},[t.createElementVNode("div",L,t.toDisplayString(J.value),1)],4)):t.createCommentVNode("",!0)],6)])):t.createCommentVNode("",!0)]}),_:1},8,["name"])]))}}),[["__scopeId","data-v-7627e61d"]]),T={class:"rangepicker-input-container"},R=["id","value","placeholder","readonly","name"],_=$(t.defineComponent({__name:"RangepickerInput",props:{id:{},name:{},placeholder:{default:"Select dates"},readonly:{type:Boolean,default:!0},class:{},modelValue:{},close:{type:Boolean},variant:{default:"desktop"},primaryColor:{},secondaryColor:{},fontFamily:{},borderRadius:{},showClearButton:{type:Boolean,default:!0},autoApply:{type:Boolean},allowRepick:{type:Boolean},dropdowns:{},startDate:{},minDate:{},maxDate:{},format:{},numberOfColumns:{},numberOfMonths:{},singleMode:{type:Boolean},tooltipText:{},tooltipNumber:{},inlineMode:{type:Boolean},minDays:{},maxDays:{},showTooltip:{type:Boolean}},emits:["update:modelValue","focusin"],setup(e,{emit:a}){function o(e){if(3===(e=e.replace(/^#/,"")).length&&(e=e.split("").map(e=>e+e).join("")),6!==e.length)return console.warn(`[Rangepicker] Invalid hex color: ${e}`),null;const t=parseInt(e.substring(0,2),16),a=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16);return isNaN(t)||isNaN(a)||isNaN(o)?null:`${t} ${a} ${o}`}const n=e,r=a,l=t.ref(null),i=t.ref(null),s=t.ref(!1);function u(e){if(!e)return{startDate:"",endDate:""};const t=e.split(" - ");return 2===t.length?{startDate:t[0].trim(),endDate:t[1].trim()}:{startDate:"",endDate:""}}t.watch(()=>null==n?void 0:n.close,e=>{e&&l.value.blur()});const d=t.ref(u(n.modelValue)),c=t.computed(()=>n.modelValue||""),m=t.computed(()=>n.class||"arch-w-full arch-px-3 arch-py-2 arch-border arch-border-gray-300 arch-rounded-lg arch-text-sm arch-text-gray-900 focus:arch-outline-none focus:arch-ring-2 focus:arch-ring-blue-500 focus:arch-border-blue-500");function p(){s.value=!0}function f(){r("focusin"),p()}function v(e){d.value=e;const t=`${e.startDate} - ${e.endDate}`;r("update:modelValue",t)}function h(){d.value={startDate:"",endDate:""},r("update:modelValue",""),s.value=!1}t.watch(()=>n.modelValue,e=>{d.value=u(e)});const y=t.computed(()=>{const e={};if(n.primaryColor){const t=o(n.primaryColor);t&&(e["--color-primary"]=t)}if(n.secondaryColor){const t=o(n.secondaryColor);t&&(e["--color-secondary"]=t)}return n.fontFamily&&(e["--rangepicker-font-family"]=n.fontFamily),e});return(a,o)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperRef",ref:i,class:"rangepicker-input-wrapper",style:t.normalizeStyle(y.value)},[t.createElementVNode("div",T,[t.createElementVNode("input",{id:e.id,ref_key:"inputRef",ref:l,type:"text",value:c.value,placeholder:e.placeholder,readonly:e.readonly,name:e.name,class:t.normalizeClass(m.value),onClick:p,onFocus:f},null,42,R),e.showClearButton&&c.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"rangepicker-clear-button",onClick:t.withModifiers(h,["stop"]),"aria-label":"Clear dates"},[...o[2]||(o[2]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"arch-h-4 arch-w-4",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)])])):t.createCommentVNode("",!0)]),t.createVNode(A,{modelValue:d.value,"onUpdate:modelValue":[o[0]||(o[0]=e=>d.value=e),v],"is-open":s.value,"onUpdate:isOpen":o[1]||(o[1]=e=>s.value=e),"trigger-element":l.value,"min-date":e.minDate,"max-date":e.maxDate,"min-days":e.minDays,"max-days":e.maxDays,"value-of-months":e.numberOfMonths||2,"value-of-columns":e.numberOfColumns||2,format:e.format||"DD MMM YYYY","auto-apply":!1!==e.autoApply,"show-tooltip":!1!==e.showTooltip,variant:e.variant,close:n.close,"color-styles":y.value,"border-radius":e.borderRadius},null,8,["modelValue","is-open","trigger-element","min-date","max-date","min-days","max-days","value-of-months","value-of-columns","format","auto-apply","show-tooltip","variant","close","color-styles","border-radius"])],4))}}),[["__scopeId","data-v-44888cf3"]]);e.Rangepicker=A,e.RangepickerInput=_,e.default=_,e.useRangepicker=function(e,a={}){const o=t.ref(!1),n=t.ref({startDate:"",endDate:""});return{isOpen:o,dateRange:n,open:()=>{o.value=!0},close:()=>{o.value=!1},toggle:()=>{o.value=!o.value},options:a}},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2
2
|
//# sourceMappingURL=rangepicker.umd.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rangepicker.umd.cjs","sources":["../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isBetween.js","../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js","../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrBefore.js","../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/customParseFormat.js","../src/utils/calendar.ts","../src/utils/date.ts","../src/Rangepicker.vue","../src/utils/position.ts","../src/RangepickerInput.vue","../src/index.ts"],"sourcesContent":["!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){\"use strict\";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r=\"(\"===(f=f||\"()\")[0],u=\")\"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrAfter=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}));","!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrBefore=i()}(this,(function(){\"use strict\";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if(\"string\"==typeof i)r+=i.length;else{var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if(\"string\"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","import type { CalendarDay, CalendarMonth } from '../types'\nimport { type Dayjs, dayjs } from './date'\n\nexport function getMonthDays(\n monthOffset: number,\n currentDate: Dayjs = dayjs(),\n): {\n month: Dayjs\n days: Array<{\n date: Dayjs\n isPrevMonth: boolean\n isCurrentMonth: boolean\n isNextMonth: boolean\n }>\n } {\n const month = currentDate.add(monthOffset, 'month').startOf('month')\n const firstDayOfMonth = month.day()\n const daysInMonth = month.daysInMonth()\n const daysInPrevMonth = month.subtract(1, 'month').daysInMonth()\n\n const days: Array<{\n date: Dayjs\n isPrevMonth: boolean\n isCurrentMonth: boolean\n isNextMonth: boolean\n }> = []\n\n // Previous month days\n for (let i = firstDayOfMonth - 1; i >= 0; i--) {\n const date = month.subtract(1, 'month').date(daysInPrevMonth - i)\n days.push({\n date,\n isPrevMonth: true,\n isCurrentMonth: false,\n isNextMonth: false,\n })\n }\n\n // Current month days\n for (let i = 1; i <= daysInMonth; i++) {\n const date = month.date(i)\n days.push({\n date,\n isPrevMonth: false,\n isCurrentMonth: true,\n isNextMonth: false,\n })\n }\n\n // Next month days to complete the grid\n const remainingDays = 42 - days.length // 6 weeks * 7 days\n for (let i = 1; i <= remainingDays; i++) {\n const date = month.add(1, 'month').date(i)\n days.push({\n date,\n isPrevMonth: false,\n isCurrentMonth: false,\n isNextMonth: true,\n })\n }\n\n return { month, days }\n}\n\nexport function createCalendarDay(\n date: Dayjs,\n isPrevMonth: boolean,\n isCurrentMonth: boolean,\n isNextMonth: boolean,\n options: {\n startDate?: Dayjs | null\n endDate?: Dayjs | null\n minDate?: Dayjs | null\n maxDate?: Dayjs | null\n disabledDates?: Dayjs[]\n holidays?: Dayjs[]\n } = {},\n): CalendarDay {\n const {\n startDate = null,\n endDate = null,\n minDate = null,\n maxDate = null,\n disabledDates = [],\n holidays = [],\n } = options\n\n const isDisabled\n = (minDate && date.isBefore(minDate, 'day'))\n || (maxDate && date.isAfter(maxDate, 'day'))\n || disabledDates.some(d => d.isSame(date, 'day'))\n\n const isHoliday = holidays.some(h => h.isSame(date, 'day'))\n\n const isSelected\n = (startDate && date.isSame(startDate, 'day'))\n || (endDate && date.isSame(endDate, 'day'))\n\n const isInRange\n = startDate\n && endDate\n && date.isAfter(startDate, 'day')\n && date.isBefore(endDate, 'day')\n\n const isToday = date.isSame(dayjs(), 'day')\n\n const isWeekend = date.day() === 0 || date.day() === 6\n\n return {\n date,\n isPrevMonth,\n isCurrentMonth,\n isNextMonth,\n isDisabled,\n isHoliday,\n isWeekend,\n isSelected,\n isInRange,\n isToday,\n }\n}\n\nexport function generateCalendarMonths(\n numberOfMonths: number,\n startOffset: number = 0,\n options: {\n startDate?: Dayjs | null\n endDate?: Dayjs | null\n minDate?: Dayjs | null\n maxDate?: Dayjs | null\n disabledDates?: Dayjs[]\n holidays?: Dayjs[]\n } = {},\n): CalendarMonth[] {\n const months: CalendarMonth[] = []\n\n for (let i = 0; i < numberOfMonths; i++) {\n const { month, days } = getMonthDays(startOffset + i)\n\n const calendarDays = days.map(day =>\n createCalendarDay(\n day.date,\n day.isPrevMonth,\n day.isCurrentMonth,\n day.isNextMonth,\n options,\n ),\n )\n\n months.push({\n month,\n days: calendarDays,\n })\n }\n\n return months\n}\n\nexport function getWeekDays(locale: string = 'en', format: 'short' | 'narrow' = 'short'): string[] {\n const weekStart = dayjs().startOf('week')\n const days: string[] = []\n\n for (let i = 0; i < 7; i++) {\n const day = weekStart.add(i, 'day')\n days.push(format === 'short' ? day.format('ddd') : day.format('dd'))\n }\n\n return days\n}\n","import type { Dayjs } from 'dayjs'\nimport dayjs from 'dayjs'\nimport isBetween from 'dayjs/plugin/isBetween'\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter'\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\n\ndayjs.extend(isBetween)\ndayjs.extend(isSameOrAfter)\ndayjs.extend(isSameOrBefore)\ndayjs.extend(customParseFormat)\n\nexport { dayjs }\nexport type { Dayjs }\n\nexport function parseDate(date: string | Date | Dayjs, format?: string): Dayjs {\n if (dayjs.isDayjs(date))\n return date\n return format ? dayjs(date, format) : dayjs(date)\n}\n\nexport function formatDate(date: Dayjs, format: string = 'YYYY-MM-DD'): string {\n return date.format(format)\n}\n\nexport function isDateInRange(date: Dayjs, start: Dayjs, end: Dayjs): boolean {\n return date.isBetween(start, end, 'day', '[]')\n}\n\nexport function getDaysBetween(start: Dayjs, end: Dayjs): number {\n return end.diff(start, 'day')\n}\n\nexport function isWeekend(date: Dayjs): boolean {\n const day = date.day()\n return day === 0 || day === 6 // Sunday or Saturday\n}\n\nexport function isToday(date: Dayjs): boolean {\n return date.isSame(dayjs(), 'day')\n}\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from \"vue\";\nimport {\n breakpointsTailwind,\n onClickOutside,\n useBreakpoints,\n useWindowSize,\n} from \"@vueuse/core\";\nimport type { Dayjs } from \"dayjs\";\nimport { dayjs } from \"./utils/date\";\nimport { generateCalendarMonths, getWeekDays } from \"./utils/calendar\";\nimport { calculatePosition } from \"./utils/position\";\nimport type { CalendarDay, RangepickerProps } from \"./types\";\n\nconst props = withDefaults(defineProps<RangepickerProps>(), {\n isOpen: false,\n variant: \"desktop\",\n valueOfMonths: 2,\n valueOfColumns: 2,\n format: \"YYYY-MM-DD\",\n delimiter: \" - \",\n showTooltip: true,\n autoApply: false,\n position: \"auto\",\n borderRadius: \"0.75rem\",\n});\n\nconst emit = defineEmits<{\n \"update:modelValue\": [value: { startDate: string; endDate: string }];\n \"update:isOpen\": [value: boolean];\n dateSelected: [date: Dayjs];\n rangeSelected: [start: Dayjs, end: Dayjs];\n}>();\nconst breakpoints = useBreakpoints(breakpointsTailwind);\nconst isMobile = breakpoints.smallerOrEqual(\"lg\");\nconst numberOfMonths = computed(() =>\n isMobile.value ? 1 : props.valueOfMonths,\n);\nconst numberOfColumns = computed(() =>\n isMobile.value ? 1 : props.valueOfColumns,\n);\n\n// Refs\nconst calendarRef = ref<HTMLElement | null>(null);\nconst isFadingOut = ref(false);\nconst hoveredDay = ref<CalendarDay | null>(null);\nconst monthOffset = ref(0);\n\n// Local state\nconst localIsOpen = ref(props.isOpen);\nconst localStartDate = ref<Dayjs | null>(null);\nconst localEndDate = ref<Dayjs | null>(null);\n\n// Parse dates from props\nconst parsedMinDate = computed(() =>\n props.minDate ? dayjs(props.minDate) : null,\n);\nconst parsedMaxDate = computed(() =>\n props.maxDate ? dayjs(props.maxDate) : null,\n);\nconst parsedDisabledDates = computed(\n () => props.disabledDates?.map((d) => dayjs(d)) || [],\n);\nconst parsedHolidays = computed(\n () => props.holidays?.map((h) => dayjs(h)) || [],\n);\n\n// Calendar data\nconst weekdays = computed(() => getWeekDays(\"en\", \"narrow\"));\n\n// For mobile view, show only 1 month\nconst effectiveNumberOfMonths = computed(() =>\n props.variant === \"mobile\" ? 1 : numberOfMonths.value,\n);\n\nconst calendarMonths = computed(() =>\n generateCalendarMonths(effectiveNumberOfMonths.value, monthOffset.value, {\n startDate: localStartDate.value,\n endDate: localEndDate.value,\n minDate: parsedMinDate.value,\n maxDate: parsedMaxDate.value,\n disabledDates: parsedDisabledDates.value,\n holidays: parsedHolidays.value,\n }),\n);\n\nconst nightCount = computed(() => {\n if (!localStartDate.value || !localEndDate.value) return 0;\n return localEndDate.value.diff(localStartDate.value, \"day\");\n});\n\nconst formattedDateRange = computed(() => {\n if (!localStartDate.value && !localEndDate.value) return \"\";\n else if (localStartDate.value && !localEndDate.value)\n return localStartDate.value.format(props.format);\n else if (localStartDate.value && localEndDate.value)\n return `${localStartDate.value.format(props.format)}${props.delimiter}${localEndDate.value.format(props.format)}`;\n else return \"\";\n});\n\n// Navigation\nconst canNavigatePrevious = computed(() => {\n if (!parsedMinDate.value) return true;\n const firstMonth = dayjs().add(monthOffset.value, \"month\").startOf(\"month\");\n return firstMonth.isAfter(parsedMinDate.value, \"month\");\n});\n\nconst canNavigateNext = computed(() => {\n if (!parsedMaxDate.value) return true;\n const lastMonth = dayjs()\n .add(monthOffset.value + effectiveNumberOfMonths.value - 1, \"month\")\n .endOf(\"month\");\n return lastMonth.isBefore(parsedMaxDate.value, \"month\");\n});\n\n// Positioning\nconst { width: windowWidth } = useWindowSize();\nconst calendarStyle = ref<Record<string, string>>({});\n\nfunction updatePosition() {\n if (props.variant === \"mobile\") {\n calendarStyle.value = {\n '--border-radius-day': props.borderRadius,\n };\n return;\n }\n\n nextTick(() => {\n const position = calculatePosition(\n props.triggerElement,\n calendarRef.value,\n props.position,\n );\n\n calendarStyle.value = {\n left: `${position.left}px`,\n ...(position.top !== undefined && { top: `${position.top}px` }),\n ...(position.bottom !== undefined && { bottom: `${position.bottom}px` }),\n ...(position.transform && { transform: position.transform }),\n '--border-radius-day': props.borderRadius,\n };\n });\n}\n\n// Tooltip\nconst tooltipStyle = ref<Record<string, string>>({});\nconst tooltipText = computed(() => {\n if (!hoveredDay.value || !localStartDate.value) return \"\";\n const nights = hoveredDay.value.date.diff(localStartDate.value, \"day\");\n if (nights <= 0) return \"\";\n return `${nights} ${nights === 1 ? \"night\" : \"nights\"}`;\n});\n\nconst showTooltipComputed = computed(() => {\n return (\n props.showTooltip &&\n hoveredDay.value &&\n localStartDate.value &&\n !localEndDate.value &&\n hoveredDay.value.date.isAfter(localStartDate.value, \"day\")\n );\n});\n\n// Methods\nfunction getDayClasses(day: CalendarDay) {\n const classes = [\"rangepicker-day\"];\n\n if (!day.isCurrentMonth) classes.push(\"rangepicker-day-other-month\");\n\n if (day.isDisabled) classes.push(\"rangepicker-day-disabled\");\n\n if (day.isToday) classes.push(\"rangepicker-day-today\");\n\n if (day.isWeekend && !day.isSelected) classes.push(\"rangepicker-day-weekend\");\n\n if (day.isHoliday) classes.push(\"rangepicker-day-holiday\");\n\n if (day.isSelected) {\n if (\n localStartDate.value &&\n localEndDate.value &&\n day.date.isSame(localStartDate.value, \"day\") &&\n day.date.isSame(localEndDate.value, \"day\")\n )\n classes.push(\"rangepicker-day-selected-single\");\n else if (\n localStartDate.value &&\n day.date.isSame(localStartDate.value, \"day\")\n )\n classes.push(\"rangepicker-day-selected-start\");\n else if (localEndDate.value && day.date.isSame(localEndDate.value, \"day\"))\n classes.push(\"rangepicker-day-selected-end\");\n else classes.push(\"rangepicker-day-selected\");\n }\n\n if (day.isInRange) classes.push(\"rangepicker-day-in-range\");\n\n // Add hover effect for potential range\n if (localStartDate.value && !localEndDate.value && hoveredDay.value) {\n const start = localStartDate.value;\n const hovered = hoveredDay.value.date;\n if (day.date.isAfter(start, \"day\") && day.date.isBefore(hovered, \"day\"))\n classes.push(\"rangepicker-day-hover-range\");\n else if (day.date.isSame(hovered, \"day\") && hovered.isAfter(start, \"day\"))\n classes.push(\"rangepicker-day-hover-end\");\n }\n\n return classes;\n}\n\nfunction selectDate(day: CalendarDay, event: MouseEvent) {\n event.preventDefault();\n if (day.isDisabled) return;\n\n emit(\"dateSelected\", day.date);\n\n // Range selection logic\n if (!localStartDate.value || (localStartDate.value && localEndDate.value)) {\n // Start new range\n localStartDate.value = day.date;\n localEndDate.value = null;\n } else {\n // Complete range\n if (day.date.isBefore(localStartDate.value, \"day\")) {\n // Swap if end is before start\n localEndDate.value = localStartDate.value;\n localStartDate.value = day.date;\n } else {\n localEndDate.value = day.date;\n }\n\n // Validate min/max days\n if (props.minDays) {\n const days = localEndDate.value.diff(localStartDate.value, \"day\");\n if (days < props.minDays) {\n // Invalid range, reset\n localStartDate.value = day.date;\n localEndDate.value = null;\n return;\n }\n }\n\n if (props.maxDays) {\n const days = localEndDate.value.diff(localStartDate.value, \"day\");\n if (days > props.maxDays) {\n // Invalid range, reset\n localStartDate.value = day.date;\n localEndDate.value = null;\n return;\n }\n }\n\n emit(\"rangeSelected\", localStartDate.value, localEndDate.value);\n\n if (props.autoApply) apply();\n }\n}\n\nfunction handleDayHover(day: CalendarDay, event: MouseEvent) {\n hoveredDay.value = day;\n\n if (props.showTooltip && localStartDate.value && !localEndDate.value)\n updateTooltipPosition(event);\n}\n\nfunction updateTooltipPosition(event: MouseEvent) {\n const rect = (event.target as HTMLElement).getBoundingClientRect();\n tooltipStyle.value = {\n left: `${rect.left + rect.width / 2}px`,\n top: `${rect.top - 10}px`,\n transform: \"translateX(-50%) translateY(-100%)\",\n };\n}\n\nfunction handleDayLeave() {\n hoveredDay.value = null;\n}\n\nfunction previousMonth() {\n if (canNavigatePrevious.value) monthOffset.value--;\n}\n\nfunction nextMonth() {\n if (canNavigateNext.value) monthOffset.value++;\n}\n\nfunction close() {\n if (isFadingOut.value) return;\n isFadingOut.value = true;\n setTimeout(() => {\n localIsOpen.value = false;\n emit(\"update:isOpen\", false);\n isFadingOut.value = false;\n }, 200); // match fade-leave-active duration\n}\n\nfunction apply() {\n if (localStartDate.value && localEndDate.value) {\n emit(\"update:modelValue\", {\n startDate: localStartDate.value.format(props.format),\n endDate: localEndDate.value.format(props.format),\n });\n }\n close();\n}\n\nfunction cancel() {\n // Reset to initial values\n if (props.modelValue?.startDate)\n localStartDate.value = dayjs(props.modelValue.startDate);\n else localStartDate.value = null;\n\n if (props.modelValue?.endDate)\n localEndDate.value = dayjs(props.modelValue.endDate);\n else localEndDate.value = null;\n\n close();\n}\n\n// Watch props\nwatch(\n () => props.isOpen,\n (newVal) => {\n localIsOpen.value = newVal;\n if (newVal) updatePosition();\n },\n);\n\n// Watch props\nwatch(\n () => props.close,\n (newVal) => {\n if (newVal) close();\n },\n);\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (newVal?.startDate) localStartDate.value = dayjs(newVal.startDate);\n else localStartDate.value = null;\n\n if (newVal?.endDate) localEndDate.value = dayjs(newVal.endDate);\n else localEndDate.value = null;\n },\n { immediate: true, deep: true },\n);\n\nwatch([windowWidth, localIsOpen], () => {\n if (localIsOpen.value) updatePosition();\n});\n\n// Click outside to close\nonClickOutside(calendarRef, () => {\n if (localIsOpen.value && props.variant !== \"mobile\") close();\n});\n\n// Keyboard navigation\nfunction handleKeydown(e: KeyboardEvent) {\n if (!localIsOpen.value) return;\n\n if (e.key === \"Escape\") close();\n}\n\nonMounted(() => {\n document.addEventListener(\"keydown\", handleKeydown);\n if (props.isOpen) updatePosition();\n});\n\nonUnmounted(() => {\n document.removeEventListener(\"keydown\", handleKeydown);\n});\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition :name=\"variant === 'mobile' ? 'slide-up' : 'fade'\">\n <div v-if=\"localIsOpen || isFadingOut\" class=\"rangepicker-overlay\">\n <!-- Backdrop -->\n <div class=\"rangepicker-backdrop\" @click=\"close\" />\n\n <!-- Calendar Container -->\n <div\n ref=\"calendarRef\"\n class=\"rangepicker-container\"\n :class=\"[variant === 'mobile' ? 'rangepicker-mobile' : '']\"\n :style=\"{ ...calendarStyle, ...colorStyles, borderRadius: props.borderRadius }\"\n >\n <!-- Header -->\n <div class=\"rangepicker-header\">\n <div class=\"arch-flex arch-items-center arch-justify-between\">\n <div>\n <p\n v-if=\"label\"\n class=\"arch-text-xs arch-font-medium arch-text-gray-500 arch-mb-1\"\n >\n {{ label }}\n </p>\n <p\n class=\"arch-text-sm arch-font-semibold arch-text-gray-900\"\n >\n {{ formattedDateRange || placeholder || \"Select dates\" }}\n </p>\n </div>\n <p\n v-if=\"nightCount > 0\"\n class=\"arch-text-xs arch-text-gray-500 arch-mt-1\"\n >\n {{ nightCount }} {{ nightCount === 1 ? \"night\" : \"nights\" }}\n </p>\n <!-- <button\n class=\"rangepicker-nav-button\"\n aria-label=\"Close\"\n @click=\"close\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"arch-h-5 arch-w-5\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </button> -->\n </div>\n </div>\n\n <!-- Calendar Body -->\n <div class=\"rangepicker-body\">\n <div\n class=\"rangepicker-month-grid\"\n >\n <div\n v-for=\"(monthData, index) in calendarMonths\"\n :key=\"monthData.month.format('YYYY-MM')\"\n class=\"rangepicker-month\"\n >\n <!-- Month Header -->\n <div class=\"rangepicker-month-header\">\n <button\n v-if=\"variant === 'mobile' || index === 0\"\n class=\"rangepicker-nav-button\"\n :disabled=\"!canNavigatePrevious\"\n aria-label=\"Previous month\"\n @click=\"previousMonth\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"arch-h-5 arch-w-5\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </button>\n <div v-else class=\"arch-w-8\"></div>\n\n <span class=\"rangepicker-month-title\">\n {{ monthData.month.format(\"MMMM YYYY\") }}\n </span>\n\n <button\n v-if=\"\n variant === 'mobile' ||\n index === calendarMonths.length - 1\n \"\n class=\"rangepicker-nav-button\"\n :disabled=\"!canNavigateNext\"\n aria-label=\"Next month\"\n @click=\"nextMonth\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"arch-h-5 arch-w-5\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </button>\n <div v-else class=\"arch-w-8\"></div>\n </div>\n\n <!-- Weekday Headers -->\n <div class=\"rangepicker-weekdays\">\n <div\n v-for=\"weekday in weekdays\"\n :key=\"weekday\"\n class=\"rangepicker-weekday\"\n >\n {{ weekday }}\n </div>\n </div>\n\n <!-- Calendar Grid -->\n <div class=\"rangepicker-grid\">\n <button\n v-for=\"day in monthData.days\"\n :key=\"day.date.unix()\"\n :class=\"getDayClasses(day)\"\n :disabled=\"day.isDisabled\"\n :aria-label=\"day.date.format('MMMM D, YYYY')\"\n @click=\"(e) => selectDate(day, e)\"\n @mouseenter=\"(e) => handleDayHover(day, e)\"\n @mouseleave=\"handleDayLeave\"\n >\n <span>{{ day.date.date() }}</span>\n </button>\n </div>\n </div>\n </div>\n\n <!-- Apply/Cancel Buttons (if not autoApply) -->\n <div\n v-if=\"!autoApply\"\n class=\"arch-mt-4 arch-flex arch-items-center arch-justify-end arch-gap-2 arch-border-t arch-border-gray-200 arch-pt-4\"\n >\n <button\n class=\"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-gray-700 hover:arch-bg-gray-100 arch-rounded-lg arch-transition-colors\"\n @click=\"cancel\"\n >\n Cancel\n </button>\n <button\n class=\"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-white arch-rounded-lg arch-transition-colors disabled:arch-opacity-50 disabled:arch-cursor-not-allowed\"\n :style=\"{\n backgroundColor: colorStyles?.['--color-primary'] \n ? `rgb(${colorStyles['--color-primary']})` \n : 'rgb(37 99 235)',\n }\"\n :disabled=\"!localStartDate || !localEndDate\"\n @click=\"apply\"\n >\n Apply\n </button>\n </div>\n </div>\n\n <!-- Tooltip -->\n <div\n v-if=\"showTooltipComputed\"\n class=\"rangepicker-tooltip\"\n :style=\"tooltipStyle\"\n >\n <div class=\"arch-flex arch-items-center arch-gap-1\">\n {{ tooltipText }}\n </div>\n </div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style lang=\"scss\" scoped>\n@use \"./styles/rangepicker.scss\";\n</style>\n","export interface PositionResult {\n top?: number\n bottom?: number\n left: number\n transform?: string\n}\n\nexport function calculatePosition(\n triggerElement: HTMLElement | null,\n calendarElement: HTMLElement | null,\n preferredPosition: 'auto' | 'top' | 'bottom' = 'auto',\n): PositionResult {\n if (!triggerElement || !calendarElement)\n return { left: 0 }\n\n const triggerRect = triggerElement.getBoundingClientRect()\n const calendarRect = calendarElement.getBoundingClientRect()\n const viewportHeight = window.innerHeight\n const viewportWidth = window.innerWidth\n\n // Calculate available space\n const spaceAbove = triggerRect.top\n const spaceBelow = viewportHeight - triggerRect.bottom\n\n // Determine vertical position\n const position: PositionResult = { left: triggerRect.left }\n\n if (preferredPosition === 'auto') {\n if (spaceBelow >= calendarRect.height || spaceBelow > spaceAbove) {\n // Position below\n position.top = triggerRect.bottom + 8\n }\n else {\n // Position above\n position.bottom = viewportHeight - triggerRect.top + 8\n }\n }\n else if (preferredPosition === 'top') {\n position.bottom = viewportHeight - triggerRect.top + 8\n }\n else {\n position.top = triggerRect.bottom + 8\n }\n\n // Adjust horizontal position to keep within viewport\n if (position.left + calendarRect.width > viewportWidth)\n position.left = viewportWidth - calendarRect.width - 16\n\n if (position.left < 16)\n position.left = 16\n\n return position\n}\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport Rangepicker from './Rangepicker.vue'\nimport type { RangepickerInputProps } from './types'\n\n// Helper function to convert HEX to RGB\nfunction hexToRgb(hex: string): string | null {\n // Remove # if present\n hex = hex.replace(/^#/, '')\n\n // Handle 3-digit hex\n if (hex.length === 3) {\n hex = hex.split('').map(char => char + char).join('')\n }\n\n if (hex.length !== 6) {\n console.warn(`[Rangepicker] Invalid hex color: ${hex}`)\n return null\n }\n\n const r = parseInt(hex.substring(0, 2), 16)\n const g = parseInt(hex.substring(2, 4), 16)\n const b = parseInt(hex.substring(4, 6), 16)\n\n if (isNaN(r) || isNaN(g) || isNaN(b)) {\n return null\n }\n\n return `${r} ${g} ${b}`\n}\n\nconst props = withDefaults(defineProps<RangepickerInputProps>(), {\n readonly: true,\n variant: 'desktop',\n placeholder: 'Select dates',\n showClearButton: true,\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: string]\n 'focusin': []\n}>()\n\n// Refs\nconst inputRef = ref<HTMLInputElement | null>(null)\nconst wrapperRef = ref<HTMLElement | null>(null)\nconst isOpen = ref(false)\n\n// Parse the modelValue into start/end dates\nfunction parseValue(value?: string) {\n if (!value)\n return { startDate: '', endDate: '' }\n\n const parts = value.split(' - ')\n if (parts.length === 2) {\n return {\n startDate: parts[0].trim(),\n endDate: parts[1].trim(),\n }\n }\n return { startDate: '', endDate: '' }\n}\n\nwatch(() => props?.close, (cur) => {\n if (cur)\n inputRef.value.blur()\n})\nconst localValue = ref(parseValue(props.modelValue))\n\nconst displayValue = computed(() => {\n return props.modelValue || ''\n})\n\nconst inputClass = computed(() => {\n return props.class || 'arch-w-full arch-px-3 arch-py-2 arch-border arch-border-gray-300 arch-rounded-lg arch-text-sm arch-text-gray-900 focus:arch-outline-none focus:arch-ring-2 focus:arch-ring-blue-500 focus:arch-border-blue-500'\n})\n\nfunction openPicker() {\n isOpen.value = true\n}\n\nfunction onFocus() {\n emit('focusin')\n openPicker()\n}\n\nfunction handleUpdate(value: { startDate: string; endDate: string }) {\n localValue.value = value\n const formatted = `${value.startDate} - ${value.endDate}`\n emit('update:modelValue', formatted)\n}\n\nfunction clearValue() {\n localValue.value = { startDate: '', endDate: '' }\n emit('update:modelValue', '')\n isOpen.value = false\n}\n\nwatch(() => props.modelValue, (newVal) => {\n localValue.value = parseValue(newVal)\n})\n\n// Compute CSS variables for scoped styling\nconst colorStyles = computed(() => {\n const styles: Record<string, string> = {}\n\n if (props.primaryColor) {\n const rgb = hexToRgb(props.primaryColor)\n if (rgb) {\n styles['--color-primary'] = rgb\n }\n }\n\n if (props.secondaryColor) {\n const rgb = hexToRgb(props.secondaryColor)\n if (rgb) {\n styles['--color-secondary'] = rgb\n }\n }\n\n if (props.fontFamily) {\n styles['--rangepicker-font-family'] = props.fontFamily\n }\n\n return styles\n})\n</script>\n\n<template>\n <div ref=\"wrapperRef\" class=\"rangepicker-input-wrapper\" :style=\"colorStyles\">\n <div class=\"rangepicker-input-container\">\n <input :id=\"id\" ref=\"inputRef\" type=\"text\" :value=\"displayValue\" :placeholder=\"placeholder\" :readonly=\"readonly\"\n :name=\"name\" :class=\"inputClass\" @click=\"openPicker\" @focus=\"onFocus\" />\n \n <button v-if=\"showClearButton && displayValue\" type=\"button\" class=\"rangepicker-clear-button\"\n @click.stop=\"clearValue\" aria-label=\"Clear dates\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"arch-h-4 arch-w-4\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\"\n clip-rule=\"evenodd\" />\n </svg>\n </button>\n </div>\n\n <Rangepicker v-model=\"localValue\" v-model:is-open=\"isOpen\" :trigger-element=\"inputRef\" :min-date=\"minDate\"\n :max-date=\"maxDate\" :min-days=\"minDays\" :max-days=\"maxDays\"\n :value-of-months=\"numberOfMonths || 2\" :value-of-columns=\"numberOfColumns || 2\"\n :format=\"format || 'DD MMM YYYY'\" :auto-apply=\"autoApply !== false\"\n :show-tooltip=\"showTooltip !== false\" :variant=\"variant\" :close=\"props.close\" :color-styles=\"colorStyles\"\n :border-radius=\"borderRadius\" @update:model-value=\"handleUpdate\" />\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n@use './styles/rangepicker.scss';\n\n.rangepicker-input-wrapper {\n position: relative;\n display: inline-block;\n width: 100%;\n font-family: var(--rangepicker-font-family, inherit);\n}\n\n.rangepicker-input-container {\n position: relative;\n display: flex;\n align-items: center;\n}\n\ninput {\n cursor: pointer;\n font-family: inherit;\n flex: 1;\n padding-right: 2.5rem;\n}\n\n.rangepicker-clear-button {\n position: absolute;\n right: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0.25rem;\n background: transparent;\n border: none;\n border-radius: 0.375rem;\n color: #6b7280;\n cursor: pointer;\n transition: all 0.2s;\n z-index: 1;\n\n &:hover {\n color: #374151;\n background: #f3f4f6;\n }\n\n &:active {\n transform: translateY(-50%) scale(0.95);\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);\n }\n}\n</style>\n","import { ref } from 'vue'\nimport './styles/rangepicker.scss'\nimport Rangepicker from './Rangepicker.vue'\nimport RangepickerInput from './RangepickerInput.vue'\nimport type { \n DateRange, \n RangepickerProps, \n RangepickerEmits, \n CalendarDay, \n CalendarMonth,\n RangepickerInputProps\n} from './types'\n\n// Default export - RangepickerInput (Litepicker-compatible wrapper)\nexport default RangepickerInput\n\n// Named exports\nexport { Rangepicker, RangepickerInput }\n\n// Type exports\nexport type { \n RangepickerProps, \n RangepickerInputProps,\n RangepickerEmits, \n DateRange, \n CalendarDay, \n CalendarMonth \n}\n\n// Vue 3 composable for easy integration\nexport function useRangepicker(triggerRef: any, options: Partial<RangepickerProps> = {}) {\n const isOpen = ref(false)\n const dateRange = ref<DateRange>({ startDate: '', endDate: '' })\n\n const open = () => { isOpen.value = true }\n const close = () => { isOpen.value = false }\n const toggle = () => { isOpen.value = !isOpen.value }\n\n return {\n isOpen,\n dateRange,\n open,\n close,\n toggle,\n options,\n }\n}\n"],"names":["exports","e","i","t","prototype","isBetween","s","f","n","o","r","u","this","isAfter","isBefore","module","isSameOrAfter","isSame","isSameOrBefore","LTS","LT","L","LL","LLL","LLLL","a","h","zone","offset","match","indexOf","concat","d","meridiem","c","A","afternoon","Q","month","S","milliseconds","SS","SSS","ss","m","mm","H","HH","hh","D","DD","Do","ordinal","day","replace","w","ww","M","MM","MMM","map","slice","Error","MMMM","Y","YY","year","YYYY","Z","ZZ","l","formats","toUpperCase","length","regex","parser","exec","call","hours","p","customParseFormat","parseTwoDigitYear","parse","date","utc","args","$u","$locale","Ls","$d","Date","minutes","seconds","week","getDate","getFullYear","v","getMonth","g","y","UTC","toDate","init","$L","locale","format","Array","apply","isValid","getMonthDays","monthOffset","currentDate","dayjs","add","startOf","firstDayOfMonth","daysInMonth","daysInPrevMonth","subtract","days","push","isPrevMonth","isCurrentMonth","isNextMonth","remainingDays","createCalendarDay","options","startDate","endDate","minDate","maxDate","disabledDates","holidays","isDisabled","some","isHoliday","isSelected","isInRange","isToday","isWeekend","extend","props","__props","emit","__emit","isMobile","useBreakpoints","breakpointsTailwind","smallerOrEqual","numberOfMonths","computed","value","valueOfMonths","valueOfColumns","calendarRef","ref","isFadingOut","hoveredDay","localIsOpen","isOpen","localStartDate","localEndDate","parsedMinDate","parsedMaxDate","parsedDisabledDates","_a","parsedHolidays","weekdays","weekStart","getWeekDays","effectiveNumberOfMonths","variant","calendarMonths","startOffset","months","calendarDays","generateCalendarMonths","nightCount","diff","formattedDateRange","delimiter","canNavigatePrevious","canNavigateNext","endOf","width","windowWidth","useWindowSize","calendarStyle","updatePosition","nextTick","position","triggerElement","calendarElement","preferredPosition","left","triggerRect","getBoundingClientRect","calendarRect","viewportHeight","window","innerHeight","viewportWidth","innerWidth","spaceAbove","top","spaceBelow","bottom","height","calculatePosition","transform","borderRadius","tooltipStyle","tooltipText","nights","showTooltipComputed","showTooltip","getDayClasses","classes","start","hovered","handleDayHover","event","rect","target","updateTooltipPosition","handleDayLeave","previousMonth","nextMonth","close","setTimeout","cancel","modelValue","_b","handleKeydown","key","watch","newVal","immediate","deep","onClickOutside","onMounted","document","addEventListener","onUnmounted","removeEventListener","_createBlock","_Teleport","to","_createVNode","_Transition","name","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","class","onClick","_normalizeClass","style","_hoisted_2","_hoisted_3","label","_hoisted_4","_toDisplayString","_hoisted_5","placeholder","_hoisted_6","_hoisted_7","_hoisted_8","_Fragment","_renderList","monthData","index","_hoisted_9","disabled","xmlns","viewBox","fill","_hoisted_11","_hoisted_12","_hoisted_14","_hoisted_15","weekday","_hoisted_16","unix","preventDefault","minDays","maxDays","autoApply","selectDate","onMouseenter","onMouseleave","_hoisted_18","_normalizeStyle","colorStyles","_hoisted_19","_hoisted_20","hexToRgb","hex","split","char","join","console","warn","parseInt","substring","b","isNaN","inputRef","wrapperRef","parseValue","parts","trim","cur","blur","localValue","displayValue","inputClass","openPicker","onFocus","handleUpdate","formatted","clearValue","styles","primaryColor","rgb","secondaryColor","fontFamily","id","type","readonly","showClearButton","Rangepicker","$event","numberOfColumns","triggerRef","dateRange","open","toggle"],"mappings":"0mBAAoEA,QAA0L,SAASC,EAAEC,EAAEC,GAAGD,EAAEE,UAAUC,UAAU,SAASJ,EAAEC,EAAEI,EAAEC,GAAG,IAAIC,EAAEL,EAAEF,GAAGQ,EAAEN,EAAED,GAAGQ,EAAE,OAAOH,EAAEA,GAAG,MAAM,GAAGI,EAAE,MAAMJ,EAAE,GAAG,OAAOG,EAAEE,KAAKC,QAAQL,EAAEF,IAAIM,KAAKE,SAASN,EAAEF,MAAMK,EAAEC,KAAKE,SAASL,EAAEH,IAAIM,KAAKC,QAAQJ,EAAEH,MAAMI,EAAEE,KAAKE,SAASN,EAAEF,IAAIM,KAAKC,QAAQL,EAAEF,MAAMK,EAAEC,KAAKC,QAAQJ,EAAEH,IAAIM,KAAKE,SAASL,EAAEH,GAAG,CAAC,uDCAzdS,EAAAf,QAA8L,SAASC,EAAEE,GAAGA,EAAEC,UAAUY,cAAc,SAASf,EAAEE,GAAG,OAAO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ckE,EAAA/I,MAC5F,gBAAeT,EAAAoE,qVCvHf,SAAwB6H,EAAiBjN,EAAqC,IACnF,MAAMiC,EAASJ,EAAAA,KAAI,GACbqL,EAAYrL,EAAAA,IAAe,CAAE5B,UAAW,GAAIC,QAAS,KAM3D,MAAO,CACL+B,SACAiL,YACAC,KAPW,KAAQlL,EAAOR,OAAQ,GAQlC6E,MAPY,KAAQrE,EAAOR,OAAQ,GAQnC2L,OAPa,KAAQnL,EAAOR,OAASQ,EAAOR,OAQ5CzB,UAEJ","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"rangepicker.umd.cjs","sources":["../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isBetween.js","../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js","../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrBefore.js","../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/customParseFormat.js","../src/utils/calendar.ts","../src/utils/date.ts","../src/Rangepicker.vue","../src/utils/position.ts","../src/RangepickerInput.vue","../src/index.ts"],"sourcesContent":["!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){\"use strict\";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r=\"(\"===(f=f||\"()\")[0],u=\")\"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrAfter=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}));","!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrBefore=i()}(this,(function(){\"use strict\";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if(\"string\"==typeof i)r+=i.length;else{var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if(\"string\"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","import type { CalendarDay, CalendarMonth } from '../types'\nimport { type Dayjs, dayjs } from './date'\n\nexport function getMonthDays(\n monthOffset: number,\n currentDate: Dayjs = dayjs(),\n): {\n month: Dayjs\n days: Array<{\n date: Dayjs\n isPrevMonth: boolean\n isCurrentMonth: boolean\n isNextMonth: boolean\n }>\n } {\n const month = currentDate.add(monthOffset, 'month').startOf('month')\n const firstDayOfMonth = month.day()\n const daysInMonth = month.daysInMonth()\n const daysInPrevMonth = month.subtract(1, 'month').daysInMonth()\n\n const days: Array<{\n date: Dayjs\n isPrevMonth: boolean\n isCurrentMonth: boolean\n isNextMonth: boolean\n }> = []\n\n // Previous month days\n for (let i = firstDayOfMonth - 1; i >= 0; i--) {\n const date = month.subtract(1, 'month').date(daysInPrevMonth - i)\n days.push({\n date,\n isPrevMonth: true,\n isCurrentMonth: false,\n isNextMonth: false,\n })\n }\n\n // Current month days\n for (let i = 1; i <= daysInMonth; i++) {\n const date = month.date(i)\n days.push({\n date,\n isPrevMonth: false,\n isCurrentMonth: true,\n isNextMonth: false,\n })\n }\n\n // Next month days to complete the grid\n const remainingDays = 42 - days.length // 6 weeks * 7 days\n for (let i = 1; i <= remainingDays; i++) {\n const date = month.add(1, 'month').date(i)\n days.push({\n date,\n isPrevMonth: false,\n isCurrentMonth: false,\n isNextMonth: true,\n })\n }\n\n return { month, days }\n}\n\nexport function createCalendarDay(\n date: Dayjs,\n isPrevMonth: boolean,\n isCurrentMonth: boolean,\n isNextMonth: boolean,\n options: {\n startDate?: Dayjs | null\n endDate?: Dayjs | null\n minDate?: Dayjs | null\n maxDate?: Dayjs | null\n disabledDates?: Dayjs[]\n holidays?: Dayjs[]\n } = {},\n): CalendarDay {\n const {\n startDate = null,\n endDate = null,\n minDate = null,\n maxDate = null,\n disabledDates = [],\n holidays = [],\n } = options\n\n const isDisabled\n = (minDate && date.isBefore(minDate, 'day'))\n || (maxDate && date.isAfter(maxDate, 'day'))\n || disabledDates.some(d => d.isSame(date, 'day'))\n\n const isHoliday = holidays.some(h => h.isSame(date, 'day'))\n\n const isSelected\n = (startDate && date.isSame(startDate, 'day'))\n || (endDate && date.isSame(endDate, 'day'))\n\n const isInRange\n = startDate\n && endDate\n && date.isAfter(startDate, 'day')\n && date.isBefore(endDate, 'day')\n\n const isToday = date.isSame(dayjs(), 'day')\n\n const isWeekend = date.day() === 0 || date.day() === 6\n\n return {\n date,\n isPrevMonth,\n isCurrentMonth,\n isNextMonth,\n isDisabled,\n isHoliday,\n isWeekend,\n isSelected,\n isInRange,\n isToday,\n }\n}\n\nexport function generateCalendarMonths(\n numberOfMonths: number,\n startOffset: number = 0,\n options: {\n startDate?: Dayjs | null\n endDate?: Dayjs | null\n minDate?: Dayjs | null\n maxDate?: Dayjs | null\n disabledDates?: Dayjs[]\n holidays?: Dayjs[]\n } = {},\n): CalendarMonth[] {\n const months: CalendarMonth[] = []\n\n for (let i = 0; i < numberOfMonths; i++) {\n const { month, days } = getMonthDays(startOffset + i)\n\n const calendarDays = days.map(day =>\n createCalendarDay(\n day.date,\n day.isPrevMonth,\n day.isCurrentMonth,\n day.isNextMonth,\n options,\n ),\n )\n\n months.push({\n month,\n days: calendarDays,\n })\n }\n\n return months\n}\n\nexport function getWeekDays(locale: string = 'en', format: 'short' | 'narrow' = 'short'): string[] {\n const weekStart = dayjs().startOf('week')\n const days: string[] = []\n\n for (let i = 0; i < 7; i++) {\n const day = weekStart.add(i, 'day')\n days.push(format === 'short' ? day.format('ddd') : day.format('dd'))\n }\n\n return days\n}\n","import type { Dayjs } from 'dayjs'\nimport dayjs from 'dayjs'\nimport isBetween from 'dayjs/plugin/isBetween'\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter'\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\n\ndayjs.extend(isBetween)\ndayjs.extend(isSameOrAfter)\ndayjs.extend(isSameOrBefore)\ndayjs.extend(customParseFormat)\n\nexport { dayjs }\nexport type { Dayjs }\n\nexport function parseDate(date: string | Date | Dayjs, format?: string): Dayjs {\n if (dayjs.isDayjs(date))\n return date\n return format ? dayjs(date, format) : dayjs(date)\n}\n\nexport function formatDate(date: Dayjs, format: string = 'YYYY-MM-DD'): string {\n return date.format(format)\n}\n\nexport function isDateInRange(date: Dayjs, start: Dayjs, end: Dayjs): boolean {\n return date.isBetween(start, end, 'day', '[]')\n}\n\nexport function getDaysBetween(start: Dayjs, end: Dayjs): number {\n return end.diff(start, 'day')\n}\n\nexport function isWeekend(date: Dayjs): boolean {\n const day = date.day()\n return day === 0 || day === 6 // Sunday or Saturday\n}\n\nexport function isToday(date: Dayjs): boolean {\n return date.isSame(dayjs(), 'day')\n}\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from \"vue\";\nimport {\n breakpointsTailwind,\n onClickOutside,\n useBreakpoints,\n useWindowSize,\n} from \"@vueuse/core\";\nimport type { Dayjs } from \"dayjs\";\nimport { dayjs } from \"./utils/date\";\nimport { generateCalendarMonths, getWeekDays } from \"./utils/calendar\";\nimport { calculatePosition } from \"./utils/position\";\nimport type { CalendarDay, RangepickerProps } from \"./types\";\n\nconst props = withDefaults(defineProps<RangepickerProps>(), {\n isOpen: false,\n variant: \"desktop\",\n valueOfMonths: 2,\n valueOfColumns: 2,\n format: \"YYYY-MM-DD\",\n delimiter: \" - \",\n showTooltip: true,\n autoApply: false,\n position: \"auto\",\n borderRadius: \"0.75rem\",\n});\n\nconst emit = defineEmits<{\n \"update:modelValue\": [value: { startDate: string; endDate: string }];\n \"update:isOpen\": [value: boolean];\n dateSelected: [date: Dayjs];\n rangeSelected: [start: Dayjs, end: Dayjs];\n}>();\nconst breakpoints = useBreakpoints(breakpointsTailwind);\nconst isMobile = breakpoints.smallerOrEqual(\"lg\");\nconst numberOfMonths = computed(() =>\n isMobile.value ? 1 : props.valueOfMonths,\n);\nconst numberOfColumns = computed(() =>\n isMobile.value ? 1 : props.valueOfColumns,\n);\n\n// Refs\nconst calendarRef = ref<HTMLElement | null>(null);\nconst isFadingOut = ref(false);\nconst hoveredDay = ref<CalendarDay | null>(null);\nconst monthOffset = ref(0);\n\n// Local state\nconst localIsOpen = ref(props.isOpen);\nconst localStartDate = ref<Dayjs | null>(null);\nconst localEndDate = ref<Dayjs | null>(null);\n\n// Parse dates from props\nconst parsedMinDate = computed(() =>\n props.minDate ? dayjs(props.minDate) : null,\n);\nconst parsedMaxDate = computed(() =>\n props.maxDate ? dayjs(props.maxDate) : null,\n);\nconst parsedDisabledDates = computed(\n () => props.disabledDates?.map((d) => dayjs(d)) || [],\n);\nconst parsedHolidays = computed(\n () => props.holidays?.map((h) => dayjs(h)) || [],\n);\n\n// Calendar data\nconst weekdays = computed(() => getWeekDays(\"en\", \"narrow\"));\n\n// For mobile view, show only 1 month\nconst effectiveNumberOfMonths = computed(() =>\n props.variant === \"mobile\" ? 1 : numberOfMonths.value,\n);\n\nconst calendarMonths = computed(() =>\n generateCalendarMonths(effectiveNumberOfMonths.value, monthOffset.value, {\n startDate: localStartDate.value,\n endDate: localEndDate.value,\n minDate: parsedMinDate.value,\n maxDate: parsedMaxDate.value,\n disabledDates: parsedDisabledDates.value,\n holidays: parsedHolidays.value,\n }),\n);\n\nconst nightCount = computed(() => {\n if (!localStartDate.value || !localEndDate.value) return 0;\n return localEndDate.value.diff(localStartDate.value, \"day\");\n});\n\nconst formattedDateRange = computed(() => {\n if (!localStartDate.value && !localEndDate.value) return \"\";\n else if (localStartDate.value && !localEndDate.value)\n return localStartDate.value.format(props.format);\n else if (localStartDate.value && localEndDate.value)\n return `${localStartDate.value.format(props.format)}${props.delimiter}${localEndDate.value.format(props.format)}`;\n else return \"\";\n});\n\n// Navigation\nconst canNavigatePrevious = computed(() => {\n if (!parsedMinDate.value) return true;\n const firstMonth = dayjs().add(monthOffset.value, \"month\").startOf(\"month\");\n return firstMonth.isAfter(parsedMinDate.value, \"month\");\n});\n\nconst canNavigateNext = computed(() => {\n if (!parsedMaxDate.value) return true;\n const lastMonth = dayjs()\n .add(monthOffset.value + effectiveNumberOfMonths.value - 1, \"month\")\n .endOf(\"month\");\n return lastMonth.isBefore(parsedMaxDate.value, \"month\");\n});\n\n// Positioning\nconst { width: windowWidth } = useWindowSize();\nconst calendarStyle = ref<Record<string, string>>({});\n\nfunction updatePosition() {\n if (props.variant === \"mobile\") {\n calendarStyle.value = {\n '--border-radius-day': props.borderRadius,\n };\n return;\n }\n\n nextTick(() => {\n const position = calculatePosition(\n props.triggerElement,\n calendarRef.value,\n props.position,\n );\n\n calendarStyle.value = {\n left: `${position.left}px`,\n ...(position.top !== undefined && { top: `${position.top}px` }),\n ...(position.bottom !== undefined && { bottom: `${position.bottom}px` }),\n ...(position.transform && { transform: position.transform }),\n '--border-radius-day': props.borderRadius,\n };\n });\n}\n\n// Tooltip\nconst tooltipStyle = ref<Record<string, string>>({});\nconst tooltipText = computed(() => {\n if (!hoveredDay.value || !localStartDate.value) return \"\";\n const nights = hoveredDay.value.date.diff(localStartDate.value, \"day\");\n if (nights <= 0) return \"\";\n return `${nights} ${nights === 1 ? \"night\" : \"nights\"}`;\n});\n\nconst showTooltipComputed = computed(() => {\n return (\n props.showTooltip &&\n hoveredDay.value &&\n localStartDate.value &&\n !localEndDate.value &&\n hoveredDay.value.date.isAfter(localStartDate.value, \"day\")\n );\n});\n\n// Methods\nfunction getDayClasses(day: CalendarDay) {\n const classes = [\"rangepicker-day\"];\n\n if (!day.isCurrentMonth) classes.push(\"rangepicker-day-other-month\");\n\n if (day.isDisabled) classes.push(\"rangepicker-day-disabled\");\n\n if (day.isToday) classes.push(\"rangepicker-day-today\");\n\n if (day.isWeekend && !day.isSelected) classes.push(\"rangepicker-day-weekend\");\n\n if (day.isHoliday) classes.push(\"rangepicker-day-holiday\");\n\n if (day.isSelected) {\n if (\n localStartDate.value &&\n localEndDate.value &&\n day.date.isSame(localStartDate.value, \"day\") &&\n day.date.isSame(localEndDate.value, \"day\")\n )\n classes.push(\"rangepicker-day-selected-single\");\n else if (\n localStartDate.value &&\n day.date.isSame(localStartDate.value, \"day\")\n )\n classes.push(\"rangepicker-day-selected-start\");\n else if (localEndDate.value && day.date.isSame(localEndDate.value, \"day\"))\n classes.push(\"rangepicker-day-selected-end\");\n else classes.push(\"rangepicker-day-selected\");\n }\n\n if (day.isInRange) classes.push(\"rangepicker-day-in-range\");\n\n // Add hover effect for potential range\n if (localStartDate.value && !localEndDate.value && hoveredDay.value) {\n const start = localStartDate.value;\n const hovered = hoveredDay.value.date;\n if (day.date.isAfter(start, \"day\") && day.date.isBefore(hovered, \"day\"))\n classes.push(\"rangepicker-day-hover-range\");\n else if (day.date.isSame(hovered, \"day\") && hovered.isAfter(start, \"day\"))\n classes.push(\"rangepicker-day-hover-end\");\n }\n\n return classes;\n}\n\nfunction selectDate(day: CalendarDay, event: MouseEvent) {\n event.preventDefault();\n if (day.isDisabled) return;\n\n emit(\"dateSelected\", day.date);\n\n // Range selection logic\n if (!localStartDate.value || (localStartDate.value && localEndDate.value)) {\n // Start new range\n localStartDate.value = day.date;\n localEndDate.value = null;\n } else {\n // Complete range\n if (day.date.isBefore(localStartDate.value, \"day\")) {\n // Swap if end is before start\n localEndDate.value = localStartDate.value;\n localStartDate.value = day.date;\n } else {\n localEndDate.value = day.date;\n }\n\n // Validate min/max days\n if (props.minDays) {\n const days = localEndDate.value.diff(localStartDate.value, \"day\");\n if (days < props.minDays) {\n // Invalid range, reset\n localStartDate.value = day.date;\n localEndDate.value = null;\n return;\n }\n }\n\n if (props.maxDays) {\n const days = localEndDate.value.diff(localStartDate.value, \"day\");\n if (days > props.maxDays) {\n // Invalid range, reset\n localStartDate.value = day.date;\n localEndDate.value = null;\n return;\n }\n }\n\n emit(\"rangeSelected\", localStartDate.value, localEndDate.value);\n\n if (props.autoApply) apply();\n }\n}\n\nfunction handleDayHover(day: CalendarDay, event: MouseEvent) {\n hoveredDay.value = day;\n\n if (props.showTooltip && localStartDate.value && !localEndDate.value)\n updateTooltipPosition(event);\n}\n\nfunction updateTooltipPosition(event: MouseEvent) {\n const rect = (event.target as HTMLElement).getBoundingClientRect();\n tooltipStyle.value = {\n left: `${rect.left + rect.width / 2}px`,\n top: `${rect.top - 10}px`,\n transform: \"translateX(-50%) translateY(-100%)\",\n };\n}\n\nfunction handleDayLeave() {\n hoveredDay.value = null;\n}\n\nfunction previousMonth() {\n if (canNavigatePrevious.value) monthOffset.value--;\n}\n\nfunction nextMonth() {\n if (canNavigateNext.value) monthOffset.value++;\n}\n\nfunction close() {\n if (isFadingOut.value) return;\n isFadingOut.value = true;\n setTimeout(() => {\n localIsOpen.value = false;\n emit(\"update:isOpen\", false);\n isFadingOut.value = false;\n }, 200); // match fade-leave-active duration\n}\n\nfunction apply() {\n if (localStartDate.value && localEndDate.value) {\n emit(\"update:modelValue\", {\n startDate: localStartDate.value.format(props.format),\n endDate: localEndDate.value.format(props.format),\n });\n }\n close();\n}\n\nfunction cancel() {\n // Reset to initial values\n if (props.modelValue?.startDate)\n localStartDate.value = dayjs(props.modelValue.startDate);\n else localStartDate.value = null;\n\n if (props.modelValue?.endDate)\n localEndDate.value = dayjs(props.modelValue.endDate);\n else localEndDate.value = null;\n\n close();\n}\n\n// Watch props\nwatch(\n () => props.isOpen,\n (newVal) => {\n localIsOpen.value = newVal;\n if (newVal) updatePosition();\n },\n);\n\n// Watch props\nwatch(\n () => props.close,\n (newVal) => {\n if (newVal) close();\n },\n);\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (newVal?.startDate) localStartDate.value = dayjs(newVal.startDate);\n else localStartDate.value = null;\n\n if (newVal?.endDate) localEndDate.value = dayjs(newVal.endDate);\n else localEndDate.value = null;\n },\n { immediate: true, deep: true },\n);\n\nwatch([windowWidth, localIsOpen], () => {\n if (localIsOpen.value) updatePosition();\n});\n\n// Click outside to close\nonClickOutside(calendarRef, () => {\n if (localIsOpen.value && props.variant !== \"mobile\") close();\n});\n\n// Keyboard navigation\nfunction handleKeydown(e: KeyboardEvent) {\n if (!localIsOpen.value) return;\n\n if (e.key === \"Escape\") close();\n}\n\nonMounted(() => {\n document.addEventListener(\"keydown\", handleKeydown);\n if (props.isOpen) updatePosition();\n});\n\nonUnmounted(() => {\n document.removeEventListener(\"keydown\", handleKeydown);\n});\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition :name=\"variant === 'mobile' ? 'slide-up' : 'fade'\">\n <div v-if=\"localIsOpen || isFadingOut\" class=\"rangepicker-overlay\">\n <!-- Backdrop -->\n <div class=\"rangepicker-backdrop\" @click=\"close\" />\n\n <!-- Calendar Container -->\n <div\n ref=\"calendarRef\"\n class=\"rangepicker-container\"\n :class=\"[variant === 'mobile' ? 'rangepicker-mobile' : '']\"\n :style=\"{ ...calendarStyle, ...colorStyles, borderRadius: props.borderRadius }\"\n >\n <!-- Header -->\n <div class=\"rangepicker-header\">\n <div class=\"arch-flex arch-items-center arch-justify-between\">\n <div>\n <p\n v-if=\"label\"\n class=\"arch-text-xs arch-font-medium arch-text-gray-500 arch-mb-1\"\n >\n {{ label }}\n </p>\n <p\n class=\"arch-text-sm arch-font-semibold arch-text-gray-900\"\n >\n {{ formattedDateRange || placeholder || \"Select dates\" }}\n </p>\n </div>\n <p\n v-if=\"nightCount > 0\"\n class=\"arch-text-xs arch-text-gray-500 arch-mt-1\"\n >\n {{ nightCount }} {{ nightCount === 1 ? \"night\" : \"nights\" }}\n </p>\n <!-- <button\n class=\"rangepicker-nav-button\"\n aria-label=\"Close\"\n @click=\"close\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"arch-h-5 arch-w-5\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </button> -->\n </div>\n </div>\n\n <!-- Calendar Body -->\n <div class=\"rangepicker-body\">\n <div\n class=\"rangepicker-month-grid\"\n >\n <div\n v-for=\"(monthData, index) in calendarMonths\"\n :key=\"monthData.month.format('YYYY-MM')\"\n class=\"rangepicker-month\"\n >\n <!-- Month Header -->\n <div class=\"rangepicker-month-header\">\n <button\n v-if=\"variant === 'mobile' || index === 0\"\n class=\"rangepicker-nav-button\"\n :disabled=\"!canNavigatePrevious\"\n aria-label=\"Previous month\"\n @click=\"previousMonth\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"arch-h-5 arch-w-5\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </button>\n <div v-else class=\"arch-w-8\"></div>\n\n <span class=\"rangepicker-month-title\">\n {{ monthData.month.format(\"MMMM YYYY\") }}\n </span>\n\n <button\n v-if=\"\n variant === 'mobile' ||\n index === calendarMonths.length - 1\n \"\n class=\"rangepicker-nav-button\"\n :disabled=\"!canNavigateNext\"\n aria-label=\"Next month\"\n @click=\"nextMonth\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"arch-h-5 arch-w-5\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </button>\n <div v-else class=\"arch-w-8\"></div>\n </div>\n\n <!-- Weekday Headers -->\n <div class=\"rangepicker-weekdays\">\n <div\n v-for=\"weekday in weekdays\"\n :key=\"weekday\"\n class=\"rangepicker-weekday\"\n >\n {{ weekday }}\n </div>\n </div>\n\n <!-- Calendar Grid -->\n <div class=\"rangepicker-grid\" @mouseleave=\"handleDayLeave\">\n <button\n v-for=\"day in monthData.days\"\n :key=\"day.date.unix()\"\n :class=\"getDayClasses(day)\"\n :disabled=\"day.isDisabled\"\n :aria-label=\"day.date.format('MMMM D, YYYY')\"\n @click=\"(e) => selectDate(day, e)\"\n @mouseenter=\"(e) => handleDayHover(day, e)\"\n >\n <span>{{ day.date.date() }}</span>\n </button>\n </div>\n </div>\n </div>\n\n <!-- Apply/Cancel Buttons (if not autoApply) -->\n <div\n v-if=\"!autoApply\"\n class=\"arch-mt-4 arch-flex arch-items-center arch-justify-end arch-gap-2 arch-border-t arch-border-gray-200 arch-pt-4\"\n >\n <button\n class=\"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-gray-700 hover:arch-bg-gray-100 arch-rounded-lg arch-transition-colors\"\n @click=\"cancel\"\n >\n Cancel\n </button>\n <button\n class=\"arch-px-4 arch-py-2 arch-text-sm arch-font-medium arch-text-white arch-rounded-lg arch-transition-colors disabled:arch-opacity-50 disabled:arch-cursor-not-allowed\"\n :style=\"{\n backgroundColor: colorStyles?.['--color-primary'] \n ? `rgb(${colorStyles['--color-primary']})` \n : 'rgb(37 99 235)',\n }\"\n :disabled=\"!localStartDate || !localEndDate\"\n @click=\"apply\"\n >\n Apply\n </button>\n </div>\n </div>\n\n <!-- Tooltip -->\n <div\n v-if=\"showTooltipComputed\"\n class=\"rangepicker-tooltip\"\n :style=\"tooltipStyle\"\n >\n <div class=\"arch-flex arch-items-center arch-gap-1\">\n {{ tooltipText }}\n </div>\n </div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style lang=\"scss\" scoped>\n@use \"./styles/rangepicker.scss\";\n</style>\n","export interface PositionResult {\n top?: number\n bottom?: number\n left: number\n transform?: string\n}\n\nexport function calculatePosition(\n triggerElement: HTMLElement | null,\n calendarElement: HTMLElement | null,\n preferredPosition: 'auto' | 'top' | 'bottom' = 'auto',\n): PositionResult {\n if (!triggerElement || !calendarElement)\n return { left: 0 }\n\n const triggerRect = triggerElement.getBoundingClientRect()\n const calendarRect = calendarElement.getBoundingClientRect()\n const viewportHeight = window.innerHeight\n const viewportWidth = window.innerWidth\n\n // Calculate available space\n const spaceAbove = triggerRect.top\n const spaceBelow = viewportHeight - triggerRect.bottom\n\n // Determine vertical position\n const position: PositionResult = { left: triggerRect.left }\n\n if (preferredPosition === 'auto') {\n if (spaceBelow >= calendarRect.height || spaceBelow > spaceAbove) {\n // Position below\n position.top = triggerRect.bottom + 8\n }\n else {\n // Position above\n position.bottom = viewportHeight - triggerRect.top + 8\n }\n }\n else if (preferredPosition === 'top') {\n position.bottom = viewportHeight - triggerRect.top + 8\n }\n else {\n position.top = triggerRect.bottom + 8\n }\n\n // Adjust horizontal position to keep within viewport\n if (position.left + calendarRect.width > viewportWidth)\n position.left = viewportWidth - calendarRect.width - 16\n\n if (position.left < 16)\n position.left = 16\n\n return position\n}\n","<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport Rangepicker from './Rangepicker.vue'\nimport type { RangepickerInputProps } from './types'\n\n// Helper function to convert HEX to RGB\nfunction hexToRgb(hex: string): string | null {\n // Remove # if present\n hex = hex.replace(/^#/, '')\n\n // Handle 3-digit hex\n if (hex.length === 3) {\n hex = hex.split('').map(char => char + char).join('')\n }\n\n if (hex.length !== 6) {\n console.warn(`[Rangepicker] Invalid hex color: ${hex}`)\n return null\n }\n\n const r = parseInt(hex.substring(0, 2), 16)\n const g = parseInt(hex.substring(2, 4), 16)\n const b = parseInt(hex.substring(4, 6), 16)\n\n if (isNaN(r) || isNaN(g) || isNaN(b)) {\n return null\n }\n\n return `${r} ${g} ${b}`\n}\n\nconst props = withDefaults(defineProps<RangepickerInputProps>(), {\n readonly: true,\n variant: 'desktop',\n placeholder: 'Select dates',\n showClearButton: true,\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: string]\n 'focusin': []\n}>()\n\n// Refs\nconst inputRef = ref<HTMLInputElement | null>(null)\nconst wrapperRef = ref<HTMLElement | null>(null)\nconst isOpen = ref(false)\n\n// Parse the modelValue into start/end dates\nfunction parseValue(value?: string) {\n if (!value)\n return { startDate: '', endDate: '' }\n\n const parts = value.split(' - ')\n if (parts.length === 2) {\n return {\n startDate: parts[0].trim(),\n endDate: parts[1].trim(),\n }\n }\n return { startDate: '', endDate: '' }\n}\n\nwatch(() => props?.close, (cur) => {\n if (cur)\n inputRef.value.blur()\n})\nconst localValue = ref(parseValue(props.modelValue))\n\nconst displayValue = computed(() => {\n return props.modelValue || ''\n})\n\nconst inputClass = computed(() => {\n return props.class || 'arch-w-full arch-px-3 arch-py-2 arch-border arch-border-gray-300 arch-rounded-lg arch-text-sm arch-text-gray-900 focus:arch-outline-none focus:arch-ring-2 focus:arch-ring-blue-500 focus:arch-border-blue-500'\n})\n\nfunction openPicker() {\n isOpen.value = true\n}\n\nfunction onFocus() {\n emit('focusin')\n openPicker()\n}\n\nfunction handleUpdate(value: { startDate: string; endDate: string }) {\n localValue.value = value\n const formatted = `${value.startDate} - ${value.endDate}`\n emit('update:modelValue', formatted)\n}\n\nfunction clearValue() {\n localValue.value = { startDate: '', endDate: '' }\n emit('update:modelValue', '')\n isOpen.value = false\n}\n\nwatch(() => props.modelValue, (newVal) => {\n localValue.value = parseValue(newVal)\n})\n\n// Compute CSS variables for scoped styling\nconst colorStyles = computed(() => {\n const styles: Record<string, string> = {}\n\n if (props.primaryColor) {\n const rgb = hexToRgb(props.primaryColor)\n if (rgb) {\n styles['--color-primary'] = rgb\n }\n }\n\n if (props.secondaryColor) {\n const rgb = hexToRgb(props.secondaryColor)\n if (rgb) {\n styles['--color-secondary'] = rgb\n }\n }\n\n if (props.fontFamily) {\n styles['--rangepicker-font-family'] = props.fontFamily\n }\n\n return styles\n})\n</script>\n\n<template>\n <div ref=\"wrapperRef\" class=\"rangepicker-input-wrapper\" :style=\"colorStyles\">\n <div class=\"rangepicker-input-container\">\n <input :id=\"id\" ref=\"inputRef\" type=\"text\" :value=\"displayValue\" :placeholder=\"placeholder\" :readonly=\"readonly\"\n :name=\"name\" :class=\"inputClass\" @click=\"openPicker\" @focus=\"onFocus\" />\n \n <button v-if=\"showClearButton && displayValue\" type=\"button\" class=\"rangepicker-clear-button\"\n @click.stop=\"clearValue\" aria-label=\"Clear dates\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"arch-h-4 arch-w-4\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fill-rule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\"\n clip-rule=\"evenodd\" />\n </svg>\n </button>\n </div>\n\n <Rangepicker v-model=\"localValue\" v-model:is-open=\"isOpen\" :trigger-element=\"inputRef\" :min-date=\"minDate\"\n :max-date=\"maxDate\" :min-days=\"minDays\" :max-days=\"maxDays\"\n :value-of-months=\"numberOfMonths || 2\" :value-of-columns=\"numberOfColumns || 2\"\n :format=\"format || 'DD MMM YYYY'\" :auto-apply=\"autoApply !== false\"\n :show-tooltip=\"showTooltip !== false\" :variant=\"variant\" :close=\"props.close\" :color-styles=\"colorStyles\"\n :border-radius=\"borderRadius\" @update:model-value=\"handleUpdate\" />\n </div>\n</template>\n\n<style scoped lang=\"scss\">\n@use './styles/rangepicker.scss';\n\n.rangepicker-input-wrapper {\n position: relative;\n display: inline-block;\n width: 100%;\n font-family: var(--rangepicker-font-family, inherit);\n}\n\n.rangepicker-input-container {\n position: relative;\n display: flex;\n align-items: center;\n}\n\ninput {\n cursor: pointer;\n font-family: inherit;\n flex: 1;\n padding-right: 2.5rem;\n}\n\n.rangepicker-clear-button {\n position: absolute;\n right: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0.25rem;\n background: transparent;\n border: none;\n border-radius: 0.375rem;\n color: #6b7280;\n cursor: pointer;\n transition: all 0.2s;\n z-index: 1;\n\n &:hover {\n color: #374151;\n background: #f3f4f6;\n }\n\n &:active {\n transform: translateY(-50%) scale(0.95);\n }\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);\n }\n}\n</style>\n","import { ref } from 'vue'\nimport './styles/rangepicker.scss'\nimport Rangepicker from './Rangepicker.vue'\nimport RangepickerInput from './RangepickerInput.vue'\nimport type { \n DateRange, \n RangepickerProps, \n RangepickerEmits, \n CalendarDay, \n CalendarMonth,\n RangepickerInputProps\n} from './types'\n\n// Default export - RangepickerInput (Litepicker-compatible wrapper)\nexport default RangepickerInput\n\n// Named exports\nexport { Rangepicker, RangepickerInput }\n\n// Type exports\nexport type { \n RangepickerProps, \n RangepickerInputProps,\n RangepickerEmits, \n DateRange, \n CalendarDay, \n CalendarMonth \n}\n\n// Vue 3 composable for easy integration\nexport function useRangepicker(triggerRef: any, options: Partial<RangepickerProps> = {}) {\n const isOpen = ref(false)\n const dateRange = ref<DateRange>({ startDate: '', endDate: '' })\n\n const open = () => { isOpen.value = true }\n const close = () => { isOpen.value = false }\n const toggle = () => { isOpen.value = !isOpen.value }\n\n return {\n isOpen,\n dateRange,\n open,\n close,\n toggle,\n options,\n }\n}\n"],"names":["exports","e","i","t","prototype","isBetween","s","f","n","o","r","u","this","isAfter","isBefore","module","isSameOrAfter","isSame","isSameOrBefore","LTS","LT","L","LL","LLL","LLLL","a","h","zone","offset","match","indexOf","concat","d","meridiem","c","A","afternoon","Q","month","S","milliseconds","SS","SSS","ss","m","mm","H","HH","hh","D","DD","Do","ordinal","day","replace","w","ww","M","MM","MMM","map","slice","Error","MMMM","Y","YY","year","YYYY","Z","ZZ","l","formats","toUpperCase","length","regex","parser","exec","call","hours","p","customParseFormat","parseTwoDigitYear","parse","date","utc","args","$u","$locale","Ls","$d","Date","minutes","seconds","week","getDate","getFullYear","v","getMonth","g","y","UTC","toDate","init","$L","locale","format","Array","apply","isValid","getMonthDays","monthOffset","currentDate","dayjs","add","startOf","firstDayOfMonth","daysInMonth","daysInPrevMonth","subtract","days","push","isPrevMonth","isCurrentMonth","isNextMonth","remainingDays","createCalendarDay","options","startDate","endDate","minDate","maxDate","disabledDates","holidays","isDisabled","some","isHoliday","isSelected","isInRange","isToday","isWeekend","extend","props","__props","emit","__emit","isMobile","useBreakpoints","breakpointsTailwind","smallerOrEqual","numberOfMonths","computed","value","valueOfMonths","valueOfColumns","calendarRef","ref","isFadingOut","hoveredDay","localIsOpen","isOpen","localStartDate","localEndDate","parsedMinDate","parsedMaxDate","parsedDisabledDates","_a","parsedHolidays","weekdays","weekStart","getWeekDays","effectiveNumberOfMonths","variant","calendarMonths","startOffset","months","calendarDays","generateCalendarMonths","nightCount","diff","formattedDateRange","delimiter","canNavigatePrevious","canNavigateNext","endOf","width","windowWidth","useWindowSize","calendarStyle","updatePosition","nextTick","position","triggerElement","calendarElement","preferredPosition","left","triggerRect","getBoundingClientRect","calendarRect","viewportHeight","window","innerHeight","viewportWidth","innerWidth","spaceAbove","top","spaceBelow","bottom","height","calculatePosition","transform","borderRadius","tooltipStyle","tooltipText","nights","showTooltipComputed","showTooltip","getDayClasses","classes","start","hovered","handleDayHover","event","rect","target","updateTooltipPosition","handleDayLeave","previousMonth","nextMonth","close","setTimeout","cancel","modelValue","_b","handleKeydown","key","watch","newVal","immediate","deep","onClickOutside","onMounted","document","addEventListener","onUnmounted","removeEventListener","_createBlock","_Teleport","to","_createVNode","_Transition","name","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","class","onClick","_normalizeClass","style","_hoisted_2","_hoisted_3","label","_hoisted_4","_toDisplayString","_hoisted_5","placeholder","_hoisted_6","_hoisted_7","_hoisted_8","_Fragment","_renderList","monthData","index","_hoisted_9","disabled","xmlns","viewBox","fill","_hoisted_11","_hoisted_12","_hoisted_14","_hoisted_15","weekday","onMouseleave","unix","preventDefault","minDays","maxDays","autoApply","selectDate","onMouseenter","_hoisted_17","_normalizeStyle","colorStyles","_hoisted_18","_hoisted_19","hexToRgb","hex","split","char","join","console","warn","parseInt","substring","b","isNaN","inputRef","wrapperRef","parseValue","parts","trim","cur","blur","localValue","displayValue","inputClass","openPicker","onFocus","handleUpdate","formatted","clearValue","styles","primaryColor","rgb","secondaryColor","fontFamily","id","type","readonly","showClearButton","Rangepicker","$event","numberOfColumns","triggerRef","dateRange","open","toggle"],"mappings":"0mBAAoEA,QAA0L,SAASC,EAAEC,EAAEC,GAAGD,EAAEE,UAAUC,UAAU,SAASJ,EAAEC,EAAEI,EAAEC,GAAG,IAAIC,EAAEL,EAAEF,GAAGQ,EAAEN,EAAED,GAAGQ,EAAE,OAAOH,EAAEA,GAAG,MAAM,GAAGI,EAAE,MAAMJ,EAAE,GAAG,OAAOG,EAAEE,KAAKC,QAAQL,EAAEF,IAAIM,KAAKE,SAASN,EAAEF,MAAMK,EAAEC,KAAKE,SAASL,EAAEH,IAAIM,KAAKC,QAAQJ,EAAEH,MAAMI,EAAEE,KAAKE,SAASN,EAAEF,IAAIM,KAAKC,QAAQL,EAAEF,MAAMK,EAAEC,KAAKC,QAAQJ,EAAEH,IAAIM,KAAKE,SAASL,EAAEH,GAAG,CAAC,uDCAzdS,EAAAf,QAA8L,SAASC,EAAEE,GAAGA,EAAEC,UAAUY,cAAc,SAASf,EAAEE,GAAG,OAAOS,KAAKK,OAAOhB,EAAEE,IAAIS,KAAKC,QAAQZ,EAAEE,EAAE,CAAC,2DCA/RY,EAAAf,QAA+L,SAASC,EAAEC,GAAGA,EAAEE,UAAUc,eAAe,SAASjB,EAAEC,GAAG,OAAOU,KAAKK,OAAOhB,EAAEC,IAAIU,KAAKE,SAASb,EAAEC,EAAE,CAAC,2DCAlSa,EAAAf,QAAmK,WAAwB,IAAIC,EAAE,CAACkB,IAAI,YAAYC,GAAG,SAASC,EAAE,aAAaC,GAAG,eAAeC,IAAI,sBAAsBC,KAAK,6BAA6BrB,EAAE,gGAAgGK,EAAE,KAAKE,EAAE,OAAOR,EAAE,QAAQO,EAAE,qBAAqBH,EAAE,CAAA,EAAGmB,EAAE,SAASxB,GAAG,OAAOA,GAAGA,IAAIA,EAAE,GAAG,KAAK,IAAI,EAAMM,EAAE,SAASN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