@aquera/nile-elements 0.0.14 → 0.0.15

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.
@@ -4092,7 +4092,6 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
4092
4092
  line-height: 14px;
4093
4093
  letter-spacing: 0.2px;
4094
4094
  height: 50px;
4095
- margin-top: 10px;
4096
4095
  }
4097
4096
 
4098
4097
  .day-names,
@@ -4137,7 +4136,8 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
4137
4136
  background: white;
4138
4137
  display: flex;
4139
4138
  justify-content: space-between;
4140
- width: auto;
4139
+ width: 365px;
4140
+ box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);
4141
4141
  }
4142
4142
 
4143
4143
  .selected-date,
@@ -4186,24 +4186,24 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
4186
4186
  .base {
4187
4187
  background-color: white;
4188
4188
  border-radius: 4px;
4189
- padding-bottom: 20px;
4190
4189
  width: 365px;
4191
4190
  }
4192
4191
 
4193
4192
  .base__range {
4194
- width: 730px;
4193
+ padding: 24px;
4195
4194
  }
4196
4195
 
4197
4196
  .calender-input {
4198
- padding: 20px;
4197
+ margin-top: 6px;
4199
4198
  padding-bottom: 0px;
4200
- background: white;
4199
+ width: 365px;
4201
4200
  }
4202
4201
 
4203
4202
  .from {
4204
4203
  display: flex;
4205
4204
  justify-content: space-between;
4206
- gap: 20px;
4205
+ gap: 8px;
4206
+ margin-top: 12px;
4207
4207
  }
4208
4208
 
4209
4209
  .manual-input {
@@ -4211,16 +4211,18 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
4211
4211
  }
4212
4212
 
4213
4213
  .manual-input-label {
4214
+ color: #7f7f7f;
4215
+ font-family: Colfax-regular;
4214
4216
  font-size: 12px;
4215
- font-style: normal;
4216
4217
  font-weight: 500;
4217
- margin-bottom: 10px;
4218
+ line-height: 12px;
4219
+ letter-spacing: 0.2px;
4218
4220
  }
4219
4221
 
4220
4222
  .button-contaner {
4221
4223
  width: 100%;
4222
4224
  text-align: right;
4223
- padding: 10px 0;
4225
+ padding: 12px 0 0 0;
4224
4226
  }
4225
4227
  `;M.NileCalendar=class extends BM{constructor(){super(...arguments),this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.dropDownOpened=!1,this.valueAttribute=null,this.formattedDate=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.range=!1}static get styles(){return[WD]}valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){const M=this.value.getTimezoneOffset(),N=new Date(this.value.getTime()-60*M*1e3);isNaN(N.getTime())||(this.valueAttribute=N.toISOString().split("T")[0],this.formattedDate=`${String(N.getDate()).padStart(2,"0")}/${String(N.getMonth()+1).padStart(2,"0")}/${N.getFullYear()}`)}}updated(M){if(super.updated(M),M.has("valueAttribute")){const M=new Date(this.valueAttribute||"");if(!isNaN(M.getTime())){const N=M.getTimezoneOffset();this.value=new Date(M.getTime()-60*N*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear()}}}static get observedAttributes(){return["value","range"]}attributeChangedCallback(M,N,D){"value"===M?(this.valueAttribute=D,this.initializeValue()):"range"===M&&(this.range=null!==D)}initializeValue(){if(this.range)try{const M=JSON.parse(this.valueAttribute||"");this.startDate=new Date(M.startDate),this.endDate=new Date(M.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null}catch(M){}else if(this.valueAttribute){let M;M=new Date(this.valueAttribute),M=new Date(M.getTime()-6e4*M.getTimezoneOffset()),isNaN(M.getTime())||(this.value=M,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null)}this.requestUpdate()}connectedCallback(){if(super.connectedCallback(),this.initializeValue(),this.valueAttribute){const M=new Date(this.valueAttribute);isNaN(M.getTime())||(this.value=M,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear())}this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getDaysArray(M,N){const D=new Date(M,N+1,0).getDate();return Array.from({length:D},((M,N)=>N+1))}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate()}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate()}selectDate(M,N,D){const i=new Date(D,N,M);this.range?(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart?(this.startDate=i,this.endDate&&i>this.endDate&&(this.endDate=null),this.isSelectingStart=!1):(this.isSelectingStart=!0,this.startDate&&i<this.startDate?(this.startDate=i,this.endDate=null,this.isSelectingStart=!1):this.endDate=i)):(this.value=i,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide()),this.requestUpdate()}confimRange(){this.startDate&&this.endDate&&(this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate})}renderMonth(M,N,D){const i=new Date(M,N,1).getDay(),j=new Date(M,N+1,0).getDay(),I=this.getDaysArray(0===N?M-1:M,0===N?11:N-1),g=this.getDaysArray(11===N?M+1:M,11===N?0:N+1),u=I.slice(I.length-i),L=g.slice(0,6-j),T=[...u,...D,...L],z=(M,N,D,i)=>{if(!i)return"";if(!this.range&&this.value){if(M===this.value.getDate()&&N===this.value.getMonth()&&D===this.value.getFullYear())return"selected-date"}const j=this.startDate&&M===this.startDate.getDate()&&N===this.startDate.getMonth()&&D===this.startDate.getFullYear(),I=this.endDate&&M===this.endDate.getDate()&&N===this.endDate.getMonth()&&D===this.endDate.getFullYear();return j?"range-start":I?"range-end":""},t=(M,N,D,i)=>{if(!i)return!1;if(this.startDate&&this.endDate){const i=new Date(D,N,M);return i>=this.startDate&&i<=this.endDate}return!1};return V`
4226
4228
  <div class="calendar">
