@axos-web-dev/shared-components 2.0.0-dev.22 → 2.0.0-dev.22-nav-3
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/dist/ATMLocator/ATMLocator.js +4 -3
- package/dist/Accordion/Accordion.js +3 -1
- package/dist/AlertBanner/index.js +3 -1
- package/dist/Auth/ErrorAlert.js +4 -3
- package/dist/BulletItem/BulletItem.js +3 -1
- package/dist/Button/Button.js +4 -3
- package/dist/Calculators/AxosOneCalculator/index.js +3 -1
- package/dist/Calculators/BalanceAPYCalculator/index.js +3 -1
- package/dist/Calculators/Calculator.js +4 -3
- package/dist/Calculators/MarginTradingCalculator/index.js +4 -3
- package/dist/Calculators/SummitApyCalculator/index.js +3 -1
- package/dist/Carousel/index.js +3 -2
- package/dist/Chat/Chat.d.ts +4 -0
- package/dist/Chat/Chat.js +13 -0
- package/dist/Chat/index.d.ts +1 -0
- package/dist/Chat/index.js +5 -0
- package/dist/Chevron/index.js +4 -3
- package/dist/CollectInformationAlert/index.js +3 -1
- package/dist/Comparison/Comparison.css.js +3 -2
- package/dist/Comparison/Comparison.js +4 -3
- package/dist/DownloadTile/index.js +6 -0
- package/dist/ExecutiveBio/ExecutiveBio.js +4 -3
- package/dist/FaqAccordion/index.js +4 -3
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.js +3 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +4 -3
- package/dist/Forms/ApplicationStart.js +3 -1
- package/dist/Forms/ApplyNow.js +4 -3
- package/dist/Forms/BoatMooringLocation.js +3 -1
- package/dist/Forms/ClearingForm.js +3 -1
- package/dist/Forms/CommercialDeposits.js +3 -1
- package/dist/Forms/CommercialDepositsNoLendingOption.js +3 -1
- package/dist/Forms/CommercialLending.js +3 -1
- package/dist/Forms/CommercialPremiumFinance.js +3 -1
- package/dist/Forms/ConstructionLendingDynamic.js +3 -1
- package/dist/Forms/ContactCompany.js +3 -1
- package/dist/Forms/ContactCompanyTitle.js +3 -1
- package/dist/Forms/ContactUs.js +3 -1
- package/dist/Forms/ContactUsAAS.js +3 -1
- package/dist/Forms/ContactUsBusiness.js +4 -3
- package/dist/Forms/ContactUsBusinessNameEmail.js +4 -3
- package/dist/Forms/ContactUsLVF.js +3 -1
- package/dist/Forms/ContactUsNMLSId.js +4 -3
- package/dist/Forms/CpraRequest.js +4 -3
- package/dist/Forms/CraPublicFile.js +4 -3
- package/dist/Forms/DealerServices.js +3 -1
- package/dist/Forms/EmailOnly.js +4 -3
- package/dist/Forms/EmailUs.js +3 -1
- package/dist/Forms/MortgageRate/MortgageRateForm.js +4 -3
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +3 -2
- package/dist/Forms/MortgageWarehouseLending.js +4 -3
- package/dist/Forms/QuickPricer/QuickPricerForm.js +3 -1
- package/dist/Forms/ScheduleCall.js +3 -1
- package/dist/Forms/ScheduleCallPremier.js +3 -1
- package/dist/Forms/SuccesForm.js +3 -2
- package/dist/Forms/WcplSurvey.js +3 -1
- package/dist/HeroBanner/HeroBanner.js +4 -2
- package/dist/HeroBanner/LargeHeroBanner.js +3 -1
- package/dist/Hyperlink/index.js +4 -3
- package/dist/ImageBillboard/ImageBillboard.js +3 -1
- package/dist/ImageBillboard/ImageBillboardSet.js +3 -2
- package/dist/ImageLink/ImageLink.js +4 -3
- package/dist/ImageLink/ImageLinkSet.js +3 -2
- package/dist/ImageLink/index.js +4 -3
- package/dist/Insight/Featured/CategorySelector.js +3 -2
- package/dist/Insight/Featured/Featured.js +3 -2
- package/dist/Insight/Featured/Header.js +3 -2
- package/dist/Modal/Modal.js +4 -3
- package/dist/Modal/contextApi/store.js +1 -1
- package/dist/NavigationMenu/AxosALTS/index.js +4 -3
- package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
- package/dist/NavigationMenu/AxosBank/DropwdownButton.d.ts +7 -0
- package/dist/NavigationMenu/AxosBank/DropwdownButton.js +238 -0
- package/dist/NavigationMenu/AxosBank/Menu.d.ts +37 -0
- package/dist/NavigationMenu/AxosBank/Menu.js +253 -0
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.d.ts +12 -1
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +180 -160
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +36 -269
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +54 -484
- package/dist/NavigationMenu/AxosBank/MobileMenu/mobileReducer.d.ts +36 -0
- package/dist/NavigationMenu/AxosBank/MobileMenu/mobileReducer.js +105 -0
- package/dist/NavigationMenu/AxosBank/NavBar.module.js +42 -39
- package/dist/NavigationMenu/AxosBank/SubNavBar.d.ts +6 -1
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +116 -3085
- package/dist/NavigationMenu/AxosBank/SubNavItem.d.ts +1 -0
- package/dist/NavigationMenu/AxosBank/SubNavItem.js +313 -0
- package/dist/NavigationMenu/AxosBank/index.d.ts +6 -4
- package/dist/NavigationMenu/AxosBank/index.js +85 -362
- package/dist/NavigationMenu/LaVictoire/index.js +4 -3
- package/dist/NavigationMenu/NavItem/index.js +137 -1
- package/dist/NavigationMenu/Navbar.d.ts +4 -1
- package/dist/NavigationMenu/Navbar.js +5 -4
- package/dist/NavigationMenu/SignInNavButton.js +3 -2
- package/dist/NavigationMenu/utils.d.ts +465 -0
- package/dist/NavigationMenu/utils.js +112 -0
- package/dist/Pagination/Pagination.js +3 -1
- package/dist/SetContainer/SetContainer.js +4 -3
- package/dist/SocialMediaBar/iconsRepository.js +4 -3
- package/dist/Table/Table.js +3 -1
- package/dist/VideoTile/VideoTile.js +4 -3
- package/dist/VideoWrapper/index.js +4 -3
- package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +116 -116
- package/dist/assets/NavigationMenu/AxosBank/NavBar.css +125 -87
- package/dist/icons/Logos/AXOS.js +49 -7
- package/dist/utils/allowedAxosDomains.js +0 -12
- package/package.json +1 -1
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useRef, useMemo, useEffect } from "react";
|
|
4
3
|
import { AnimatePresence, motion } from "framer-motion";
|
|
5
|
-
import { usePathname } from "next/navigation.js";
|
|
6
4
|
import Link from "next/link.js";
|
|
7
|
-
import {
|
|
5
|
+
import { usePathname } from "next/navigation.js";
|
|
6
|
+
import { useRef, useState, useReducer, useEffect } from "react";
|
|
7
|
+
import { useClickAway } from "react-use";
|
|
8
|
+
import { mobileData } from "./MobileNavData.js";
|
|
9
|
+
import { MenuActions, reducer } from "./mobileReducer.js";
|
|
8
10
|
import styles from "./MobileMenu.module.js";
|
|
9
11
|
import "../../../Chevron/Chevron.css.js";
|
|
10
12
|
import "../../../Accordion/Accordion.js";
|
|
11
13
|
import "../../../Accordion/Accordion.css.js";
|
|
12
14
|
import "../../../icons/ArrowIcon/ArrowIcon.css.js";
|
|
13
15
|
import "../../../icons/CheckIcon/CheckIcon.css.js";
|
|
14
|
-
import '../../../assets/Modal/Modal.css';import '../../../assets/VideoWrapper/VideoWrapper.css';import '../../../assets/TopicalNavSet/TopicalNavSet.css';import '../../../assets/TopicalNavItem/TopicalNavItem.css';import '../../../assets/Topic/Topic.css';import '../../../assets/TextBlock/TextBlock.css';import '../../../assets/SocialMediaBar/SocialMediaBar.css';import '../../../assets/SecondaryFooter/SecondaryFooter.css';import '../../../assets/Pagination/Pagination.css';import '../../../assets/PageNavSet/PageNavigationSet.css';import '../../../assets/NavigationMenu/LaVictoire/NavBar2.css';import '../../../assets/NavigationMenu/AxosALTS/NavBar2.css';import '../../../assets/NavigationMenu/AxosClearing/NavBar2.css';import '../../../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../../../assets/NavigationMenu/
|
|
16
|
+
import '../../../assets/Modal/Modal.css';import '../../../assets/VideoWrapper/VideoWrapper.css';import '../../../assets/TopicalNavSet/TopicalNavSet.css';import '../../../assets/TopicalNavItem/TopicalNavItem.css';import '../../../assets/Topic/Topic.css';import '../../../assets/TextBlock/TextBlock.css';import '../../../assets/SocialMediaBar/SocialMediaBar.css';import '../../../assets/SecondaryFooter/SecondaryFooter.css';import '../../../assets/Pagination/Pagination.css';import '../../../assets/PageNavSet/PageNavigationSet.css';import '../../../assets/NavigationMenu/LaVictoire/NavBar2.css';import '../../../assets/NavigationMenu/AxosALTS/NavBar2.css';import '../../../assets/NavigationMenu/AxosClearing/NavBar2.css';import '../../../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../../../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../../../assets/NavigationMenu/AxosAdvisorServices/NavBar2.css';import '../../../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../../../assets/NavigationMenu/AxosAdvisor/NavBar2.css';import '../../../assets/Insight/Featured/Header.css';import '../../../assets/Insight/Featured/CategorySelector.css';import '../../../assets/Insight/Featured/Featured.css';import '../../../assets/ImageLink/ImageLink.css';import '../../../assets/VideoTile/VideoTile.css';import '../../../assets/HelpArticle/HelpArticle.css';import '../../../assets/FooterSiteMap/AxosBank/FooterSiteMap.css';import '../../../assets/FooterDisclosure/LVF/LaVictorieFooter.css';import '../../../assets/DownloadTile/DownloadTile.css';import '../../../assets/CollectInformationAlert/CollectInformationAlert.css';import '../../../assets/Chatbot/ChatWindow.css';import '../../../assets/Chatbot/Bubble.css';import '../../../assets/Chatbot/Chatbot.css';import '../../../assets/Chatbot/AnimatedGradientBorder.css';import '../../../assets/CallToActionBar/CallToActionBar.css';import '../../../assets/Insight/Insight.css';import '../../../assets/AwardsItem/AwardsItem.css';import '../../../assets/AwardsBanner/AwardsBanner.css';import '../../../assets/Auth/SignIn.css';import '../../../assets/Auth/ErrorAlert.css';import '../../../assets/Calculators/MarginTradingCalculator/MarginTradingCalculator.css';import '../../../assets/Forms/QuickPricer/UserInformation.css';import '../../../assets/Forms/QuickPricer/QuickPricerResults.css';import '../../../assets/BulletItem/BulletItem.css';import '../../../assets/NavigationMenu/AxosBank/NavBar2.css';import '../../../assets/Typography/Typography.css';import '../../../assets/icons/FollowIcon/FollowIcon.css';import '../../../assets/icons/DownloadIcon/DownloadIcon.css';import '../../../assets/themes/victorie.css';import '../../../assets/themes/ufb.css';import '../../../assets/themes/premier.css';import '../../../assets/themes/axos.css';/* empty css */
|
|
15
17
|
/* empty css */
|
|
16
18
|
/* empty css */
|
|
17
19
|
/* empty css */
|
|
18
20
|
/* empty css */
|
|
19
21
|
/* empty css */
|
|
22
|
+
/* empty css */
|
|
23
|
+
/* empty css */
|
|
20
24
|
import "clsx";
|
|
21
25
|
import "../../../AlertBanner/AlertBanner.css.js";
|
|
22
26
|
import "../../../Article/Article.css.js";
|
|
23
27
|
import "../../../IconBillboard/IconBillboard.css.js";
|
|
24
28
|
/* empty css */
|
|
25
|
-
/* empty css */
|
|
26
29
|
import "../../../Interstitial/Interstitial-variants.css.js";
|
|
27
30
|
import "../../../Button/Button.css.js";
|
|
28
|
-
import "react-use";
|
|
29
31
|
import "../../../ArticlesSet/ArticlesSet.css.js";
|
|
30
32
|
import "../../../Calculators/calculator.css.js";
|
|
31
33
|
import "../../../Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js";
|
|
@@ -109,7 +111,7 @@ import "../../../LandingPageHeader/LandingPageHeader.css.js";
|
|
|
109
111
|
/* empty css */
|
|
110
112
|
/* empty css */
|
|
111
113
|
/* empty css */
|
|
112
|
-
|
|
114
|
+
import "../Menu.js";
|
|
113
115
|
/* empty css */
|
|
114
116
|
/* empty css */
|
|
115
117
|
/* empty css */
|
|
@@ -146,30 +148,43 @@ const slideVariants = {
|
|
|
146
148
|
position: "absolute"
|
|
147
149
|
})
|
|
148
150
|
};
|
|
149
|
-
const
|
|
151
|
+
const initialState = {
|
|
152
|
+
direction: "forward",
|
|
153
|
+
isMobileMenuOpen: false,
|
|
154
|
+
hasOpenedOnce: false,
|
|
155
|
+
prevLevel: [],
|
|
156
|
+
currentMenuData: null,
|
|
157
|
+
stack: [],
|
|
158
|
+
loginDrawer: false,
|
|
159
|
+
loginData: {}
|
|
160
|
+
};
|
|
161
|
+
const MobileDrawerMenu = ({ menu }) => {
|
|
150
162
|
const pathname = usePathname();
|
|
151
|
-
const { resolveUrl } = useGlobalContext();
|
|
152
|
-
const menuData = getMenuData(resolveUrl);
|
|
153
|
-
const [queryString, setQueryString] = useState("");
|
|
154
|
-
const [open, setOpen] = useState(false);
|
|
155
|
-
const [stack, setStack] = useState([
|
|
156
|
-
{ title: "Main Menu", items: menuData }
|
|
157
|
-
]);
|
|
158
|
-
const [hasOpenedOnce, setHasOpenedOnce] = useState(false);
|
|
159
|
-
const [direction, setDirection] = useState("forward");
|
|
160
|
-
const [quickLinks, setQuickLinks] = useState([]);
|
|
161
|
-
const [loginDrawerOpen, setLoginDrawerOpen] = useState(false);
|
|
162
163
|
const drawerRef = useRef(null);
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
const loginRef = useRef(null);
|
|
165
|
+
useClickAway(drawerRef, () => {
|
|
166
|
+
dispatch({ type: MenuActions.SET_MOBILE_MENU_CLOSED, payload: {} });
|
|
167
|
+
});
|
|
168
|
+
useClickAway(loginRef, () => {
|
|
169
|
+
dispatch({ type: MenuActions.SET_LOGIN_MENU_CLOSED, payload: {} });
|
|
170
|
+
});
|
|
171
|
+
const [queryString, setQueryString] = useState("");
|
|
172
|
+
const [stack, dispatch] = useReducer(reducer, initialState);
|
|
173
|
+
const { resolveUrl } = useGlobalContext();
|
|
174
|
+
useEffect(() => {
|
|
175
|
+
const menuProcessed = mobileData(menu, resolveUrl);
|
|
176
|
+
dispatch({
|
|
177
|
+
type: MenuActions.INIT,
|
|
178
|
+
payload: {
|
|
179
|
+
currentMenuData: menuProcessed,
|
|
180
|
+
stack: [{ title: "Menu", items: menuProcessed }],
|
|
181
|
+
quickLinks: menu?.quickLinks
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}, [menu, resolveUrl]);
|
|
167
185
|
useEffect(() => {
|
|
168
186
|
if (!pathname) return;
|
|
169
|
-
|
|
170
|
-
const links = getQuickLinks(pathnameParts, resolveUrl);
|
|
171
|
-
setQuickLinks(links);
|
|
172
|
-
}, [pathname, resolveUrl]);
|
|
187
|
+
}, [pathname]);
|
|
173
188
|
useEffect(() => {
|
|
174
189
|
if (typeof window !== "undefined") {
|
|
175
190
|
const search = window.location.search;
|
|
@@ -179,71 +194,33 @@ const MobileDrawerMenu = () => {
|
|
|
179
194
|
}
|
|
180
195
|
}, []);
|
|
181
196
|
const handleClick = (key) => {
|
|
182
|
-
|
|
183
|
-
if (typeof item === "object") {
|
|
184
|
-
setDirection("forward");
|
|
185
|
-
setStack((prev) => [...prev, { title: key, items: item }]);
|
|
186
|
-
}
|
|
197
|
+
dispatch({ type: MenuActions.ADD_TO_STACK, payload: key });
|
|
187
198
|
};
|
|
188
199
|
const handleBack = () => {
|
|
189
|
-
if (stack.length > 1) {
|
|
190
|
-
|
|
191
|
-
setStack((prev) => prev.slice(0, -1));
|
|
200
|
+
if (stack.stack.length > 1) {
|
|
201
|
+
dispatch({ type: MenuActions.REMOVE_FROM_STACK, payload: {} });
|
|
192
202
|
}
|
|
193
203
|
};
|
|
194
204
|
const handleToggle = () => {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
if (isOpening && !hasOpenedOnce) {
|
|
198
|
-
setHasOpenedOnce(true);
|
|
199
|
-
setStack([{ title: "Menu", items: menuData }]);
|
|
200
|
-
}
|
|
201
|
-
return isOpening;
|
|
202
|
-
});
|
|
205
|
+
dispatch({ type: MenuActions.SET_HAS_OPENED_ONCE, payload: {} });
|
|
206
|
+
dispatch({ type: MenuActions.SET_MOBILE_MENU_OPEN, payload: {} });
|
|
203
207
|
};
|
|
204
|
-
const handleLoginDrawerOpen = () =>
|
|
205
|
-
|
|
206
|
-
const handleLoginDrawerOutsideClick = (e) => {
|
|
207
|
-
if (loginDrawerRef.current && !loginDrawerRef.current.contains(e.target)) {
|
|
208
|
-
setLoginDrawerOpen(false);
|
|
209
|
-
}
|
|
208
|
+
const handleLoginDrawerOpen = () => {
|
|
209
|
+
dispatch({ type: MenuActions.SET_LOGIN_MENU_OPEN, payload: {} });
|
|
210
210
|
};
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
setOpen(false);
|
|
214
|
-
}
|
|
211
|
+
const handleLoginDrawerClose = () => {
|
|
212
|
+
dispatch({ type: MenuActions.SET_LOGIN_MENU_CLOSED, payload: {} });
|
|
215
213
|
};
|
|
216
|
-
useEffect(() => {
|
|
217
|
-
if (open) {
|
|
218
|
-
document.addEventListener("mousedown", handleOutsideClick);
|
|
219
|
-
} else {
|
|
220
|
-
document.removeEventListener("mousedown", handleOutsideClick);
|
|
221
|
-
}
|
|
222
|
-
return () => document.removeEventListener("mousedown", handleOutsideClick);
|
|
223
|
-
}, [open]);
|
|
224
214
|
useEffect(() => {
|
|
225
215
|
const onEsc = (e) => {
|
|
226
|
-
if (e.key === "Escape")
|
|
216
|
+
if (e.key === "Escape")
|
|
217
|
+
dispatch({ type: MenuActions.SET_MOBILE_MENU_CLOSED, payload: {} });
|
|
227
218
|
};
|
|
228
|
-
if (
|
|
219
|
+
if (stack.isMobileMenuOpen) {
|
|
229
220
|
document.addEventListener("keydown", onEsc);
|
|
230
221
|
}
|
|
231
222
|
return () => document.removeEventListener("keydown", onEsc);
|
|
232
|
-
}, [
|
|
233
|
-
useEffect(() => {
|
|
234
|
-
if (!loginDrawerOpen) return;
|
|
235
|
-
document.addEventListener("mousedown", handleLoginDrawerOutsideClick);
|
|
236
|
-
return () => document.removeEventListener("mousedown", handleLoginDrawerOutsideClick);
|
|
237
|
-
}, [loginDrawerOpen]);
|
|
238
|
-
useEffect(() => {
|
|
239
|
-
const onEsc = (e) => {
|
|
240
|
-
if (e.key === "Escape") setLoginDrawerOpen(false);
|
|
241
|
-
};
|
|
242
|
-
if (loginDrawerOpen) {
|
|
243
|
-
document.addEventListener("keydown", onEsc);
|
|
244
|
-
}
|
|
245
|
-
return () => document.removeEventListener("keydown", onEsc);
|
|
246
|
-
}, [loginDrawerOpen]);
|
|
223
|
+
}, [stack.isMobileMenuOpen]);
|
|
247
224
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
248
225
|
/* @__PURE__ */ jsxs("div", { className: styles.mobileNavRow, children: [
|
|
249
226
|
/* @__PURE__ */ jsx(
|
|
@@ -285,7 +262,7 @@ const MobileDrawerMenu = () => {
|
|
|
285
262
|
}
|
|
286
263
|
)
|
|
287
264
|
] }),
|
|
288
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children:
|
|
265
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: stack.isMobileMenuOpen && /* @__PURE__ */ jsx(
|
|
289
266
|
motion.div,
|
|
290
267
|
{
|
|
291
268
|
className: styles.overlay,
|
|
@@ -308,7 +285,7 @@ const MobileDrawerMenu = () => {
|
|
|
308
285
|
children: [
|
|
309
286
|
/* @__PURE__ */ jsx("p", { id: "menu-description", className: styles.sr_only, children: "Use tab to navigate this menu. Press Escape to close." }),
|
|
310
287
|
/* @__PURE__ */ jsxs("div", { className: styles.header, children: [
|
|
311
|
-
stack.length > 1 ? /* @__PURE__ */ jsxs(
|
|
288
|
+
stack.stack?.length > 1 ? /* @__PURE__ */ jsxs(
|
|
312
289
|
"button",
|
|
313
290
|
{
|
|
314
291
|
onClick: handleBack,
|
|
@@ -333,7 +310,7 @@ const MobileDrawerMenu = () => {
|
|
|
333
310
|
)
|
|
334
311
|
}
|
|
335
312
|
),
|
|
336
|
-
/* @__PURE__ */ jsx("span", { className: styles.prevlevel, children: prevLevel
|
|
313
|
+
/* @__PURE__ */ jsx("span", { className: styles.prevlevel, children: stack.prevLevel?.title })
|
|
337
314
|
]
|
|
338
315
|
}
|
|
339
316
|
) : /* @__PURE__ */ jsx(
|
|
@@ -386,7 +363,7 @@ const MobileDrawerMenu = () => {
|
|
|
386
363
|
className: `${styles.level} flex middle`,
|
|
387
364
|
"aria-label": "current menu level",
|
|
388
365
|
children: [
|
|
389
|
-
/* @__PURE__ */ jsx("h2", { className: styles.levelTitle, id: "menu-level", children:
|
|
366
|
+
/* @__PURE__ */ jsx("h2", { className: styles.levelTitle, id: "menu-level", children: stack.currentMenuData?.title }),
|
|
390
367
|
/* @__PURE__ */ jsx(
|
|
391
368
|
"svg",
|
|
392
369
|
{
|
|
@@ -411,75 +388,81 @@ const MobileDrawerMenu = () => {
|
|
|
411
388
|
/* @__PURE__ */ jsx("nav", { "aria-label": "main navigation menu", children: /* @__PURE__ */ jsx(
|
|
412
389
|
AnimatePresence,
|
|
413
390
|
{
|
|
414
|
-
custom: direction,
|
|
391
|
+
custom: stack.direction,
|
|
415
392
|
mode: "sync",
|
|
416
393
|
initial: false,
|
|
417
|
-
children: /* @__PURE__ */
|
|
394
|
+
children: /* @__PURE__ */ jsxs(
|
|
418
395
|
motion.ul,
|
|
419
396
|
{
|
|
420
397
|
className: styles.menu,
|
|
421
|
-
custom: direction,
|
|
398
|
+
custom: stack.direction,
|
|
422
399
|
variants: slideVariants,
|
|
423
400
|
initial: "enter",
|
|
424
401
|
animate: "center",
|
|
425
402
|
exit: "exit",
|
|
426
403
|
transition: { duration: 0.3, ease: "linear" },
|
|
427
|
-
children:
|
|
428
|
-
stack.length
|
|
429
|
-
Object.entries(currentLevel.items).filter(
|
|
430
|
-
([k]) => k !== "Log in"
|
|
431
|
-
)
|
|
432
|
-
) : currentLevel.items
|
|
433
|
-
).map(([key, value]) => {
|
|
434
|
-
const hasChildren = typeof value === "object";
|
|
435
|
-
return /* @__PURE__ */ jsx("li", { children: hasChildren ? /* @__PURE__ */ jsxs(
|
|
436
|
-
"button",
|
|
437
|
-
{
|
|
438
|
-
className: styles.menuItem,
|
|
439
|
-
onClick: () => handleClick(key),
|
|
440
|
-
"aria-label": `open submenu for ${key}`,
|
|
441
|
-
children: [
|
|
442
|
-
/* @__PURE__ */ jsx("span", { children: key }),
|
|
443
|
-
/* @__PURE__ */ jsx("span", { className: styles.chevron, children: /* @__PURE__ */ jsx(
|
|
444
|
-
"svg",
|
|
445
|
-
{
|
|
446
|
-
className: styles.chevronIcon,
|
|
447
|
-
width: 12,
|
|
448
|
-
height: 20,
|
|
449
|
-
viewBox: "0 0 12 20",
|
|
450
|
-
fill: "none",
|
|
451
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
452
|
-
children: /* @__PURE__ */ jsx(
|
|
453
|
-
"path",
|
|
454
|
-
{
|
|
455
|
-
d: "M1.76378 0.46875L11.2941 9.99908L1.76378 19.5294L0.703125 18.4687L9.17295 9.99908L0.703125 1.52941L1.76378 0.46875Z",
|
|
456
|
-
fill: "#4A5560"
|
|
457
|
-
}
|
|
458
|
-
)
|
|
459
|
-
}
|
|
460
|
-
) })
|
|
461
|
-
]
|
|
462
|
-
}
|
|
463
|
-
) : /* @__PURE__ */ jsx(
|
|
404
|
+
children: [
|
|
405
|
+
stack.stack.length > 1 && !stack.currentMenuData?.dropdown && /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
464
406
|
Link,
|
|
465
407
|
{
|
|
466
|
-
href:
|
|
408
|
+
href: stack.currentMenuData.url + (queryString && !stack.currentMenuData.url.includes("?") ? `?${queryString}` : ""),
|
|
467
409
|
className: styles.menuItem,
|
|
468
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ jsxs("span", { children: [
|
|
411
|
+
stack.currentMenuData.title,
|
|
412
|
+
" Home"
|
|
413
|
+
] })
|
|
469
414
|
}
|
|
470
|
-
) },
|
|
471
|
-
|
|
415
|
+
) }),
|
|
416
|
+
stack?.currentMenuData?.items?.map((item) => {
|
|
417
|
+
const hasChildren = item.items && item.items.length > 0;
|
|
418
|
+
return hasChildren ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
419
|
+
"button",
|
|
420
|
+
{
|
|
421
|
+
className: styles.menuItem,
|
|
422
|
+
onClick: () => handleClick(item),
|
|
423
|
+
children: [
|
|
424
|
+
/* @__PURE__ */ jsx("span", { children: item.label }),
|
|
425
|
+
/* @__PURE__ */ jsx("span", { className: styles.chevron, children: /* @__PURE__ */ jsx(
|
|
426
|
+
"svg",
|
|
427
|
+
{
|
|
428
|
+
className: styles.chevronIcon,
|
|
429
|
+
width: 12,
|
|
430
|
+
height: 20,
|
|
431
|
+
viewBox: "0 0 12 20",
|
|
432
|
+
fill: "none",
|
|
433
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
434
|
+
children: /* @__PURE__ */ jsx(
|
|
435
|
+
"path",
|
|
436
|
+
{
|
|
437
|
+
d: "M1.76378 0.46875L11.2941 9.99908L1.76378 19.5294L0.703125 18.4687L9.17295 9.99908L0.703125 1.52941L1.76378 0.46875Z",
|
|
438
|
+
fill: "#4A5560"
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
}
|
|
442
|
+
) })
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
) }, item.id + "1") : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
446
|
+
Link,
|
|
447
|
+
{
|
|
448
|
+
href: item?.url + (queryString && !item?.url?.includes("?") ? `?${queryString}` : ""),
|
|
449
|
+
className: styles.menuItem,
|
|
450
|
+
children: /* @__PURE__ */ jsx("span", { children: item.label })
|
|
451
|
+
}
|
|
452
|
+
) }, item.id);
|
|
453
|
+
})
|
|
454
|
+
]
|
|
472
455
|
},
|
|
473
|
-
|
|
456
|
+
stack.currentMenuData?.title
|
|
474
457
|
)
|
|
475
458
|
}
|
|
476
459
|
) }),
|
|
477
|
-
/* @__PURE__ */ jsx("div", { className: `${styles.quickLinks} flex middle between`, children: quickLinks
|
|
460
|
+
/* @__PURE__ */ jsx("div", { className: `${styles.quickLinks} flex middle between`, children: stack.quickLinks?.map((link) => /* @__PURE__ */ jsxs(
|
|
478
461
|
"a",
|
|
479
462
|
{
|
|
480
|
-
href: link.url + (queryString && !link.url.includes("?") ? `?${queryString}` : ""),
|
|
463
|
+
href: resolveUrl(link.url) + (queryString && !link.url.includes("?") ? `?${queryString}` : ""),
|
|
481
464
|
className: `${styles.quickLink} flex_col middle`,
|
|
482
|
-
"aria-label":
|
|
465
|
+
"aria-label": link.ariaLabel,
|
|
483
466
|
children: [
|
|
484
467
|
/* @__PURE__ */ jsx(
|
|
485
468
|
"img",
|
|
@@ -491,10 +474,10 @@ const MobileDrawerMenu = () => {
|
|
|
491
474
|
loading: "lazy"
|
|
492
475
|
}
|
|
493
476
|
),
|
|
494
|
-
/* @__PURE__ */ jsx("span", { children: link.
|
|
477
|
+
/* @__PURE__ */ jsx("span", { children: link.label })
|
|
495
478
|
]
|
|
496
479
|
},
|
|
497
|
-
link.
|
|
480
|
+
link.id
|
|
498
481
|
)) })
|
|
499
482
|
] }) })
|
|
500
483
|
]
|
|
@@ -502,7 +485,7 @@ const MobileDrawerMenu = () => {
|
|
|
502
485
|
)
|
|
503
486
|
}
|
|
504
487
|
) }),
|
|
505
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children:
|
|
488
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: stack.loginDrawer && /* @__PURE__ */ jsx(
|
|
506
489
|
motion.div,
|
|
507
490
|
{
|
|
508
491
|
className: styles.overlay,
|
|
@@ -513,7 +496,7 @@ const MobileDrawerMenu = () => {
|
|
|
513
496
|
motion.div,
|
|
514
497
|
{
|
|
515
498
|
className: `${styles.drawer} flex_col`,
|
|
516
|
-
ref:
|
|
499
|
+
ref: loginRef,
|
|
517
500
|
initial: { x: "100%" },
|
|
518
501
|
animate: { x: 0 },
|
|
519
502
|
exit: { x: "100%" },
|
|
@@ -568,37 +551,74 @@ const MobileDrawerMenu = () => {
|
|
|
568
551
|
}
|
|
569
552
|
)
|
|
570
553
|
] }),
|
|
571
|
-
/* @__PURE__ */ jsx("div", { className: styles.loginDrawerContent, children: /* @__PURE__ */ jsx("div", { className: styles.loginAccordion, children: /* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ jsx("div", { className: styles.loginDrawerContent, children: /* @__PURE__ */ jsx("div", { className: styles.loginAccordion, children: /* @__PURE__ */ jsxs(
|
|
572
555
|
"ul",
|
|
573
556
|
{
|
|
574
557
|
className: styles.loginAccordionList,
|
|
575
558
|
"aria-label": "Login options",
|
|
576
|
-
children:
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
children: /* @__PURE__ */ jsx(
|
|
588
|
-
Link,
|
|
559
|
+
children: [
|
|
560
|
+
stack.loginData?.items?.filter((item) => item.items)?.map((group) => {
|
|
561
|
+
return /* @__PURE__ */ jsxs(
|
|
562
|
+
"li",
|
|
563
|
+
{
|
|
564
|
+
className: styles.loginAccordionGroup,
|
|
565
|
+
"aria-label": `${group?.label} login options`,
|
|
566
|
+
children: [
|
|
567
|
+
/* @__PURE__ */ jsx("span", { className: styles.loginAccordionHeading, children: group.label }),
|
|
568
|
+
/* @__PURE__ */ jsx("ul", { className: styles.loginAccordionGroupList, children: group.items?.map((item) => /* @__PURE__ */ jsx(
|
|
569
|
+
"li",
|
|
589
570
|
{
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
571
|
+
"aria-label": `access ${item.label}`,
|
|
572
|
+
children: /* @__PURE__ */ jsx(
|
|
573
|
+
"a",
|
|
574
|
+
{
|
|
575
|
+
href: item.url + (queryString && !item.url.includes("?") ? `?${queryString}` : ""),
|
|
576
|
+
className: styles.menuItem,
|
|
577
|
+
children: /* @__PURE__ */ jsx("span", { children: item.label })
|
|
578
|
+
}
|
|
579
|
+
)
|
|
580
|
+
},
|
|
581
|
+
item.id
|
|
582
|
+
)) })
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
group?.id
|
|
586
|
+
);
|
|
587
|
+
}),
|
|
588
|
+
/* @__PURE__ */ jsxs(
|
|
589
|
+
"li",
|
|
590
|
+
{
|
|
591
|
+
className: styles.loginAccordionGroup,
|
|
592
|
+
children: [
|
|
593
|
+
/* @__PURE__ */ jsx("span", { className: styles.loginAccordionHeading }),
|
|
594
|
+
stack.loginData?.items.filter((item) => !item.items).map((group) => {
|
|
595
|
+
return /* @__PURE__ */ jsx(
|
|
596
|
+
"ul",
|
|
597
|
+
{
|
|
598
|
+
className: styles.loginAccordionGroupList,
|
|
599
|
+
children: /* @__PURE__ */ jsx(
|
|
600
|
+
"li",
|
|
601
|
+
{
|
|
602
|
+
"aria-label": `access ${group.label}`,
|
|
603
|
+
children: /* @__PURE__ */ jsx(
|
|
604
|
+
"a",
|
|
605
|
+
{
|
|
606
|
+
href: group.url + (queryString && !group.url.includes("?") ? `?${queryString}` : ""),
|
|
607
|
+
className: styles.menuItem,
|
|
608
|
+
children: /* @__PURE__ */ jsx("span", { children: group.label })
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
},
|
|
612
|
+
group.id
|
|
613
|
+
)
|
|
614
|
+
},
|
|
615
|
+
group.id
|
|
616
|
+
);
|
|
617
|
+
})
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
)
|
|
621
|
+
]
|
|
602
622
|
}
|
|
603
623
|
) }) })
|
|
604
624
|
]
|