willba-component-library 0.1.11 → 0.1.12
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/README.md +6 -6
- package/lib/components/FilterBar/FilterBar.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.esm.js +8 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +8 -6
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +8 -6
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/FilterBar.css +2 -6
- package/src/components/FilterBar/FilterBar.tsx +10 -6
package/lib/index.umd.js
CHANGED
|
@@ -8109,7 +8109,7 @@
|
|
|
8109
8109
|
};
|
|
8110
8110
|
}
|
|
8111
8111
|
|
|
8112
|
-
var css_248z$2 = ".will-root {\r\n z-index: 99999;\r\n width: 100%;\r\n max-height: 100vh;\r\n position: relative;\r\n \r\n}\r\n\r\n.will-filter-bar {\r\n box-sizing: border-box;\r\n position: relative;\r\n}\r\n\r\n.will-filter-bar-underlay {\r\n background-color: rgba(0,0,0,.8);\r\n position: absolute;\r\n /* top:0; */\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n cursor: pointer;\r\n min-height: 200vh;\r\n z-index: 88888;\r\n\r\n transform: translateY(-50%);\r\n}\r\n\r\n/* Header */\r\n.will-filter-bar-header {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 10px 20px;\r\n position: relative;\r\n z-index: 222;\r\n \r\n \r\n border-radius: 40px;\r\n background-color: var(--will-white);\r\n box-shadow: var(--will-box-shadow);\r\n}\r\n\r\n@media (max-width: 960px) {\r\n .will-filter-bar-header {\r\n flex-direction: column;\r\n padding: 20px;\r\n }\r\n}\r\n\r\n/* Container */\r\n\r\n.will-filter-bar-container {\r\n background-color: var(--will-white);\r\n min-height: 100px;\r\n \r\n padding: 90px 40px 30px 40px;\r\n position: absolute;\r\n top: 0;\r\n z-index: 111;\r\n border-radius: 25px;\r\n width: -webkit-fill-available;\r\n box-shadow: var(--will-box-shadow);\r\n}\r\n\r\n@media (max-width: 960px) {\r\n .will-root { \r\n overflow-y: auto;\r\n padding: 40px 10px;\r\n top: 15px;\r\n z-index: 0;\r\n }\r\n\r\n .will-filter-bar-container {\r\n margin-top: 20px;\r\n padding: 30px 40px;\r\n position: relative;\r\n }\r\n\r\n .isMobileAbsolute {\r\n position:
|
|
8112
|
+
var css_248z$2 = ".will-root {\r\n z-index: 99999;\r\n width: 100%;\r\n max-height: 100vh;\r\n position: relative;\r\n \r\n}\r\n\r\n.will-filter-bar {\r\n box-sizing: border-box;\r\n position: relative;\r\n}\r\n\r\n.will-filter-bar-underlay {\r\n background-color: rgba(0,0,0,.8);\r\n position: absolute;\r\n /* top:0; */\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n cursor: pointer;\r\n min-height: 200vh;\r\n z-index: 88888;\r\n\r\n transform: translateY(-50%);\r\n}\r\n\r\n/* Header */\r\n.will-filter-bar-header {\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 10px 20px;\r\n position: relative;\r\n z-index: 222;\r\n \r\n \r\n border-radius: 40px;\r\n background-color: var(--will-white);\r\n box-shadow: var(--will-box-shadow);\r\n}\r\n\r\n@media (max-width: 960px) {\r\n .will-filter-bar-header {\r\n flex-direction: column;\r\n padding: 20px;\r\n }\r\n}\r\n\r\n/* Container */\r\n\r\n.will-filter-bar-container {\r\n background-color: var(--will-white);\r\n min-height: 100px;\r\n \r\n padding: 90px 40px 30px 40px;\r\n position: absolute;\r\n top: 0;\r\n z-index: 111;\r\n border-radius: 25px;\r\n width: -webkit-fill-available;\r\n box-shadow: var(--will-box-shadow);\r\n}\r\n\r\n@media (max-width: 960px) {\r\n .will-root { \r\n overflow-y: auto;\r\n padding: 40px 10px;\r\n top: 15px;\r\n z-index: 0;\r\n }\r\n\r\n .will-filter-bar-container {\r\n margin-top: 20px;\r\n padding: 30px 40px;\r\n position: relative;\r\n }\r\n\r\n .will-root.isMobileAbsolute {\r\n position: relative;\r\n z-index: 99999;\r\n }\r\n}\r\n\r\n";
|
|
8113
8113
|
styleInject(css_248z$2);
|
|
8114
8114
|
|
|
8115
8115
|
var css_248z$1 = "@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');\r\n\r\n.will-root * {\r\n font-family: 'Montserrat', sans-serif;\r\n}\r\n\r\n.will-root {\r\n \r\n box-sizing: border-box;\r\n font-size: 14px;\r\n \r\n color: #1E1E1E;\r\n\r\n /* Pallete */\r\n --will-primary: #374269;\r\n --will-secondary: #374269;\r\n --will-grey: #ABA7AF;\r\n --will-white: #fff;\r\n --will-onahau: #CDEEFF;\r\n --will-text: #5A5959;\r\n\r\n /* Confines */\r\n --will-box-shadow: 0px 6px 11px 0px #a7a4a480;\r\n\r\n /* Breakpoints */\r\n\r\n --will-lg: 1140px;\r\n --will-md: 960px;\r\n --will-sm: 600px;\r\n --will-xl: 1280px;\r\n --will-xs: 0px;\r\n}\r\n\r\n/* Typography */\r\n\r\n.will-root h1, h2, h3, h4, h5, h6 {\r\n font-weight: 700;\r\n} \r\n\r\n.will-root p, h1, h2, h3, h4, h5, h6, span {\r\n margin: 0;\r\n padding: 0;\r\n}";
|
|
@@ -10482,12 +10482,14 @@
|
|
|
10482
10482
|
// Filters
|
|
10483
10483
|
var _e = useFilterBar({ redirectUrl: redirectUrl }), selectedFilter = _e.selectedFilter, ageCategoryCounts = _e.ageCategoryCounts, categories = _e.categories, calendarRange = _e.calendarRange, setCalendarRange = _e.setCalendarRange, setCategories = _e.setCategories, handleSelectedFilter = _e.handleSelectedFilter, handleSubmit = _e.handleSubmit, updateGuestsCount = _e.updateGuestsCount;
|
|
10484
10484
|
// Scroll in to view
|
|
10485
|
-
var
|
|
10485
|
+
var targetFilterBarRef = React__default.useRef(null);
|
|
10486
10486
|
React__default.useEffect(function () {
|
|
10487
|
-
if (
|
|
10488
|
-
|
|
10487
|
+
if (targetFilterBarRef.current && selectedFilter) {
|
|
10488
|
+
window.scrollTo({
|
|
10489
10489
|
behavior: 'smooth',
|
|
10490
|
-
|
|
10490
|
+
top: targetFilterBarRef.current.getBoundingClientRect().top -
|
|
10491
|
+
document.body.getBoundingClientRect().top -
|
|
10492
|
+
30,
|
|
10491
10493
|
});
|
|
10492
10494
|
}
|
|
10493
10495
|
}, [selectedFilter]);
|
|
@@ -10496,7 +10498,7 @@
|
|
|
10496
10498
|
handleSelectedFilter(false);
|
|
10497
10499
|
} })),
|
|
10498
10500
|
React__default.createElement("div", { className: "will-root ".concat(selectedFilter ? 'isMobileAbsolute' : ''), style: themePalette },
|
|
10499
|
-
React__default.createElement("div", { className: "will-filter-bar-header", ref:
|
|
10501
|
+
React__default.createElement("div", { className: "will-filter-bar-header", ref: targetFilterBarRef },
|
|
10500
10502
|
React__default.createElement(SelectButton, { style: fontWigthBold(selectedFilter === 1 || selectedFilter === 2), label: t('calendar.startDate'), onClick: function () { return handleSelectedFilter(1); } }),
|
|
10501
10503
|
React__default.createElement(Divider, null),
|
|
10502
10504
|
React__default.createElement(SelectButton, { style: fontWigthBold(selectedFilter === 1 || selectedFilter === 2), label: t('calendar.endDate'), onClick: function () { return handleSelectedFilter(2); } }),
|