@daryasidorovich/modsen-datepicker 1.0.25 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
7
  var reactDom = require('react-dom');
8
- var zod = require('@hookform/resolvers/zod');
9
8
  var reactHookForm = require('react-hook-form');
10
9
  var reactImask = require('react-imask');
11
10
 
@@ -29,10 +28,10 @@ function _interopNamespace(e) {
29
28
 
30
29
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
30
 
32
- var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
31
+ var e=[],t$2=[];function n$1(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t$2[u]={}),a=t$2[u]&&t$2[u][s]?t$2[u][s]:t$2[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
33
32
 
34
33
  var css$e = "*,\n::before,\n::after {\n box-sizing: border-box;\n}\n\n:where(ul, ol):where([class]) {\n padding-left: 0;\n}\n\nbody,\n:where(blockquote, figure):where([class]) {\n margin: 0;\n}\n\n:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl):where([class]) {\n margin-block: 0;\n}\n\n:where(dd[class]) {\n margin-left: 0;\n}\n\n:where(fieldset[class]) {\n margin-left: 0;\n padding: 0;\n border: none;\n}\n\n:where(ul[class]) {\n list-style: none;\n}\n\n:where(address[class]) {\n font-style: normal;\n}\n\np {\n margin-block: 0;\n}\n\nimg,\nvideo {\n display: block;\n max-width: 100%;\n height: auto;\n}\n\ninput,\ntextarea,\nselect,\nbutton {\n font: inherit;\n}\n\nhtml {\n height: 100%;\n scrollbar-gutter: stable;\n}\n\nhtml,\n:has(:target) {\n scroll-behavior: smooth;\n}\n\nbody {\n min-height: 100%;\n line-height: 1.5;\n}\n\na:where([class]) {\n display: inline-flex;\n}\n\nbutton,\nlabel {\n cursor: pointer;\n}\n\n[stroke] {\n stroke: currentColor;\n}\n\nsvg * {\n transition-property: fill, stroke;\n}\n\n@media (prefers-reduced-motion: reduce) {\n *,\n ::before,\n ::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n scroll-behavior: auto !important;\n }\n}\nhtml.main_isLock__423dfe15 {\n overflow: hidden;\n}\n\nbody {\n font-weight: 400;\n font-family: \"Open Sans\", sans-serif;\n font-size: 14px;\n}\n.main_themeLight__423dfe15 body {\n color: #333333;\n}\n.main_themeDark__423dfe15 body {\n color: #ffffff;\n}\n\nh1,\nh2 {\n margin: 0;\n}\n\nh1 {\n font-size: 15px;\n font-weight: 600;\n}\n\nh2 {\n font-weight: 700;\n}\n\na,\nbutton,\nlabel,\ninput,\ntextarea,\nselect,\nsvg * {\n transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, fill 0.2s ease, opacity 0.2s ease;\n}\n\na:has(svg),\nbutton:has(svg) {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.main_grid__423dfe15 {\n display: grid;\n width: 100%;\n grid-template-columns: repeat(7, 1fr);\n}";
35
- n(css$e,{});
34
+ n$1(css$e,{});
36
35
 
37
36
  const FIRST_DAY_OF_WEEK = {
38
37
  MONDAY: 1,
@@ -350,7 +349,7 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
350
349
 
351
350
  var css$d = ".styles_module_day__0d250405 {\n width: 32px;\n height: 32px;\n}\n.theme-light .styles_module_day__0d250405 {\n background-color: #ffffff;\n color: #333333;\n}\n.theme-dark .styles_module_day__0d250405 {\n background-color: #333333;\n color: #ffffff;\n}\n.styles_module_day__0d250405 {\n font-size: 13px;\n padding: 10px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n border: none;\n position: relative;\n}\n\n.theme-light .styles_module_holiday__0d250405 {\n color: #ff383c;\n}\n.theme-dark .styles_module_holiday__0d250405 {\n color: #ff383c;\n}\n\n.theme-light .styles_module_today__0d250405 {\n color: #2f80ed;\n}\n.theme-dark .styles_module_today__0d250405 {\n color: #2f80ed;\n}\n\n.theme-light .styles_module_selected__0d250405 {\n background-color: #2f80ed;\n color: #ffffff;\n}\n.theme-dark .styles_module_selected__0d250405 {\n background-color: #2f80ed;\n color: #e1e1e1;\n}\n\n.theme-light .styles_module_disabled__0d250405 {\n color: #aaaaaa;\n}\n.theme-dark .styles_module_disabled__0d250405 {\n color: #aaaaaa;\n}\n.styles_module_disabled__0d250405 {\n cursor: not-allowed;\n}\n\n.theme-light .styles_module_otherMonth__0d250405 {\n color: #aaaaaa;\n}\n.theme-dark .styles_module_otherMonth__0d250405 {\n color: #aaaaaa;\n}\n\n.theme-light .styles_module_rangeStart__0d250405 {\n color: #ffffff;\n background-color: rgba(47, 129, 237, 0.5764705882);\n}\n.theme-dark .styles_module_rangeStart__0d250405 {\n color: #e1e1e1;\n background-color: rgba(47, 129, 237, 0.5764705882);\n}\n.styles_module_rangeStart__0d250405 {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.theme-light .styles_module_rangeMiddle__0d250405 {\n background-color: rgba(47, 129, 237, 0.1647058824);\n}\n.theme-dark .styles_module_rangeMiddle__0d250405 {\n background-color: rgba(47, 129, 237, 0.1647058824);\n}\n.styles_module_rangeMiddle__0d250405 {\n border-radius: 0;\n}\n\n.theme-light .styles_module_rangeEnd__0d250405 {\n color: #ffffff;\n background-color: #2f80ed;\n}\n.theme-dark .styles_module_rangeEnd__0d250405 {\n color: #e1e1e1;\n background-color: #2f80ed;\n}\n.styles_module_rangeEnd__0d250405 {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.styles_module_hasTasks__0d250405 {\n position: relative;\n}\n.styles_module_hasTasks__0d250405::after {\n width: 4px;\n height: 4px;\n}\n.theme-light .styles_module_hasTasks__0d250405::after {\n background-color: #62d0a2;\n}\n.theme-dark .styles_module_hasTasks__0d250405::after {\n background-color: #62d0a2;\n}\n.styles_module_hasTasks__0d250405::after {\n content: \"\";\n position: absolute;\n top: 12%;\n right: 12%;\n border-radius: 100%;\n}";
352
351
  var modules_efc4e723$d = {"day":"styles_module_day__0d250405","holiday":"styles_module_holiday__0d250405","today":"styles_module_today__0d250405","selected":"styles_module_selected__0d250405","disabled":"styles_module_disabled__0d250405","otherMonth":"styles_module_otherMonth__0d250405","rangeStart":"styles_module_rangeStart__0d250405","rangeMiddle":"styles_module_rangeMiddle__0d250405","rangeEnd":"styles_module_rangeEnd__0d250405","hasTasks":"styles_module_hasTasks__0d250405"};
353
- n(css$d,{});
352
+ n$1(css$d,{});
354
353
 
355
354
  const Day = ({ date, isSelected = false, isCurrentMonth, isDisabled = false, isHoliday = false, hasTasks = false, isRangeStart = false, isRangeEnd = false, isRangeMiddle = false, onClick, onDoubleClick, onMouseEnter, onMouseLeave, }) => {
356
355
  const dayNumber = date.getDate();
@@ -399,7 +398,7 @@ const Day = ({ date, isSelected = false, isCurrentMonth, isDisabled = false, isH
399
398
 
400
399
  var css$c = ".styles_module_week__5d817eab {\n display: flex;\n}\n.theme-light .styles_module_week__5d817eab {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_week__5d817eab {\n background-color: #333333;\n}";
401
400
  var modules_efc4e723$c = {"week":"styles_module_week__5d817eab"};
402
- n(css$c,{});
401
+ n$1(css$c,{});
403
402
 
404
403
  const Week = ({ weekDays, selectedDate, getIsHoliday, getIsDisabled, getIsCurrentMonth, rangeStart, rangeEnd, hasTasks, onDateClick, onDateDoubleClick, onMouseEnter, onMouseLeave, }) => {
405
404
  return (jsxRuntime.jsx("div", { className: modules_efc4e723$c.week, children: weekDays.map((date) => {
@@ -570,8 +569,7 @@ function withMinMax(calendar, minDate, maxDate) {
570
569
  return calendar;
571
570
  }
572
571
 
573
- const HOLIDAY_API_URL = 'https://holidayapi.com/v1/holidays';
574
- const API_KEY = 'f36f54be-e335-4957-9c64-fde814074428';
572
+ const HOLIDAY_API_URL = 'https://date.nager.at/api/v3/PublicHolidays';
575
573
  const getHolidays = async (year = new Date().getFullYear(), signal) => {
576
574
  try {
577
575
  let holidayDates;
@@ -580,15 +578,14 @@ const getHolidays = async (year = new Date().getFullYear(), signal) => {
580
578
  if (!countryCode) {
581
579
  throw new Error('Cannot get your country code');
582
580
  }
583
- if (!API_KEY) ;
584
- const url = `${HOLIDAY_API_URL}?key=${API_KEY}&country=${countryCode}&year=${year}`;
581
+ const url = `${HOLIDAY_API_URL}/${year}/${countryCode}`;
585
582
  const response = await fetch(url, { signal });
586
583
  if (!response.ok) {
587
584
  throw new Error(`Error while loading holidays`);
588
585
  }
589
586
  const data = await response.json();
590
- if (data.holidays) {
591
- holidayDates = data.holidays.map((holiday) => {
587
+ if (data) {
588
+ holidayDates = data.map((holiday) => {
592
589
  const date = new Date(holiday.date);
593
590
  return new Date(date.getFullYear(), date.getMonth(), date.getDate());
594
591
  });
@@ -649,7 +646,7 @@ function useCalendar(props) {
649
646
 
650
647
  var css$b = ".styles_module_calendar__131b64c5 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.theme-light .styles_module_errorMessage__131b64c5 {\n color: #ff383c;\n}\n.theme-dark .styles_module_errorMessage__131b64c5 {\n color: #ff383c;\n}";
651
648
  var modules_efc4e723$b = {"calendar":"styles_module_calendar__131b64c5","errorMessage":"styles_module_errorMessage__131b64c5"};
652
- n(css$b,{});
649
+ n$1(css$b,{});
653
650
 
654
651
  const CalendarGridWithoutTasks = ({ children, ...props }) => {
655
652
  const { calendar, loading, error } = useCalendar(props);
@@ -743,7 +740,7 @@ const useLockBodyScroll = (isLocked) => {
743
740
 
744
741
  var css$a = ".styles_module_overlay__337f9387 {\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n}\n\n.theme-light .styles_module_overlayColor__337f9387 {\n background-color: rgba(44, 49, 68, 0.4);\n}\n.theme-dark .styles_module_overlayColor__337f9387 {\n background-color: rgba(44, 49, 68, 0.4);\n}\n\n.styles_module_modal__337f9387 {\n position: relative;\n}\n.theme-light .styles_module_modal__337f9387 {\n background-color: #ffffff;\n border-color: #e1e1e1;\n}\n.theme-dark .styles_module_modal__337f9387 {\n background-color: #333333;\n border-color: #aaaaaa;\n}\n.styles_module_modal__337f9387 {\n border-style: solid;\n border-width: 1px;\n border-radius: 8px;\n padding: 24px;\n}\n\n.styles_module_closeButton__337f9387 {\n border: none;\n background-color: transparent;\n position: absolute;\n right: 8px;\n top: 0;\n font-size: 24px;\n line-height: normal;\n}\n.theme-light .styles_module_closeButton__337f9387 {\n color: #333333;\n}\n.theme-dark .styles_module_closeButton__337f9387 {\n color: #ffffff;\n}";
745
742
  var modules_efc4e723$a = {"overlay":"styles_module_overlay__337f9387","overlayColor":"styles_module_overlayColor__337f9387","modal":"styles_module_modal__337f9387","closeButton":"styles_module_closeButton__337f9387"};
746
- n(css$a,{});
743
+ n$1(css$a,{});
747
744
 
748
745
  const Modal = ({ isOpen, onClose, children, showOverlay = true, showCloseButton = true, className = '', classNameOverlay = '', style = {}, }) => {
749
746
  const modalRoot = document.body;
@@ -763,6 +760,10 @@ const Modal = ({ isOpen, onClose, children, showOverlay = true, showCloseButton
763
760
  return reactDom.createPortal(modalContent, targetElement);
764
761
  };
765
762
 
763
+ const t$1=(r,t,s)=>{if(r&&"reportValidity"in r){const o=reactHookForm.get(s,t);r.setCustomValidity(o&&o.message||""),r.reportValidity();}},s$1=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&"reportValidity"in o.ref?t$1(o.ref,s,e):o&&o.refs&&o.refs.forEach(r=>t$1(r,s,e));}},o$1=(t,o)=>{o.shouldUseNativeValidation&&s$1(t,o);const n={};for(const s in t){const f=reactHookForm.get(o.fields,s),c=Object.assign(t[s]||{},{ref:f&&f.refs?f.refs[0]:f&&f.ref});if(i$1(o.names||Object.keys(t),s)){const t=Object.assign({},reactHookForm.get(n,s));reactHookForm.set(t,"root",c),reactHookForm.set(n,s,t);}else reactHookForm.set(n,s,c);}return n},i$1=(e,r)=>{const t=n(r).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(e=>n(e).match(`^${t}\\.\\d+`))};function n(e){return e.replace(/\[(\d+)]/g,".$1").replace(/[[\]]/g,"")}
764
+
765
+ function o(){return o=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(r[o]=n[o]);}return r},o.apply(null,arguments)}function t(r,e){try{var n=r();}catch(r){return e(r)}return n&&n.then?n.then(void 0,e):n}function s(r,e){for(var o=Object.create(null);r.length;){var t=r[0],s=t.code,i=t.message,u=t.path.join(".");if(!o[u])if("unionErrors"in t){var a,c,l=t.unionErrors.reduce(function(r,e){return e.errors.length<r.errors.length?e:r}).errors[0];o[u]={message:null!=(a=null==l?void 0:l.message)?a:i,type:null!=(c=null==l?void 0:l.code)?c:s};}else o[u]={message:i,type:s};if("unionErrors"in t&&t.unionErrors.forEach(function(e){return e.errors.forEach(function(e){return r.push(e)})}),e){var f=o[u].types,d=f&&f[t.code];o[u]=reactHookForm.appendErrors(u,e,o,s,d?[].concat(d,t.message):t.message);}r.shift();}return o}function i(r,e){for(var t=Object.create(null),s=function(){var s=r[0],i=s.code,u=s.message,a=s.path.join(".");if(!t[a])if("invalid_union"===s.code&&s.errors.length>0){var c,l,f=s.errors.reduce(function(r,e){return e.length<r.length?e:r})[0];t[a]={message:null!=(c=null==f?void 0:f.message)?c:u,type:null!=(l=null==f?void 0:f.code)?l:i};}else t[a]={message:u,type:i};if("invalid_union"===s.code&&s.errors.forEach(function(e){return e.forEach(function(e){return r.push(o({},e,{path:[].concat(s.path,e.path)}))})}),e){var d=t[a].types,h=d&&d[s.code];t[a]=reactHookForm.appendErrors(a,e,t,i,h?[].concat(h,s.message):s.message);}r.shift();};r.length;)s();return t}function u(n,o,u){if(void 0===u&&(u={}),function(r){return "_zod"in r&&"object"==typeof r._zod}(n))return function(s,a,c){try{return Promise.resolve(t(function(){function e(e){return c.shouldUseNativeValidation&&s$1({},c),{errors:{},values:u.raw?Object.assign({},s):e}}var t=n;return "sync"===u.mode?e(t.parse(s,o)):Promise.resolve(t.parseAsync(s,o)).then(e)},function(r){if(function(r){var e;return !(null==r||null==(e=r._zod)||null==(e=e.traits)||!e.has("$ZodError"))}(r))return {values:{},errors:o$1(i(r.issues,!c.shouldUseNativeValidation&&"all"===c.criteriaMode),c)};throw r}))}catch(r){return Promise.reject(r)}};if(function(r){return "_def"in r&&"object"==typeof r._def}(n))return function(i,a,c){try{return Promise.resolve(t(function(){return Promise.resolve(n["sync"===u.mode?"parse":"parseAsync"](i,o)).then(function(e){return c.shouldUseNativeValidation&&s$1({},c),{errors:{},values:u.raw?Object.assign({},i):e}})},function(r){if(function(r){return Array.isArray(null==r?void 0:r.issues)}(r))return {values:{},errors:o$1(s(r.errors,!c.shouldUseNativeValidation&&"all"===c.criteriaMode),c)};throw r}))}catch(r){return Promise.reject(r)}};throw new Error("Invalid input: not a Zod schema")}
766
+
766
767
  var _path$3;
767
768
  function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
768
769
  var SvgCalendar = function SvgCalendar(props) {
@@ -793,7 +794,7 @@ var SvgClear = function SvgClear(props) {
793
794
 
794
795
  var css$9 = ".theme-light .styles_module_wrapper__ef28f65c {\n color: #333333;\n background-color: #ffffff;\n}\n.theme-dark .styles_module_wrapper__ef28f65c {\n color: #ffffff;\n background-color: #333333;\n}\n.styles_module_wrapper__ef28f65c {\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: 2px;\n width: 100%;\n}\n\n.styles_module_label__ef28f65c {\n font-size: 15px;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.theme-light .styles_module_inputWrapper__ef28f65c {\n color: #333333;\n background-color: #ffffff;\n border-color: #e1e1e1;\n}\n.theme-dark .styles_module_inputWrapper__ef28f65c {\n color: #ffffff;\n background-color: #333333;\n border-color: #aaaaaa;\n}\n.styles_module_inputWrapper__ef28f65c {\n border-style: solid;\n border-width: 1px;\n padding: 8px 15px;\n border-radius: 8px;\n display: flex;\n gap: 8px;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n}\n\n.theme-light .styles_module_errorWrapper__ef28f65c {\n border-color: #ff383c;\n}\n.theme-dark .styles_module_errorWrapper__ef28f65c {\n border-color: #ff383c;\n}\n\n.styles_module_input__ef28f65c {\n border: none;\n outline: none;\n background-color: transparent;\n width: 100%;\n}\n.theme-light .styles_module_input__ef28f65c {\n color: #333333;\n}\n.theme-dark .styles_module_input__ef28f65c {\n color: #ffffff;\n}\n.theme-light .styles_module_input__ef28f65c::placeholder {\n color: #e1e1e1;\n}\n.theme-dark .styles_module_input__ef28f65c::placeholder {\n color: #aaaaaa;\n}\n\n.styles_module_clear__ef28f65c {\n border: none;\n background-color: transparent;\n width: max-content;\n padding: 0;\n}\n\n.styles_module_icon__ef28f65c {\n flex-shrink: 0;\n}\n.theme-light .styles_module_icon__ef28f65c {\n color: #aaaaaa;\n}\n.theme-dark .styles_module_icon__ef28f65c {\n color: #aaaaaa;\n}\n\n.theme-light .styles_module_error__ef28f65c {\n color: #ff383c;\n}\n.theme-dark .styles_module_error__ef28f65c {\n color: #ff383c;\n}\n.styles_module_error__ef28f65c {\n height: 15px;\n}";
795
796
  var modules_efc4e723$9 = {"wrapper":"styles_module_wrapper__ef28f65c","label":"styles_module_label__ef28f65c","inputWrapper":"styles_module_inputWrapper__ef28f65c","errorWrapper":"styles_module_errorWrapper__ef28f65c","input":"styles_module_input__ef28f65c","clear":"styles_module_clear__ef28f65c","icon":"styles_module_icon__ef28f65c","error":"styles_module_error__ef28f65c"};
796
- n(css$9,{});
797
+ n$1(css$9,{});
797
798
 
798
799
  const Input = ({ label, error, className = '', id, onReset, placeholder, type = 'text', isDateInput = false, ref = null, ...restProps }) => {
799
800
  const generatedId = React.useId();
@@ -805,7 +806,7 @@ const Input = ({ label, error, className = '', id, onReset, placeholder, type =
805
806
 
806
807
  var css$8 = ".styles_module_header__2145d314 {\n margin-bottom: 24px;\n margin-top: 8px;\n}\n\n.styles_module_title__2145d314 {\n font-size: 18px;\n}\n\n.styles_module_footer__2145d314 {\n display: flex;\n width: 100%;\n gap: 10px;\n justify-content: end;\n}\n\n.styles_module_children__2145d314 {\n display: flex;\n gap: 8px;\n flex-direction: column;\n min-width: 300px;\n width: fit-content;\n margin-bottom: 24px;\n}\n\n.theme-light .styles_module_modalButtons__2145d314 {\n background-color: rgba(47, 129, 237, 0.1647058824);\n border-color: #e1e1e1;\n color: #333333;\n}\n.theme-dark .styles_module_modalButtons__2145d314 {\n background-color: rgba(47, 129, 237, 0.1647058824);\n border-color: #aaaaaa;\n color: #ffffff;\n}\n.styles_module_modalButtons__2145d314 {\n border-style: solid;\n border-width: 1px;\n padding: 5px 10px;\n border-radius: 8px;\n}\n\n.theme-light .styles_module_confirm__2145d314 {\n background-color: rgba(47, 129, 237, 0.5764705882);\n border-color: #e1e1e1;\n color: #ffffff;\n}\n.theme-dark .styles_module_confirm__2145d314 {\n background-color: rgba(47, 129, 237, 0.5764705882);\n border-color: #aaaaaa;\n color: #e1e1e1;\n}";
807
808
  var modules_efc4e723$8 = {"header":"styles_module_header__2145d314","title":"styles_module_title__2145d314","footer":"styles_module_footer__2145d314","children":"styles_module_children__2145d314","modalButtons":"styles_module_modalButtons__2145d314","confirm":"styles_module_confirm__2145d314"};
808
- n(css$8,{});
809
+ n$1(css$8,{});
809
810
 
810
811
  const CrudModal = ({ isOpen, onClose, onConfirm, title, cancelText = 'No', confirmText = 'Yes', isLoading = false, children, showCloseButton = false, }) => {
811
812
  return (jsxRuntime.jsxs(Modal, { isOpen: isOpen, onClose: onClose, showCloseButton: showCloseButton, children: [jsxRuntime.jsx("div", { className: modules_efc4e723$8.header, children: jsxRuntime.jsx("h1", { className: modules_efc4e723$8.title, children: title }) }), children && jsxRuntime.jsx("div", { className: modules_efc4e723$8.children, children: children }), jsxRuntime.jsxs("div", { className: modules_efc4e723$8.footer, children: [jsxRuntime.jsx("button", { className: modules_efc4e723$8.modalButtons, onClick: onClose, disabled: isLoading, children: cancelText }), jsxRuntime.jsx("button", { className: classNames(modules_efc4e723$8.confirm, modules_efc4e723$8.modalButtons), onClick: onConfirm, children: confirmText })] })] }));
@@ -6195,7 +6196,7 @@ const formSchema = object({
6195
6196
  const AddModal = ({ isOpen, onClose, date }) => {
6196
6197
  const { addTask } = useTasks();
6197
6198
  const { register, handleSubmit, reset, formState: { errors }, } = reactHookForm.useForm({
6198
- resolver: zod.zodResolver(formSchema),
6199
+ resolver: u(formSchema),
6199
6200
  defaultValues: {
6200
6201
  title: '',
6201
6202
  date: formatDate(date),
@@ -6227,7 +6228,7 @@ const DeleteModal = ({ id, isOpen, onClose }) => {
6227
6228
  const EditModal = ({ isOpen, onClose, id, date }) => {
6228
6229
  const { editTask, tasks } = useTasks();
6229
6230
  const { register, handleSubmit, reset, formState: { errors }, } = reactHookForm.useForm({
6230
- resolver: zod.zodResolver(formSchema),
6231
+ resolver: u(formSchema),
6231
6232
  defaultValues: {
6232
6233
  title: '',
6233
6234
  date: formatDate(date),
@@ -6274,7 +6275,7 @@ const EditModal = ({ isOpen, onClose, id, date }) => {
6274
6275
 
6275
6276
  var css$7 = ".styles_module_tasksManager__2b8e4ddb {\n min-width: 300px;\n width: fit-content;\n display: flex;\n flex-direction: column;\n gap: 24px;\n max-height: 70%;\n}\n\n.styles_module_tasks__2b8e4ddb {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.styles_module_task__2b8e4ddb {\n display: flex;\n gap: 8px;\n justify-content: space-between;\n align-items: center;\n}\n\n.theme-light .styles_module_checked__2b8e4ddb {\n color: #aaaaaa;\n}\n.theme-dark .styles_module_checked__2b8e4ddb {\n color: #aaaaaa;\n}\n\n.styles_module_title__2b8e4ddb {\n margin-right: auto;\n}\n\n.styles_module_action__2b8e4ddb {\n border: none;\n background-color: transparent;\n}\n.theme-light .styles_module_action__2b8e4ddb {\n color: #333333;\n}\n.theme-dark .styles_module_action__2b8e4ddb {\n color: #ffffff;\n}\n\n.theme-light .styles_module_delete__2b8e4ddb {\n color: #ff383c;\n}\n.theme-dark .styles_module_delete__2b8e4ddb {\n color: #ff383c;\n}\n\n.theme-light .styles_module_add__2b8e4ddb {\n background-color: rgba(47, 129, 237, 0.5764705882);\n border-color: #e1e1e1;\n color: #ffffff;\n}\n.theme-dark .styles_module_add__2b8e4ddb {\n background-color: rgba(47, 129, 237, 0.5764705882);\n border-color: #aaaaaa;\n color: #e1e1e1;\n}\n.styles_module_add__2b8e4ddb {\n border-style: solid;\n border-width: 1px;\n border-radius: 8px;\n}\n\n.styles_module_header__2b8e4ddb {\n font-size: 18px;\n}";
6276
6277
  var modules_efc4e723$7 = {"tasksManager":"styles_module_tasksManager__2b8e4ddb","tasks":"styles_module_tasks__2b8e4ddb","task":"styles_module_task__2b8e4ddb","checked":"styles_module_checked__2b8e4ddb","title":"styles_module_title__2b8e4ddb","action":"styles_module_action__2b8e4ddb","delete":"styles_module_delete__2b8e4ddb","add":"styles_module_add__2b8e4ddb","header":"styles_module_header__2b8e4ddb"};
6277
- n(css$7,{});
6278
+ n$1(css$7,{});
6278
6279
 
6279
6280
  const TasksManager = ({ onClose, isOpen, tasks, selectedDate, }) => {
6280
6281
  const addModal = useModal();
@@ -6336,7 +6337,7 @@ const useTooltip = () => {
6336
6337
 
6337
6338
  var css$6 = ".theme-light .styles_module_tooltip__ac28d9b8 {\n background-color: #e1e1e1;\n}\n.theme-dark .styles_module_tooltip__ac28d9b8 {\n background-color: #aaaaaa;\n}\n.styles_module_tooltip__ac28d9b8 {\n border-radius: 8px;\n padding: 2px 8px;\n position: absolute;\n}";
6338
6339
  var modules_efc4e723$6 = {"tooltip":"styles_module_tooltip__ac28d9b8"};
6339
- n(css$6,{});
6340
+ n$1(css$6,{});
6340
6341
 
6341
6342
  const Tooltip = ({ isVisible, text, x, y }) => {
6342
6343
  if (!isVisible)
@@ -6420,7 +6421,7 @@ var SvgPrev = function SvgPrev(props) {
6420
6421
 
6421
6422
  var css$5 = ".theme-light .styles_module_month__0a69a8ca {\n color: #333333;\n background-color: #ffffff;\n}\n.theme-dark .styles_module_month__0a69a8ca {\n color: #ffffff;\n background-color: #333333;\n}\n.styles_module_month__0a69a8ca {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n padding-block: 5px;\n gap: 2px;\n font-weight: 700;\n}\n\n.theme-light .styles_module_arrow__0a69a8ca {\n color: #333333;\n}\n.theme-dark .styles_module_arrow__0a69a8ca {\n color: #ffffff;\n}\n.styles_module_arrow__0a69a8ca {\n width: max-content;\n border: none;\n background-color: transparent;\n}\n.theme-light .styles_module_arrow__0a69a8ca:hover {\n color: rgba(47, 129, 237, 0.5764705882);\n}\n.theme-dark .styles_module_arrow__0a69a8ca:hover {\n color: rgba(47, 129, 237, 0.5764705882);\n}";
6422
6423
  var modules_efc4e723$5 = {"month":"styles_module_month__0a69a8ca","arrow":"styles_module_arrow__0a69a8ca"};
6423
- n(css$5,{});
6424
+ n$1(css$5,{});
6424
6425
 
6425
6426
  const Month = ({ date, onPrev, onNext }) => {
6426
6427
  const year = date.getFullYear();
@@ -6441,7 +6442,7 @@ const getOrderedDays = (firstDayOfWeek) => {
6441
6442
 
6442
6443
  var css$4 = ".styles_module_weekDay__a9cd2130 {\n display: flex;\n}\n\n.styles_module_dayName__a9cd2130 {\n width: 32px;\n height: 32px;\n}\n.theme-light .styles_module_dayName__a9cd2130 {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_dayName__a9cd2130 {\n background-color: #333333;\n}\n.styles_module_dayName__a9cd2130 {\n font-size: 13px;\n padding: 10px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n}";
6443
6444
  var modules_efc4e723$4 = {"weekDay":"styles_module_weekDay__a9cd2130","dayName":"styles_module_dayName__a9cd2130"};
6444
- n(css$4,{});
6445
+ n$1(css$4,{});
6445
6446
 
6446
6447
  const WeekDay = ({ firstDayOfWeek = 1, className = '', hideWeekends = false, }) => {
6447
6448
  let days = getOrderedDays(firstDayOfWeek);
@@ -6455,7 +6456,7 @@ const WeekDay = ({ firstDayOfWeek = 1, className = '', hideWeekends = false, })
6455
6456
 
6456
6457
  var css$3 = ".styles_module_calendarGrid__a4a27900 {\n border-style: solid;\n border-width: 1px;\n}\n.theme-light .styles_module_calendarGrid__a4a27900 {\n border-color: #e1e1e1;\n background-color: #ffffff;\n}\n.theme-dark .styles_module_calendarGrid__a4a27900 {\n border-color: #aaaaaa;\n background-color: #333333;\n}\n.styles_module_calendarGrid__a4a27900 {\n padding: 10px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n align-items: center;\n width: 262px;\n}";
6457
6458
  var modules_efc4e723$3 = {"calendarGrid":"styles_module_calendarGrid__a4a27900"};
6458
- n(css$3,{});
6459
+ n$1(css$3,{});
6459
6460
 
6460
6461
  const BaseCalendar = ({ mode = MODES.MONTH, monthDate, firstDayOfWeek = 1, hideWeekends = false, ...props }) => {
6461
6462
  const [baseDate, setBaseDate] = React.useState(monthDate);
@@ -6575,7 +6576,7 @@ function useValidate(selectedDate) {
6575
6576
 
6576
6577
  var css$2 = ".styles_module_datepicker__56a414ad {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px;\n width: 262px;\n}\n.theme-light .styles_module_datepicker__56a414ad {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_datepicker__56a414ad {\n background-color: #333333;\n}";
6577
6578
  var modules_efc4e723$2 = {"datepicker":"styles_module_datepicker__56a414ad"};
6578
- n(css$2,{});
6579
+ n$1(css$2,{});
6579
6580
 
6580
6581
  const DatePicker = ({ selectedDate, monthDate = new Date(), onChange, ...props }) => {
6581
6582
  const { currentDate, value, handleDateSelect, error, ref, handleDateValidation, handleClearInput, } = useValidate(selectedDate);
@@ -6598,7 +6599,7 @@ const DatePicker = ({ selectedDate, monthDate = new Date(), onChange, ...props }
6598
6599
 
6599
6600
  var css$1 = ".styles_module_clear__8e986404 {\n border-style: solid;\n border-width: 1px;\n}\n.theme-light .styles_module_clear__8e986404 {\n border-color: #e1e1e1;\n background-color: #ffffff;\n color: #333333;\n}\n.theme-dark .styles_module_clear__8e986404 {\n border-color: #aaaaaa;\n background-color: #333333;\n color: #ffffff;\n}\n.styles_module_clear__8e986404 {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 10px;\n width: 100%;\n font-weight: 600;\n border-bottom-right-radius: 8px;\n border-bottom-left-radius: 8px;\n}\n.theme-light .styles_module_clear__8e986404:hover {\n background-color: rgba(47, 129, 237, 0.5764705882);\n color: #ffffff;\n}\n.theme-dark .styles_module_clear__8e986404:hover {\n background-color: #aaaaaa;\n color: #e1e1e1;\n}\n.styles_module_clear__8e986404:active {\n transform: scale(0.98);\n}\n.theme-light .styles_module_clear__8e986404:active {\n background-color: #2f80ed;\n color: #ffffff;\n}\n.theme-dark .styles_module_clear__8e986404:active {\n background-color: #2f80ed;\n color: #e1e1e1;\n}";
6600
6601
  var modules_efc4e723$1 = {"clear":"styles_module_clear__8e986404"};
6601
- n(css$1,{});
6602
+ n$1(css$1,{});
6602
6603
 
6603
6604
  const Clear = ({ onClick }) => {
6604
6605
  return (jsxRuntime.jsx("button", { className: modules_efc4e723$1.clear, type: "button", onClick: onClick, children: "Clear" }));
@@ -6606,7 +6607,7 @@ const Clear = ({ onClick }) => {
6606
6607
 
6607
6608
  var css = ".styles_module_rangePicker__2a1e1dc4 {\n display: flex;\n flex-direction: column;\n padding: 8px;\n width: 262px;\n}\n.theme-light .styles_module_rangePicker__2a1e1dc4 {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_rangePicker__2a1e1dc4 {\n background-color: #333333;\n}\n\n.styles_module_calendar__2a1e1dc4 {\n margin-top: 15px;\n}\n\n.styles_module_inputs__2a1e1dc4 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}";
6608
6609
  var modules_efc4e723 = {"rangePicker":"styles_module_rangePicker__2a1e1dc4","calendar":"styles_module_calendar__2a1e1dc4","inputs":"styles_module_inputs__2a1e1dc4"};
6609
- n(css,{});
6610
+ n$1(css,{});
6610
6611
 
6611
6612
  const RangePicker = ({ rangeStart, rangeEnd, monthDate = new Date(), onChangeStart, onChangeEnd, ...props }) => {
6612
6613
  const { currentDate: startDate, value: startValue, error: startError, ref: startRef, handleDateSelect: handleStartDateSelect, handleDateValidation: handleStartDateValidation, handleClearInput: handleStartClearInput, } = useValidate(rangeStart);