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.js
CHANGED
|
@@ -8107,7 +8107,7 @@ function useFilterBar(_a) {
|
|
|
8107
8107
|
};
|
|
8108
8108
|
}
|
|
8109
8109
|
|
|
8110
|
-
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:
|
|
8110
|
+
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";
|
|
8111
8111
|
styleInject(css_248z$2);
|
|
8112
8112
|
|
|
8113
8113
|
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}";
|
|
@@ -10480,12 +10480,14 @@ function FilterBar(_a) {
|
|
|
10480
10480
|
// Filters
|
|
10481
10481
|
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;
|
|
10482
10482
|
// Scroll in to view
|
|
10483
|
-
var
|
|
10483
|
+
var targetFilterBarRef = React__default.useRef(null);
|
|
10484
10484
|
React__default.useEffect(function () {
|
|
10485
|
-
if (
|
|
10486
|
-
|
|
10485
|
+
if (targetFilterBarRef.current && selectedFilter) {
|
|
10486
|
+
window.scrollTo({
|
|
10487
10487
|
behavior: 'smooth',
|
|
10488
|
-
|
|
10488
|
+
top: targetFilterBarRef.current.getBoundingClientRect().top -
|
|
10489
|
+
document.body.getBoundingClientRect().top -
|
|
10490
|
+
30,
|
|
10489
10491
|
});
|
|
10490
10492
|
}
|
|
10491
10493
|
}, [selectedFilter]);
|
|
@@ -10494,7 +10496,7 @@ function FilterBar(_a) {
|
|
|
10494
10496
|
handleSelectedFilter(false);
|
|
10495
10497
|
} })),
|
|
10496
10498
|
React__default.createElement("div", { className: "will-root ".concat(selectedFilter ? 'isMobileAbsolute' : ''), style: themePalette },
|
|
10497
|
-
React__default.createElement("div", { className: "will-filter-bar-header", ref:
|
|
10499
|
+
React__default.createElement("div", { className: "will-filter-bar-header", ref: targetFilterBarRef },
|
|
10498
10500
|
React__default.createElement(SelectButton, { style: fontWigthBold(selectedFilter === 1 || selectedFilter === 2), label: t('calendar.startDate'), onClick: function () { return handleSelectedFilter(1); } }),
|
|
10499
10501
|
React__default.createElement(Divider, null),
|
|
10500
10502
|
React__default.createElement(SelectButton, { style: fontWigthBold(selectedFilter === 1 || selectedFilter === 2), label: t('calendar.endDate'), onClick: function () { return handleSelectedFilter(2); } }),
|