@@ -4254,16 +4256,16 @@ const bM=Symbol.for(""),ZM=M=>{if((null==M?void 0:M.r)===bM)return null==M?void
4254
4256
  </div>
4255
4257
  `}formatDate(M){if(!M)return"";return`${String(M.getDate()).padStart(2,"0")}/${String(M.getMonth()+1).padStart(2,"0")}/${M.getFullYear()}`}formatDateRange(M){return M?M.startDate&&M.endDate?`${this.formatDate(M.startDate)} - ${this.formatDate(M.endDate)}`:"":M}handleStartDateInput(M){const N=this.parseDate(M.detail.value);this.isValidDateInput(N)||(this.startDate=null),N&&(!this.endDate||N<=this.endDate)?this.startDate=N:(this.startDate=null,this.endDate=null),this.requestUpdate()}handleEndDateInput(M){const N=this.parseDate(M.detail.value);this.isValidDateInput(N)||(this.endDate=null),N&&(!this.startDate||N>=this.startDate)?this.endDate=N:this.endDate=null,this.requestUpdate()}parseDate(M){const[N,D,i]=M.split("/").map(Number),j=new Date(i,D-1,N);return isNaN(j.getTime())?null:j}isValidDateInput(M){return/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(M)}formatTime(M){if(!M)return"";return`${String(M.getHours()).padStart(2,"0")}:${String(M.getMinutes()).padStart(2,"0")}:${String(M.getSeconds()).padStart(2,"0")}`}isValidTimeInput(M){return/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(M)}parseTime(M,N){if(!this.isValidTimeInput(M))return null;const[D,i,j]=M.split(":").map(Number),I=new Date(N.getTime());return I.setHours(D,i,j),I}handleStartTimeInput(M){if(!this.startDate)return void(this.startDate=null);const N=this.parseTime(M.detail.value,this.startDate);N?this.startDate=N:this.startDate.setHours(0,0,0),this.requestUpdate()}handleEndTimeInput(M){if(!this.endDate)return void(this.endDate=null);const N=this.parseTime(M.detail.value,this.endDate);N?this.endDate=N:this.endDate.setHours(0,0,0),this.requestUpdate()}render(){this.getDaysArray(this.currentYear,this.currentMonth);const M=(this.currentMonth+1)%12,N=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(N,M),V`
4256
4258
 
4257
- <div class="base${this.range?"__range":""}">
4259
+ <div class="base ${this.range?"base__range":""}">
4258
4260
  <div class="calendar-wrapper" >
4259
4261
  <div class="calendar-container ${this.range?"with-margin":""}">
4260
4262
  ${this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth))}
4261
4263
  </div>
4262
- ${this.range?V`
4264
+ <!-- ${this.range?V`
4263
4265
  <div class="calendar-container">
4264
4266
  ${this.renderMonth(this.currentYear,(this.currentMonth+1)%12,this.getDaysArray(this.currentYear,(this.currentMonth+1)%12))}
4265
4267
  </div>
4266
- `:""}
4268
+ `:""} -->
4267
4269
 
4268
4270
  </div>
