willba-component-library 0.2.89 → 0.2.91
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 +9 -15
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +9 -15
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +9 -15
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/FilterBar.css +1 -1
- package/src/components/FilterBar/components/buttons/select-button/SelectButton.css +3 -4
- package/src/components/FilterBar/components/guests/GuestCount/GuestCount.css +6 -2
- package/src/components/FilterBar/components/guests/GuestCount/GuestCount.tsx +28 -2
- package/src/components/FilterBar/hooks/useFilterBar.tsx +0 -12
package/lib/index.esm.js
CHANGED
|
@@ -11704,16 +11704,6 @@ var useFilterBar = function (_a) {
|
|
|
11704
11704
|
setAgeCategoryCounts(ageCategoryCountsParam);
|
|
11705
11705
|
setCategories(parsedCategories);
|
|
11706
11706
|
}, []);
|
|
11707
|
-
useEffect(function () {
|
|
11708
|
-
// Handle hide scroll bar on mobile
|
|
11709
|
-
if (typeof window === 'undefined')
|
|
11710
|
-
return;
|
|
11711
|
-
document.body.style.overflow =
|
|
11712
|
-
selectedFilter && window.innerWidth < 960 ? 'hidden' : 'visible';
|
|
11713
|
-
return function () {
|
|
11714
|
-
document.body.style.overflow = 'visible';
|
|
11715
|
-
};
|
|
11716
|
-
}, [selectedFilter]);
|
|
11717
11707
|
useEffect(function () {
|
|
11718
11708
|
if (typeof window === 'undefined')
|
|
11719
11709
|
return;
|
|
@@ -11850,7 +11840,7 @@ var useScrollInToView = function (_a) {
|
|
|
11850
11840
|
return { isMobile: isMobile, targetFilterBarRef: targetFilterBarRef };
|
|
11851
11841
|
};
|
|
11852
11842
|
|
|
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
|
|
11843
|
+
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 color: var(--will-black);\n font-weight: 600;\n}\n\n.will-filter-bar-select-button .select-button-description {\n \n color: var(--will-black);\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";
|
|
11854
11844
|
styleInject(css_248z$7);
|
|
11855
11845
|
|
|
11856
11846
|
var SelectButton = function (_a) {
|
|
@@ -11870,7 +11860,7 @@ var TabButton = function (_a) {
|
|
|
11870
11860
|
return (React__default__default.createElement("button", { className: "will-filter-bar-tab-button ".concat(mode || 'light', " ").concat(active && 'active', " "), onClick: onClick }, label));
|
|
11871
11861
|
};
|
|
11872
11862
|
|
|
11873
|
-
var css_248z$5 = ".will-guests-filter-label, .will-guests-filter-count {\n font-size: 18px;\n color: var(--will-text)\n}\n\n.will-guests-filter-inner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 30px;\n}\n\n.will-guests-filter-label {\n display: block;\n font-weight: 600;\n margin-bottom: 10px;\n \n}\n\n.will-guests-filter-inner .will-guests-filter-counter {\n display: flex;\n align-items: center;\n}\n\n.will-guests-filter-count {\n margin: 0 10px;\n min-width: 30px;\n text-align: center;\n}\n\n.will-guests-filter-counter-button {\n
|
|
11863
|
+
var css_248z$5 = ".will-guests-filter-label, .will-guests-filter-count {\n font-size: 18px;\n color: var(--will-text)\n}\n\n.will-guests-filter-inner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 30px;\n}\n\n.will-guests-filter-label {\n display: block;\n font-weight: 600;\n margin-bottom: 10px;\n \n}\n\n.will-guests-filter-inner .will-guests-filter-counter {\n display: flex;\n align-items: center;\n}\n\n.will-guests-filter-count {\n margin: 0 10px;\n min-width: 30px;\n text-align: center;\n}\n\n.will-guests-filter-counter-button {\n \n border-radius: 50%;\n background-color: transparent;\n border: 1px solid var(--will-grey);\n width: 30px;\n height: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 20px;\n cursor: pointer;\n color: var(--will-black);\n\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.will-guests-filter-counter-button:hover {\n background-color: var(--will-onahau);\n}\n\n@media (max-width: 960px) {\n\n .will-guests-filter-inner {\n width: 100%;\n margin: 15px 0;\n justify-content: space-between;\n }\n}";
|
|
11874
11864
|
styleInject(css_248z$5);
|
|
11875
11865
|
|
|
11876
11866
|
function GuestCount(_a) {
|
|
@@ -11895,9 +11885,13 @@ function GuestCount(_a) {
|
|
|
11895
11885
|
cursor: (minVal && count <= minVal) || !count ? 'initial' : 'pointer',
|
|
11896
11886
|
paddingBottom: '4px',
|
|
11897
11887
|
opacity: (minVal && count <= minVal) || !count ? 0.4 : 1,
|
|
11898
|
-
} },
|
|
11888
|
+
} },
|
|
11889
|
+
React__default__default.createElement("svg", { width: "10", height: "10", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11890
|
+
React__default__default.createElement("path", { d: "M4 10H16", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }))),
|
|
11899
11891
|
React__default__default.createElement("span", { className: "will-guests-filter-count" }, count),
|
|
11900
|
-
React__default__default.createElement("button", { className: "will-guests-filter-counter-button", onClick: handleIncrement },
|
|
11892
|
+
React__default__default.createElement("button", { className: "will-guests-filter-counter-button", onClick: handleIncrement },
|
|
11893
|
+
React__default__default.createElement("svg", { width: "15", height: "15", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11894
|
+
React__default__default.createElement("path", { d: "M10 4V16M4 10H16", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }))))));
|
|
11901
11895
|
}
|
|
11902
11896
|
|
|
11903
11897
|
var css_248z$4 = ".will-filter-bar-guests {\n text-align: initial;\n}\n\n.will-guests-filter-title {\n font-size: 22px;\n margin: 10px 0;\n}\n\n.will-guests-filter-subtitle {\n font-size: 15px;\n font-weight: 500;\n color:var(--will-text)\n}\n\n\n.will-guests-filter-container {\n display: flex;\n flex-direction: column;\n min-width: 400px;\n}\n\n\n@media (max-width: 960px) {\n .will-guests-filter-title {\n font-size: 18px;\n }\n\n .will-guests-filter-container {\n margin-top: 15px;\n min-width: 100%;\n }\n}";
|
|
@@ -11942,7 +11936,7 @@ var Categories = function (_a) {
|
|
|
11942
11936
|
React__default__default.createElement("span", null, itm))); }))));
|
|
11943
11937
|
};
|
|
11944
11938
|
|
|
11945
|
-
var css_248z$1 = ".will-root {\n z-index: 999;\n width: fit-content;\n min-width: 796px;\n max-height: 100vh;\n position: relative;\n}\n\n.will-root.is-full-width {\n width: 100%;\n min-width: auto;\n}\n\n.will-filter-bar {\n box-sizing: border-box;\n position: relative;\n}\n\n/* Tabs */\n\n.will-filter-bar-tabs {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n z-index: 222;\n background: transparent;\n padding: 10px;\n gap: 10px\n}\n\n/* Header */\n.will-filter-bar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n position: relative;\n z-index: 222;\n border-radius: 40px;\n background-color: var(--will-white);\n \n}\n\n\n\n@media (max-width: 960px) {\n .will-filter-bar-header {\n flex-direction: column;\n padding: 20px;\n border-radius: 25px;\n }\n}\n\n/* Container */\n\n.will-filter-bar-container {\n background-color: var(--will-white);\n min-height: 100px;\n padding: 40px 20px ;\n position: absolute;\n top: 125px;\n z-index: 111;\n border-radius: 25px;\n box-shadow: var(--will-box-shadow);\n}\n\n@media (max-width: 960px) {\n .will-root { \n width: 100%;\n min-width: auto;\n max-height: 100vh; \n z-index: 3;\n }\n\n .will-filter-bar-container {\n margin-top: 10px;\n top:0;\n padding:
|
|
11939
|
+
var css_248z$1 = ".will-root {\n z-index: 999;\n width: fit-content;\n min-width: 796px;\n max-height: 100vh;\n position: relative;\n}\n\n.will-root.is-full-width {\n width: 100%;\n min-width: auto;\n}\n\n.will-filter-bar {\n box-sizing: border-box;\n position: relative;\n}\n\n/* Tabs */\n\n.will-filter-bar-tabs {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n z-index: 222;\n background: transparent;\n padding: 10px;\n gap: 10px\n}\n\n/* Header */\n.will-filter-bar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n position: relative;\n z-index: 222;\n border-radius: 40px;\n background-color: var(--will-white);\n \n}\n\n\n\n@media (max-width: 960px) {\n .will-filter-bar-header {\n flex-direction: column;\n padding: 20px;\n border-radius: 25px;\n }\n}\n\n/* Container */\n\n.will-filter-bar-container {\n background-color: var(--will-white);\n min-height: 100px;\n padding: 40px 20px ;\n position: absolute;\n top: 125px;\n z-index: 111;\n border-radius: 25px;\n box-shadow: var(--will-box-shadow);\n}\n\n@media (max-width: 960px) {\n .will-root { \n width: 100%;\n min-width: auto;\n max-height: 100vh; \n z-index: 3;\n }\n\n .will-filter-bar-container {\n margin-top: 10px;\n top:0;\n padding: 45px 20px;\n position: relative;\n }\n}\n\n/* Common */\n\n.will-filter-bar-header.dark,\n.will-filter-bar-container.dark {\n box-shadow: var(--will-box-shadow-dark)\n}\n\n.will-filter-bar-header.light,\n.will-filter-bar-container.light {\n box-shadow: var(--will-box-shadow-light)\n}\n\n";
|
|
11946
11940
|
styleInject(css_248z$1);
|
|
11947
11941
|
|
|
11948
11942
|
function FilterBar(_a) {
|