@bonlineza/luxity-lib 2.35.6 → 2.35.8
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 +88 -59
- package/LuxityMobileHeader.js +94 -61
- package/build/bundle.css +1 -1
- package/build/bundle.js +114 -118
- package/package.json +1 -1
package/LuxityDesktopHeader.js
CHANGED
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
return null;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
if (!isSearchFocused
|
|
370
|
+
if (!isSearchFocused) {
|
|
371
371
|
return null;
|
|
372
372
|
}
|
|
373
373
|
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
key: product.link,
|
|
391
391
|
href: product.link,
|
|
392
392
|
className: "product-card"
|
|
393
|
-
},
|
|
393
|
+
}, product.featured_image && /*#__PURE__*/React__default.createElement("div", {
|
|
394
394
|
className: "product-card__image-container"
|
|
395
395
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
396
396
|
src: product.featured_image,
|
|
@@ -779,6 +779,72 @@
|
|
|
779
779
|
};
|
|
780
780
|
};
|
|
781
781
|
|
|
782
|
+
var useSearchClickOutside = function useSearchClickOutside(ref, searchResults, setCachedResults, setIsSearchFocused, setSearchResults) {
|
|
783
|
+
React.useEffect(function () {
|
|
784
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
785
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
786
|
+
setCachedResults(searchResults);
|
|
787
|
+
setIsSearchFocused(false);
|
|
788
|
+
setSearchResults({
|
|
789
|
+
brands: [],
|
|
790
|
+
products: []
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
796
|
+
return function () {
|
|
797
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
798
|
+
};
|
|
799
|
+
}, [ref, searchResults, setCachedResults, setIsSearchFocused, setSearchResults]);
|
|
800
|
+
};
|
|
801
|
+
var useSearchInputChange = function useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults) {
|
|
802
|
+
return React.useCallback(function (event) {
|
|
803
|
+
var value = event.target.value;
|
|
804
|
+
setSearchValue(value);
|
|
805
|
+
setIsSearchFocused(true);
|
|
806
|
+
|
|
807
|
+
if (value.trim().length >= 3) {
|
|
808
|
+
debouncedSearch(value);
|
|
809
|
+
} else {
|
|
810
|
+
setSearchResults({
|
|
811
|
+
brands: [],
|
|
812
|
+
products: []
|
|
813
|
+
});
|
|
814
|
+
setCachedResults({
|
|
815
|
+
brands: [],
|
|
816
|
+
products: []
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
}, [setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults]);
|
|
820
|
+
};
|
|
821
|
+
var useSearchInputFocus = function useSearchInputFocus(searchValue, setIsSearchFocused, cachedResults, setSearchResults) {
|
|
822
|
+
return React.useCallback(function () {
|
|
823
|
+
setIsSearchFocused(true);
|
|
824
|
+
|
|
825
|
+
if (searchValue.trim().length >= 3) {
|
|
826
|
+
setSearchResults(cachedResults);
|
|
827
|
+
}
|
|
828
|
+
}, [searchValue, setIsSearchFocused, cachedResults, setSearchResults]);
|
|
829
|
+
};
|
|
830
|
+
var useSearchInputKeyDown = function useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused) {
|
|
831
|
+
var setSearchValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
832
|
+
return React.useCallback(function (event) {
|
|
833
|
+
if (event.key === 'Enter') {
|
|
834
|
+
event.preventDefault();
|
|
835
|
+
|
|
836
|
+
if (searchValue.trim().length >= 3) {
|
|
837
|
+
immediateSearch(searchValue);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
setIsSearchFocused(false);
|
|
841
|
+
} else if (event.key === 'Escape' && setSearchValue) {
|
|
842
|
+
setSearchValue('');
|
|
843
|
+
setIsSearchFocused(false);
|
|
844
|
+
}
|
|
845
|
+
}, [searchValue, immediateSearch, setIsSearchFocused, setSearchValue]);
|
|
846
|
+
};
|
|
847
|
+
|
|
782
848
|
var LuxityDesktopHeader = function LuxityDesktopHeader(_ref) {
|
|
783
849
|
var accountIcon = _ref.accountIcon,
|
|
784
850
|
cartIcon = _ref.cartIcon,
|
|
@@ -800,7 +866,6 @@
|
|
|
800
866
|
onCartClick = _ref.onCartClick,
|
|
801
867
|
onAccountClick = _ref.onAccountClick,
|
|
802
868
|
inputSearchIcon = _ref.inputSearchIcon,
|
|
803
|
-
onSearch = _ref.onSearch,
|
|
804
869
|
onSellToUsClick = _ref.onSellToUsClick,
|
|
805
870
|
contactUsLink = _ref.contactUsLink,
|
|
806
871
|
ourStoryLink = _ref.ourStoryLink,
|
|
@@ -881,56 +946,24 @@
|
|
|
881
946
|
searchResults = _useState14[0],
|
|
882
947
|
setSearchResults = _useState14[1];
|
|
883
948
|
|
|
949
|
+
var _useState15 = React.useState({
|
|
950
|
+
brands: [],
|
|
951
|
+
products: []
|
|
952
|
+
}),
|
|
953
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
954
|
+
cachedResults = _useState16[0],
|
|
955
|
+
setCachedResults = _useState16[1];
|
|
956
|
+
|
|
884
957
|
var searchResultsRef = React.useRef(null);
|
|
885
|
-
var debouncedSearch = createDebouncedSearch(
|
|
958
|
+
var debouncedSearch = createDebouncedSearch(function (results) {
|
|
959
|
+
setSearchResults(results);
|
|
960
|
+
setCachedResults(results);
|
|
961
|
+
});
|
|
886
962
|
var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
setIsSearchFocused(true);
|
|
892
|
-
|
|
893
|
-
if (value.trim().length >= 3) {
|
|
894
|
-
debouncedSearch(value);
|
|
895
|
-
} else {
|
|
896
|
-
setSearchResults({
|
|
897
|
-
brands: [],
|
|
898
|
-
products: []
|
|
899
|
-
});
|
|
900
|
-
}
|
|
901
|
-
};
|
|
902
|
-
|
|
903
|
-
React.useEffect(function () {
|
|
904
|
-
var handleClickOutside = function handleClickOutside(event) {
|
|
905
|
-
if (searchResultsRef.current && !searchResultsRef.current.contains(event.target)) {
|
|
906
|
-
setSearchValue('');
|
|
907
|
-
setIsSearchFocused(false);
|
|
908
|
-
setSearchResults({
|
|
909
|
-
brands: [],
|
|
910
|
-
products: []
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
916
|
-
return function () {
|
|
917
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
918
|
-
};
|
|
919
|
-
}, []);
|
|
920
|
-
|
|
921
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
922
|
-
if (event.key === 'Enter') {
|
|
923
|
-
event.preventDefault();
|
|
924
|
-
|
|
925
|
-
if (searchValue.trim().length >= 3) {
|
|
926
|
-
immediateSearch(searchValue);
|
|
927
|
-
}
|
|
928
|
-
} else if (event.key === 'Escape') {
|
|
929
|
-
setSearchValue('');
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
setIsSearchFocused(false);
|
|
933
|
-
};
|
|
963
|
+
var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults);
|
|
964
|
+
useSearchClickOutside(searchResultsRef, searchResults, setCachedResults, setIsSearchFocused, setSearchResults);
|
|
965
|
+
var handleSearchFocus = useSearchInputFocus(searchValue, setIsSearchFocused, cachedResults, setSearchResults);
|
|
966
|
+
var handleKeyDown = useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused);
|
|
934
967
|
|
|
935
968
|
function addCategoryToElements(elements, categoryName) {
|
|
936
969
|
return elements.map(function (element) {
|
|
@@ -983,7 +1016,8 @@
|
|
|
983
1016
|
className: "navbar__logo"
|
|
984
1017
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
985
1018
|
src: logoSrc,
|
|
986
|
-
alt: "luxity-logo"
|
|
1019
|
+
alt: "luxity-logo",
|
|
1020
|
+
loading: "eager"
|
|
987
1021
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
988
1022
|
className: "navbar__section"
|
|
989
1023
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1001,13 +1035,8 @@
|
|
|
1001
1035
|
value: searchValue,
|
|
1002
1036
|
onChange: handleChange,
|
|
1003
1037
|
onKeyDown: handleKeyDown,
|
|
1004
|
-
onClick:
|
|
1005
|
-
|
|
1006
|
-
setIsSearchFocused(true);
|
|
1007
|
-
},
|
|
1008
|
-
onFocus: function onFocus() {
|
|
1009
|
-
return setIsSearchFocused(true);
|
|
1010
|
-
}
|
|
1038
|
+
onClick: handleSearchFocus,
|
|
1039
|
+
onFocus: handleSearchFocus
|
|
1011
1040
|
})), /*#__PURE__*/React__default.createElement(SearchResults, {
|
|
1012
1041
|
searchValue: searchValue,
|
|
1013
1042
|
searchResults: searchResults,
|
package/LuxityMobileHeader.js
CHANGED
|
@@ -1078,7 +1078,7 @@
|
|
|
1078
1078
|
return null;
|
|
1079
1079
|
}
|
|
1080
1080
|
|
|
1081
|
-
if (!isSearchFocused
|
|
1081
|
+
if (!isSearchFocused) {
|
|
1082
1082
|
return null;
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
@@ -1101,7 +1101,7 @@
|
|
|
1101
1101
|
key: product.link,
|
|
1102
1102
|
href: product.link,
|
|
1103
1103
|
className: "product-card"
|
|
1104
|
-
},
|
|
1104
|
+
}, product.featured_image && /*#__PURE__*/React__default.createElement("div", {
|
|
1105
1105
|
className: "product-card__image-container"
|
|
1106
1106
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1107
1107
|
src: product.featured_image,
|
|
@@ -1287,6 +1287,72 @@
|
|
|
1287
1287
|
};
|
|
1288
1288
|
};
|
|
1289
1289
|
|
|
1290
|
+
var useSearchClickOutside = function useSearchClickOutside(ref, searchResults, setCachedResults, setIsSearchFocused, setSearchResults) {
|
|
1291
|
+
React.useEffect(function () {
|
|
1292
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
1293
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
1294
|
+
setCachedResults(searchResults);
|
|
1295
|
+
setIsSearchFocused(false);
|
|
1296
|
+
setSearchResults({
|
|
1297
|
+
brands: [],
|
|
1298
|
+
products: []
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
1304
|
+
return function () {
|
|
1305
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
1306
|
+
};
|
|
1307
|
+
}, [ref, searchResults, setCachedResults, setIsSearchFocused, setSearchResults]);
|
|
1308
|
+
};
|
|
1309
|
+
var useSearchInputChange = function useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults) {
|
|
1310
|
+
return React.useCallback(function (event) {
|
|
1311
|
+
var value = event.target.value;
|
|
1312
|
+
setSearchValue(value);
|
|
1313
|
+
setIsSearchFocused(true);
|
|
1314
|
+
|
|
1315
|
+
if (value.trim().length >= 3) {
|
|
1316
|
+
debouncedSearch(value);
|
|
1317
|
+
} else {
|
|
1318
|
+
setSearchResults({
|
|
1319
|
+
brands: [],
|
|
1320
|
+
products: []
|
|
1321
|
+
});
|
|
1322
|
+
setCachedResults({
|
|
1323
|
+
brands: [],
|
|
1324
|
+
products: []
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
}, [setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults]);
|
|
1328
|
+
};
|
|
1329
|
+
var useSearchInputFocus = function useSearchInputFocus(searchValue, setIsSearchFocused, cachedResults, setSearchResults) {
|
|
1330
|
+
return React.useCallback(function () {
|
|
1331
|
+
setIsSearchFocused(true);
|
|
1332
|
+
|
|
1333
|
+
if (searchValue.trim().length >= 3) {
|
|
1334
|
+
setSearchResults(cachedResults);
|
|
1335
|
+
}
|
|
1336
|
+
}, [searchValue, setIsSearchFocused, cachedResults, setSearchResults]);
|
|
1337
|
+
};
|
|
1338
|
+
var useSearchInputKeyDown = function useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused) {
|
|
1339
|
+
var setSearchValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1340
|
+
return React.useCallback(function (event) {
|
|
1341
|
+
if (event.key === 'Enter') {
|
|
1342
|
+
event.preventDefault();
|
|
1343
|
+
|
|
1344
|
+
if (searchValue.trim().length >= 3) {
|
|
1345
|
+
immediateSearch(searchValue);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
setIsSearchFocused(false);
|
|
1349
|
+
} else if (event.key === 'Escape' && setSearchValue) {
|
|
1350
|
+
setSearchValue('');
|
|
1351
|
+
setIsSearchFocused(false);
|
|
1352
|
+
}
|
|
1353
|
+
}, [searchValue, immediateSearch, setIsSearchFocused, setSearchValue]);
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1290
1356
|
var LuxityMobileHeader = function LuxityMobileHeader(_ref) {
|
|
1291
1357
|
var logoSrc = _ref.logoSrc,
|
|
1292
1358
|
menuIcon = _ref.menuIcon,
|
|
@@ -1369,73 +1435,41 @@
|
|
|
1369
1435
|
searchResults = _useState8[0],
|
|
1370
1436
|
setSearchResults = _useState8[1];
|
|
1371
1437
|
|
|
1372
|
-
var _useState9 = React.useState(
|
|
1438
|
+
var _useState9 = React.useState({
|
|
1439
|
+
brands: [],
|
|
1440
|
+
products: []
|
|
1441
|
+
}),
|
|
1373
1442
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
1374
|
-
|
|
1375
|
-
|
|
1443
|
+
cachedResults = _useState10[0],
|
|
1444
|
+
setCachedResults = _useState10[1];
|
|
1445
|
+
|
|
1446
|
+
var _useState11 = React.useState(false),
|
|
1447
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
1448
|
+
isSearchFocused = _useState12[0],
|
|
1449
|
+
setIsSearchFocused = _useState12[1];
|
|
1376
1450
|
|
|
1377
|
-
var
|
|
1451
|
+
var _useState13 = React.useState({
|
|
1378
1452
|
trending_brands: [],
|
|
1379
1453
|
latest_products: []
|
|
1380
1454
|
}),
|
|
1381
|
-
|
|
1382
|
-
initialSearchView =
|
|
1383
|
-
setInitialSearchView =
|
|
1455
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
1456
|
+
initialSearchView = _useState14[0],
|
|
1457
|
+
setInitialSearchView = _useState14[1];
|
|
1384
1458
|
|
|
1385
1459
|
var searchResultsRef = React.useRef(null);
|
|
1386
1460
|
var searchInputRef = React.useRef(null);
|
|
1387
|
-
var debouncedSearch = createDebouncedSearch(
|
|
1461
|
+
var debouncedSearch = createDebouncedSearch(function (results) {
|
|
1462
|
+
setSearchResults(results);
|
|
1463
|
+
setCachedResults(results);
|
|
1464
|
+
});
|
|
1388
1465
|
var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
|
|
1389
|
-
|
|
1390
|
-
var
|
|
1391
|
-
var value = event.target.value;
|
|
1392
|
-
setSearchValue(value);
|
|
1393
|
-
setIsSearchFocused(true);
|
|
1394
|
-
|
|
1395
|
-
if (value.trim().length >= 3) {
|
|
1396
|
-
debouncedSearch(value);
|
|
1397
|
-
} else {
|
|
1398
|
-
setSearchResults({
|
|
1399
|
-
brands: [],
|
|
1400
|
-
products: []
|
|
1401
|
-
});
|
|
1402
|
-
}
|
|
1403
|
-
};
|
|
1404
|
-
|
|
1405
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
1406
|
-
if (event.key === 'Enter') {
|
|
1407
|
-
event.preventDefault();
|
|
1408
|
-
|
|
1409
|
-
if (searchValue.trim().length >= 3) {
|
|
1410
|
-
immediateSearch(searchValue);
|
|
1411
|
-
setIsSearchFocused(false);
|
|
1412
|
-
}
|
|
1413
|
-
} else if (event.key === 'Escape') {
|
|
1414
|
-
setSearchValue('');
|
|
1415
|
-
setIsSearchFocused(false);
|
|
1416
|
-
}
|
|
1417
|
-
};
|
|
1418
|
-
|
|
1466
|
+
var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults);
|
|
1467
|
+
var handleKeyDown = useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused, setSearchValue);
|
|
1419
1468
|
React.useMemo(function () {
|
|
1420
1469
|
fetchInitialSearchData(initialSearchData, setInitialSearchView);
|
|
1421
1470
|
}, [initialSearchData, fetchInitialSearchData]);
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
if (searchResultsRef.current && !searchResultsRef.current.contains(event.target)) {
|
|
1425
|
-
setSearchValue('');
|
|
1426
|
-
setIsSearchFocused(false);
|
|
1427
|
-
setSearchResults({
|
|
1428
|
-
brands: [],
|
|
1429
|
-
products: []
|
|
1430
|
-
});
|
|
1431
|
-
}
|
|
1432
|
-
};
|
|
1433
|
-
|
|
1434
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
1435
|
-
return function () {
|
|
1436
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
1437
|
-
};
|
|
1438
|
-
}, []);
|
|
1471
|
+
useSearchClickOutside(searchResultsRef, searchResults, setCachedResults, setIsSearchFocused, setSearchResults);
|
|
1472
|
+
var handleSearchFocus = useSearchInputFocus(searchValue, setIsSearchFocused, cachedResults, setSearchResults);
|
|
1439
1473
|
React.useEffect(function () {
|
|
1440
1474
|
if (showSearchBar && searchInputRef.current) {
|
|
1441
1475
|
searchInputRef.current.focus();
|
|
@@ -1560,7 +1594,8 @@
|
|
|
1560
1594
|
className: "navbar__logo"
|
|
1561
1595
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1562
1596
|
src: logoSrc,
|
|
1563
|
-
alt: "luxity-logo"
|
|
1597
|
+
alt: "luxity-logo",
|
|
1598
|
+
loading: "eager"
|
|
1564
1599
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
1565
1600
|
className: "navbar__icons-wrapper"
|
|
1566
1601
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -1598,9 +1633,7 @@
|
|
|
1598
1633
|
value: searchValue,
|
|
1599
1634
|
onChange: handleChange,
|
|
1600
1635
|
onKeyDown: handleKeyDown,
|
|
1601
|
-
onFocus:
|
|
1602
|
-
return setIsSearchFocused(true);
|
|
1603
|
-
}
|
|
1636
|
+
onFocus: handleSearchFocus
|
|
1604
1637
|
})), /*#__PURE__*/React__default.createElement("button", {
|
|
1605
1638
|
type: "button",
|
|
1606
1639
|
onClick: onSearchClick
|
package/build/bundle.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@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}.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%}.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}}.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}.interests__add-button{display:flex;flex-direction:row;gap:10px;width:100%}@media only screen and (max-width:879px){.interests__add-button{flex-direction:column}}.interests__section-wrapper{display:flex;flex-direction:column;width:100%}.interests__select-option{display:flex;flex-direction:column;margin-bottom:15px}.interests__title{font-family:El Messiri;font-size:16px;margin-bottom:10px}.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}.search-results{background:#fff;border:1px solid #dfdede;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.08);display:flex;position:absolute;width:770px;z-index:50}@media only screen and (max-width:1052px){.search-results{border:none;box-shadow:none;flex-direction:column;top:120px;width:100%}}.search-results__section:first-child{border-right:1px solid #dfdede;flex:1;min-width:240px}.search-results__section:last-child{display:flex;flex:2;flex-direction:column}.search-results__section-header{align-items:center;display:flex;justify-content:space-between}.search-results__header{color:#000;font-family:Martel Sans;font-size:14px;font-weight:600;margin-bottom:0;padding:16px 20px;text-transform:uppercase}.search-results__view-all-link{display:none}@media only screen and (max-width:879px){.search-results__view-all-link{color:#000;display:block;font-family:Martel Sans;font-size:14px;margin-right:20px}}.search-results__list{display:flex;flex-direction:column}.search-results__item{color:grey;font-family:Martel Sans;font-size:14px;padding:8px 20px;text-decoration:none}.search-results__product-list{display:flex;flex-direction:column;overflow-y:auto}.product-card{color:inherit;display:flex;padding:12px 20px;text-decoration:none;transition:background-color .15s ease}.product-card:hover{background-color:#f4f4f4}.product-card__image-container{border-radius:2px;flex-shrink:0;height:90px;margin-right:16px;overflow:hidden;width:90px}.product-card__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.product-card__details{display:flex;flex:1;flex-direction:column}.product-card__name{color:#000;font-family:Martel Sans;font-size:14px;line-height:1.4;margin-bottom:24px}.product-card__brand-name{font-weight:600}.product-card__info-row{align-items:flex-end;display:flex;justify-content:space-between}@media only screen and (max-width:879px){.product-card__info-row{align-items:flex-start;flex-direction:column}}.product-card__price-group{display:flex;flex-direction:column;gap:4px}.product-card__price{color:#000;font-family:Martel Sans;font-size:14px;font-weight:600;line-height:1}.product-card__retail-price{color:#939393;font-family:Martel Sans;font-size:14px;text-decoration:line-through}.product-card__condition{color:#000;font-family:Martel Sans;font-size:13px;margin-right:20px;text-align:right}.product-card__condition-label{color:#939393;margin-right:4px}.search-results__view-all-button{background-color:#f5f0ea!important;border:none;color:#000;cursor:pointer;font-family:Martel Sans;font-size:13px;font-weight:400;padding:16px;text-align:center}@media only screen and (max-width:879px){.search-results__view-all-button{display:none}}.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%}.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%}.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}}.interests__add-button{display:flex;flex-direction:row;gap:10px;width:100%}@media only screen and (max-width:879px){.interests__add-button{flex-direction:column}}.interests__section-wrapper{display:flex;flex-direction:column;width:100%}.interests__select-option{display:flex;flex-direction:column;margin-bottom:15px}.interests__title{font-family:El Messiri;font-size:16px;margin-bottom:10px}@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}.search-results{background:#fff;border:1px solid #dfdede;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.08);display:flex;position:absolute;width:770px;z-index:50}@media only screen and (max-width:1052px){.search-results{border:none;box-shadow:none;flex-direction:column;top:120px;width:100%}}.search-results__section:first-child{border-right:1px solid #dfdede;flex:1;min-width:240px}.search-results__section:last-child{display:flex;flex:2;flex-direction:column}.search-results__section-header{align-items:center;display:flex;justify-content:space-between}.search-results__header{color:#000;font-family:Martel Sans;font-size:14px;font-weight:600;margin-bottom:0;padding:16px 20px;text-transform:uppercase}.search-results__view-all-link{display:none}@media only screen and (max-width:879px){.search-results__view-all-link{color:#000;display:block;font-family:Martel Sans;font-size:14px;margin-right:20px}}.search-results__list{display:flex;flex-direction:column}.search-results__item{color:grey;font-family:Martel Sans;font-size:14px;padding:8px 20px;text-decoration:none}.search-results__product-list{display:flex;flex-direction:column;overflow-y:auto}.product-card{color:inherit;display:flex;padding:12px 20px;text-decoration:none;transition:background-color .15s ease}.product-card:hover{background-color:#f4f4f4}.product-card__image-container{border-radius:2px;flex-shrink:0;height:90px;margin-right:16px;overflow:hidden;width:90px}.product-card__image{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.product-card__details{display:flex;flex:1;flex-direction:column}.product-card__name{color:#000;font-family:Martel Sans;font-size:14px;line-height:1.4;margin-bottom:24px}.product-card__brand-name{font-weight:600}.product-card__info-row{align-items:flex-end;display:flex;justify-content:space-between}@media only screen and (max-width:879px){.product-card__info-row{align-items:flex-start;flex-direction:column}}.product-card__price-group{display:flex;flex-direction:column;gap:4px}.product-card__price{color:#000;font-family:Martel Sans;font-size:14px;font-weight:600;line-height:1}.product-card__retail-price{color:#939393;font-family:Martel Sans;font-size:14px;text-decoration:line-through}.product-card__condition{color:#000;font-family:Martel Sans;font-size:13px;margin-right:20px;text-align:right}.product-card__condition-label{color:#939393;margin-right:4px}.search-results__view-all-button{background-color:#f5f0ea!important;border:none;color:#000;cursor:pointer;font-family:Martel Sans;font-size:13px;font-weight:400;padding:16px;text-align:center}@media only screen and (max-width:879px){.search-results__view-all-button{display: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
|
@@ -15999,7 +15999,7 @@
|
|
|
15999
15999
|
return null;
|
|
16000
16000
|
}
|
|
16001
16001
|
|
|
16002
|
-
if (!isSearchFocused
|
|
16002
|
+
if (!isSearchFocused) {
|
|
16003
16003
|
return null;
|
|
16004
16004
|
}
|
|
16005
16005
|
|
|
@@ -16022,7 +16022,7 @@
|
|
|
16022
16022
|
key: product.link,
|
|
16023
16023
|
href: product.link,
|
|
16024
16024
|
className: "product-card"
|
|
16025
|
-
},
|
|
16025
|
+
}, product.featured_image && /*#__PURE__*/React__default.createElement("div", {
|
|
16026
16026
|
className: "product-card__image-container"
|
|
16027
16027
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
16028
16028
|
src: product.featured_image,
|
|
@@ -16208,6 +16208,72 @@
|
|
|
16208
16208
|
};
|
|
16209
16209
|
};
|
|
16210
16210
|
|
|
16211
|
+
var useSearchClickOutside = function useSearchClickOutside(ref, searchResults, setCachedResults, setIsSearchFocused, setSearchResults) {
|
|
16212
|
+
React.useEffect(function () {
|
|
16213
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
16214
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
16215
|
+
setCachedResults(searchResults);
|
|
16216
|
+
setIsSearchFocused(false);
|
|
16217
|
+
setSearchResults({
|
|
16218
|
+
brands: [],
|
|
16219
|
+
products: []
|
|
16220
|
+
});
|
|
16221
|
+
}
|
|
16222
|
+
};
|
|
16223
|
+
|
|
16224
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
16225
|
+
return function () {
|
|
16226
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
16227
|
+
};
|
|
16228
|
+
}, [ref, searchResults, setCachedResults, setIsSearchFocused, setSearchResults]);
|
|
16229
|
+
};
|
|
16230
|
+
var useSearchInputChange = function useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults) {
|
|
16231
|
+
return React.useCallback(function (event) {
|
|
16232
|
+
var value = event.target.value;
|
|
16233
|
+
setSearchValue(value);
|
|
16234
|
+
setIsSearchFocused(true);
|
|
16235
|
+
|
|
16236
|
+
if (value.trim().length >= 3) {
|
|
16237
|
+
debouncedSearch(value);
|
|
16238
|
+
} else {
|
|
16239
|
+
setSearchResults({
|
|
16240
|
+
brands: [],
|
|
16241
|
+
products: []
|
|
16242
|
+
});
|
|
16243
|
+
setCachedResults({
|
|
16244
|
+
brands: [],
|
|
16245
|
+
products: []
|
|
16246
|
+
});
|
|
16247
|
+
}
|
|
16248
|
+
}, [setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults]);
|
|
16249
|
+
};
|
|
16250
|
+
var useSearchInputFocus = function useSearchInputFocus(searchValue, setIsSearchFocused, cachedResults, setSearchResults) {
|
|
16251
|
+
return React.useCallback(function () {
|
|
16252
|
+
setIsSearchFocused(true);
|
|
16253
|
+
|
|
16254
|
+
if (searchValue.trim().length >= 3) {
|
|
16255
|
+
setSearchResults(cachedResults);
|
|
16256
|
+
}
|
|
16257
|
+
}, [searchValue, setIsSearchFocused, cachedResults, setSearchResults]);
|
|
16258
|
+
};
|
|
16259
|
+
var useSearchInputKeyDown = function useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused) {
|
|
16260
|
+
var setSearchValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
16261
|
+
return React.useCallback(function (event) {
|
|
16262
|
+
if (event.key === 'Enter') {
|
|
16263
|
+
event.preventDefault();
|
|
16264
|
+
|
|
16265
|
+
if (searchValue.trim().length >= 3) {
|
|
16266
|
+
immediateSearch(searchValue);
|
|
16267
|
+
}
|
|
16268
|
+
|
|
16269
|
+
setIsSearchFocused(false);
|
|
16270
|
+
} else if (event.key === 'Escape' && setSearchValue) {
|
|
16271
|
+
setSearchValue('');
|
|
16272
|
+
setIsSearchFocused(false);
|
|
16273
|
+
}
|
|
16274
|
+
}, [searchValue, immediateSearch, setIsSearchFocused, setSearchValue]);
|
|
16275
|
+
};
|
|
16276
|
+
|
|
16211
16277
|
var LuxityDesktopHeader = function LuxityDesktopHeader(_ref) {
|
|
16212
16278
|
var accountIcon = _ref.accountIcon,
|
|
16213
16279
|
cartIcon = _ref.cartIcon,
|
|
@@ -16229,7 +16295,6 @@
|
|
|
16229
16295
|
onCartClick = _ref.onCartClick,
|
|
16230
16296
|
onAccountClick = _ref.onAccountClick,
|
|
16231
16297
|
inputSearchIcon = _ref.inputSearchIcon,
|
|
16232
|
-
onSearch = _ref.onSearch,
|
|
16233
16298
|
onSellToUsClick = _ref.onSellToUsClick,
|
|
16234
16299
|
contactUsLink = _ref.contactUsLink,
|
|
16235
16300
|
ourStoryLink = _ref.ourStoryLink,
|
|
@@ -16310,56 +16375,24 @@
|
|
|
16310
16375
|
searchResults = _useState14[0],
|
|
16311
16376
|
setSearchResults = _useState14[1];
|
|
16312
16377
|
|
|
16378
|
+
var _useState15 = React.useState({
|
|
16379
|
+
brands: [],
|
|
16380
|
+
products: []
|
|
16381
|
+
}),
|
|
16382
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
16383
|
+
cachedResults = _useState16[0],
|
|
16384
|
+
setCachedResults = _useState16[1];
|
|
16385
|
+
|
|
16313
16386
|
var searchResultsRef = React.useRef(null);
|
|
16314
|
-
var debouncedSearch = createDebouncedSearch(
|
|
16387
|
+
var debouncedSearch = createDebouncedSearch(function (results) {
|
|
16388
|
+
setSearchResults(results);
|
|
16389
|
+
setCachedResults(results);
|
|
16390
|
+
});
|
|
16315
16391
|
var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
|
|
16320
|
-
setIsSearchFocused(true);
|
|
16321
|
-
|
|
16322
|
-
if (value.trim().length >= 3) {
|
|
16323
|
-
debouncedSearch(value);
|
|
16324
|
-
} else {
|
|
16325
|
-
setSearchResults({
|
|
16326
|
-
brands: [],
|
|
16327
|
-
products: []
|
|
16328
|
-
});
|
|
16329
|
-
}
|
|
16330
|
-
};
|
|
16331
|
-
|
|
16332
|
-
React.useEffect(function () {
|
|
16333
|
-
var handleClickOutside = function handleClickOutside(event) {
|
|
16334
|
-
if (searchResultsRef.current && !searchResultsRef.current.contains(event.target)) {
|
|
16335
|
-
setSearchValue('');
|
|
16336
|
-
setIsSearchFocused(false);
|
|
16337
|
-
setSearchResults({
|
|
16338
|
-
brands: [],
|
|
16339
|
-
products: []
|
|
16340
|
-
});
|
|
16341
|
-
}
|
|
16342
|
-
};
|
|
16343
|
-
|
|
16344
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
16345
|
-
return function () {
|
|
16346
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
16347
|
-
};
|
|
16348
|
-
}, []);
|
|
16349
|
-
|
|
16350
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
16351
|
-
if (event.key === 'Enter') {
|
|
16352
|
-
event.preventDefault();
|
|
16353
|
-
|
|
16354
|
-
if (searchValue.trim().length >= 3) {
|
|
16355
|
-
immediateSearch(searchValue);
|
|
16356
|
-
}
|
|
16357
|
-
} else if (event.key === 'Escape') {
|
|
16358
|
-
setSearchValue('');
|
|
16359
|
-
}
|
|
16360
|
-
|
|
16361
|
-
setIsSearchFocused(false);
|
|
16362
|
-
};
|
|
16392
|
+
var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults);
|
|
16393
|
+
useSearchClickOutside(searchResultsRef, searchResults, setCachedResults, setIsSearchFocused, setSearchResults);
|
|
16394
|
+
var handleSearchFocus = useSearchInputFocus(searchValue, setIsSearchFocused, cachedResults, setSearchResults);
|
|
16395
|
+
var handleKeyDown = useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused);
|
|
16363
16396
|
|
|
16364
16397
|
function addCategoryToElements(elements, categoryName) {
|
|
16365
16398
|
return elements.map(function (element) {
|
|
@@ -16412,7 +16445,8 @@
|
|
|
16412
16445
|
className: "navbar__logo"
|
|
16413
16446
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
16414
16447
|
src: logoSrc,
|
|
16415
|
-
alt: "luxity-logo"
|
|
16448
|
+
alt: "luxity-logo",
|
|
16449
|
+
loading: "eager"
|
|
16416
16450
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
16417
16451
|
className: "navbar__section"
|
|
16418
16452
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -16430,13 +16464,8 @@
|
|
|
16430
16464
|
value: searchValue,
|
|
16431
16465
|
onChange: handleChange,
|
|
16432
16466
|
onKeyDown: handleKeyDown,
|
|
16433
|
-
onClick:
|
|
16434
|
-
|
|
16435
|
-
setIsSearchFocused(true);
|
|
16436
|
-
},
|
|
16437
|
-
onFocus: function onFocus() {
|
|
16438
|
-
return setIsSearchFocused(true);
|
|
16439
|
-
}
|
|
16467
|
+
onClick: handleSearchFocus,
|
|
16468
|
+
onFocus: handleSearchFocus
|
|
16440
16469
|
})), /*#__PURE__*/React__default.createElement(SearchResults, {
|
|
16441
16470
|
searchValue: searchValue,
|
|
16442
16471
|
searchResults: searchResults,
|
|
@@ -17360,73 +17389,41 @@
|
|
|
17360
17389
|
searchResults = _useState8[0],
|
|
17361
17390
|
setSearchResults = _useState8[1];
|
|
17362
17391
|
|
|
17363
|
-
var _useState9 = React.useState(
|
|
17392
|
+
var _useState9 = React.useState({
|
|
17393
|
+
brands: [],
|
|
17394
|
+
products: []
|
|
17395
|
+
}),
|
|
17364
17396
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
17365
|
-
|
|
17366
|
-
|
|
17397
|
+
cachedResults = _useState10[0],
|
|
17398
|
+
setCachedResults = _useState10[1];
|
|
17367
17399
|
|
|
17368
|
-
var _useState11 = React.useState(
|
|
17400
|
+
var _useState11 = React.useState(false),
|
|
17401
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
17402
|
+
isSearchFocused = _useState12[0],
|
|
17403
|
+
setIsSearchFocused = _useState12[1];
|
|
17404
|
+
|
|
17405
|
+
var _useState13 = React.useState({
|
|
17369
17406
|
trending_brands: [],
|
|
17370
17407
|
latest_products: []
|
|
17371
17408
|
}),
|
|
17372
|
-
|
|
17373
|
-
initialSearchView =
|
|
17374
|
-
setInitialSearchView =
|
|
17409
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
17410
|
+
initialSearchView = _useState14[0],
|
|
17411
|
+
setInitialSearchView = _useState14[1];
|
|
17375
17412
|
|
|
17376
17413
|
var searchResultsRef = React.useRef(null);
|
|
17377
17414
|
var searchInputRef = React.useRef(null);
|
|
17378
|
-
var debouncedSearch = createDebouncedSearch(
|
|
17415
|
+
var debouncedSearch = createDebouncedSearch(function (results) {
|
|
17416
|
+
setSearchResults(results);
|
|
17417
|
+
setCachedResults(results);
|
|
17418
|
+
});
|
|
17379
17419
|
var immediateSearch = createImmediateSearch(setSearchValue, setSearchResults, onSearchSubmit);
|
|
17380
|
-
|
|
17381
|
-
var
|
|
17382
|
-
var value = event.target.value;
|
|
17383
|
-
setSearchValue(value);
|
|
17384
|
-
setIsSearchFocused(true);
|
|
17385
|
-
|
|
17386
|
-
if (value.trim().length >= 3) {
|
|
17387
|
-
debouncedSearch(value);
|
|
17388
|
-
} else {
|
|
17389
|
-
setSearchResults({
|
|
17390
|
-
brands: [],
|
|
17391
|
-
products: []
|
|
17392
|
-
});
|
|
17393
|
-
}
|
|
17394
|
-
};
|
|
17395
|
-
|
|
17396
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
17397
|
-
if (event.key === 'Enter') {
|
|
17398
|
-
event.preventDefault();
|
|
17399
|
-
|
|
17400
|
-
if (searchValue.trim().length >= 3) {
|
|
17401
|
-
immediateSearch(searchValue);
|
|
17402
|
-
setIsSearchFocused(false);
|
|
17403
|
-
}
|
|
17404
|
-
} else if (event.key === 'Escape') {
|
|
17405
|
-
setSearchValue('');
|
|
17406
|
-
setIsSearchFocused(false);
|
|
17407
|
-
}
|
|
17408
|
-
};
|
|
17409
|
-
|
|
17420
|
+
var handleChange = useSearchInputChange(setSearchValue, setIsSearchFocused, debouncedSearch, setSearchResults, setCachedResults);
|
|
17421
|
+
var handleKeyDown = useSearchInputKeyDown(searchValue, immediateSearch, setIsSearchFocused, setSearchValue);
|
|
17410
17422
|
React.useMemo(function () {
|
|
17411
17423
|
fetchInitialSearchData(initialSearchData, setInitialSearchView);
|
|
17412
17424
|
}, [initialSearchData, fetchInitialSearchData]);
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
if (searchResultsRef.current && !searchResultsRef.current.contains(event.target)) {
|
|
17416
|
-
setSearchValue('');
|
|
17417
|
-
setIsSearchFocused(false);
|
|
17418
|
-
setSearchResults({
|
|
17419
|
-
brands: [],
|
|
17420
|
-
products: []
|
|
17421
|
-
});
|
|
17422
|
-
}
|
|
17423
|
-
};
|
|
17424
|
-
|
|
17425
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
17426
|
-
return function () {
|
|
17427
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
17428
|
-
};
|
|
17429
|
-
}, []);
|
|
17425
|
+
useSearchClickOutside(searchResultsRef, searchResults, setCachedResults, setIsSearchFocused, setSearchResults);
|
|
17426
|
+
var handleSearchFocus = useSearchInputFocus(searchValue, setIsSearchFocused, cachedResults, setSearchResults);
|
|
17430
17427
|
React.useEffect(function () {
|
|
17431
17428
|
if (showSearchBar && searchInputRef.current) {
|
|
17432
17429
|
searchInputRef.current.focus();
|
|
@@ -17551,7 +17548,8 @@
|
|
|
17551
17548
|
className: "navbar__logo"
|
|
17552
17549
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
17553
17550
|
src: logoSrc,
|
|
17554
|
-
alt: "luxity-logo"
|
|
17551
|
+
alt: "luxity-logo",
|
|
17552
|
+
loading: "eager"
|
|
17555
17553
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
17556
17554
|
className: "navbar__icons-wrapper"
|
|
17557
17555
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -17589,9 +17587,7 @@
|
|
|
17589
17587
|
value: searchValue,
|
|
17590
17588
|
onChange: handleChange,
|
|
17591
17589
|
onKeyDown: handleKeyDown,
|
|
17592
|
-
onFocus:
|
|
17593
|
-
return setIsSearchFocused(true);
|
|
17594
|
-
}
|
|
17590
|
+
onFocus: handleSearchFocus
|
|
17595
17591
|
})), /*#__PURE__*/React__default.createElement("button", {
|
|
17596
17592
|
type: "button",
|
|
17597
17593
|
onClick: onSearchClick
|