4269
4271
  ${this.range?V`
@@ -1,2 +1,2 @@
1
- System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-calendar.css.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-0f6a51ec.cjs.js","lit","lit/directives/class-map.js","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,n,a,h,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,r;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){n=_nileCalendarCssCjsJs.s;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){l=_property002CjsJs.n;},function(_lit){},function(_litDirectivesClassMapJs){},function(_nilePopupNilePopupCssCjsJs){}],execute:function(){_export("N",r=/*#__PURE__*/function(_h){_inherits(r,_h);var _super=_createSuper(r);function r(){var _this;_classCallCheck(this,r);_this=_super.apply(this,arguments),_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.dropDownOpened=!1,_this.valueAttribute=null,_this.formattedDate=null,_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.range=!1;return _this;}_createClass(r,[{key:"valueChanged",value:function valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){var _t=this.value.getTimezoneOffset(),_i=new Date(this.value.getTime()-60*_t*1e3);isNaN(_i.getTime())||(this.valueAttribute=_i.toISOString().split("T")[0],this.formattedDate="".concat(String(_i.getDate()).padStart(2,"0"),"/").concat(String(_i.getMonth()+1).padStart(2,"0"),"/").concat(_i.getFullYear()));}}},{key:"updated",value:function updated(t){if(_get(_getPrototypeOf(r.prototype),"updated",this).call(this,t),t.has("valueAttribute")){var _t2=new Date(this.valueAttribute||"");if(!isNaN(_t2.getTime())){var _i2=_t2.getTimezoneOffset();this.value=new Date(_t2.getTime()-60*_i2*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}}}},{key:"attributeChangedCallback",value:function attributeChangedCallback(t,i,s){"value"===t?(this.valueAttribute=s,this.initializeValue()):"range"===t&&(this.range=null!==s);}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null;}catch(t){}else if(this.valueAttribute){var _t4;_t4=new Date(this.valueAttribute),_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null);}this.requestUpdate();}},{key:"connectedCallback",value:function connectedCallback(){if(_get(_getPrototypeOf(r.prototype),"connectedCallback",this).call(this),this.initializeValue(),this.valueAttribute){var _t5=new Date(this.valueAttribute);isNaN(_t5.getTime())||(this.value=_t5,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(r.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"getDaysArray",value:function getDaysArray(t,i){var s=new Date(t,i+1,0).getDate();return Array.from({length:s},function(t,i){return i+1;});}},{key:"nextMonth",value:function nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate();}},{key:"prevMonth",value:function prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate();}},{key:"selectDate",value:function selectDate(t,i,s){var e=new Date(s,i,t);this.range?(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart?(this.startDate=e,this.endDate&&e>this.endDate&&(this.endDate=null),this.isSelectingStart=!1):(this.isSelectingStart=!0,this.startDate&&e<this.startDate?(this.startDate=e,this.endDate=null,this.isSelectingStart=!1):this.endDate=e)):(this.value=e,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide()),this.requestUpdate();}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&(this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate});}},{key:"renderMonth",value:function renderMonth(t,s,e){var _this2=this;var n=new Date(t,s,1).getDay(),a=new Date(t,s+1,0).getDay(),h=this.getDaysArray(0===s?t-1:t,0===s?11:s-1),l=this.getDaysArray(11===s?t+1:t,11===s?0:s+1),_r=h.slice(h.length-n),d=l.slice(0,6-a),c=[].concat(_toConsumableArray(_r),_toConsumableArray(e),_toConsumableArray(d)),u=function u(t,i,s,e){if(!e)return"";if(!_this2.range&&_this2.value){if(t===_this2.value.getDate()&&i===_this2.value.getMonth()&&s===_this2.value.getFullYear())return"selected-date";}var n=_this2.startDate&&t===_this2.startDate.getDate()&&i===_this2.startDate.getMonth()&&s===_this2.startDate.getFullYear(),a=_this2.endDate&&t===_this2.endDate.getDate()&&i===_this2.endDate.getMonth()&&s===_this2.endDate.getFullYear();return n?"range-start":a?"range-end":"";},o=function o(t,i,s,e){if(!e)return!1;if(_this2.startDate&&_this2.endDate){var _e=new Date(s,i,t);return _e>=_this2.startDate&&_e<=_this2.endDate;}return!1;};return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowleft\" color=\"black\" @click=\"","\">\n </nile-icon>\n <span\n >","\n ","</span\n >\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowright\" color=\"black\" @click=\"","\">\n </nile-icon>\n </div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ","\n </div>\n </div>\n "])),this.prevMonth,new Date(t,s).toLocaleString("default",{month:"long"}),t,this.nextMonth,c.map(function(n,a){var h=a>=_r.length&&a<_r.length+e.length;return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <div\n class=\"day "," "," ","\"\n @click=\"","\"\n >\n ","\n </div>"])),u(n,s,t,h),o(n,s,t,h)?"in-range":"",h?"":"filler",function(){h&&_this2.selectDate(n,s,t);},n);}));}},{key:"formatDate",value:function formatDate(t){if(!t)return"";return"".concat(String(t.getDate()).padStart(2,"0"),"/").concat(String(t.getMonth()+1).padStart(2,"0"),"/").concat(t.getFullYear());}},{key:"formatDateRange",value:function formatDateRange(t){return t?t.startDate&&t.endDate?"".concat(this.formatDate(t.startDate)," - ").concat(this.formatDate(t.endDate)):"":t;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate();}},{key:"handleEndDateInput",value:function handleEndDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate();}},{key:"parseDate",value:function parseDate(t){var _t$split$map=t.split("/").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),i=_t$split$map2[0],s=_t$split$map2[1],e=_t$split$map2[2],n=new Date(e,s-1,i);return isNaN(n.getTime())?null:n;}},{key:"isValidDateInput",value:function isValidDateInput(t){return /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map3=t.split(":").map(Number),_t$split$map4=_slicedToArray(_t$split$map3,3),s=_t$split$map4[0],e=_t$split$map4[1],n=_t$split$map4[2],a=new Date(i.getTime());return a.setHours(s,e,n),a;}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"render",value:function render(){this.getDaysArray(this.currentYear,this.currentMonth);var t=(this.currentMonth+1)%12,s=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(s,t),i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n\n <div class=\"base","\">\n <div class=\"calendar-wrapper\" >\n <div class=\"calendar-container ","\">\n ","\n </div>\n ","\n\n </div>\n ","\n </div>\n "])),this.range?"__range":"",this.range?"with-margin":"",this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),this.range?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div class=\"calendar-container\">\n ","\n </div>\n "])),this.renderMonth(this.currentYear,(this.currentMonth+1)%12,this.getDaysArray(this.currentYear,(this.currentMonth+1)%12))):"",this.range?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input\">\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n\n </div>\n<br>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n <div class=\"button-contaner\">\n <nile-button class=\"apply-button\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n "])),this.formatDate(this.startDate),this.handleStartDateInput,this.formatTime(this.startDate),this.handleStartTimeInput,this.formatDate(this.endDate),this.handleEndDateInput,this.formatTime(this.endDate),this.handleEndTimeInput,!this.startDate||!this.endDate,this.confimRange):"");}}],[{key:"styles",get:function get(){return[n];}},{key:"observedAttributes",get:function get(){return["value","range"];}}]);return r;}(h));t([s("nile-dropdown")],r.prototype,"dropdown",void 0),t([l({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([l({type:Object})],r.prototype,"value",void 0),t([l({type:Object})],r.prototype,"rangeValue",void 0),t([l({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([l({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([l({type:Object})],r.prototype,"startDate",void 0),t([l({type:Object})],r.prototype,"endDate",void 0),t([l({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([l({type:Boolean})],r.prototype,"range",void 0),t([a("value")],r.prototype,"valueChanged",null),_export("N",r=t([e("nile-calendar")],r));}};});
1
+ System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-calendar.css.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-0f6a51ec.cjs.js","lit","lit/directives/class-map.js","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,n,a,h,l,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,r;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){n=_nileCalendarCssCjsJs.s;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){l=_property002CjsJs.n;},function(_lit){},function(_litDirectivesClassMapJs){},function(_nilePopupNilePopupCssCjsJs){}],execute:function(){_export("N",r=/*#__PURE__*/function(_h){_inherits(r,_h);var _super=_createSuper(r);function r(){var _this;_classCallCheck(this,r);_this=_super.apply(this,arguments),_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.dropDownOpened=!1,_this.valueAttribute=null,_this.formattedDate=null,_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.range=!1;return _this;}_createClass(r,[{key:"valueChanged",value:function valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){var _t=this.value.getTimezoneOffset(),_i=new Date(this.value.getTime()-60*_t*1e3);isNaN(_i.getTime())||(this.valueAttribute=_i.toISOString().split("T")[0],this.formattedDate="".concat(String(_i.getDate()).padStart(2,"0"),"/").concat(String(_i.getMonth()+1).padStart(2,"0"),"/").concat(_i.getFullYear()));}}},{key:"updated",value:function updated(t){if(_get(_getPrototypeOf(r.prototype),"updated",this).call(this,t),t.has("valueAttribute")){var _t2=new Date(this.valueAttribute||"");if(!isNaN(_t2.getTime())){var _i2=_t2.getTimezoneOffset();this.value=new Date(_t2.getTime()-60*_i2*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}}}},{key:"attributeChangedCallback",value:function attributeChangedCallback(t,i,s){"value"===t?(this.valueAttribute=s,this.initializeValue()):"range"===t&&(this.range=null!==s);}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null;}catch(t){}else if(this.valueAttribute){var _t4;_t4=new Date(this.valueAttribute),_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null);}this.requestUpdate();}},{key:"connectedCallback",value:function connectedCallback(){if(_get(_getPrototypeOf(r.prototype),"connectedCallback",this).call(this),this.initializeValue(),this.valueAttribute){var _t5=new Date(this.valueAttribute);isNaN(_t5.getTime())||(this.value=_t5,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(r.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"getDaysArray",value:function getDaysArray(t,i){var s=new Date(t,i+1,0).getDate();return Array.from({length:s},function(t,i){return i+1;});}},{key:"nextMonth",value:function nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++,this.requestUpdate();}},{key:"prevMonth",value:function prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--,this.requestUpdate();}},{key:"selectDate",value:function selectDate(t,i,s){var e=new Date(s,i,t);this.range?(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart?(this.startDate=e,this.endDate&&e>this.endDate&&(this.endDate=null),this.isSelectingStart=!1):(this.isSelectingStart=!0,this.startDate&&e<this.startDate?(this.startDate=e,this.endDate=null,this.isSelectingStart=!1):this.endDate=e)):(this.value=e,this.emit("nile-changed",{value:this.value}),this.dropdown&&this.dropdown.hide()),this.requestUpdate();}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&(this.emit("nile-changed",{startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide(),this.rangeValue={startDate:this.startDate,endDate:this.endDate});}},{key:"renderMonth",value:function renderMonth(t,s,e){var _this2=this;var n=new Date(t,s,1).getDay(),a=new Date(t,s+1,0).getDay(),h=this.getDaysArray(0===s?t-1:t,0===s?11:s-1),l=this.getDaysArray(11===s?t+1:t,11===s?0:s+1),_r=h.slice(h.length-n),d=l.slice(0,6-a),c=[].concat(_toConsumableArray(_r),_toConsumableArray(e),_toConsumableArray(d)),u=function u(t,i,s,e){if(!e)return"";if(!_this2.range&&_this2.value){if(t===_this2.value.getDate()&&i===_this2.value.getMonth()&&s===_this2.value.getFullYear())return"selected-date";}var n=_this2.startDate&&t===_this2.startDate.getDate()&&i===_this2.startDate.getMonth()&&s===_this2.startDate.getFullYear(),a=_this2.endDate&&t===_this2.endDate.getDate()&&i===_this2.endDate.getMonth()&&s===_this2.endDate.getFullYear();return n?"range-start":a?"range-end":"";},o=function o(t,i,s,e){if(!e)return!1;if(_this2.startDate&&_this2.endDate){var _e=new Date(s,i,t);return _e>=_this2.startDate&&_e<=_this2.endDate;}return!1;};return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowleft\" color=\"black\" @click=\"","\">\n </nile-icon>\n <span\n >","\n ","</span\n >\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowright\" color=\"black\" @click=\"","\">\n </nile-icon>\n </div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ","\n </div>\n </div>\n "])),this.prevMonth,new Date(t,s).toLocaleString("default",{month:"long"}),t,this.nextMonth,c.map(function(n,a){var h=a>=_r.length&&a<_r.length+e.length;return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <div\n class=\"day "," "," ","\"\n @click=\"","\"\n >\n ","\n </div>"])),u(n,s,t,h),o(n,s,t,h)?"in-range":"",h?"":"filler",function(){h&&_this2.selectDate(n,s,t);},n);}));}},{key:"formatDate",value:function formatDate(t){if(!t)return"";return"".concat(String(t.getDate()).padStart(2,"0"),"/").concat(String(t.getMonth()+1).padStart(2,"0"),"/").concat(t.getFullYear());}},{key:"formatDateRange",value:function formatDateRange(t){return t?t.startDate&&t.endDate?"".concat(this.formatDate(t.startDate)," - ").concat(this.formatDate(t.endDate)):"":t;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate();}},{key:"handleEndDateInput",value:function handleEndDateInput(t){var i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate();}},{key:"parseDate",value:function parseDate(t){var _t$split$map=t.split("/").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),i=_t$split$map2[0],s=_t$split$map2[1],e=_t$split$map2[2],n=new Date(e,s-1,i);return isNaN(n.getTime())?null:n;}},{key:"isValidDateInput",value:function isValidDateInput(t){return /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map3=t.split(":").map(Number),_t$split$map4=_slicedToArray(_t$split$map3,3),s=_t$split$map4[0],e=_t$split$map4[1],n=_t$split$map4[2],a=new Date(i.getTime());return a.setHours(s,e,n),a;}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"render",value:function render(){this.getDaysArray(this.currentYear,this.currentMonth);var t=(this.currentMonth+1)%12,s=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(s,t),i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n\n <div class=\"base ","\">\n <div class=\"calendar-wrapper\" >\n <div class=\"calendar-container ","\">\n ","\n </div>\n <!-- "," -->\n\n </div>\n ","\n </div>\n "])),this.range?"base__range":"",this.range?"with-margin":"",this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),this.range?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div class=\"calendar-container\">\n ","\n </div>\n "])),this.renderMonth(this.currentYear,(this.currentMonth+1)%12,this.getDaysArray(this.currentYear,(this.currentMonth+1)%12))):"",this.range?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input\">\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n\n </div>\n<br>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"DD/MM/YYYY\" @nile-change=\"","\"></nile-input>\n <nile-input class=\"manual-input\" value=\"","\" placeholder=\"HH:MM:SS\" @nile-change=\"","\"> </nile-input>\n </div>\n <div class=\"button-contaner\">\n <nile-button class=\"apply-button\" ?disabled=\"","\" @click=\"","\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n "])),this.formatDate(this.startDate),this.handleStartDateInput,this.formatTime(this.startDate),this.handleStartTimeInput,this.formatDate(this.endDate),this.handleEndDateInput,this.formatTime(this.endDate),this.handleEndTimeInput,!this.startDate||!this.endDate,this.confimRange):"");}}],[{key:"styles",get:function get(){return[n];}},{key:"observedAttributes",get:function get(){return["value","range"];}}]);return r;}(h));t([s("nile-dropdown")],r.prototype,"dropdown",void 0),t([l({type:Boolean,reflect:!0})],r.prototype,"dropDownOpened",void 0),t([l({type:Object})],r.prototype,"value",void 0),t([l({type:Object})],r.prototype,"rangeValue",void 0),t([l({type:String,attribute:"value"})],r.prototype,"valueAttribute",void 0),t([l({type:String,attribute:"value"})],r.prototype,"formattedDate",void 0),t([l({type:Object})],r.prototype,"startDate",void 0),t([l({type:Object})],r.prototype,"endDate",void 0),t([l({type:Boolean})],r.prototype,"isSelectingStart",void 0),t([l({type:Boolean})],r.prototype,"range",void 0),t([a("value")],r.prototype,"valueChanged",null),_export("N",r=t([e("nile-calendar")],r));}};});
2
2
  //# sourceMappingURL=nile-calendar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n * The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private currentMonth: number = new Date().getMonth();\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value : any;\n\n @property({ type: Object }) rangeValue : any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n @property({ type: Object }) endDate: Date | null = null;\n @property({ type: Boolean }) isSelectingStart = true; // flag to indicate what we're selecting\n\n @property({ type: Boolean }) range = false;\n\n @watch('value')\n valueChanged() {\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n\n\n\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n\n private nextMonth(): void {\n\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\n }\n\n private prevMonth(): void {\n\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.requestUpdate();\n }\n\n private selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n this.endDate = selectedDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n }\n\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowleft\" color=\"black\" @click=\"${this.prevMonth}\">\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowright\" color=\"black\" @click=\"${this.nextMonth}\">\n </nile-icon>\n </div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day ${isSelectedDate(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatDateRange(value: { startDate: Date | null, endDate: Date | null }): string {\n if(!value){\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(value.endDate)}`;\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n\n }\n this.requestUpdate();\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n// Parse time string to a Date object\nprivate parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n}\n\nprivate handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n}\n\nprivate handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n}\n\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n\n return html`\n\n <div class=\"base${this.range ? '__range' : ''}\">\n <div class=\"calendar-wrapper\" >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n ${this.range\n ? html`\n <div class=\"calendar-container\">\n ${this.renderMonth(\n this.currentYear,\n (this.currentMonth + 1) % 12,\n this.getDaysArray(\n this.currentYear,\n (this.currentMonth + 1) % 12\n )\n )}\n </div>\n `\n : ''}\n\n </div>\n ${this.range\n ? html`\n <div class=\"calender-input\">\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(this.startDate)}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${this.handleStartDateInput}\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(this.startDate)}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput}\"> </nile-input>\n\n </div>\n<br>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(this.endDate)}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${this.handleEndDateInput}\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(this.endDate)}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput}\"> </nile-input>\n </div>\n <div class=\"button-contaner\">\n <nile-button class=\"apply-button\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}\n"],"names":["NileCalendar","_h","_inherits","r","_super","_createSuper","constructor","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","_this","_createClass","key","value","valueChanged","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","concat","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","JSON","parse","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","length","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","dropdown","hide","confimRange","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","slice","fillerDaysAfter","allDays","isSelectedDate","isCurrentMonth","isStartDate","isEndDate","isInRange","html","_templateObject","_taggedTemplateLiteral","toLocaleString","map","index","_templateObject2","formatDate","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","newDate","hour","minute","second","setHours","handleStartTimeInput","time","handleEndTimeInput","render","nextYear","_templateObject3","_templateObject4","_templateObject5","__decorate","get","styles","NileElement","query","prototype","property","type","Boolean","reflect","Object","attribute","watch","customElement"],"mappings":"qjNA0CaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,CAAAG,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCASGC,KAAAA,CAAAC,YAAuB,CAAA,GAAIC,CAAAA,IAAOC,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA,CAClCH,KAAAA,CAAAI,WAAsB,CAAA,GAAIF,CAAAA,OAAOG,WAIGL,CAAAA,CAAAA,CAAAA,KAAAA,CAAcM,gBAAG,CAMbN,CAAAA,KAAAA,CAAcO,cAEnD,CAAA,IAA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CAAAA,CAAAA,CAAAA,CAAAA,CAAAqI,SAAA,CAAA,WAAA,CAAA,IAAA,IAC9BL,CAAA,CAAA,CAA3BM,CAAS,CAAA,CAAEC,IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAsC1I,CAAAqI,CAAAA,SAAAA,CAAA,SAAA,CAAA,IAAA,EAAA,CAAA,CAC3BL,CAAA,CAAA,CAA5BM,CAAS,CAAA,CAAEC,KAAMC,OAAmCxI,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqI,SAAA,CAAA,kBAAA,CAAA,IAAA,EAExBL,CAAAA,CAAAA,CAAAA,CAAA,CAA5BM,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAAyBxI,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqI,SAAA,CAAA,OAAA,CAAA,IAAA,EAG3CL,CAAAA,CAAAA,CAAAA,CAAA,CADCY,CAAAA,CAAM,OAuBN5I,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqI,SAAA,CAAA,cAAA,CAAA,IAxDUrI,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYgI,CAAA,CAAA,CADxBa,CAAc,CAAA,eAAA,CAAA,CAAA,CACF7I"}
