willba-component-library 0.2.82 → 0.2.84
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 +5 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +5 -4
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/components/buttons/select-button/SelectButton.css +1 -0
- package/src/components/FilterCalendar/FilterCalendar.stories.tsx +3 -455
- package/src/core/components/calendar/hooks/useUpdateDisabledDates.tsx +1 -3
package/lib/index.esm.js
CHANGED
|
@@ -11466,10 +11466,11 @@ var useUpdateDisabledDates = function (_a) {
|
|
|
11466
11466
|
var _b = __read(useState(undefined), 2), overlappingDate = _b[0], setOverlappingDate = _b[1];
|
|
11467
11467
|
var _c = __read(useState([]), 2), lastPossibleCheckout = _c[0], setLatsPossibleCheckout = _c[1];
|
|
11468
11468
|
var newDisableCalendarDates = useMemo(function () {
|
|
11469
|
+
var _a;
|
|
11469
11470
|
if (disableCalendarDates === null || disableCalendarDates === void 0 ? void 0 : disableCalendarDates.availableDates) {
|
|
11470
11471
|
var dateFormat_1 = 'dd-MM-yyyy';
|
|
11471
11472
|
var disabledDates = disableCalendarDates.disabledDates;
|
|
11472
|
-
var
|
|
11473
|
+
var _b = (disabledDates || []).reduce(function (acc, dateRange) {
|
|
11473
11474
|
var _a, _b;
|
|
11474
11475
|
var formattedFromDate = format(dateRange.from, dateFormat_1);
|
|
11475
11476
|
var formattedToDate = format(dateRange.to, dateFormat_1);
|
|
@@ -11492,9 +11493,9 @@ var useUpdateDisabledDates = function (_a) {
|
|
|
11492
11493
|
acc.updatedDisabledDates.push(dateRange);
|
|
11493
11494
|
}
|
|
11494
11495
|
return acc;
|
|
11495
|
-
}, { updatedDisabledDates: [], newOverlappingDates: [] }), updatedDisabledDates =
|
|
11496
|
+
}, { updatedDisabledDates: [], newOverlappingDates: [] }), updatedDisabledDates = _b.updatedDisabledDates, newOverlappingDates = _b.newOverlappingDates;
|
|
11496
11497
|
// Find last possible checkout ( disable all dates after the last possible checkout )
|
|
11497
|
-
var lastPossibleCheckout_1 = disableCalendarDates.availableDates
|
|
11498
|
+
var lastPossibleCheckout_1 = (_a = disableCalendarDates.availableDates.at(-1)) === null || _a === void 0 ? void 0 : _a.lastCheckOut;
|
|
11498
11499
|
if (lastPossibleCheckout_1) {
|
|
11499
11500
|
setLatsPossibleCheckout({ after: lastPossibleCheckout_1 });
|
|
11500
11501
|
}
|
|
@@ -11849,7 +11850,7 @@ var useScrollInToView = function (_a) {
|
|
|
11849
11850
|
return { isMobile: isMobile, targetFilterBarRef: targetFilterBarRef };
|
|
11850
11851
|
};
|
|
11851
11852
|
|
|
11852
|
-
var css_248z$7 = ".will-filter-bar-select-button {\n width: 100%;\n height: auto;\n background-color: transparent;\n border: none;\n padding: 0 20px;\n border-radius: 20px;\n cursor: pointer;\n font-size: 14px;\n text-align: initial;\n}\n\n.will-filter-bar-select-button .select-button-wrapper {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 10px;\n \n}\n\n.will-filter-bar-select-button .select-button-wrapper > div {\n display: grid\n}\n\n.will-filter-bar-select-button .select-button-label {\n font-weight: 600;\n}\n\n.will-filter-bar-select-button .select-button-description {\n font-weight: 400;\n opacity: 0.5;\n white-space: nowrap;\n }\n\n .will-filter-bar-select-button .select-button-description span {\n font: inherit\n }\n\n .will-root.is-full-width .will-filter-bar-select-button .select-button-description {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .will-filter-bar-select-button .select-button-label.active,\n .will-filter-bar-select-button .select-button-description.active {\n font-weight: 700;\n font-size: 15px;\n opacity: 1;\n\n }\n\n@media (max-width: 960px) {\n .will-filter-bar-select-button {\n padding: 15px 0;\n }\n\n .will-filter-bar-select-button:first-child {\n padding: 0 0 15px 0;\n }\n\n .will-filter-bar-select-button .select-button-wrapper {\n justify-content: center;\n text-align: center;\n }\n\n .will-filter-bar-select-button .select-button-description {\n white-space: wrap;\n }\n\n .will-filter-bar-select-button .select-button-divider {\n display: none\n }\n}\n\n\n";
|
|
11853
|
+
var css_248z$7 = ".will-filter-bar-select-button {\n width: 100%;\n height: auto;\n background-color: transparent;\n border: none;\n padding: 0 20px;\n border-radius: 20px;\n cursor: pointer;\n font-size: 14px;\n text-align: initial;\n}\n\n.will-filter-bar-select-button .select-button-wrapper {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 10px;\n \n}\n\n.will-filter-bar-select-button .select-button-wrapper > div {\n display: grid\n}\n\n.will-filter-bar-select-button .select-button-label {\n font-weight: 600;\n}\n\n.will-filter-bar-select-button .select-button-description {\n font-weight: 400;\n opacity: 0.5;\n white-space: nowrap;\n min-height: 19px;\n }\n\n .will-filter-bar-select-button .select-button-description span {\n font: inherit\n }\n\n .will-root.is-full-width .will-filter-bar-select-button .select-button-description {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .will-filter-bar-select-button .select-button-label.active,\n .will-filter-bar-select-button .select-button-description.active {\n font-weight: 700;\n font-size: 15px;\n opacity: 1;\n\n }\n\n@media (max-width: 960px) {\n .will-filter-bar-select-button {\n padding: 15px 0;\n }\n\n .will-filter-bar-select-button:first-child {\n padding: 0 0 15px 0;\n }\n\n .will-filter-bar-select-button .select-button-wrapper {\n justify-content: center;\n text-align: center;\n }\n\n .will-filter-bar-select-button .select-button-description {\n white-space: wrap;\n }\n\n .will-filter-bar-select-button .select-button-divider {\n display: none\n }\n}\n\n\n";
|
|
11853
11854
|
styleInject(css_248z$7);
|
|
11854
11855
|
|
|
11855
11856
|
var SelectButton = function (_a) {
|