@daryasidorovich/modsen-datepicker 1.0.21 → 1.0.23

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.js CHANGED
@@ -547,8 +547,8 @@ function withMinMax(calendar, minDate, maxDate) {
547
547
  return calendar;
548
548
  }
549
549
 
550
- const HOLIDAY_API_URL = import.meta.env.STORYBOOK_HOLIDAY_API_URL;
551
- const API_KEY = import.meta.env.STORYBOOK_HOLIDAY_API_KEY;
550
+ const HOLIDAY_API_URL = 'https://holidayapi.com/v1';
551
+ const API_KEY = 'f36f54be-e335-4957-9c64-fde814074428';
552
552
  const getHolidays = async (year = new Date().getFullYear(), signal) => {
553
553
  try {
554
554
  let holidayDates;
@@ -557,9 +557,7 @@ const getHolidays = async (year = new Date().getFullYear(), signal) => {
557
557
  if (!countryCode) {
558
558
  throw new Error('Cannot get your country code');
559
559
  }
560
- if (!API_KEY) {
561
- throw new Error('API key is not defined');
562
- }
560
+ if (!API_KEY) ;
563
561
  const url = `${HOLIDAY_API_URL}?key=${API_KEY}&country=${countryCode}&year=${year}`;
564
562
  const response = await fetch(url, { signal });
565
563
  if (!response.ok) {
@@ -6432,8 +6430,8 @@ const WeekDay = ({ firstDayOfWeek = 1, className = '', hideWeekends = false, })
6432
6430
  }) }));
6433
6431
  };
6434
6432
 
6435
- var css$3 = ".styles_module_calendarGrid__b44526fd {\n border-style: solid;\n border-width: 1px;\n}\n.theme-light .styles_module_calendarGrid__b44526fd {\n border-color: #e1e1e1;\n background-color: #ffffff;\n}\n.theme-dark .styles_module_calendarGrid__b44526fd {\n border-color: #aaaaaa;\n background-color: #333333;\n}\n.styles_module_calendarGrid__b44526fd {\n padding: 10px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n align-items: center;\n max-width: 262px;\n}";
6436
- var modules_efc4e723$3 = {"calendarGrid":"styles_module_calendarGrid__b44526fd"};
6433
+ 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}";
6434
+ var modules_efc4e723$3 = {"calendarGrid":"styles_module_calendarGrid__a4a27900"};
6437
6435
  n(css$3,{});
6438
6436
 
6439
6437
  const BaseCalendar = ({ mode = MODES.MONTH, monthDate, firstDayOfWeek = 1, hideWeekends = false, ...props }) => {
@@ -6552,8 +6550,8 @@ function useValidate(selectedDate) {
6552
6550
  };
6553
6551
  }
6554
6552
 
6555
- var css$2 = ".styles_module_datepicker__392917ad {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px;\n max-width: 262px;\n}\n.theme-light .styles_module_datepicker__392917ad {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_datepicker__392917ad {\n background-color: #333333;\n}";
6556
- var modules_efc4e723$2 = {"datepicker":"styles_module_datepicker__392917ad"};
6553
+ 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}";
6554
+ var modules_efc4e723$2 = {"datepicker":"styles_module_datepicker__56a414ad"};
6557
6555
  n(css$2,{});
6558
6556
 
6559
6557
  const DatePicker = ({ selectedDate, monthDate = new Date(), onChange, ...props }) => {
@@ -6583,8 +6581,8 @@ const Clear = ({ onClick }) => {
6583
6581
  return (jsx("button", { className: modules_efc4e723$1.clear, type: "button", onClick: onClick, children: "Clear" }));
6584
6582
  };
6585
6583
 
6586
- var css = ".styles_module_rangePicker__bf693e64 {\n display: flex;\n flex-direction: column;\n padding: 8px;\n max-width: 262px;\n}\n.theme-light .styles_module_rangePicker__bf693e64 {\n background-color: #ffffff;\n}\n.theme-dark .styles_module_rangePicker__bf693e64 {\n background-color: #333333;\n}\n\n.styles_module_calendar__bf693e64 {\n margin-top: 15px;\n}\n\n.styles_module_inputs__bf693e64 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}";
6587
- var modules_efc4e723 = {"rangePicker":"styles_module_rangePicker__bf693e64","calendar":"styles_module_calendar__bf693e64","inputs":"styles_module_inputs__bf693e64"};
6584
+ 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}";
6585
+ var modules_efc4e723 = {"rangePicker":"styles_module_rangePicker__2a1e1dc4","calendar":"styles_module_calendar__2a1e1dc4","inputs":"styles_module_inputs__2a1e1dc4"};
6588
6586
  n(css,{});
6589
6587
 
6590
6588
  const RangePicker = ({ rangeStart, rangeEnd, monthDate = new Date(), onChangeStart, onChangeEnd, ...props }) => {