willba-component-library 0.1.78 → 0.1.80

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/lib/index.esm.js CHANGED
@@ -3970,11 +3970,11 @@ var useFilterBar = function (_a) {
3970
3970
  if (typeof window === 'undefined')
3971
3971
  return;
3972
3972
  var defaultTab = (tabs === null || tabs === void 0 ? void 0 : tabs.length) === 1 ? tabs[0] : tabs === null || tabs === void 0 ? void 0 : tabs.find(function (tab) { return tab.default; });
3973
- var currentPath = (defaultTab === null || defaultTab === void 0 ? void 0 : defaultTab.path) === Pages.EVENTS ||
3974
- window.location.pathname.includes(Pages.EVENTS)
3973
+ var currentPath = window.location.pathname.includes(Pages.EVENTS) ||
3974
+ (defaultTab === null || defaultTab === void 0 ? void 0 : defaultTab.path) === Pages.EVENTS
3975
3975
  ? Pages.EVENTS
3976
- : (defaultTab === null || defaultTab === void 0 ? void 0 : defaultTab.path) === Pages.ROOMS ||
3977
- window.location.pathname.includes(Pages.ROOMS)
3976
+ : window.location.pathname.includes(Pages.ROOMS) ||
3977
+ (defaultTab === null || defaultTab === void 0 ? void 0 : defaultTab.path) === Pages.ROOMS
3978
3978
  ? Pages.ROOMS
3979
3979
  : Pages.EVENTS;
3980
3980
  setSelectedPath(currentPath);
@@ -11108,7 +11108,7 @@ function FilterBar(_a) {
11108
11108
  React__default__default.createElement(Divider, null),
11109
11109
  React__default__default.createElement(SelectButton, { label: t('guests.label'), description: parsedGuests.content, onClick: function () { return handleSelectedFilter(FilterSections.GUESTS); }, active: !!parsedGuests.data.total }))),
11110
11110
  React__default__default.createElement(SubmitButton, { onClick: handleSubmit })),
11111
- selectedFilter && (React__default__default.createElement("div", { className: "will-filter-bar-container ".concat(mode || 'dark'), style: tabs && tabs.length === 1 && !isMobile ? { top: 66 } : {} },
11111
+ selectedFilter && (React__default__default.createElement("div", { className: "will-filter-bar-container ".concat(mode || 'dark'), style: (!tabs || tabs.length < 2) && !isMobile ? { top: 66 } : {} },
11112
11112
  React__default__default.createElement(CloseButton, { handleClose: function () { return handleSelectedFilter(false); } }),
11113
11113
  selectedFilter === FilterSections.CALENDAR && (React__default__default.createElement(Calendar, { calendarRange: calendarRange, setCalendarRange: setCalendarRange, ref: filtersRef, calendarOffset: calendarOffset, selectedPath: selectedPath, locale: language })),
11114
11114
  selectedFilter === FilterSections.GUESTS && (React__default__default.createElement(Guests, { updateGuestsCount: updateGuestsCount, ageCategories: ageCategories, ageCategoryCounts: ageCategoryCounts, ref: filtersRef })),