@bonlineza/luxity-lib 2.39.5 → 2.39.6
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/Accordion.js +342 -352
- package/AddInterest.js +3136 -3142
- package/AddProductInterest.js +999 -7572
- package/BrandSelector.js +854 -861
- package/Checkbox.js +240 -250
- package/CheckboxButton.js +229 -236
- package/CommunicationPreferenceOptionsRenderer.js +560 -568
- package/CommunicationPreferenceSection.js +651 -659
- package/CommunicationPreferences.js +2394 -2402
- package/ConditionSelector.js +852 -859
- package/CountryCodeSelect.js +79 -6650
- package/CurrencyInputFormatter.js +86 -96
- package/CurrencySelect.js +219 -227
- package/DropdownSelector.js +212 -6821
- package/GALink.js +43 -51
- package/GenderSelector.js +355 -362
- package/GraphQLDropdownSelector.js +5308 -11879
- package/GraphQLMultiSelector.js +593 -601
- package/IconHeader.js +118 -126
- package/IconWrapper.js +17 -25
- package/InterestCatSelector.js +424 -432
- package/InterestItem.js +462 -470
- package/Interests.js +4718 -11289
- package/InterestsSubheading.js +33 -41
- package/InvertedTextButton.js +167 -175
- package/LuxityAppSideNav.js +181 -189
- package/LuxityDesktopHeader.js +1355 -1363
- package/LuxityFooter.js +2228 -2236
- package/LuxityGraphQLDropdownSelector.js +5393 -11964
- package/LuxityGraphQLMultiselector.js +778 -785
- package/LuxityMobileHeader.js +1786 -1794
- package/LuxityPageReady.js +199 -209
- package/LuxityProductInterestItem.js +359 -367
- package/LuxitySideNav.js +665 -673
- package/MaterialSelector.js +5428 -11999
- package/ModelSelector.js +5428 -11999
- package/NotificationDropDown.js +459 -7030
- package/Notify.js +20 -32
- package/OutlinePrimaryButton.js +134 -142
- package/PriceRangeSelector.js +1264 -1270
- package/PrimaryButton.js +129 -137
- package/RadioButtons.js +308 -318
- package/RangeSlider.js +1033 -1039
- package/RareStepFooter.js +257 -264
- package/RareStepHeader.js +801 -808
- package/ReactSelectWrapper.js +33 -6604
- package/SecondaryButton.js +144 -152
- package/ShoeSizeRangeSelector.js +1147 -1153
- package/ShoeSizeSelector.js +1146 -1154
- package/SimpleErrorBoundary.js +130 -138
- package/StyleSelector.js +854 -861
- package/TestComponent.js +15 -0
- package/TextButton.js +135 -143
- package/Tooltip.js +176 -184
- package/Tracking.js +15 -25
- package/WrapperButton.js +50 -58
- package/build/CountryCodeSelect/index.js +18 -0
- package/build/ReactSelectWrapper/index.js +34 -0
- package/build/bundle.css +1 -1
- package/build/bundle.js +10634 -17239
- package/build/constants.js +32 -45
- package/package.json +2 -2
- package/postcss.config.js +6 -0
- package/svg/Accessories.js +34 -42
- package/svg/Account.js +30 -38
- package/svg/Add.js +31 -39
- package/svg/ArrowRight.js +28 -36
- package/svg/Bags.js +40 -48
- package/svg/BurgerMenu.js +24 -32
- package/svg/Calendar.js +98 -106
- package/svg/CalendarCircled.js +100 -108
- package/svg/CheckCircled.js +32 -40
- package/svg/Close.js +29 -37
- package/svg/Clothing.js +36 -44
- package/svg/Dot.js +32 -40
- package/svg/Edit.js +27 -35
- package/svg/Eye.js +28 -36
- package/svg/FileAttach.js +28 -36
- package/svg/FileAttachCircled.js +30 -38
- package/svg/Jewellery.js +49 -57
- package/svg/LightBulb.js +58 -66
- package/svg/Logo.js +132 -140
- package/svg/LuxityMenu.js +28 -36
- package/svg/Minus.js +29 -37
- package/svg/MobileAvatar.js +28 -36
- package/svg/MyOrder.js +36 -44
- package/svg/MyPayment.js +36 -44
- package/svg/MyProfile.js +44 -52
- package/svg/MySale.js +31 -39
- package/svg/Notification.js +30 -38
- package/svg/PointerDown.js +28 -36
- package/svg/Search.js +27 -35
- package/svg/Shoes.js +37 -45
- package/svg/SvgWrapper.js +13 -21
- package/svg/Trash.js +32 -40
- package/svg/Watches.js +47 -55
package/LuxitySideNav.js
CHANGED
|
@@ -1,738 +1,730 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if (Object.getOwnPropertySymbols) {
|
|
15
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
16
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
17
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
18
|
-
})), keys.push.apply(keys, symbols);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return keys;
|
|
1
|
+
import React, { forwardRef, useState, useMemo } from 'react';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import styled, { css, ThemeProvider } from 'styled-components';
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) {
|
|
6
|
+
var keys = Object.keys(object);
|
|
7
|
+
|
|
8
|
+
if (Object.getOwnPropertySymbols) {
|
|
9
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
10
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
11
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12
|
+
})), keys.push.apply(keys, symbols);
|
|
22
13
|
}
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
27
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
28
|
-
_defineProperty(target, key, source[key]);
|
|
29
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
30
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
31
|
-
});
|
|
32
|
-
}
|
|
15
|
+
return keys;
|
|
16
|
+
}
|
|
33
17
|
|
|
34
|
-
|
|
18
|
+
function _objectSpread2(target) {
|
|
19
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
20
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
21
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
22
|
+
_defineProperty(target, key, source[key]);
|
|
23
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
24
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
25
|
+
});
|
|
35
26
|
}
|
|
36
27
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Object.defineProperty(obj, key, {
|
|
40
|
-
value: value,
|
|
41
|
-
enumerable: true,
|
|
42
|
-
configurable: true,
|
|
43
|
-
writable: true
|
|
44
|
-
});
|
|
45
|
-
} else {
|
|
46
|
-
obj[key] = value;
|
|
47
|
-
}
|
|
28
|
+
return target;
|
|
29
|
+
}
|
|
48
30
|
|
|
49
|
-
|
|
31
|
+
function _defineProperty(obj, key, value) {
|
|
32
|
+
if (key in obj) {
|
|
33
|
+
Object.defineProperty(obj, key, {
|
|
34
|
+
value: value,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
obj[key] = value;
|
|
50
41
|
}
|
|
51
42
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
55
|
-
var source = arguments[i];
|
|
43
|
+
return obj;
|
|
44
|
+
}
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
46
|
+
function _extends() {
|
|
47
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
48
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
49
|
+
var source = arguments[i];
|
|
50
|
+
|
|
51
|
+
for (var key in source) {
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
53
|
+
target[key] = source[key];
|
|
61
54
|
}
|
|
62
55
|
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return target;
|
|
59
|
+
};
|
|
60
|
+
return _extends.apply(this, arguments);
|
|
61
|
+
}
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
64
|
+
if (!raw) {
|
|
65
|
+
raw = strings.slice(0);
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
69
|
+
raw: {
|
|
70
|
+
value: Object.freeze(raw)
|
|
72
71
|
}
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
75
|
+
function _slicedToArray(arr, i) {
|
|
76
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
77
|
+
}
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
function _arrayWithHoles(arr) {
|
|
80
|
+
if (Array.isArray(arr)) return arr;
|
|
81
|
+
}
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
83
|
+
function _iterableToArrayLimit(arr, i) {
|
|
84
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
88
85
|
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
if (_i == null) return;
|
|
87
|
+
var _arr = [];
|
|
88
|
+
var _n = true;
|
|
89
|
+
var _d = false;
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
var _arr = [];
|
|
94
|
-
var _n = true;
|
|
95
|
-
var _d = false;
|
|
91
|
+
var _s, _e;
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
try {
|
|
94
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
95
|
+
_arr.push(_s.value);
|
|
98
96
|
|
|
97
|
+
if (i && _arr.length === i) break;
|
|
98
|
+
}
|
|
99
|
+
} catch (err) {
|
|
100
|
+
_d = true;
|
|
101
|
+
_e = err;
|
|
102
|
+
} finally {
|
|
99
103
|
try {
|
|
100
|
-
|
|
101
|
-
_arr.push(_s.value);
|
|
102
|
-
|
|
103
|
-
if (i && _arr.length === i) break;
|
|
104
|
-
}
|
|
105
|
-
} catch (err) {
|
|
106
|
-
_d = true;
|
|
107
|
-
_e = err;
|
|
104
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
108
105
|
} finally {
|
|
109
|
-
|
|
110
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
111
|
-
} finally {
|
|
112
|
-
if (_d) throw _e;
|
|
113
|
-
}
|
|
106
|
+
if (_d) throw _e;
|
|
114
107
|
}
|
|
115
|
-
|
|
116
|
-
return _arr;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
120
|
-
if (!o) return;
|
|
121
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
122
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
123
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
124
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
125
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function _arrayLikeToArray(arr, len) {
|
|
129
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
130
|
-
|
|
131
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
132
|
-
|
|
133
|
-
return arr2;
|
|
134
108
|
}
|
|
135
109
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
110
|
+
return _arr;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
114
|
+
if (!o) return;
|
|
115
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
116
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
117
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
118
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
119
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function _arrayLikeToArray(arr, len) {
|
|
123
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
124
|
+
|
|
125
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
126
|
+
|
|
127
|
+
return arr2;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function _nonIterableRest() {
|
|
131
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
var StoresDropdown = function StoresDropdown(_ref) {
|
|
135
|
+
var backIcon = _ref.backIcon,
|
|
136
|
+
onBackClick = _ref.onBackClick,
|
|
137
|
+
stores = _ref.stores,
|
|
138
|
+
onContactUsClick = _ref.onContactUsClick;
|
|
139
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
className: "side-nav__sub-menu"
|
|
141
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
142
|
+
type: "button",
|
|
143
|
+
className: "side-nav__back-button-wrapper",
|
|
144
|
+
onClick: onBackClick
|
|
145
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
146
|
+
src: backIcon,
|
|
147
|
+
alt: "back-icon",
|
|
148
|
+
className: "side-nav__back-icon"
|
|
149
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
className: "side-nav__back-button"
|
|
151
|
+
}, "Back To Menu")), /*#__PURE__*/React.createElement("div", {
|
|
152
|
+
className: "side-nav__store-details"
|
|
153
|
+
}, !!stores.length && stores.map(function (store) {
|
|
154
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
className: "stores-dropdown__main-title"
|
|
156
|
+
}, store.title, ", ", store.location), /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: "stores-dropdown__open-days"
|
|
158
|
+
}, store.regularOpenDays), /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: "stores-dropdown__open-hours"
|
|
160
|
+
}, store.regularOpenHours), /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
className: "stores-dropdown__open-days"
|
|
162
|
+
}, store.holidayOpenDays), /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
className: "stores-dropdown__open-hours"
|
|
164
|
+
}, store.holidayOpenHours), /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
className: "stores-dropdown__open-days"
|
|
166
|
+
}, store.weekendOpenDays), /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: "stores-dropdown__open-hours"
|
|
168
|
+
}, store.weekendOpenHours), /*#__PURE__*/React.createElement("button", {
|
|
148
169
|
type: "button",
|
|
149
|
-
className: "
|
|
150
|
-
onClick:
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
onClick: onContactUsClick
|
|
178
|
-
}, "View More"));
|
|
179
|
-
})));
|
|
170
|
+
className: "stores-dropdown__view-more",
|
|
171
|
+
onClick: onContactUsClick
|
|
172
|
+
}, "View More"));
|
|
173
|
+
})));
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
var BrandsDropDown = function BrandsDropDown(_ref) {
|
|
177
|
+
var subMenuOpen = _ref.subMenuOpen,
|
|
178
|
+
onBackClick = _ref.onBackClick,
|
|
179
|
+
onCloseSideNav = _ref.onCloseSideNav,
|
|
180
|
+
backIcon = _ref.backIcon,
|
|
181
|
+
subMenuCategoryTitle = _ref.subMenuCategoryTitle,
|
|
182
|
+
productUrl = _ref.productUrl,
|
|
183
|
+
categoryElements = _ref.categoryElements,
|
|
184
|
+
subMenuBrandsTitle = _ref.subMenuBrandsTitle,
|
|
185
|
+
_ref$brandsList = _ref.brandsList,
|
|
186
|
+
brandsList = _ref$brandsList === void 0 ? [] : _ref$brandsList,
|
|
187
|
+
categorySlug = _ref.categorySlug,
|
|
188
|
+
isLoading = _ref.isLoading,
|
|
189
|
+
hasError = _ref.hasError,
|
|
190
|
+
LinkComponent = _ref.LinkComponent;
|
|
191
|
+
|
|
192
|
+
var handleLinkClick = function handleLinkClick(event) {
|
|
193
|
+
event.preventDefault();
|
|
194
|
+
var href = event.currentTarget.getAttribute('href');
|
|
195
|
+
onBackClick();
|
|
196
|
+
onCloseSideNav();
|
|
197
|
+
window.location.href = href;
|
|
180
198
|
};
|
|
181
199
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
className: "
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}, categoryElements.map(function (categoryElement) {
|
|
231
|
-
return categoryElement.category ? /*#__PURE__*/React__default.createElement(LinkComponent, {
|
|
232
|
-
href: "".concat(productUrl, "/").concat(categoryElement.category, "/").concat(categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.slug),
|
|
233
|
-
onClick: handleLinkClick,
|
|
234
|
-
className: "dropdown__element",
|
|
235
|
-
key: categoryElement.name
|
|
236
|
-
}, categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.name.toLowerCase()) : /*#__PURE__*/React__default.createElement(LinkComponent, {
|
|
237
|
-
href: "".concat(productUrl, "/").concat(categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.slug),
|
|
238
|
-
onClick: handleLinkClick,
|
|
239
|
-
className: "dropdown__element",
|
|
240
|
-
key: categoryElement.name
|
|
241
|
-
}, categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.name.toLowerCase());
|
|
242
|
-
})), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("div", {
|
|
243
|
-
className: "side-nav__elements"
|
|
244
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
245
|
-
className: "side-nav__sub-menu-title"
|
|
246
|
-
}, subMenuBrandsTitle), /*#__PURE__*/React__default.createElement(LinkComponent, {
|
|
247
|
-
href: "".concat(productUrl, "/").concat(categorySlug === 'new' ? 'brands' : categorySlug),
|
|
200
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
201
|
+
className: "side-nav__content ".concat(subMenuOpen ? '' : 'side-nav__content--hidden')
|
|
202
|
+
}, hasError ? /*#__PURE__*/React.createElement("div", {
|
|
203
|
+
className: "side-nav__errors"
|
|
204
|
+
}, "Failed to load data.") : /*#__PURE__*/React.createElement("div", {
|
|
205
|
+
className: "side-nav__sub-menu-wrapper"
|
|
206
|
+
}, isLoading ? /*#__PURE__*/React.createElement("div", {
|
|
207
|
+
className: "cover-spinner"
|
|
208
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
209
|
+
className: "side-nav__sub-menu"
|
|
210
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
211
|
+
type: "button",
|
|
212
|
+
className: "side-nav__back-button-wrapper",
|
|
213
|
+
onClick: onBackClick
|
|
214
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
215
|
+
src: backIcon,
|
|
216
|
+
alt: "back-icon",
|
|
217
|
+
className: "side-nav__back-icon"
|
|
218
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
219
|
+
className: "side-nav__back-button"
|
|
220
|
+
}, "Back To Menu")), /*#__PURE__*/React.createElement("div", {
|
|
221
|
+
className: "side-nav__sub-menu-title"
|
|
222
|
+
}, subMenuCategoryTitle), /*#__PURE__*/React.createElement("div", {
|
|
223
|
+
className: "side-nav__elements"
|
|
224
|
+
}, categoryElements.map(function (categoryElement) {
|
|
225
|
+
return categoryElement.category ? /*#__PURE__*/React.createElement(LinkComponent, {
|
|
226
|
+
href: "".concat(productUrl, "/").concat(categoryElement.category, "/").concat(categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.slug),
|
|
227
|
+
onClick: handleLinkClick,
|
|
228
|
+
className: "dropdown__element",
|
|
229
|
+
key: categoryElement.name
|
|
230
|
+
}, categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.name.toLowerCase()) : /*#__PURE__*/React.createElement(LinkComponent, {
|
|
231
|
+
href: "".concat(productUrl, "/").concat(categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.slug),
|
|
232
|
+
onClick: handleLinkClick,
|
|
233
|
+
className: "dropdown__element",
|
|
234
|
+
key: categoryElement.name
|
|
235
|
+
}, categoryElement === null || categoryElement === void 0 ? void 0 : categoryElement.name.toLowerCase());
|
|
236
|
+
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
|
|
237
|
+
className: "side-nav__elements"
|
|
238
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
239
|
+
className: "side-nav__sub-menu-title"
|
|
240
|
+
}, subMenuBrandsTitle), /*#__PURE__*/React.createElement(LinkComponent, {
|
|
241
|
+
href: "".concat(productUrl, "/").concat(categorySlug === 'new' ? 'brands' : categorySlug),
|
|
242
|
+
onClick: handleLinkClick,
|
|
243
|
+
className: "side-nav__element"
|
|
244
|
+
}, "All Brands"), !!brandsList.length && brandsList.map(function (brand) {
|
|
245
|
+
return /*#__PURE__*/React.createElement(LinkComponent, {
|
|
246
|
+
key: brand.slug,
|
|
247
|
+
href: "".concat(productUrl, "/").concat(categorySlug === 'new' ? 'brands' : categorySlug, "/").concat(brand.slug),
|
|
248
248
|
onClick: handleLinkClick,
|
|
249
249
|
className: "side-nav__element"
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
250
|
+
}, brand.name);
|
|
251
|
+
})))));
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
var removeCategoryByName = function removeCategoryByName(categories, name) {
|
|
255
|
+
var _categories$filter;
|
|
256
|
+
|
|
257
|
+
return (_categories$filter = categories === null || categories === void 0 ? void 0 : categories.filter(function (category) {
|
|
258
|
+
return category.name.toLowerCase() !== name.toLowerCase();
|
|
259
|
+
})) !== null && _categories$filter !== void 0 ? _categories$filter : [];
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
263
|
+
/* position relative is required for the Body element to be positioned correctly */
|
|
264
|
+
|
|
265
|
+
var relativeInlineStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
266
|
+
var topMiddleBodyStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 1;\n bottom: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])));
|
|
267
|
+
var getTopMiddleArrowAfterStyle = function getTopMiddleArrowAfterStyle(props) {
|
|
268
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
|
|
269
|
+
};
|
|
270
|
+
var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
|
|
271
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
|
|
272
|
+
};
|
|
273
|
+
var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
|
|
274
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
var _templateObject$1;
|
|
278
|
+
|
|
279
|
+
var getBodyStyle = function getBodyStyle() {
|
|
280
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
281
|
+
var _props$$toolTipPositi = props.$toolTipPosition,
|
|
282
|
+
$toolTipPosition = _props$$toolTipPositi === void 0 ? '' : _props$$toolTipPositi;
|
|
283
|
+
|
|
284
|
+
switch ($toolTipPosition) {
|
|
285
|
+
case 'top':
|
|
286
|
+
return topMiddleBodyStyle;
|
|
287
|
+
|
|
288
|
+
case 'bottom':
|
|
289
|
+
return getBottomMiddleBodyStyle(props);
|
|
290
|
+
|
|
291
|
+
default:
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
};
|
|
267
295
|
|
|
268
|
-
|
|
269
|
-
|
|
296
|
+
var getAfterStyling = function getAfterStyling() {
|
|
297
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
298
|
+
var $toolTipPosition = props.$toolTipPosition;
|
|
270
299
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /*Bottom Arrow*/\n top: 100%; /* At the bottom of the tooltip */\n left: calc(50% - ", ");\n border-width: ", ";\n border-style: solid;\n border-color: ", " transparent transparent transparent;\n"])), props.$apexWidth, props.$apexWidth, props.theme.colors.base);
|
|
275
|
-
};
|
|
276
|
-
var getBottomMiddleBodyStyle = function getBottomMiddleBodyStyle(props) {
|
|
277
|
-
return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 100%;\n left: calc(50% - ", " / 2);\n"])), props.$bodyWidth);
|
|
278
|
-
};
|
|
279
|
-
var getBottomMiddleArrowAfterStyle = function getBottomMiddleArrowAfterStyle(props) {
|
|
280
|
-
return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n /*Top Arrow*/\n bottom: 100%; /* At the top of the tooltip */\n top: initial;\n left: 50%;\n border-style: solid;\n border-color: transparent transparent ", " transparent;\n"])), props.theme.colors.base);
|
|
281
|
-
};
|
|
300
|
+
switch ($toolTipPosition) {
|
|
301
|
+
case 'top':
|
|
302
|
+
return getTopMiddleArrowAfterStyle(props);
|
|
282
303
|
|
|
283
|
-
|
|
304
|
+
case 'bottom':
|
|
305
|
+
return getBottomMiddleArrowAfterStyle(props);
|
|
284
306
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
307
|
+
default:
|
|
308
|
+
return '';
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
var Body = styled.span(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", ";\n visibility: hidden;\n opacity: 0;\n width: ", ";\n transition: visibility 0.3s linear, opacity 0.3s linear;\n background-color: ", ";\n color: white;\n text-align: center;\n border-radius: 5px;\n ", "\n &::after {\n content: ' ';\n position: absolute;\n ", "\n }\n"])), relativeInlineStyle, function (props) {
|
|
313
|
+
return props.$bodyWidth;
|
|
314
|
+
}, function (props) {
|
|
315
|
+
return props.theme.colors.base || 'black';
|
|
316
|
+
}, function (props) {
|
|
317
|
+
return getBodyStyle(props);
|
|
318
|
+
}, function (props) {
|
|
319
|
+
return getAfterStyling(props);
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
var _templateObject$2;
|
|
323
|
+
var Container = styled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", ";\n cursor: pointer;\n &:hover ", " {\n opacity: 1;\n visibility: visible;\n }\n"])), relativeInlineStyle, Body);
|
|
324
|
+
|
|
325
|
+
var theme = {
|
|
326
|
+
breakpoints: ['40em', '52em', '64em'],
|
|
327
|
+
space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
|
|
328
|
+
fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
|
|
329
|
+
marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
|
|
330
|
+
letterSpacings: ['-0.5px', '0px', '+0.5px'],
|
|
331
|
+
radii: ['0px', '2px', '4px', '8px'],
|
|
332
|
+
borderRadius: '6px',
|
|
333
|
+
colors: {
|
|
334
|
+
primary: '#000',
|
|
335
|
+
base: '#4e4949',
|
|
336
|
+
baseLt: '#817c7c',
|
|
337
|
+
borderColor: '#d8d8d8',
|
|
338
|
+
ntrlMin: '#fff',
|
|
339
|
+
ntrlMinTen: '#e6e6e6',
|
|
340
|
+
gray: '#efefef',
|
|
341
|
+
darkerGray: '#454141'
|
|
342
|
+
},
|
|
343
|
+
rareStepColors: {
|
|
344
|
+
primary: '#202b58',
|
|
345
|
+
secondary: '#ef5c2d',
|
|
346
|
+
ntrlMin: '#ffffff',
|
|
347
|
+
ntrl40: '#f4f4f4',
|
|
348
|
+
ntrl50: '#808080',
|
|
349
|
+
ntrl60: '#e8e8e8',
|
|
350
|
+
ntrl70: '#252525',
|
|
351
|
+
ntrlMax: '#000000'
|
|
352
|
+
},
|
|
353
|
+
rareStepFontWeights: {
|
|
354
|
+
normal: 400,
|
|
355
|
+
medium: 500,
|
|
356
|
+
semiBold: 600,
|
|
357
|
+
bold: 700
|
|
358
|
+
},
|
|
359
|
+
rareStepFontSize: {
|
|
360
|
+
h1: '36px',
|
|
361
|
+
h2: '30px',
|
|
362
|
+
h3: '24px',
|
|
363
|
+
h4: '20px',
|
|
364
|
+
h5: '16px',
|
|
365
|
+
h6: '14px',
|
|
366
|
+
footerTitle: '16px'
|
|
367
|
+
},
|
|
368
|
+
rareStepPageSizes: {
|
|
369
|
+
mobile: '500px',
|
|
370
|
+
tablet: '768px',
|
|
371
|
+
desktop: '992px',
|
|
372
|
+
screenl: '1280px',
|
|
373
|
+
screenxl: '1680px',
|
|
374
|
+
screenxxl: '1920px',
|
|
375
|
+
container: '1600px'
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
var themed = (function (Component) {
|
|
380
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
381
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
382
|
+
theme: theme
|
|
383
|
+
}, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
384
|
+
ref: ref
|
|
385
|
+
})));
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
/* eslint-disable react/require-default-props */
|
|
390
|
+
|
|
391
|
+
var Tooltip = function Tooltip(_ref) {
|
|
392
|
+
var _ref$children = _ref.children,
|
|
393
|
+
children = _ref$children === void 0 ? null : _ref$children,
|
|
394
|
+
_ref$toolTipText = _ref.toolTipText,
|
|
395
|
+
toolTipText = _ref$toolTipText === void 0 ? '' : _ref$toolTipText,
|
|
396
|
+
_ref$toolTipPosition = _ref.toolTipPosition,
|
|
397
|
+
toolTipPosition = _ref$toolTipPosition === void 0 ? 'top' : _ref$toolTipPosition,
|
|
398
|
+
_ref$bodyWidth = _ref.bodyWidth,
|
|
399
|
+
bodyWidth = _ref$bodyWidth === void 0 ? '8em' : _ref$bodyWidth,
|
|
400
|
+
_ref$apexWidth = _ref.apexWidth,
|
|
401
|
+
apexWidth = _ref$apexWidth === void 0 ? '5px' : _ref$apexWidth,
|
|
402
|
+
_ref$containerClassNa = _ref.containerClassName,
|
|
403
|
+
containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,
|
|
404
|
+
_ref$bodyClassName = _ref.bodyClassName,
|
|
405
|
+
bodyClassName = _ref$bodyClassName === void 0 ? '' : _ref$bodyClassName;
|
|
406
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
407
|
+
className: containerClassName
|
|
408
|
+
}, children, /*#__PURE__*/React.createElement(Body, {
|
|
409
|
+
$toolTipPosition: toolTipPosition,
|
|
410
|
+
$bodyWidth: bodyWidth,
|
|
411
|
+
$apexWidth: apexWidth,
|
|
412
|
+
className: bodyClassName
|
|
413
|
+
}, toolTipText));
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
var Tooltip$1 = themed(Tooltip);
|
|
417
|
+
|
|
418
|
+
var CurrencySelect = function CurrencySelect(_ref) {
|
|
419
|
+
var currency = _ref.currency,
|
|
420
|
+
currencyOptions = _ref.currencyOptions,
|
|
421
|
+
onCurrencyChange = _ref.onCurrencyChange,
|
|
422
|
+
_ref$isCurrencySelect = _ref.isCurrencySelectionDisabled,
|
|
423
|
+
isCurrencySelectionDisabled = _ref$isCurrencySelect === void 0 ? false : _ref$isCurrencySelect,
|
|
424
|
+
_ref$tooltipContent = _ref.tooltipContent,
|
|
425
|
+
tooltipContent = _ref$tooltipContent === void 0 ? '' : _ref$tooltipContent;
|
|
426
|
+
|
|
427
|
+
if (!currencyOptions || currencyOptions.length === 0) {
|
|
428
|
+
return null;
|
|
429
|
+
}
|
|
289
430
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
431
|
+
var selectedOption = currencyOptions.find(function (opt) {
|
|
432
|
+
return opt.value === currency;
|
|
433
|
+
});
|
|
293
434
|
|
|
294
|
-
|
|
295
|
-
|
|
435
|
+
if (!selectedOption) {
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
296
438
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
439
|
+
return /*#__PURE__*/React.createElement(Tooltip$1, {
|
|
440
|
+
toolTipText: isCurrencySelectionDisabled ? tooltipContent : '',
|
|
441
|
+
toolTipPosition: "bottom",
|
|
442
|
+
bodyWidth: "160px"
|
|
443
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
444
|
+
className: "currency-select-container ".concat(isCurrencySelectionDisabled ? 'disabled' : '')
|
|
445
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
446
|
+
className: "currency-flag"
|
|
447
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
448
|
+
src: selectedOption.flagSrc,
|
|
449
|
+
alt: "".concat(currency, " flag")
|
|
450
|
+
})), /*#__PURE__*/React.createElement("select", {
|
|
451
|
+
value: currency,
|
|
452
|
+
onChange: function onChange(e) {
|
|
453
|
+
return onCurrencyChange(e.target.value);
|
|
454
|
+
},
|
|
455
|
+
className: "currency-select",
|
|
456
|
+
disabled: isCurrencySelectionDisabled
|
|
457
|
+
}, currencyOptions.map(function (option) {
|
|
458
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
459
|
+
key: option.value,
|
|
460
|
+
value: option.value
|
|
461
|
+
}, option.value, " (", option.symbol, ")");
|
|
462
|
+
}))));
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
var LuxitySideNav = function LuxitySideNav(_ref) {
|
|
466
|
+
var accordionIcon = _ref.accordionIcon,
|
|
467
|
+
closeIcon = _ref.closeIcon,
|
|
468
|
+
backIcon = _ref.backIcon,
|
|
469
|
+
productUrl = _ref.productUrl,
|
|
470
|
+
onAccountClick = _ref.onAccountClick,
|
|
471
|
+
onCartClick = _ref.onCartClick,
|
|
472
|
+
onContactUsClick = _ref.onContactUsClick,
|
|
473
|
+
onOurStoryClick = _ref.onOurStoryClick,
|
|
474
|
+
onBlogClick = _ref.onBlogClick,
|
|
475
|
+
onSellToUsClick = _ref.onSellToUsClick,
|
|
476
|
+
stores = _ref.stores,
|
|
477
|
+
categoryElements = _ref.categoryElements,
|
|
478
|
+
showSideNav = _ref.showSideNav,
|
|
479
|
+
onMenuClick = _ref.onMenuClick,
|
|
480
|
+
currency = _ref.currency,
|
|
481
|
+
currencyOptions = _ref.currencyOptions,
|
|
482
|
+
onCurrencyChange = _ref.onCurrencyChange,
|
|
483
|
+
isCurrencySelectionDisabled = _ref.isCurrencySelectionDisabled,
|
|
484
|
+
tooltipContent = _ref.tooltipContent,
|
|
485
|
+
LinkComponent = _ref.LinkComponent,
|
|
486
|
+
categoryConfig = _ref.categoryConfig;
|
|
487
|
+
|
|
488
|
+
var _useState = useState(false),
|
|
489
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
490
|
+
subMenuOpen = _useState2[0],
|
|
491
|
+
setSubMenuOpen = _useState2[1];
|
|
492
|
+
|
|
493
|
+
var _useState3 = useState(''),
|
|
494
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
495
|
+
displayedSubMenu = _useState4[0],
|
|
496
|
+
setDisplayedSubMenu = _useState4[1];
|
|
497
|
+
|
|
498
|
+
var _useState5 = useState(false),
|
|
499
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
500
|
+
loading = _useState6[0],
|
|
501
|
+
setLoading = _useState6[1];
|
|
502
|
+
|
|
503
|
+
var _useState7 = useState({}),
|
|
504
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
505
|
+
dropdownData = _useState8[0],
|
|
506
|
+
setDropdownData = _useState8[1];
|
|
507
|
+
|
|
508
|
+
var _useState9 = useState(false),
|
|
509
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
510
|
+
hasError = _useState10[0],
|
|
511
|
+
setHasError = _useState10[1];
|
|
512
|
+
|
|
513
|
+
var onSubMenuClick = function onSubMenuClick(subMenu) {
|
|
514
|
+
setSubMenuOpen(function (prev) {
|
|
515
|
+
return !prev;
|
|
516
|
+
});
|
|
517
|
+
setDisplayedSubMenu(subMenu);
|
|
300
518
|
};
|
|
301
519
|
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
switch ($toolTipPosition) {
|
|
307
|
-
case 'top':
|
|
308
|
-
return getTopMiddleArrowAfterStyle(props);
|
|
309
|
-
|
|
310
|
-
case 'bottom':
|
|
311
|
-
return getBottomMiddleArrowAfterStyle(props);
|
|
520
|
+
var onStoresClick = function onStoresClick() {
|
|
521
|
+
setSubMenuOpen(false);
|
|
522
|
+
setDisplayedSubMenu('stores');
|
|
523
|
+
};
|
|
312
524
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
525
|
+
var onBackClick = function onBackClick() {
|
|
526
|
+
setSubMenuOpen(false);
|
|
527
|
+
setDisplayedSubMenu('');
|
|
316
528
|
};
|
|
317
529
|
|
|
318
|
-
var
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}, function (props) {
|
|
323
|
-
return getBodyStyle(props);
|
|
324
|
-
}, function (props) {
|
|
325
|
-
return getAfterStyling(props);
|
|
326
|
-
});
|
|
530
|
+
var onCloseSideNav = function onCloseSideNav(e) {
|
|
531
|
+
onMenuClick();
|
|
532
|
+
setSubMenuOpen(false);
|
|
533
|
+
setDisplayedSubMenu('');
|
|
327
534
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
var theme = {
|
|
332
|
-
breakpoints: ['40em', '52em', '64em'],
|
|
333
|
-
space: ['0px', '4px', '8px', '16px', '32px', '64px', '128px', '256px', '512px'],
|
|
334
|
-
fontSizes: ['12px', '14px', '16px', '20px', '24px', '32px', '48px', '64px', '72px'],
|
|
335
|
-
marginPaddings: ['0.5rem', '1rem', '1.5rem', '2rem', '2.5rem', '3rem', '3.5rem', '4rem', '4.5rem', '5rem', '5.5rem', '6rem'],
|
|
336
|
-
letterSpacings: ['-0.5px', '0px', '+0.5px'],
|
|
337
|
-
radii: ['0px', '2px', '4px', '8px'],
|
|
338
|
-
borderRadius: '6px',
|
|
339
|
-
colors: {
|
|
340
|
-
primary: '#000',
|
|
341
|
-
base: '#4e4949',
|
|
342
|
-
baseLt: '#817c7c',
|
|
343
|
-
borderColor: '#d8d8d8',
|
|
344
|
-
ntrlMin: '#fff',
|
|
345
|
-
ntrlMinTen: '#e6e6e6',
|
|
346
|
-
gray: '#efefef',
|
|
347
|
-
darkerGray: '#454141'
|
|
348
|
-
},
|
|
349
|
-
rareStepColors: {
|
|
350
|
-
primary: '#202b58',
|
|
351
|
-
secondary: '#ef5c2d',
|
|
352
|
-
ntrlMin: '#ffffff',
|
|
353
|
-
ntrl40: '#f4f4f4',
|
|
354
|
-
ntrl50: '#808080',
|
|
355
|
-
ntrl60: '#e8e8e8',
|
|
356
|
-
ntrl70: '#252525',
|
|
357
|
-
ntrlMax: '#000000'
|
|
358
|
-
},
|
|
359
|
-
rareStepFontWeights: {
|
|
360
|
-
normal: 400,
|
|
361
|
-
medium: 500,
|
|
362
|
-
semiBold: 600,
|
|
363
|
-
bold: 700
|
|
364
|
-
},
|
|
365
|
-
rareStepFontSize: {
|
|
366
|
-
h1: '36px',
|
|
367
|
-
h2: '30px',
|
|
368
|
-
h3: '24px',
|
|
369
|
-
h4: '20px',
|
|
370
|
-
h5: '16px',
|
|
371
|
-
h6: '14px',
|
|
372
|
-
footerTitle: '16px'
|
|
373
|
-
},
|
|
374
|
-
rareStepPageSizes: {
|
|
375
|
-
mobile: '500px',
|
|
376
|
-
tablet: '768px',
|
|
377
|
-
desktop: '992px',
|
|
378
|
-
screenl: '1280px',
|
|
379
|
-
screenxl: '1680px',
|
|
380
|
-
screenxxl: '1920px',
|
|
381
|
-
container: '1600px'
|
|
535
|
+
if (e && e.key === 'Enter') {
|
|
536
|
+
e.preventDefault();
|
|
382
537
|
}
|
|
383
538
|
};
|
|
384
539
|
|
|
385
|
-
|
|
386
|
-
return
|
|
387
|
-
return
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
ref: ref
|
|
391
|
-
})));
|
|
540
|
+
function addCategoryToElements(elements, categoryName) {
|
|
541
|
+
return elements.map(function (element) {
|
|
542
|
+
return _objectSpread2(_objectSpread2({}, element), {}, {
|
|
543
|
+
category: categoryName
|
|
544
|
+
});
|
|
392
545
|
});
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
/* eslint-disable react/require-default-props */
|
|
396
|
-
|
|
397
|
-
var Tooltip = function Tooltip(_ref) {
|
|
398
|
-
var _ref$children = _ref.children,
|
|
399
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
400
|
-
_ref$toolTipText = _ref.toolTipText,
|
|
401
|
-
toolTipText = _ref$toolTipText === void 0 ? '' : _ref$toolTipText,
|
|
402
|
-
_ref$toolTipPosition = _ref.toolTipPosition,
|
|
403
|
-
toolTipPosition = _ref$toolTipPosition === void 0 ? 'top' : _ref$toolTipPosition,
|
|
404
|
-
_ref$bodyWidth = _ref.bodyWidth,
|
|
405
|
-
bodyWidth = _ref$bodyWidth === void 0 ? '8em' : _ref$bodyWidth,
|
|
406
|
-
_ref$apexWidth = _ref.apexWidth,
|
|
407
|
-
apexWidth = _ref$apexWidth === void 0 ? '5px' : _ref$apexWidth,
|
|
408
|
-
_ref$containerClassNa = _ref.containerClassName,
|
|
409
|
-
containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,
|
|
410
|
-
_ref$bodyClassName = _ref.bodyClassName,
|
|
411
|
-
bodyClassName = _ref$bodyClassName === void 0 ? '' : _ref$bodyClassName;
|
|
412
|
-
return /*#__PURE__*/React__default.createElement(Container, {
|
|
413
|
-
className: containerClassName
|
|
414
|
-
}, children, /*#__PURE__*/React__default.createElement(Body, {
|
|
415
|
-
$toolTipPosition: toolTipPosition,
|
|
416
|
-
$bodyWidth: bodyWidth,
|
|
417
|
-
$apexWidth: apexWidth,
|
|
418
|
-
className: bodyClassName
|
|
419
|
-
}, toolTipText));
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
var Tooltip$1 = themed(Tooltip);
|
|
423
|
-
|
|
424
|
-
var CurrencySelect = function CurrencySelect(_ref) {
|
|
425
|
-
var currency = _ref.currency,
|
|
426
|
-
currencyOptions = _ref.currencyOptions,
|
|
427
|
-
onCurrencyChange = _ref.onCurrencyChange,
|
|
428
|
-
_ref$isCurrencySelect = _ref.isCurrencySelectionDisabled,
|
|
429
|
-
isCurrencySelectionDisabled = _ref$isCurrencySelect === void 0 ? false : _ref$isCurrencySelect,
|
|
430
|
-
_ref$tooltipContent = _ref.tooltipContent,
|
|
431
|
-
tooltipContent = _ref$tooltipContent === void 0 ? '' : _ref$tooltipContent;
|
|
432
|
-
|
|
433
|
-
if (!currencyOptions || currencyOptions.length === 0) {
|
|
434
|
-
return null;
|
|
435
|
-
}
|
|
546
|
+
}
|
|
436
547
|
|
|
437
|
-
|
|
438
|
-
|
|
548
|
+
useMemo(function () {
|
|
549
|
+
setLoading(true);
|
|
550
|
+
axios.get("".concat(categoryConfig.menuData)).then(function (_ref2) {
|
|
551
|
+
var data = _ref2.data;
|
|
552
|
+
setLoading(false);
|
|
553
|
+
setDropdownData(data);
|
|
554
|
+
}).catch(function () {
|
|
555
|
+
return setHasError(true);
|
|
439
556
|
});
|
|
557
|
+
}, [categoryConfig.menuData]);
|
|
440
558
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
559
|
+
var renderMenuItems = function renderMenuItems() {
|
|
560
|
+
return categoryConfig.categories.map(function (category) {
|
|
561
|
+
var title = category.title,
|
|
562
|
+
categorySlug = category.categorySlug;
|
|
563
|
+
var slug = categorySlug;
|
|
444
564
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
toolTipPosition: "bottom",
|
|
448
|
-
bodyWidth: "160px"
|
|
449
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
450
|
-
className: "currency-select-container ".concat(isCurrencySelectionDisabled ? 'disabled' : '')
|
|
451
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
452
|
-
className: "currency-flag"
|
|
453
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
454
|
-
src: selectedOption.flagSrc,
|
|
455
|
-
alt: "".concat(currency, " flag")
|
|
456
|
-
})), /*#__PURE__*/React__default.createElement("select", {
|
|
457
|
-
value: currency,
|
|
458
|
-
onChange: function onChange(e) {
|
|
459
|
-
return onCurrencyChange(e.target.value);
|
|
460
|
-
},
|
|
461
|
-
className: "currency-select",
|
|
462
|
-
disabled: isCurrencySelectionDisabled
|
|
463
|
-
}, currencyOptions.map(function (option) {
|
|
464
|
-
return /*#__PURE__*/React__default.createElement("option", {
|
|
465
|
-
key: option.value,
|
|
466
|
-
value: option.value
|
|
467
|
-
}, option.value, " (", option.symbol, ")");
|
|
468
|
-
}))));
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
var LuxitySideNav = function LuxitySideNav(_ref) {
|
|
472
|
-
var accordionIcon = _ref.accordionIcon,
|
|
473
|
-
closeIcon = _ref.closeIcon,
|
|
474
|
-
backIcon = _ref.backIcon,
|
|
475
|
-
productUrl = _ref.productUrl,
|
|
476
|
-
onAccountClick = _ref.onAccountClick,
|
|
477
|
-
onCartClick = _ref.onCartClick,
|
|
478
|
-
onContactUsClick = _ref.onContactUsClick,
|
|
479
|
-
onOurStoryClick = _ref.onOurStoryClick,
|
|
480
|
-
onBlogClick = _ref.onBlogClick,
|
|
481
|
-
onSellToUsClick = _ref.onSellToUsClick,
|
|
482
|
-
stores = _ref.stores,
|
|
483
|
-
categoryElements = _ref.categoryElements,
|
|
484
|
-
showSideNav = _ref.showSideNav,
|
|
485
|
-
onMenuClick = _ref.onMenuClick,
|
|
486
|
-
currency = _ref.currency,
|
|
487
|
-
currencyOptions = _ref.currencyOptions,
|
|
488
|
-
onCurrencyChange = _ref.onCurrencyChange,
|
|
489
|
-
isCurrencySelectionDisabled = _ref.isCurrencySelectionDisabled,
|
|
490
|
-
tooltipContent = _ref.tooltipContent,
|
|
491
|
-
LinkComponent = _ref.LinkComponent,
|
|
492
|
-
categoryConfig = _ref.categoryConfig;
|
|
493
|
-
|
|
494
|
-
var _useState = React.useState(false),
|
|
495
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
496
|
-
subMenuOpen = _useState2[0],
|
|
497
|
-
setSubMenuOpen = _useState2[1];
|
|
498
|
-
|
|
499
|
-
var _useState3 = React.useState(''),
|
|
500
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
501
|
-
displayedSubMenu = _useState4[0],
|
|
502
|
-
setDisplayedSubMenu = _useState4[1];
|
|
503
|
-
|
|
504
|
-
var _useState5 = React.useState(false),
|
|
505
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
506
|
-
loading = _useState6[0],
|
|
507
|
-
setLoading = _useState6[1];
|
|
508
|
-
|
|
509
|
-
var _useState7 = React.useState({}),
|
|
510
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
511
|
-
dropdownData = _useState8[0],
|
|
512
|
-
setDropdownData = _useState8[1];
|
|
513
|
-
|
|
514
|
-
var _useState9 = React.useState(false),
|
|
515
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
516
|
-
hasError = _useState10[0],
|
|
517
|
-
setHasError = _useState10[1];
|
|
518
|
-
|
|
519
|
-
var onSubMenuClick = function onSubMenuClick(subMenu) {
|
|
520
|
-
setSubMenuOpen(function (prev) {
|
|
521
|
-
return !prev;
|
|
522
|
-
});
|
|
523
|
-
setDisplayedSubMenu(subMenu);
|
|
524
|
-
};
|
|
525
|
-
|
|
526
|
-
var onStoresClick = function onStoresClick() {
|
|
527
|
-
setSubMenuOpen(false);
|
|
528
|
-
setDisplayedSubMenu('stores');
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
var onBackClick = function onBackClick() {
|
|
532
|
-
setSubMenuOpen(false);
|
|
533
|
-
setDisplayedSubMenu('');
|
|
534
|
-
};
|
|
535
|
-
|
|
536
|
-
var onCloseSideNav = function onCloseSideNav(e) {
|
|
537
|
-
onMenuClick();
|
|
538
|
-
setSubMenuOpen(false);
|
|
539
|
-
setDisplayedSubMenu('');
|
|
540
|
-
|
|
541
|
-
if (e && e.key === 'Enter') {
|
|
542
|
-
e.preventDefault();
|
|
565
|
+
if (categorySlug === 'brands') {
|
|
566
|
+
slug = 'new';
|
|
543
567
|
}
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
function addCategoryToElements(elements, categoryName) {
|
|
547
|
-
return elements.map(function (element) {
|
|
548
|
-
return _objectSpread2(_objectSpread2({}, element), {}, {
|
|
549
|
-
category: categoryName
|
|
550
|
-
});
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
React.useMemo(function () {
|
|
555
|
-
setLoading(true);
|
|
556
|
-
axios.get("".concat(categoryConfig.menuData)).then(function (_ref2) {
|
|
557
|
-
var data = _ref2.data;
|
|
558
|
-
setLoading(false);
|
|
559
|
-
setDropdownData(data);
|
|
560
|
-
}).catch(function () {
|
|
561
|
-
return setHasError(true);
|
|
562
|
-
});
|
|
563
|
-
}, [categoryConfig.menuData]);
|
|
564
568
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
slug
|
|
569
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
570
|
+
className: "side-nav__menu-item",
|
|
571
|
+
key: slug
|
|
572
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
573
|
+
type: "button",
|
|
574
|
+
className: "side-nav__menu-title-wrapper",
|
|
575
|
+
onClick: function onClick() {
|
|
576
|
+
return onSubMenuClick(slug);
|
|
573
577
|
}
|
|
578
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
579
|
+
className: "side-nav__menu-title"
|
|
580
|
+
}, title), /*#__PURE__*/React.createElement("img", {
|
|
581
|
+
src: accordionIcon,
|
|
582
|
+
alt: "accordion-icon",
|
|
583
|
+
className: "side-nav__accordion-icon"
|
|
584
|
+
})));
|
|
585
|
+
});
|
|
586
|
+
};
|
|
574
587
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
};
|
|
593
|
-
|
|
594
|
-
var renderDropdownLinks = function renderDropdownLinks() {
|
|
595
|
-
return categoryConfig.categories.map(function (category) {
|
|
596
|
-
var categorySlug = category.categorySlug,
|
|
597
|
-
categoryName = category.categoryName,
|
|
598
|
-
elementsKey = category.elementsKey,
|
|
599
|
-
subCategoryElementsKey = category.subCategoryElementsKey,
|
|
600
|
-
styleElementsKey = category.styleElementsKey;
|
|
601
|
-
var categoryElementsProcessed = categoryElements;
|
|
602
|
-
|
|
603
|
-
if (subCategoryElementsKey && dropdownData[subCategoryElementsKey]) {
|
|
604
|
-
// show subcategory elements
|
|
605
|
-
categoryElementsProcessed = removeCategoryByName(dropdownData[subCategoryElementsKey], categoryName);
|
|
606
|
-
} else if (styleElementsKey && dropdownData[styleElementsKey]) {
|
|
607
|
-
categoryElementsProcessed = addCategoryToElements(dropdownData[styleElementsKey], categorySlug);
|
|
608
|
-
} else {
|
|
609
|
-
categoryElementsProcessed = addCategoryToElements(categoryElementsProcessed, categorySlug);
|
|
610
|
-
}
|
|
588
|
+
var renderDropdownLinks = function renderDropdownLinks() {
|
|
589
|
+
return categoryConfig.categories.map(function (category) {
|
|
590
|
+
var categorySlug = category.categorySlug,
|
|
591
|
+
categoryName = category.categoryName,
|
|
592
|
+
elementsKey = category.elementsKey,
|
|
593
|
+
subCategoryElementsKey = category.subCategoryElementsKey,
|
|
594
|
+
styleElementsKey = category.styleElementsKey;
|
|
595
|
+
var categoryElementsProcessed = categoryElements;
|
|
596
|
+
|
|
597
|
+
if (subCategoryElementsKey && dropdownData[subCategoryElementsKey]) {
|
|
598
|
+
// show subcategory elements
|
|
599
|
+
categoryElementsProcessed = removeCategoryByName(dropdownData[subCategoryElementsKey], categoryName);
|
|
600
|
+
} else if (styleElementsKey && dropdownData[styleElementsKey]) {
|
|
601
|
+
categoryElementsProcessed = addCategoryToElements(dropdownData[styleElementsKey], categorySlug);
|
|
602
|
+
} else {
|
|
603
|
+
categoryElementsProcessed = addCategoryToElements(categoryElementsProcessed, categorySlug);
|
|
604
|
+
}
|
|
611
605
|
|
|
612
|
-
|
|
606
|
+
var subMenuTitle = 'Brands';
|
|
613
607
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
608
|
+
if (categorySlug !== 'brands') {
|
|
609
|
+
subMenuTitle = "".concat(categoryName, " Brands");
|
|
610
|
+
}
|
|
617
611
|
|
|
618
|
-
|
|
612
|
+
var subMenu = categorySlug;
|
|
619
613
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
614
|
+
if (subMenu === 'brands') {
|
|
615
|
+
subMenu = 'new';
|
|
616
|
+
}
|
|
623
617
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
});
|
|
618
|
+
return /*#__PURE__*/React.createElement(BrandsDropDown, {
|
|
619
|
+
key: categorySlug,
|
|
620
|
+
subMenuOpen: subMenuOpen && displayedSubMenu === subMenu,
|
|
621
|
+
onBackClick: onBackClick,
|
|
622
|
+
backIcon: backIcon,
|
|
623
|
+
subMenuCategoryTitle: "Department",
|
|
624
|
+
productUrl: productUrl,
|
|
625
|
+
categoryElements: categoryElementsProcessed,
|
|
626
|
+
subMenuBrandsTitle: subMenuTitle,
|
|
627
|
+
brandsList: dropdownData[elementsKey],
|
|
628
|
+
categorySlug: displayedSubMenu,
|
|
629
|
+
isLoading: loading,
|
|
630
|
+
hasError: hasError,
|
|
631
|
+
onCloseSideNav: onCloseSideNav,
|
|
632
|
+
LinkComponent: LinkComponent
|
|
640
633
|
});
|
|
641
|
-
};
|
|
642
|
-
|
|
643
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
644
|
-
className: "side-nav"
|
|
645
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
646
|
-
role: "button",
|
|
647
|
-
tabIndex: 0,
|
|
648
|
-
className: "side-nav__overlay ".concat(showSideNav ? 'side-nav__overlay--visible' : 'side-nav__overlay--hidden', " "),
|
|
649
|
-
onClick: onCloseSideNav,
|
|
650
|
-
onKeyDown: onCloseSideNav
|
|
651
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
652
|
-
className: "side-nav__content ".concat(subMenuOpen ? 'side-nav__content--hidden' : '', " ").concat(showSideNav ? 'side-nav__content--open' : 'side-nav__content--closed')
|
|
653
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
654
|
-
type: "button",
|
|
655
|
-
onClick: onMenuClick,
|
|
656
|
-
className: "side-nav__icon-container"
|
|
657
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
658
|
-
src: closeIcon,
|
|
659
|
-
alt: "close-icon",
|
|
660
|
-
className: "side-nav__close-icon"
|
|
661
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
662
|
-
className: "side-nav__menu-items-wrapper"
|
|
663
|
-
}, renderMenuItems(), !!stores.length && /*#__PURE__*/React__default.createElement("div", {
|
|
664
|
-
className: "side-nav__menu-item",
|
|
665
|
-
key: "stores"
|
|
666
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
667
|
-
type: "button",
|
|
668
|
-
className: "side-nav__menu-title-wrapper",
|
|
669
|
-
onClick: onStoresClick
|
|
670
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
671
|
-
className: "side-nav__menu-title"
|
|
672
|
-
}, "Our Stores"), /*#__PURE__*/React__default.createElement("img", {
|
|
673
|
-
src: accordionIcon,
|
|
674
|
-
alt: "accordion-icon",
|
|
675
|
-
className: "side-nav__accordion-icon"
|
|
676
|
-
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
677
|
-
className: "side-nav__menu-item",
|
|
678
|
-
key: "sell-to-us"
|
|
679
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
680
|
-
type: "button",
|
|
681
|
-
className: "side-nav__block-button",
|
|
682
|
-
onClick: onSellToUsClick
|
|
683
|
-
}, "Sell To Us")), /*#__PURE__*/React__default.createElement("div", {
|
|
684
|
-
className: "side-nav__menu-item",
|
|
685
|
-
key: "our-story"
|
|
686
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
687
|
-
type: "button",
|
|
688
|
-
className: "side-nav__sub-link",
|
|
689
|
-
onClick: onOurStoryClick
|
|
690
|
-
}, "Our Story")), typeof onBlogClick === 'function' && /*#__PURE__*/React__default.createElement("div", {
|
|
691
|
-
className: "side-nav__menu-item",
|
|
692
|
-
key: "blog"
|
|
693
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
694
|
-
type: "button",
|
|
695
|
-
className: "side-nav__sub-link",
|
|
696
|
-
onClick: onBlogClick
|
|
697
|
-
}, "Blog")), /*#__PURE__*/React__default.createElement("div", {
|
|
698
|
-
className: "side-nav__menu-item",
|
|
699
|
-
key: "contact-us"
|
|
700
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
701
|
-
type: "button",
|
|
702
|
-
className: "side-nav__sub-link",
|
|
703
|
-
onClick: onContactUsClick
|
|
704
|
-
}, "Contact Us")), /*#__PURE__*/React__default.createElement("div", {
|
|
705
|
-
className: "side-nav__menu-item",
|
|
706
|
-
key: "my-account"
|
|
707
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
708
|
-
type: "button",
|
|
709
|
-
className: "side-nav__sub-link",
|
|
710
|
-
onClick: onAccountClick
|
|
711
|
-
}, "My Account")), /*#__PURE__*/React__default.createElement("div", {
|
|
712
|
-
className: "side-nav__menu-item",
|
|
713
|
-
key: "my-cart"
|
|
714
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
715
|
-
type: "button",
|
|
716
|
-
className: "side-nav__sub-link",
|
|
717
|
-
onClick: onCartClick
|
|
718
|
-
}, "My Cart")), /*#__PURE__*/React__default.createElement(CurrencySelect, {
|
|
719
|
-
key: "currency",
|
|
720
|
-
currency: currency,
|
|
721
|
-
currencyOptions: currencyOptions,
|
|
722
|
-
onCurrencyChange: onCurrencyChange,
|
|
723
|
-
isCurrencySelectionDisabled: isCurrencySelectionDisabled,
|
|
724
|
-
tooltipContent: tooltipContent
|
|
725
|
-
}))), renderDropdownLinks(), displayedSubMenu === 'stores' && /*#__PURE__*/React__default.createElement("div", {
|
|
726
|
-
className: "side-nav__content"
|
|
727
|
-
}, /*#__PURE__*/React__default.createElement(StoresDropdown, {
|
|
728
|
-
key: "stores",
|
|
729
|
-
backIcon: backIcon,
|
|
730
|
-
onBackClick: onBackClick,
|
|
731
|
-
stores: stores,
|
|
732
|
-
onContactUsClick: onContactUsClick
|
|
733
|
-
})));
|
|
634
|
+
});
|
|
734
635
|
};
|
|
735
636
|
|
|
736
|
-
return
|
|
737
|
-
|
|
738
|
-
}
|
|
637
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
638
|
+
className: "side-nav"
|
|
639
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
640
|
+
role: "button",
|
|
641
|
+
tabIndex: 0,
|
|
642
|
+
className: "side-nav__overlay ".concat(showSideNav ? 'side-nav__overlay--visible' : 'side-nav__overlay--hidden', " "),
|
|
643
|
+
onClick: onCloseSideNav,
|
|
644
|
+
onKeyDown: onCloseSideNav
|
|
645
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
646
|
+
className: "side-nav__content ".concat(subMenuOpen ? 'side-nav__content--hidden' : '', " ").concat(showSideNav ? 'side-nav__content--open' : 'side-nav__content--closed')
|
|
647
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
648
|
+
type: "button",
|
|
649
|
+
onClick: onMenuClick,
|
|
650
|
+
className: "side-nav__icon-container"
|
|
651
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
652
|
+
src: closeIcon,
|
|
653
|
+
alt: "close-icon",
|
|
654
|
+
className: "side-nav__close-icon"
|
|
655
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
656
|
+
className: "side-nav__menu-items-wrapper"
|
|
657
|
+
}, renderMenuItems(), !!stores.length && /*#__PURE__*/React.createElement("div", {
|
|
658
|
+
className: "side-nav__menu-item",
|
|
659
|
+
key: "stores"
|
|
660
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
661
|
+
type: "button",
|
|
662
|
+
className: "side-nav__menu-title-wrapper",
|
|
663
|
+
onClick: onStoresClick
|
|
664
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
665
|
+
className: "side-nav__menu-title"
|
|
666
|
+
}, "Our Stores"), /*#__PURE__*/React.createElement("img", {
|
|
667
|
+
src: accordionIcon,
|
|
668
|
+
alt: "accordion-icon",
|
|
669
|
+
className: "side-nav__accordion-icon"
|
|
670
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
671
|
+
className: "side-nav__menu-item",
|
|
672
|
+
key: "sell-to-us"
|
|
673
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
674
|
+
type: "button",
|
|
675
|
+
className: "side-nav__block-button",
|
|
676
|
+
onClick: onSellToUsClick
|
|
677
|
+
}, "Sell To Us")), /*#__PURE__*/React.createElement("div", {
|
|
678
|
+
className: "side-nav__menu-item",
|
|
679
|
+
key: "our-story"
|
|
680
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
681
|
+
type: "button",
|
|
682
|
+
className: "side-nav__sub-link",
|
|
683
|
+
onClick: onOurStoryClick
|
|
684
|
+
}, "Our Story")), typeof onBlogClick === 'function' && /*#__PURE__*/React.createElement("div", {
|
|
685
|
+
className: "side-nav__menu-item",
|
|
686
|
+
key: "blog"
|
|
687
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
688
|
+
type: "button",
|
|
689
|
+
className: "side-nav__sub-link",
|
|
690
|
+
onClick: onBlogClick
|
|
691
|
+
}, "Blog")), /*#__PURE__*/React.createElement("div", {
|
|
692
|
+
className: "side-nav__menu-item",
|
|
693
|
+
key: "contact-us"
|
|
694
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
695
|
+
type: "button",
|
|
696
|
+
className: "side-nav__sub-link",
|
|
697
|
+
onClick: onContactUsClick
|
|
698
|
+
}, "Contact Us")), /*#__PURE__*/React.createElement("div", {
|
|
699
|
+
className: "side-nav__menu-item",
|
|
700
|
+
key: "my-account"
|
|
701
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
702
|
+
type: "button",
|
|
703
|
+
className: "side-nav__sub-link",
|
|
704
|
+
onClick: onAccountClick
|
|
705
|
+
}, "My Account")), /*#__PURE__*/React.createElement("div", {
|
|
706
|
+
className: "side-nav__menu-item",
|
|
707
|
+
key: "my-cart"
|
|
708
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
709
|
+
type: "button",
|
|
710
|
+
className: "side-nav__sub-link",
|
|
711
|
+
onClick: onCartClick
|
|
712
|
+
}, "My Cart")), /*#__PURE__*/React.createElement(CurrencySelect, {
|
|
713
|
+
key: "currency",
|
|
714
|
+
currency: currency,
|
|
715
|
+
currencyOptions: currencyOptions,
|
|
716
|
+
onCurrencyChange: onCurrencyChange,
|
|
717
|
+
isCurrencySelectionDisabled: isCurrencySelectionDisabled,
|
|
718
|
+
tooltipContent: tooltipContent
|
|
719
|
+
}))), renderDropdownLinks(), displayedSubMenu === 'stores' && /*#__PURE__*/React.createElement("div", {
|
|
720
|
+
className: "side-nav__content"
|
|
721
|
+
}, /*#__PURE__*/React.createElement(StoresDropdown, {
|
|
722
|
+
key: "stores",
|
|
723
|
+
backIcon: backIcon,
|
|
724
|
+
onBackClick: onBackClick,
|
|
725
|
+
stores: stores,
|
|
726
|
+
onContactUsClick: onContactUsClick
|
|
727
|
+
})));
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
export default LuxitySideNav;
|