@bonlineza/luxity-lib 2.34.8 → 2.34.9
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/LuxityDesktopHeader.js +21 -13
- package/LuxityMobileHeader.js +13 -12
- package/build/CountryCodeSelect/index.js +18 -0
- package/build/ReactSelectWrapper/index.js +34 -0
- package/build/bundle.css +1 -1
- package/build/bundle.js +34 -25
- package/package.json +1 -1
package/LuxityDesktopHeader.js
CHANGED
|
@@ -824,27 +824,24 @@
|
|
|
824
824
|
};
|
|
825
825
|
|
|
826
826
|
var debouncedSearch = React.useCallback(debounce(function (nextValue) {
|
|
827
|
-
var isKeyDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
828
827
|
setSearchLoading(true);
|
|
829
828
|
axios.post(endpoint, searchProducts(nextValue, 6)).then(function (response) {
|
|
830
829
|
setSearchResults(response.data.data.luxity_products_serach_results);
|
|
831
830
|
var ids = response.data.data.luxity_products_serach_results.luxity_product_ids;
|
|
832
831
|
onProductIdsReceived(ids);
|
|
833
|
-
|
|
834
|
-
if (isKeyDown) {
|
|
835
|
-
// reset the search results on keydown
|
|
836
|
-
setSearchResults({
|
|
837
|
-
brands: [],
|
|
838
|
-
products: []
|
|
839
|
-
});
|
|
840
|
-
onSearchSubmit(nextValue);
|
|
841
|
-
}
|
|
842
|
-
|
|
843
832
|
setSearchLoading(false);
|
|
844
833
|
}).catch(function () {
|
|
845
834
|
setSearchLoading(false);
|
|
846
835
|
});
|
|
847
836
|
}, 500), [endpoint]);
|
|
837
|
+
var immediateSearch = React.useCallback(function (value) {
|
|
838
|
+
setSearchValue('');
|
|
839
|
+
setSearchResults({
|
|
840
|
+
brands: [],
|
|
841
|
+
products: []
|
|
842
|
+
});
|
|
843
|
+
onSearchSubmit(value);
|
|
844
|
+
}, [onSearchSubmit]);
|
|
848
845
|
|
|
849
846
|
var handleChange = function handleChange(event) {
|
|
850
847
|
var value = event.target.value;
|
|
@@ -875,7 +872,11 @@
|
|
|
875
872
|
|
|
876
873
|
var handleKeyDown = function handleKeyDown(event) {
|
|
877
874
|
if (event.key === 'Enter') {
|
|
878
|
-
|
|
875
|
+
event.preventDefault();
|
|
876
|
+
|
|
877
|
+
if (searchValue.trim().length >= 3) {
|
|
878
|
+
immediateSearch(searchValue);
|
|
879
|
+
}
|
|
879
880
|
} else if (event.key === 'Escape') {
|
|
880
881
|
setSearchValue('');
|
|
881
882
|
}
|
|
@@ -910,6 +911,13 @@
|
|
|
910
911
|
return setHasError(true);
|
|
911
912
|
});
|
|
912
913
|
}, [menuData]);
|
|
914
|
+
|
|
915
|
+
var getMarginRight = function getMarginRight(userIsVip, userName) {
|
|
916
|
+
if (userIsVip) return '15px';
|
|
917
|
+
if (userName) return '5px';
|
|
918
|
+
return '18px';
|
|
919
|
+
};
|
|
920
|
+
|
|
913
921
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
914
922
|
className: "navbar"
|
|
915
923
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1050,7 +1058,7 @@
|
|
|
1050
1058
|
className: "navbar__icon relative flex",
|
|
1051
1059
|
onClick: onAccountClick,
|
|
1052
1060
|
style: {
|
|
1053
|
-
marginRight: isVip
|
|
1061
|
+
marginRight: getMarginRight(isVip, name)
|
|
1054
1062
|
}
|
|
1055
1063
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1056
1064
|
src: accountIcon,
|
package/LuxityMobileHeader.js
CHANGED
|
@@ -1323,27 +1323,24 @@
|
|
|
1323
1323
|
};
|
|
1324
1324
|
|
|
1325
1325
|
var debouncedSearch = React.useCallback(debounce(function (nextValue) {
|
|
1326
|
-
var isKeyDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1327
1326
|
setSearchLoading(true);
|
|
1328
1327
|
axios.post(endpoint, searchProducts(nextValue, 6)).then(function (response) {
|
|
1329
1328
|
setSearchResults(response.data.data.luxity_products_serach_results);
|
|
1330
1329
|
var ids = response.data.data.luxity_products_serach_results.luxity_product_ids;
|
|
1331
1330
|
onProductIdsReceived(ids);
|
|
1332
|
-
|
|
1333
|
-
if (isKeyDown) {
|
|
1334
|
-
// reset the search results on keydown
|
|
1335
|
-
setSearchResults({
|
|
1336
|
-
brands: [],
|
|
1337
|
-
products: []
|
|
1338
|
-
});
|
|
1339
|
-
onSearchSubmit(nextValue);
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
1331
|
setSearchLoading(false);
|
|
1343
1332
|
}).catch(function () {
|
|
1344
1333
|
setSearchLoading(false);
|
|
1345
1334
|
});
|
|
1346
1335
|
}, 500), [endpoint]);
|
|
1336
|
+
var immediateSearch = React.useCallback(function (value) {
|
|
1337
|
+
setSearchValue('');
|
|
1338
|
+
setSearchResults({
|
|
1339
|
+
brands: [],
|
|
1340
|
+
products: []
|
|
1341
|
+
});
|
|
1342
|
+
onSearchSubmit(value);
|
|
1343
|
+
}, [onSearchSubmit]);
|
|
1347
1344
|
|
|
1348
1345
|
var handleChange = function handleChange(event) {
|
|
1349
1346
|
var value = event.target.value;
|
|
@@ -1361,7 +1358,11 @@
|
|
|
1361
1358
|
|
|
1362
1359
|
var handleKeyDown = function handleKeyDown(event) {
|
|
1363
1360
|
if (event.key === 'Enter') {
|
|
1364
|
-
|
|
1361
|
+
event.preventDefault();
|
|
1362
|
+
|
|
1363
|
+
if (searchValue.trim().length >= 3) {
|
|
1364
|
+
immediateSearch(searchValue);
|
|
1365
|
+
}
|
|
1365
1366
|
} else if (event.key === 'Escape') {
|
|
1366
1367
|
setSearchValue('');
|
|
1367
1368
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var ReactSelectWrapper_1 = __importDefault(require("../ReactSelectWrapper"));
|
|
8
|
+
var responseTransform = function (countryData) {
|
|
9
|
+
return countryData.map(function (item) { return ({
|
|
10
|
+
label: "".concat(item.code, " (+").concat(item.dial_code, ")"),
|
|
11
|
+
value: item.code,
|
|
12
|
+
}); });
|
|
13
|
+
};
|
|
14
|
+
var CountryCodeSelect = function (_a) {
|
|
15
|
+
var _b = _a.countryData, countryData = _b === void 0 ? [] : _b, className = _a.className, classNamePrefix = _a.classNamePrefix, _c = _a.defaultCountryCode, defaultCountryCode = _c === void 0 ? 'ZA' : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { return null; } : _d, _e = _a.isSearchable, isSearchable = _e === void 0 ? true : _e, _f = _a.name, name = _f === void 0 ? 'country_code' : _f, _g = _a.renderNoData, renderNoData = _g === void 0 ? function () { return 'Loading...'; } : _g;
|
|
16
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, countryData && countryData.length ? (react_1.default.createElement(ReactSelectWrapper_1.default, { name: name, className: className, classNamePrefix: classNamePrefix, options: responseTransform(countryData), defaultValue: responseTransform(countryData.filter(function (item) { return item.code === defaultCountryCode; })), onChange: onChange, isSearchable: isSearchable })) : (renderNoData())));
|
|
17
|
+
};
|
|
18
|
+
exports.default = CountryCodeSelect;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var react_select_1 = __importDefault(require("react-select"));
|
|
30
|
+
var ReactSelectWrapper = function (_a) {
|
|
31
|
+
var _b = _a.isMulti, isMulti = _b === void 0 ? false : _b, _c = _a.isSearchable, isSearchable = _c === void 0 ? false : _c, _d = _a.components, components = _d === void 0 ? { IndicatorSeparator: function () { return null; } } : _d, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.className, className = _f === void 0 ? 'dropdown-select-container' : _f, _g = _a.classNamePrefix, classNamePrefix = _g === void 0 ? 'dropdown-select' : _g, _h = _a.onChange, onChange = _h === void 0 ? function () { return null; } : _h, name = _a.name, _j = _a.noOptionsMessage, noOptionsMessage = _j === void 0 ? function () { return 'No Options'; } : _j, rest = __rest(_a, ["isMulti", "isSearchable", "components", "options", "className", "classNamePrefix", "onChange", "name", "noOptionsMessage"]);
|
|
32
|
+
return (react_1.default.createElement(react_select_1.default, __assign({ isMulti: isMulti, isSearchable: isSearchable, components: components, options: options, className: className, classNamePrefix: classNamePrefix, onChange: onChange, name: name, noOptionsMessage: noOptionsMessage }, rest)));
|
|
33
|
+
};
|
|
34
|
+
exports.default = ReactSelectWrapper;
|
package/build/bundle.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.footer__newsletter-section{align-items:center;background-color:#000;color:#fff;display:flex;justify-content:space-between;padding:2.265rem 0}@media only screen and (max-width:879px){.footer__newsletter-section{flex-direction:column}}.footer__newsletter-wrapper{align-items:center;display:flex;justify-content:space-between;margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__newsletter-wrapper{flex-direction:column}.footer__link-container{flex-basis:50%}}.footer__newsletter-icon{height:30px;position:absolute;right:0;top:0;width:32px}.footer__newsletter-form{flex-basis:50%;max-width:250px;position:relative}@media only screen and (max-width:879px){.footer__newsletter-form{display:block;margin-top:20px;max-width:100%;width:100%}}.footer__newsletter-title{font-family:Martel Sans,sans-serif;font-size:14px;font-weight:700;letter-spacing:3px;margin-bottom:1.125rem;text-transform:uppercase}.footer__newsletter-text{font-size:14px}.footer__form-input{background-color:#000;border:none;border-bottom:1px solid #fff;color:#fff;height:30px;outline:none;width:100%}.footer__form-input::-moz-placeholder{color:#fff;font-weight:400}.footer__form-input::placeholder{color:#fff;font-weight:400}.footer__form-errors{color:#fff;margin-top:5px}.footer__main-section{align-items:flex-start;display:flex;justify-content:space-between;margin-bottom:50px;margin-top:80px}.footer__link-title{font-family:El Messiri;font-size:16px;font-weight:700;margin-bottom:20px;text-transform:uppercase}@media only screen and (max-width:879px){.footer__link-title{margin-bottom:10px}}.footer__link-child{margin-top:25px}.footer__links{display:flex;flex-direction:column}.footer__link{color:#939393;cursor:pointer;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:7px;text-align:left;text-decoration:none}.footer__link:hover{color:#000;text-decoration:underline}@media only screen and (max-width:879px){.footer__link{margin-bottom:10px}}.footer__link-wrapper{align-items:center;display:flex;gap:5px}.footer__link-icon{height:30px;margin-bottom:18px}.footer__text{color:#939393;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:15px;text-align:left;text-decoration:none}.footer__store-hours{margin-top:35px}.footer__copyrights-section{border-top:1px solid;display:flex;justify-content:space-between;padding-bottom:20px;padding-top:20px}.footer__logo{height:30px;width:135px}.footer__payment-icons{align-items:center;display:flex;gap:8px}.footer__wrapper{margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__wrapper{padding:32px 0 0 24px}}.footer__wrapper--desktop{display:block}@media only screen and (max-width:879px){.footer__wrapper--desktop{display:none}}.footer__wrapper--mobile{display:none}@media only screen and (max-width:879px){.footer__wrapper--mobile{display:block;padding-top:30px}}.footer__copyright{font-size:10px;line-height:22px}.footer__copyright--mobile{display:none}@media only screen and (max-width:879px){.footer__copyright--mobile{display:block;padding:30px 10px 30px 0;text-align:center}}.footer__section-row{display:flex;gap:50%}@media only screen and (max-width:879px){.footer__section-row{gap:unset}}.side-nav{font-family:Martel Sans}.side-nav__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center}.side-nav__overlay{background-color:rgba(78,73,73,.51);height:100%;opacity:0;position:fixed;top:0;transition:opacity .5s ease-out 0s,visibility .5s ease-out 0s;width:100%;z-index:99999}.side-nav__overlay--visible{opacity:1;visibility:visible}.side-nav__overlay--hidden{opacity:1;visibility:hidden}.side-nav__content{background-color:#fff;bottom:0;overflow-y:scroll;padding:1.5rem;position:fixed;top:0;transition:left .5s ease-in-out;width:80%;z-index:99999}.side-nav__content--hidden{display:none}.side-nav__content--open{left:0}.side-nav__content--closed{left:-100%}.side-nav__menu-title-wrapper{align-items:center;background-color:transparent;border:none;display:flex;outline:none;width:100%}.side-nav__icon-container{float:right;margin-bottom:10px}.side-nav__menu-title{align-items:center;display:flex;font-size:14px;font-weight:700;justify-content:center;line-height:20px;text-transform:uppercase}.side-nav__menu-icon{display:flex;height:25px;margin-right:10px;width:25px}.side-nav__menu-divider{margin-bottom:40px}.side-nav__accordion-icon{height:auto;width:15px}.side-nav__menu-item{margin-bottom:25px}.side-nav__close-icon{height:20px;margin-left:auto;width:20px}.side-nav__back-button-wrapper{align-items:center;display:flex;margin-bottom:25px}.side-nav__back-icon{height:20px;width:20px}.side-nav__back-button,.side-nav__sub-menu-title{font-weight:700;text-transform:uppercase}.side-nav__sub-menu-title{font-size:14px;margin-bottom:10px}.side-nav__elements{display:flex;flex-direction:column}.side-nav__element{color:#555;cursor:pointer;line-height:20px;margin-bottom:10px}.side-nav__element,.side-nav__sub-link{font-size:14px;font-weight:400;text-transform:capitalize}.side-nav__block-button{background-color:#000;color:#fff;font-weight:700;padding:10px 0;width:100%}.navbar{box-shadow:2px 2px 10px #dfdede;display:flex;padding-bottom:10px;padding-top:20px;position:relative}.navbar__link-item--desktop{align-items:center;display:flex;height:35px;margin:auto 0;padding-top:5px}.navbar__mobile-wrapper{align-items:center;display:flex;flex-direction:column;padding-bottom:20px;padding-left:32px;padding-right:32px}.navbar__container{display:flex;margin:0 auto;max-width:1280px;padding-left:12px;padding-right:12px;width:100%}.navbar__body{flex-basis:60%}.navbar__wrapper{align-items:center;display:flex;justify-content:space-between;width:100%}.navbar__product-search-wrapper{align-items:center;display:flex;justify-content:center;padding:0 20%;width:100%}@media only screen and (max-width:879px){.navbar__product-search-wrapper{padding:0}}.navbar__input-close-icon{height:auto;margin-bottom:10px;margin-left:10px;width:20px}@media only screen and (max-width:879px){.navbar__input-close-icon{margin-bottom:0;margin-left:0;width:15px}}.navbar__menu-icon{width:30px}.navbar__product-search{align-items:center;display:flex;max-width:545px;width:100%}.navbar__logo-wrapper{margin-right:18px;width:200px}.navbar__logo{width:200px}@media only screen and (max-width:879px){.navbar__logo{margin-left:10px;margin-top:5px;width:125px}}.navbar__form-input{align-items:center;background:transparent;border:none;display:flex;font-size:13px;outline:none;padding:8px;width:100%}.navbar__product-search{border:1px solid #dfdede;margin-bottom:10px}@media only screen and (max-width:879px){.navbar__product-search{border:none;border-bottom:1px solid #dfdede;margin-bottom:0;margin-right:10px;margin-top:10px}}.navbar__section{align-items:flex-start;display:flex;flex-direction:row;justify-content:space-between;width:100%}.navbar__link{display:inline-block;font-family:Martel Sans;font-size:14px;font-weight:700;margin-right:10px;overflow:hidden;text-transform:uppercase;transition:.3s ease-in-out}.navbar__link:after{background-color:#000;content:"";display:block;height:2px;transition:width .25s ease-out;width:0}.navbar__link:hover:after{width:100%}.navbar__link:hover .navbar__dropdown{animation:fadeInDropdown .3s ease-in-out;display:block}.navbar__dropdown{background-color:#fff;box-shadow:5px 5px 5px #dfdede;display:none;left:0;position:absolute;width:100%;z-index:999}@keyframes fadeInDropdown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.navbar__company-link{font-size:13px;font-weight:400;list-style:none;margin-left:18px;text-decoration:none}.navbar__company-block{align-items:center;background-color:#000;color:#fff;display:flex;font-weight:700;height:33px;justify-content:center;margin-right:0;padding:0 18px;text-transform:uppercase}.navbar__input-search-icon{height:auto;margin-left:1.125rem;margin-right:.375rem;width:15px}.navbar__nav-links{align-items:center;display:flex}.navbar__nav-links--wrap{flex-wrap:wrap}.navbar__icons{align-items:center;display:flex;height:40px;justify-content:flex-end;margin-bottom:10px}@media only screen and (max-width:879px){.navbar__icons{display:block;height:20px;margin-bottom:0}}.navbar__icon{cursor:pointer;height:auto;margin-right:18px;width:20px}@media only screen and (max-width:879px){.navbar__icon{margin-right:0}}.navbar__icon--app{cursor:pointer;height:auto;margin-left:12px;width:20px}@media only screen and (max-width:879px){.navbar__icon--app{margin-right:0}}.navbar__vip-icon{height:16px;position:absolute;right:-12px;top:-4px;width:16px}.navbar__cart-icon{position:relative}.navbar__cart-count{align-items:center;background-color:#000;border-radius:50%;bottom:50%;color:#fff;display:flex;font-size:13px;height:20px;justify-content:center;left:100%;position:absolute;width:20px}.side-nav{font-family:Martel Sans}.side-nav__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center}.side-nav__overlay{background-color:rgba(78,73,73,.51);height:100%;opacity:0;position:fixed;top:0;transition:opacity .5s ease-out 0s,visibility .5s ease-out 0s;width:100%;z-index:99999}.side-nav__overlay--visible{opacity:1;visibility:visible}.side-nav__overlay--hidden{opacity:1;visibility:hidden}.side-nav__content{background-color:#fff;bottom:0;overflow-y:scroll;padding:1.5rem;position:fixed;top:0;transition:left .5s ease-in-out;width:80%;z-index:99999}.side-nav__content--hidden{display:none}.side-nav__content--open{left:0}.side-nav__content--closed{left:-100%}.side-nav__menu-title-wrapper{align-items:center;background-color:transparent;border:none;display:flex;justify-content:space-between;outline:none;width:100%}.side-nav__icon-container{float:right;margin-bottom:10px}.side-nav__menu-title{font-size:14px;font-weight:700;line-height:20px;text-transform:uppercase}.side-nav__accordion-icon{height:auto;width:15px}.side-nav__menu-item{margin-bottom:25px}.side-nav__close-icon{height:20px;margin-left:auto;width:20px}.side-nav__back-button-wrapper{align-items:center;display:flex;margin-bottom:25px}.side-nav__back-icon{height:20px;width:20px}.side-nav__back-button,.side-nav__sub-menu-title{font-weight:700;text-transform:uppercase}.side-nav__sub-menu-title{font-size:14px;margin-bottom:10px}.side-nav__elements{display:flex;flex-direction:column}.side-nav__element{color:#555;cursor:pointer;line-height:20px;margin-bottom:10px}.side-nav__element,.side-nav__sub-link{font-size:14px;font-weight:400;text-transform:capitalize}.side-nav__block-button{background-color:#000;color:#fff;font-weight:700;padding:10px 0;width:100%}@charset "UTF-8";.currency-select-container{align-items:center;display:flex;margin-right:18px;position:relative}.currency-select-container .currency-flag{margin-right:5px}.currency-select-container .currency-flag img{height:15px;-o-object-fit:cover;object-fit:cover;width:20px}.currency-select-container .currency-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:none;color:#000;cursor:pointer;font-family:inherit;font-size:14px;margin:0;outline:none;padding:5px 15px 5px 5px}.currency-select-container .currency-select::-ms-expand{display:none}.currency-select-container .currency-select:focus{box-shadow:none;outline:none}.currency-select-container .currency-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.currency-select-container:after{color:#000;content:"▼";font-size:10px;pointer-events:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}@media only screen and (max-width:879px){.currency-select-container .currency-select{appearance:menulist;-webkit-appearance:menulist;-moz-appearance:menulist;padding-right:0}.currency-select-container:after{display:none}}.currency-select-container.disabled{cursor:not-allowed;opacity:.7}.currency-select-container.disabled .currency-select{pointer-events:none}.stores-dropdown{align-items:flex-start;display:flex;font-family:Martel Sans;gap:20px;margin-left:auto;margin-right:auto;max-width:1280px;overflow-x:auto;padding:20px 15px}.stores-dropdown__image{height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.stores-dropdown__store-details{flex-basis:20%}.stores-dropdown__title{font-family:El Messiri}.stores-dropdown__main-title,.stores-dropdown__title{font-size:16px;font-weight:400;letter-spacing:3px;margin-top:20px}.stores-dropdown__main-title{font-weight:700;margin-bottom:10px}.stores-dropdown__open-days{font-size:12px;font-weight:700;line-height:20px}.stores-dropdown__open-hours{font-size:12px;font-weight:400;line-height:20px}.stores-dropdown__queries-title{font-family:El Messiri;font-size:16px;font-weight:400;letter-spacing:3px}.stores-dropdown__contact-details{font-size:16px;font-weight:700}.stores-dropdown__view-more{cursor:pointer;font-size:14px;font-weight:400;margin-top:10px;text-transform:capitalize}.dropdown{display:flex;justify-content:space-between;margin-left:auto;margin-right:auto;max-width:1280px;min-height:500px;overflow-x:auto;padding:20px 0}.dropdown__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center;min-height:300px}.dropdown__column{flex:1;padding-left:12px}.dropdown__column:nth-child(2){flex:2}.dropdown__title{font-family:El Messiri;font-size:16px;font-weight:700;letter-spacing:3px;line-height:1;margin-bottom:20px;text-transform:uppercase}.dropdown__elements{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));max-height:800px;overflow-y:auto}.dropdown__brand-elements{-moz-column-count:3;column-count:3;max-height:800px}.dropdown__brand-element{cursor:pointer;margin-bottom:10px}.dropdown__element{flex-basis:33.33%;font-family:Martel Sans;font-size:14px;font-weight:400;margin-bottom:10px;text-transform:capitalize}.cover-spinner{align-items:center;background-color:hsla(0,0%,100%,.7);display:flex;height:100%;justify-content:center;min-height:400px;position:relative;top:50%;width:100%;z-index:9999}.cover-spinner:after{animation:spin 1.5s linear infinite;border:4px dotted #000;border-radius:50%;border-top-color:transparent;content:"";display:block;height:40px;position:absolute;width:40px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
|
1
|
+
.navbar{box-shadow:2px 2px 10px #dfdede;display:flex;padding-bottom:10px;padding-top:20px;position:relative}.navbar__link-item--desktop{align-items:center;display:flex;height:35px;margin:auto 0;padding-top:5px}.navbar__mobile-wrapper{align-items:center;display:flex;flex-direction:column;padding-bottom:20px;padding-left:32px;padding-right:32px}.navbar__container{display:flex;margin:0 auto;max-width:1280px;padding-left:12px;padding-right:12px;width:100%}.navbar__body{flex-basis:60%}.navbar__wrapper{align-items:center;display:flex;justify-content:space-between;width:100%}.navbar__product-search-wrapper{align-items:center;display:flex;justify-content:center;padding:0 20%;width:100%}@media only screen and (max-width:879px){.navbar__product-search-wrapper{padding:0}}.navbar__input-close-icon{height:auto;margin-bottom:10px;margin-left:10px;width:20px}@media only screen and (max-width:879px){.navbar__input-close-icon{margin-bottom:0;margin-left:0;width:15px}}.navbar__menu-icon{width:30px}.navbar__product-search{align-items:center;display:flex;max-width:545px;width:100%}.navbar__logo-wrapper{margin-right:18px;width:200px}.navbar__logo{width:200px}@media only screen and (max-width:879px){.navbar__logo{margin-left:10px;margin-top:5px;width:125px}}.navbar__form-input{align-items:center;background:transparent;border:none;display:flex;font-size:13px;outline:none;padding:8px;width:100%}.navbar__product-search{border:1px solid #dfdede;margin-bottom:10px}@media only screen and (max-width:879px){.navbar__product-search{border:none;border-bottom:1px solid #dfdede;margin-bottom:0;margin-right:10px;margin-top:10px}}.navbar__section{align-items:flex-start;display:flex;flex-direction:row;justify-content:space-between;width:100%}.navbar__link{display:inline-block;font-family:Martel Sans;font-size:14px;font-weight:700;margin-right:10px;overflow:hidden;text-transform:uppercase;transition:.3s ease-in-out}.navbar__link:after{background-color:#000;content:"";display:block;height:2px;transition:width .25s ease-out;width:0}.navbar__link:hover:after{width:100%}.navbar__link:hover .navbar__dropdown{animation:fadeInDropdown .3s ease-in-out;display:block}.navbar__dropdown{background-color:#fff;box-shadow:5px 5px 5px #dfdede;display:none;left:0;position:absolute;width:100%;z-index:999}@keyframes fadeInDropdown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.navbar__company-link{font-size:13px;font-weight:400;list-style:none;margin-left:18px;text-decoration:none}.navbar__company-block{align-items:center;background-color:#000;color:#fff;display:flex;font-weight:700;height:33px;justify-content:center;margin-right:0;padding:0 18px;text-transform:uppercase}.navbar__input-search-icon{height:auto;margin-left:1.125rem;margin-right:.375rem;width:15px}.navbar__nav-links{align-items:center;display:flex}.navbar__nav-links--wrap{flex-wrap:wrap}.navbar__icons{align-items:center;display:flex;height:40px;justify-content:flex-end;margin-bottom:10px}@media only screen and (max-width:879px){.navbar__icons{display:block;height:20px;margin-bottom:0}}.navbar__icon{cursor:pointer;height:auto;margin-right:18px;width:20px}@media only screen and (max-width:879px){.navbar__icon{margin-right:0}}.navbar__icon--app{cursor:pointer;height:auto;margin-left:12px;width:20px}@media only screen and (max-width:879px){.navbar__icon--app{margin-right:0}}.navbar__vip-icon{height:16px;position:absolute;right:-12px;top:-4px;width:16px}.navbar__cart-icon{position:relative}.navbar__cart-count{align-items:center;background-color:#000;border-radius:50%;bottom:50%;color:#fff;display:flex;font-size:13px;height:20px;justify-content:center;left:100%;position:absolute;width:20px}.side-nav{font-family:Martel Sans}.side-nav__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center}.side-nav__overlay{background-color:rgba(78,73,73,.51);height:100%;opacity:0;position:fixed;top:0;transition:opacity .5s ease-out 0s,visibility .5s ease-out 0s;width:100%;z-index:99999}.side-nav__overlay--visible{opacity:1;visibility:visible}.side-nav__overlay--hidden{opacity:1;visibility:hidden}.side-nav__content{background-color:#fff;bottom:0;overflow-y:scroll;padding:1.5rem;position:fixed;top:0;transition:left .5s ease-in-out;width:80%;z-index:99999}.side-nav__content--hidden{display:none}.side-nav__content--open{left:0}.side-nav__content--closed{left:-100%}.side-nav__menu-title-wrapper{align-items:center;background-color:transparent;border:none;display:flex;justify-content:space-between;outline:none;width:100%}.side-nav__icon-container{float:right;margin-bottom:10px}.side-nav__menu-title{font-size:14px;font-weight:700;line-height:20px;text-transform:uppercase}.side-nav__accordion-icon{height:auto;width:15px}.side-nav__menu-item{margin-bottom:25px}.side-nav__close-icon{height:20px;margin-left:auto;width:20px}.side-nav__back-button-wrapper{align-items:center;display:flex;margin-bottom:25px}.side-nav__back-icon{height:20px;width:20px}.side-nav__back-button,.side-nav__sub-menu-title{font-weight:700;text-transform:uppercase}.side-nav__sub-menu-title{font-size:14px;margin-bottom:10px}.side-nav__elements{display:flex;flex-direction:column}.side-nav__element{color:#555;cursor:pointer;line-height:20px;margin-bottom:10px}.side-nav__element,.side-nav__sub-link{font-size:14px;font-weight:400;text-transform:capitalize}.side-nav__block-button{background-color:#000;color:#fff;font-weight:700;padding:10px 0;width:100%}.footer__newsletter-section{align-items:center;background-color:#000;color:#fff;display:flex;justify-content:space-between;padding:2.265rem 0}@media only screen and (max-width:879px){.footer__newsletter-section{flex-direction:column}}.footer__newsletter-wrapper{align-items:center;display:flex;justify-content:space-between;margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__newsletter-wrapper{flex-direction:column}.footer__link-container{flex-basis:50%}}.footer__newsletter-icon{height:30px;position:absolute;right:0;top:0;width:32px}.footer__newsletter-form{flex-basis:50%;max-width:250px;position:relative}@media only screen and (max-width:879px){.footer__newsletter-form{display:block;margin-top:20px;max-width:100%;width:100%}}.footer__newsletter-title{font-family:Martel Sans,sans-serif;font-size:14px;font-weight:700;letter-spacing:3px;margin-bottom:1.125rem;text-transform:uppercase}.footer__newsletter-text{font-size:14px}.footer__form-input{background-color:#000;border:none;border-bottom:1px solid #fff;color:#fff;height:30px;outline:none;width:100%}.footer__form-input::-moz-placeholder{color:#fff;font-weight:400}.footer__form-input::placeholder{color:#fff;font-weight:400}.footer__form-errors{color:#fff;margin-top:5px}.footer__main-section{align-items:flex-start;display:flex;justify-content:space-between;margin-bottom:50px;margin-top:80px}.footer__link-title{font-family:El Messiri;font-size:16px;font-weight:700;margin-bottom:20px;text-transform:uppercase}@media only screen and (max-width:879px){.footer__link-title{margin-bottom:10px}}.footer__link-child{margin-top:25px}.footer__links{display:flex;flex-direction:column}.footer__link{color:#939393;cursor:pointer;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:7px;text-align:left;text-decoration:none}.footer__link:hover{color:#000;text-decoration:underline}@media only screen and (max-width:879px){.footer__link{margin-bottom:10px}}.footer__link-wrapper{align-items:center;display:flex;gap:5px}.footer__link-icon{height:30px;margin-bottom:18px}.footer__text{color:#939393;font-family:Martel Sans;font-size:14px;line-height:20px;margin-bottom:15px;text-align:left;text-decoration:none}.footer__store-hours{margin-top:35px}.footer__copyrights-section{border-top:1px solid;display:flex;justify-content:space-between;padding-bottom:20px;padding-top:20px}.footer__logo{height:30px;width:135px}.footer__payment-icons{align-items:center;display:flex;gap:8px}.footer__wrapper{margin:0 auto;max-width:1280px;padding-left:32px;padding-right:32px;width:100%}@media only screen and (max-width:879px){.footer__wrapper{padding:32px 0 0 24px}}.footer__wrapper--desktop{display:block}@media only screen and (max-width:879px){.footer__wrapper--desktop{display:none}}.footer__wrapper--mobile{display:none}@media only screen and (max-width:879px){.footer__wrapper--mobile{display:block;padding-top:30px}}.footer__copyright{font-size:10px;line-height:22px}.footer__copyright--mobile{display:none}@media only screen and (max-width:879px){.footer__copyright--mobile{display:block;padding:30px 10px 30px 0;text-align:center}}.footer__section-row{display:flex;gap:50%}@media only screen and (max-width:879px){.footer__section-row{gap:unset}}.side-nav{font-family:Martel Sans}.side-nav__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center}.side-nav__overlay{background-color:rgba(78,73,73,.51);height:100%;opacity:0;position:fixed;top:0;transition:opacity .5s ease-out 0s,visibility .5s ease-out 0s;width:100%;z-index:99999}.side-nav__overlay--visible{opacity:1;visibility:visible}.side-nav__overlay--hidden{opacity:1;visibility:hidden}.side-nav__content{background-color:#fff;bottom:0;overflow-y:scroll;padding:1.5rem;position:fixed;top:0;transition:left .5s ease-in-out;width:80%;z-index:99999}.side-nav__content--hidden{display:none}.side-nav__content--open{left:0}.side-nav__content--closed{left:-100%}.side-nav__menu-title-wrapper{align-items:center;background-color:transparent;border:none;display:flex;outline:none;width:100%}.side-nav__icon-container{float:right;margin-bottom:10px}.side-nav__menu-title{align-items:center;display:flex;font-size:14px;font-weight:700;justify-content:center;line-height:20px;text-transform:uppercase}.side-nav__menu-icon{display:flex;height:25px;margin-right:10px;width:25px}.side-nav__menu-divider{margin-bottom:40px}.side-nav__accordion-icon{height:auto;width:15px}.side-nav__menu-item{margin-bottom:25px}.side-nav__close-icon{height:20px;margin-left:auto;width:20px}.side-nav__back-button-wrapper{align-items:center;display:flex;margin-bottom:25px}.side-nav__back-icon{height:20px;width:20px}.side-nav__back-button,.side-nav__sub-menu-title{font-weight:700;text-transform:uppercase}.side-nav__sub-menu-title{font-size:14px;margin-bottom:10px}.side-nav__elements{display:flex;flex-direction:column}.side-nav__element{color:#555;cursor:pointer;line-height:20px;margin-bottom:10px}.side-nav__element,.side-nav__sub-link{font-size:14px;font-weight:400;text-transform:capitalize}.side-nav__block-button{background-color:#000;color:#fff;font-weight:700;padding:10px 0;width:100%}@charset "UTF-8";.currency-select-container{align-items:center;display:flex;margin-right:18px;position:relative}.currency-select-container .currency-flag{margin-right:5px}.currency-select-container .currency-flag img{height:15px;-o-object-fit:cover;object-fit:cover;width:20px}.currency-select-container .currency-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:none;color:#000;cursor:pointer;font-family:inherit;font-size:14px;margin:0;outline:none;padding:5px 15px 5px 5px}.currency-select-container .currency-select::-ms-expand{display:none}.currency-select-container .currency-select:focus{box-shadow:none;outline:none}.currency-select-container .currency-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.currency-select-container:after{color:#000;content:"▼";font-size:10px;pointer-events:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}@media only screen and (max-width:879px){.currency-select-container .currency-select{appearance:menulist;-webkit-appearance:menulist;-moz-appearance:menulist;padding-right:0}.currency-select-container:after{display:none}}.currency-select-container.disabled{cursor:not-allowed;opacity:.7}.currency-select-container.disabled .currency-select{pointer-events:none}.stores-dropdown{align-items:flex-start;display:flex;font-family:Martel Sans;gap:20px;margin-left:auto;margin-right:auto;max-width:1280px;overflow-x:auto;padding:20px 15px}.stores-dropdown__image{height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.stores-dropdown__store-details{flex-basis:20%}.stores-dropdown__title{font-family:El Messiri}.stores-dropdown__main-title,.stores-dropdown__title{font-size:16px;font-weight:400;letter-spacing:3px;margin-top:20px}.stores-dropdown__main-title{font-weight:700;margin-bottom:10px}.stores-dropdown__open-days{font-size:12px;font-weight:700;line-height:20px}.stores-dropdown__open-hours{font-size:12px;font-weight:400;line-height:20px}.stores-dropdown__queries-title{font-family:El Messiri;font-size:16px;font-weight:400;letter-spacing:3px}.stores-dropdown__contact-details{font-size:16px;font-weight:700}.stores-dropdown__view-more{cursor:pointer;font-size:14px;font-weight:400;margin-top:10px;text-transform:capitalize}.dropdown{display:flex;justify-content:space-between;margin-left:auto;margin-right:auto;max-width:1280px;min-height:500px;overflow-x:auto;padding:20px 0}.dropdown__errors{align-items:center;color:red;display:flex;font-size:16px;justify-content:center;min-height:300px}.dropdown__column{flex:1;padding-left:12px}.dropdown__column:nth-child(2){flex:2}.dropdown__title{font-family:El Messiri;font-size:16px;font-weight:700;letter-spacing:3px;line-height:1;margin-bottom:20px;text-transform:uppercase}.dropdown__elements{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));max-height:800px;overflow-y:auto}.dropdown__brand-elements{-moz-column-count:3;column-count:3;max-height:800px}.dropdown__brand-element{cursor:pointer;margin-bottom:10px}.dropdown__element{flex-basis:33.33%;font-family:Martel Sans;font-size:14px;font-weight:400;margin-bottom:10px;text-transform:capitalize}.cover-spinner{align-items:center;background-color:hsla(0,0%,100%,.7);display:flex;height:100%;justify-content:center;min-height:400px;position:relative;top:50%;width:100%;z-index:9999}.cover-spinner:after{animation:spin 1.5s linear infinite;border:4px dotted #000;border-radius:50%;border-top-color:transparent;content:"";display:block;height:40px;position:absolute;width:40px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
package/build/bundle.js
CHANGED
|
@@ -14996,27 +14996,24 @@
|
|
|
14996
14996
|
};
|
|
14997
14997
|
|
|
14998
14998
|
var debouncedSearch = React.useCallback(debounce(function (nextValue) {
|
|
14999
|
-
var isKeyDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
15000
14999
|
setSearchLoading(true);
|
|
15001
15000
|
axios.post(endpoint, searchProducts(nextValue, 6)).then(function (response) {
|
|
15002
15001
|
setSearchResults(response.data.data.luxity_products_serach_results);
|
|
15003
15002
|
var ids = response.data.data.luxity_products_serach_results.luxity_product_ids;
|
|
15004
15003
|
onProductIdsReceived(ids);
|
|
15005
|
-
|
|
15006
|
-
if (isKeyDown) {
|
|
15007
|
-
// reset the search results on keydown
|
|
15008
|
-
setSearchResults({
|
|
15009
|
-
brands: [],
|
|
15010
|
-
products: []
|
|
15011
|
-
});
|
|
15012
|
-
onSearchSubmit(nextValue);
|
|
15013
|
-
}
|
|
15014
|
-
|
|
15015
15004
|
setSearchLoading(false);
|
|
15016
15005
|
}).catch(function () {
|
|
15017
15006
|
setSearchLoading(false);
|
|
15018
15007
|
});
|
|
15019
15008
|
}, 500), [endpoint]);
|
|
15009
|
+
var immediateSearch = React.useCallback(function (value) {
|
|
15010
|
+
setSearchValue('');
|
|
15011
|
+
setSearchResults({
|
|
15012
|
+
brands: [],
|
|
15013
|
+
products: []
|
|
15014
|
+
});
|
|
15015
|
+
onSearchSubmit(value);
|
|
15016
|
+
}, [onSearchSubmit]);
|
|
15020
15017
|
|
|
15021
15018
|
var handleChange = function handleChange(event) {
|
|
15022
15019
|
var value = event.target.value;
|
|
@@ -15047,7 +15044,11 @@
|
|
|
15047
15044
|
|
|
15048
15045
|
var handleKeyDown = function handleKeyDown(event) {
|
|
15049
15046
|
if (event.key === 'Enter') {
|
|
15050
|
-
|
|
15047
|
+
event.preventDefault();
|
|
15048
|
+
|
|
15049
|
+
if (searchValue.trim().length >= 3) {
|
|
15050
|
+
immediateSearch(searchValue);
|
|
15051
|
+
}
|
|
15051
15052
|
} else if (event.key === 'Escape') {
|
|
15052
15053
|
setSearchValue('');
|
|
15053
15054
|
}
|
|
@@ -15082,6 +15083,13 @@
|
|
|
15082
15083
|
return setHasError(true);
|
|
15083
15084
|
});
|
|
15084
15085
|
}, [menuData]);
|
|
15086
|
+
|
|
15087
|
+
var getMarginRight = function getMarginRight(userIsVip, userName) {
|
|
15088
|
+
if (userIsVip) return '15px';
|
|
15089
|
+
if (userName) return '5px';
|
|
15090
|
+
return '18px';
|
|
15091
|
+
};
|
|
15092
|
+
|
|
15085
15093
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
15086
15094
|
className: "navbar"
|
|
15087
15095
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -15222,7 +15230,7 @@
|
|
|
15222
15230
|
className: "navbar__icon relative flex",
|
|
15223
15231
|
onClick: onAccountClick,
|
|
15224
15232
|
style: {
|
|
15225
|
-
marginRight: isVip
|
|
15233
|
+
marginRight: getMarginRight(isVip, name)
|
|
15226
15234
|
}
|
|
15227
15235
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
15228
15236
|
src: accountIcon,
|
|
@@ -16044,27 +16052,24 @@
|
|
|
16044
16052
|
};
|
|
16045
16053
|
|
|
16046
16054
|
var debouncedSearch = React.useCallback(debounce(function (nextValue) {
|
|
16047
|
-
var isKeyDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
16048
16055
|
setSearchLoading(true);
|
|
16049
16056
|
axios.post(endpoint, searchProducts(nextValue, 6)).then(function (response) {
|
|
16050
16057
|
setSearchResults(response.data.data.luxity_products_serach_results);
|
|
16051
16058
|
var ids = response.data.data.luxity_products_serach_results.luxity_product_ids;
|
|
16052
16059
|
onProductIdsReceived(ids);
|
|
16053
|
-
|
|
16054
|
-
if (isKeyDown) {
|
|
16055
|
-
// reset the search results on keydown
|
|
16056
|
-
setSearchResults({
|
|
16057
|
-
brands: [],
|
|
16058
|
-
products: []
|
|
16059
|
-
});
|
|
16060
|
-
onSearchSubmit(nextValue);
|
|
16061
|
-
}
|
|
16062
|
-
|
|
16063
16060
|
setSearchLoading(false);
|
|
16064
16061
|
}).catch(function () {
|
|
16065
16062
|
setSearchLoading(false);
|
|
16066
16063
|
});
|
|
16067
16064
|
}, 500), [endpoint]);
|
|
16065
|
+
var immediateSearch = React.useCallback(function (value) {
|
|
16066
|
+
setSearchValue('');
|
|
16067
|
+
setSearchResults({
|
|
16068
|
+
brands: [],
|
|
16069
|
+
products: []
|
|
16070
|
+
});
|
|
16071
|
+
onSearchSubmit(value);
|
|
16072
|
+
}, [onSearchSubmit]);
|
|
16068
16073
|
|
|
16069
16074
|
var handleChange = function handleChange(event) {
|
|
16070
16075
|
var value = event.target.value;
|
|
@@ -16082,7 +16087,11 @@
|
|
|
16082
16087
|
|
|
16083
16088
|
var handleKeyDown = function handleKeyDown(event) {
|
|
16084
16089
|
if (event.key === 'Enter') {
|
|
16085
|
-
|
|
16090
|
+
event.preventDefault();
|
|
16091
|
+
|
|
16092
|
+
if (searchValue.trim().length >= 3) {
|
|
16093
|
+
immediateSearch(searchValue);
|
|
16094
|
+
}
|
|
16086
16095
|
} else if (event.key === 'Escape') {
|
|
16087
16096
|
setSearchValue('');
|
|
16088
16097
|
}
|