1
+ {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n * The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private currentMonth: number = new Date().getMonth();\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value : any;\n\n @property({ type: Object }) rangeValue : any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n @property({ type: Object }) endDate: Date | null = null;\n @property({ type: Boolean }) isSelectingStart = true; // flag to indicate what we're selecting\n\n @property({ type: Boolean }) range = false;\n\n @watch('value')\n valueChanged() {\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n\n\n\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n\n private nextMonth(): void {\n\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.requestUpdate();\n }\n\n private prevMonth(): void {\n\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.requestUpdate();\n }\n\n private selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n this.endDate = selectedDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emit('nile-changed', { value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n this.requestUpdate();\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n this.emit('nile-changed', {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n }\n\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowleft\" color=\"black\" @click=\"${this.prevMonth}\">\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon class=\"calendar-header__month-navigation\" name=\"arrowright\" color=\"black\" @click=\"${this.nextMonth}\">\n </nile-icon>\n </div>\n <div class=\"day-names\">\n <div class=\"day\">Sun</div>\n <div class=\"day\">Mon</div>\n <div class=\"day\">Tue</div>\n <div class=\"day\">Wed</div>\n <div class=\"day\">Thu</div>\n <div class=\"day\">Fri</div>\n <div class=\"day\">Sat</div>\n </div>\n <div class=\"days\">\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n return html` <div\n class=\"day ${isSelectedDate(\n day,\n month,\n year,\n isCurrentMonth\n )} ${isInRange(day, month, year, isCurrentMonth)\n ? 'in-range'\n : ''} ${!isCurrentMonth ? 'filler' : ''}\"\n @click=\"${() => {\n if (isCurrentMonth) {\n this.selectDate(day, month, year);\n }\n }}\"\n >\n ${day}\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatDateRange(value: { startDate: Date | null, endDate: Date | null }): string {\n if(!value){\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(value.endDate)}`;\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n this.requestUpdate();\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n\n }\n this.requestUpdate();\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n// Parse time string to a Date object\nprivate parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n}\n\nprivate handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n}\n\nprivate handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n}\n\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n const daysArray = this.getDaysArray(this.currentYear, this.currentMonth);\n const nextMonth = (this.currentMonth + 1) % 12;\n const nextYear =\n this.currentMonth === 11 ? this.currentYear + 1 : this.currentYear;\n const nextMonthDaysArray = this.getDaysArray(nextYear, nextMonth);\n\n return html`\n\n <div class=\"base ${this.range ? 'base__range' : ''}\">\n <div class=\"calendar-wrapper\" >\n <div class=\"calendar-container ${this.range ? 'with-margin' : ''}\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n <!-- ${this.range\n ? html`\n <div class=\"calendar-container\">\n ${this.renderMonth(\n this.currentYear,\n (this.currentMonth + 1) % 12,\n this.getDaysArray(\n this.currentYear,\n (this.currentMonth + 1) % 12\n )\n )}\n </div>\n `\n : ''} -->\n\n </div>\n ${this.range\n ? html`\n <div class=\"calender-input\">\n <span class=\"manual-input-label\">From </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(this.startDate)}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${this.handleStartDateInput}\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(this.startDate)}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput}\"> </nile-input>\n\n </div>\n<br>\n <span class=\"manual-input-label\">To </span>\n <div class=\"from\">\n <nile-input class=\"manual-input\" value=\"${this.formatDate(this.endDate)}\" placeholder=\"DD/MM/YYYY\" @nile-change=\"${this.handleEndDateInput}\"></nile-input>\n <nile-input class=\"manual-input\" value=\"${this.formatTime(this.endDate)}\" placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput}\"> </nile-input>\n </div>\n <div class=\"button-contaner\">\n <nile-button class=\"apply-button\" ?disabled=\"${\n !this.startDate || !this.endDate\n }\" @click=\"${this.confimRange}\"> Apply</nile-button>\n </div>\n\n\n </div>\n </div>\n `\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}\n"],"names":["NileCalendar","_h","_inherits","r","_super","_createSuper","constructor","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","_this","_createClass","key","value","valueChanged","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","concat","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","JSON","parse","e","requestUpdate","connectedCallback","emit","disconnectedCallback","getDaysArray","year","month","daysInMonth","Array","from","length","_","i","nextMonth","prevMonth","selectDate","day","selectedDate","dropdown","hide","confimRange","renderMonth","daysArray","_this2","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","slice","fillerDaysAfter","allDays","isSelectedDate","isCurrentMonth","isStartDate","isEndDate","isInRange","html","_templateObject","_taggedTemplateLiteral","toLocaleString","map","index","_templateObject2","formatDate","formatDateRange","handleStartDateInput","event","parseDate","detail","isValidDateInput","handleEndDateInput","dateString","_t$split$map","Number","input","test","formatTime","getHours","getMinutes","getSeconds","isValidTimeInput","parseTime","_t$split$map3","newDate","hour","minute","second","setHours","handleStartTimeInput","time","handleEndTimeInput","render","nextYear","_templateObject3","_templateObject4","_templateObject5","__decorate","get","styles","NileElement","query","prototype","property","type","Boolean","reflect","Object","attribute","watch","customElement"],"mappings":"qjNA0CaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,CAAAG,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCASGC,KAAAA,CAAAC,YAAuB,CAAA,GAAIC,CAAAA,IAAOC,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA,CAClCH,KAAAA,CAAAI,WAAsB,CAAA,GAAIF,CAAAA,OAAOG,WAIGL,CAAAA,CAAAA,CAAAA,KAAAA,CAAcM,gBAAG,CAMbN,CAAAA,KAAAA,CAAcO,cAEnD,CAAA,IAAA,CAEqCP,KAAAA,CAAaQ,aAC3D,CAAA,IAAA,CAE0BR,KAAAA,CAASS,SAAAA,CAAgB,KACzBT,KAAAA,CAAOU,OAAAA,CAAgB,IACtBV,CAAAA,KAAAA,CAAAW,kBAAmB,CAEnBX,CAAAA,KAAAA,CAAKY,OAAG,CA+etC,QAAAC,KAAA,EAzgBQC,YAAA,CAAAlB,CAAA,GAAAmB,GAAA,gBAAAC,KAAA,CA6BP,SAAAC,aAAA,CAAAA,CAEE,GAAIjB,IAAKY,CAAAA,KAAAA,EAASZ,KAAKgB,KAGrB,CAAA,MAFAhB,KAAKkB,CAAAA,UAAAA,CAAalB,KAAKgB,KACvBhB,CAAAA,KAAAA,IAAAA,CAAKgB,MAAQ,IAIf,CAAA,CAAA,GAAIhB,KAAKgB,KAAUG,EAAAA,CAAAA,KAAAA,CAAMnB,IAAKgB,CAAAA,KAAAA,CAAMI,WAAY,CAC9C,GAAMC,CAAAA,EAASrB,CAAAA,IAAAA,CAAKgB,MAAMM,iBACpBC,CAAAA,CAAAA,CAAAA,EAAAA,CAAY,GAAIrB,CAAAA,IAAAA,CAAKF,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,CAAAA,CAAYgI,CAAA,CAAA,CADxBa,CAAc,CAAA,eAAA,CAAA,CAAA,CACF7I"}
@@ -1,2 +1,2 @@
1
- System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,t;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function(){_export("s",t=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n margin-top: 10px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: auto;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 4px;\n padding-bottom: 20px;\n width: 365px;\n }\n\n .base__range {\n width: 730px;\n }\n\n .calender-input {\n padding: 20px;\n padding-bottom: 0px;\n background: white;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 20px;\n }\n\n .manual-input {\n width: 100%;\n }\n\n .manual-input-label {\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n margin-bottom: 10px;\n }\n\n .button-contaner {\n width: 100%;\n text-align: right;\n padding: 10px 0;\n }\n"]))));}};});
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,a;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function(){_export("s",a=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 365px;\n box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 4px;\n width: 365px;\n }\n\n .base__range {\n padding: 24px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding-bottom: 0px;\n width: 365px;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n }\n\n .manual-input {\n width: 100%;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-contaner {\n width: 100%;\n text-align: right;\n padding: 12px 0 0 0;\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-calendar.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.css.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n margin-top: 10px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: auto;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 4px;\n padding-bottom: 20px;\n width: 365px;\n }\n\n .base__range {\n width: 730px;\n }\n\n .calender-input {\n padding: 20px;\n padding-bottom: 0px;\n background: white;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 20px;\n }\n\n .manual-input {\n width: 100%;\n }\n\n .manual-input-label {\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n margin-bottom: 10px;\n }\n\n .button-contaner {\n width: 100%;\n text-align: right;\n padding: 10px 0;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-calendar.css.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 365px;\n box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 4px;\n width: 365px;\n }\n\n .base__range {\n padding: 24px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding-bottom: 0px;\n width: 365px;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n }\n\n .manual-input {\n width: 100%;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-contaner {\n width: 100%;\n text-align: right;\n padding: 12px 0 0 0;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{i as e}from"../index-cd2f9c12.esm.js";const t=e`
1
+ import{i as e}from"../index-cd2f9c12.esm.js";const a=e`
2
2
  :host {
3
3
  }
4
4
 
@@ -41,7 +41,6 @@ import{i as e}from"../index-cd2f9c12.esm.js";const t=e`
41
41
  line-height: 14px;
42
42
  letter-spacing: 0.2px;
43
43
  height: 50px;
44
- margin-top: 10px;
45
44
  }
46
45
 
47
46
  .day-names,
@@ -86,7 +85,8 @@ import{i as e}from"../index-cd2f9c12.esm.js";const t=e`
86
85
  background: white;
87
86
  display: flex;
88
87
  justify-content: space-between;
89
- width: auto;
88
+ width: 365px;
89
+ box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);
90
90
  }
91
91
 
92
92
  .selected-date,
@@ -135,24 +135,24 @@ import{i as e}from"../index-cd2f9c12.esm.js";const t=e`
135
135
  .base {
136
136
  background-color: white;
137
137
  border-radius: 4px;
138
- padding-bottom: 20px;
139
138
  width: 365px;
140
139
  }
141
140
 
142
141
  .base__range {
143
- width: 730px;
142
+ padding: 24px;
144
143
  }
145
144
 
146
145
  .calender-input {
147
- padding: 20px;
146
+ margin-top: 6px;
148
147
  padding-bottom: 0px;
149
- background: white;
148
+ width: 365px;
150
149
  }
151
150
 
152
151
  .from {
153
152
  display: flex;
154
153
  justify-content: space-between;
155
- gap: 20px;
154
+ gap: 8px;
155
+ margin-top: 12px;
156
156
  }
157
157
 
158
158
  .manual-input {
@@ -160,15 +160,17 @@ import{i as e}from"../index-cd2f9c12.esm.js";const t=e`
160
160
  }
161
161
 
162
162
  .manual-input-label {
163
+ color: #7f7f7f;
164
+ font-family: Colfax-regular;
163
165
  font-size: 12px;
164
- font-style: normal;
165
166
  font-weight: 500;
166
- margin-bottom: 10px;
167
+ line-height: 12px;
168
+ letter-spacing: 0.2px;
167
169
  }
168
170
 
169
171
  .button-contaner {
170
172
  width: 100%;
171
173
  text-align: right;
172
- padding: 10px 0;
174
+ padding: 12px 0 0 0;
173
175
  }
174
- `;export{t as s};
176
+ `;export{a as s};
@@ -30,16 +30,16 @@ import{__decorate as t}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";
30
30
  </div>
31
31
  `}formatDate(t){if(!t)return"";return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}formatDateRange(t){return t?t.startDate&&t.endDate?`${this.formatDate(t.startDate)} - ${this.formatDate(t.endDate)}`:"":t}handleStartDateInput(t){const i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.startDate=null),i&&(!this.endDate||i<=this.endDate)?this.startDate=i:(this.startDate=null,this.endDate=null),this.requestUpdate()}handleEndDateInput(t){const i=this.parseDate(t.detail.value);this.isValidDateInput(i)||(this.endDate=null),i&&(!this.startDate||i>=this.startDate)?this.endDate=i:this.endDate=null,this.requestUpdate()}parseDate(t){const[i,s,e]=t.split("/").map(Number),n=new Date(e,s-1,i);return isNaN(n.getTime())?null:n}isValidDateInput(t){return/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t)}formatTime(t){if(!t)return"";return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`}isValidTimeInput(t){return/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t)}parseTime(t,i){if(!this.isValidTimeInput(t))return null;const[s,e,n]=t.split(":").map(Number),a=new Date(i.getTime());return a.setHours(s,e,n),a}handleStartTimeInput(t){if(!this.startDate)return void(this.startDate=null);const i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate()}handleEndTimeInput(t){if(!this.endDate)return void(this.endDate=null);const i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate()}render(){this.getDaysArray(this.currentYear,this.currentMonth);const t=(this.currentMonth+1)%12,s=11===this.currentMonth?this.currentYear+1:this.currentYear;return this.getDaysArray(s,t),i`
32
32
 
33
- <div class="base${this.range?"__range":""}">
33
+ <div class="base ${this.range?"base__range":""}">
34
34
  <div class="calendar-wrapper" >
35
35
  <div class="calendar-container ${this.range?"with-margin":""}">
36
36
  ${this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth))}
37
37
  </div>
38
- ${this.range?i`
38
+ <!-- ${this.range?i`
39
39
  <div class="calendar-container">
40
40
  ${this.renderMonth(this.currentYear,(this.currentMonth+1)%12,this.getDaysArray(this.currentYear,(this.currentMonth+1)%12))}
41
41
  </div>
42
- `:""}
42
+ `:""} -->
43
43
 
44
44
  </div>
45
45
  ${this.range?i`
@@ -51,7 +51,6 @@ export const styles = css `
51
51
  line-height: 14px;
52
52
  letter-spacing: 0.2px;
53
53
  height: 50px;
54
- margin-top: 10px;
55
54
  }
56
55
 
57
56
  .day-names,
@@ -96,7 +95,8 @@ export const styles = css `
96
95
  background: white;
97
96
  display: flex;
98
97
  justify-content: space-between;
99
- width: auto;
98
+ width: 365px;
99
+ box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);
100
100
  }
101
101
 
102
102
  .selected-date,
@@ -145,24 +145,24 @@ export const styles = css `
145
145
  .base {
146
146
  background-color: white;
147
147
  border-radius: 4px;
148
- padding-bottom: 20px;
149
148
  width: 365px;
150
149
  }
151
150
 
152
151
  .base__range {
153
- width: 730px;
152
+ padding: 24px;
154
153
  }
155
154
 
156
155
  .calender-input {
157
- padding: 20px;
156
+ margin-top: 6px;
158
157
  padding-bottom: 0px;
159
- background: white;
158
+ width: 365px;
160
159
  }
161
160
 
162
161
  .from {
163
162
  display: flex;
164
163
  justify-content: space-between;
165
- gap: 20px;
164
+ gap: 8px;
165
+ margin-top: 12px;
166
166
  }
167
167
 
168
168
  .manual-input {
@@ -170,16 +170,18 @@ export const styles = css `
170
170
  }
171
171
 
172
172
  .manual-input-label {
173
+ color: #7f7f7f;
174
+ font-family: Colfax-regular;
173
175
  font-size: 12px;
174
- font-style: normal;
175
176
  font-weight: 500;
176
- margin-bottom: 10px;
177
+ line-height: 12px;
178
+ letter-spacing: 0.2px;
177
179
  }
178
180
 
179
181
  .button-contaner {
180
182
  width: 100%;
181
183
  text-align: right;
182
- padding: 10px 0;
184
+ padding: 12px 0 0 0;
183
185
  }
184
186
  `;
185
187
  export default [styles];
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.css.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6KxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n margin-top: 10px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: auto;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 4px;\n padding-bottom: 20px;\n width: 365px;\n }\n\n .base__range {\n width: 730px;\n }\n\n .calender-input {\n padding: 20px;\n padding-bottom: 0px;\n background: white;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 20px;\n }\n\n .manual-input {\n width: 100%;\n }\n\n .manual-input-label {\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n margin-bottom: 10px;\n }\n\n .button-contaner {\n width: 100%;\n text-align: right;\n padding: 10px 0;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-calendar.css.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+KxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 365px;\n box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 4px;\n width: 365px;\n }\n\n .base__range {\n padding: 24px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding-bottom: 0px;\n width: 365px;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n }\n\n .manual-input {\n width: 100%;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-contaner {\n width: 100%;\n text-align: right;\n padding: 12px 0 0 0;\n }\n`;\n\nexport default [styles];\n"]}