@axos-web-dev/shared-components 2.0.0-dev.2 → 2.0.0-dev.2-nav-0

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.
Files changed (88) hide show
  1. package/dist/ATMLocator/ATMLocator.js +2 -1
  2. package/dist/Accordion/Accordion.js +3 -3
  3. package/dist/AlertBanner/index.js +1 -1
  4. package/dist/Article/Article.js +1 -1
  5. package/dist/Auth/ErrorAlert.js +2 -1
  6. package/dist/Button/Button.js +2 -1
  7. package/dist/Calculators/AnnualFeeCalculator/index.js +1 -1
  8. package/dist/Calculators/ApyCalculator/index.js +1 -1
  9. package/dist/Calculators/BuyDownCalculator/index.js +1 -1
  10. package/dist/Calculators/Calculator.js +2 -1
  11. package/dist/Calculators/MarginTradingCalculator/index.js +3 -2
  12. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +1 -1
  13. package/dist/Calculators/MaxLoanCalculator/index.js +1 -1
  14. package/dist/Calculators/MonthlyPaymentCalculator/index.js +1 -1
  15. package/dist/Calculators/MonthlyPaymentLVFCalculator/index.js +1 -1
  16. package/dist/Carousel/index.js +3 -2
  17. package/dist/Chevron/index.js +2 -1
  18. package/dist/Comparison/Comparison.js +2 -1
  19. package/dist/ContentBanner/index.js +1 -1
  20. package/dist/ExecutiveBio/ExecutiveBio.js +3 -2
  21. package/dist/ExecutiveBio/ExecutiveBioSet.js +1 -1
  22. package/dist/FaqAccordion/index.js +3 -2
  23. package/dist/FooterDisclosure/FooterDisclosure.js +1 -1
  24. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +2 -1
  25. package/dist/Forms/ApplyNow.js +2 -1
  26. package/dist/Forms/ContactUsBusiness.js +2 -1
  27. package/dist/Forms/ContactUsBusinessNameEmail.js +2 -1
  28. package/dist/Forms/ContactUsNMLSId.js +2 -1
  29. package/dist/Forms/CpraRequest.js +2 -1
  30. package/dist/Forms/CraPublicFile.js +2 -1
  31. package/dist/Forms/EmailOnly.js +2 -1
  32. package/dist/Forms/MortgageRate/MortgageRateForm.js +3 -2
  33. package/dist/Forms/MortgageRate/MortgageRateWatch.js +2 -1
  34. package/dist/Forms/MortgageWarehouseLending.js +2 -1
  35. package/dist/Forms/SuccesForm.js +2 -1
  36. package/dist/HeroBanner/HeroBanner.js +2 -2
  37. package/dist/Hyperlink/index.js +2 -1
  38. package/dist/IconBillboard/IconBillboardSet.js +1 -1
  39. package/dist/ImageBillboard/ImageBillboard.js +1 -1
  40. package/dist/ImageLink/ImageLink.js +2 -1
  41. package/dist/ImageLink/ImageLinkSet.js +2 -1
  42. package/dist/ImageLink/index.js +2 -1
  43. package/dist/Input/Checkbox.js +2 -2
  44. package/dist/Input/DownPaymentInput.js +1 -1
  45. package/dist/Input/Dropdown.js +1 -1
  46. package/dist/Input/Input.js +1 -1
  47. package/dist/Input/InputTextArea.js +1 -1
  48. package/dist/Insight/Featured/CategorySelector.js +2 -1
  49. package/dist/Insight/Featured/Featured.js +4 -3
  50. package/dist/Insight/Featured/Header.js +2 -1
  51. package/dist/LandingPageHeader/LandingPageHeader.js +1 -1
  52. package/dist/Modal/Modal.js +2 -1
  53. package/dist/Modal/contextApi/store.js +1 -1
  54. package/dist/NavigationMenu/AxosALTS/index.js +2 -1
  55. package/dist/NavigationMenu/AxosBank/DropwdownButton.d.ts +7 -0
  56. package/dist/NavigationMenu/AxosBank/DropwdownButton.js +239 -0
  57. package/dist/NavigationMenu/AxosBank/Menu.d.ts +37 -0
  58. package/dist/NavigationMenu/AxosBank/Menu.js +254 -0
  59. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.d.ts +12 -1
  60. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +180 -160
  61. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +37 -268
  62. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +63 -494
  63. package/dist/NavigationMenu/AxosBank/MobileMenu/mobileReducer.d.ts +36 -0
  64. package/dist/NavigationMenu/AxosBank/MobileMenu/mobileReducer.js +105 -0
  65. package/dist/NavigationMenu/AxosBank/NavBar.module.js +42 -39
  66. package/dist/NavigationMenu/AxosBank/SubNavBar.d.ts +6 -1
  67. package/dist/NavigationMenu/AxosBank/SubNavBar.js +117 -3081
  68. package/dist/NavigationMenu/AxosBank/SubNavItem.d.ts +1 -0
  69. package/dist/NavigationMenu/AxosBank/SubNavItem.js +313 -0
  70. package/dist/NavigationMenu/AxosBank/index.d.ts +6 -4
  71. package/dist/NavigationMenu/AxosBank/index.js +85 -363
  72. package/dist/NavigationMenu/LaVictoire/index.js +2 -1
  73. package/dist/NavigationMenu/Navbar.d.ts +4 -1
  74. package/dist/NavigationMenu/Navbar.js +9 -8
  75. package/dist/NavigationMenu/SignInNavButton.js +3 -2
  76. package/dist/NavigationMenu/utils.d.ts +465 -0
  77. package/dist/NavigationMenu/utils.js +112 -0
  78. package/dist/PageNavItem/PageNavItem.js +1 -1
  79. package/dist/SetContainer/SetContainer.js +3 -2
  80. package/dist/SocialMediaBar/iconsRepository.js +2 -1
  81. package/dist/StepItem/StepItem.js +1 -1
  82. package/dist/StepItemSet/StepItemSet.js +1 -1
  83. package/dist/Table/Table.js +1 -1
  84. package/dist/Topic/Topic.js +1 -1
  85. package/dist/VideoTile/VideoTile.js +2 -1
  86. package/dist/VideoWrapper/index.js +2 -1
  87. package/dist/assets/NavigationMenu/AxosBank/NavBar.css +125 -87
  88. package/package.json +1 -1
@@ -1,2 +1,13 @@
1
- declare const MobileDrawerMenu: () => import("react/jsx-runtime").JSX.Element;
1
+ import { Navigation } from '../../utils';
2
+
3
+ export interface MenuLink {
4
+ url: string;
5
+ ariaLabel: string;
6
+ }
7
+ export interface MenuTree {
8
+ [label: string]: MenuLink | MenuTree;
9
+ }
10
+ declare const MobileDrawerMenu: ({ menu }: {
11
+ menu: Navigation;
12
+ }) => import("react/jsx-runtime").JSX.Element;
2
13
  export default MobileDrawerMenu;
@@ -1,11 +1,5 @@
1
1
  "use client";
2
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
- import { useState, useRef, useMemo, useEffect } from "react";
4
- import { AnimatePresence, motion } from "framer-motion";
5
- import { usePathname } from "next/navigation.js";
6
- import Link from "next/link.js";
7
- import { getMenuData, getLoginGroups, getQuickLinks } from "./MobileNavData.js";
8
- import styles from "./MobileMenu.module.js";
9
3
  import "../../../Chevron/Chevron.css.js";
10
4
  import "../../../Accordion/Accordion.js";
11
5
  import "../../../Accordion/Accordion.css.js";
@@ -18,6 +12,7 @@ import '../../../assets/Modal/Modal.css';import '../../../assets/VideoWrapper/Vi
18
12
  /* empty css */
19
13
  /* empty css */
20
14
  import "clsx";
15
+ import { useRef, useReducer, useState, useEffect } from "react";
21
16
  import "../../../AlertBanner/AlertBanner.css.js";
22
17
  import "../../../Article/Article.css.js";
23
18
  import "../../../IconBillboard/IconBillboard.css.js";
@@ -25,7 +20,7 @@ import "../../../IconBillboard/IconBillboard.css.js";
25
20
  /* empty css */
26
21
  import "../../../Interstitial/Interstitial-variants.css.js";
27
22
  import "../../../Button/Button.css.js";
28
- import "react-use";
23
+ import { useClickAway } from "react-use";
29
24
  import "../../../ArticlesSet/ArticlesSet.css.js";
30
25
  import "../../../Calculators/calculator.css.js";
31
26
  import "../../../Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js";
@@ -73,6 +68,7 @@ import "../../../Auth/SignInPassword.js";
73
68
  /* empty css */
74
69
  /* empty css */
75
70
  import "../../../Carousel/index.js";
71
+ import { AnimatePresence, motion } from "framer-motion";
76
72
  /* empty css */
77
73
  /* empty css */
78
74
  import "../../../Chatbot/store/chat.js";
@@ -106,14 +102,17 @@ import "next/script.js";
106
102
  /* empty css */
107
103
  import "../../../LandingPageHeader/LandingPageHeader.css.js";
108
104
  /* empty css */
105
+ import { usePathname } from "next/navigation.js";
109
106
  /* empty css */
110
107
  /* empty css */
111
108
  /* empty css */
112
109
  /* empty css */
110
+ import "../Menu.js";
113
111
  /* empty css */
114
112
  /* empty css */
115
113
  /* empty css */
116
114
  /* empty css */
115
+ import Link from "next/link.js";
117
116
  import "../../../PageNavItem/PageNavItem.css.js";
118
117
  import "react-slick";
119
118
  /* empty css */
@@ -128,6 +127,9 @@ import "../../../StepItemSet/StepItemSet.css.js";
128
127
  /* empty css */
129
128
  /* empty css */
130
129
  /* empty css */
130
+ import styles from "./MobileMenu.module.js";
131
+ import { mobileData } from "./MobileNavData.js";
132
+ import { MenuActions, reducer } from "./mobileReducer.js";
131
133
  const slideVariants = {
132
134
  enter: (direction) => ({
133
135
  x: direction === "forward" ? "100%" : "-100%",
@@ -146,30 +148,43 @@ const slideVariants = {
146
148
  position: "absolute"
147
149
  })
148
150
  };
149
- const MobileDrawerMenu = () => {
150
- const pathname = usePathname();
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 }) => {
151
162
  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);
163
+ const pathname = usePathname();
162
164
  const drawerRef = useRef(null);
163
- const loginDrawerRef = useRef(null);
164
- const loginGroups = useMemo(() => getLoginGroups(resolveUrl), [resolveUrl]);
165
- const currentLevel = stack[stack.length - 1];
166
- const prevLevel = stack[stack.length - 2];
165
+ const loginRef = useRef(null);
166
+ useClickAway(drawerRef, () => {
167
+ dispatch({ type: MenuActions.SET_MOBILE_MENU_CLOSED, payload: {} });
168
+ });
169
+ useClickAway(loginRef, () => {
170
+ dispatch({ type: MenuActions.SET_LOGIN_MENU_CLOSED, payload: {} });
171
+ });
172
+ const [queryString, setQueryString] = useState("");
173
+ const [stack, dispatch] = useReducer(reducer, initialState);
174
+ useEffect(() => {
175
+ const menuProcessed = mobileData(menu);
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]);
167
185
  useEffect(() => {
168
186
  if (!pathname) return;
169
- const pathnameParts = "/" + pathname.split("/")[1];
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
- const item = currentLevel.items[key];
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
- setDirection("backward");
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
- setOpen((prev) => {
196
- const isOpening = !prev;
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 = () => setLoginDrawerOpen(true);
205
- const handleLoginDrawerClose = () => setLoginDrawerOpen(false);
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 handleOutsideClick = (e) => {
212
- if (drawerRef.current && !drawerRef.current.contains(e.target)) {
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
- useEffect(() => {
225
- const onEsc = (e) => {
226
- if (e.key === "Escape") setOpen(false);
227
- };
228
- if (open) {
229
- document.addEventListener("keydown", onEsc);
230
- }
231
- return () => document.removeEventListener("keydown", onEsc);
232
- }, [open]);
233
- useEffect(() => {
234
- if (!loginDrawerOpen) return;
235
- document.addEventListener("mousedown", handleLoginDrawerOutsideClick);
236
- return () => document.removeEventListener("mousedown", handleLoginDrawerOutsideClick);
237
- }, [loginDrawerOpen]);
238
214
  useEffect(() => {
239
215
  const onEsc = (e) => {
240
- if (e.key === "Escape") setLoginDrawerOpen(false);
216
+ if (e.key === "Escape")
217
+ dispatch({ type: MenuActions.SET_MOBILE_MENU_CLOSED, payload: {} });
241
218
  };
242
- if (loginDrawerOpen) {
219
+ if (stack.isMobileMenuOpen) {
243
220
  document.addEventListener("keydown", onEsc);
244
221
  }
245
222
  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: open && /* @__PURE__ */ jsx(
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.title })
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: currentLevel.title }),
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__ */ jsx(
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: Object.entries(
428
- stack.length === 1 ? Object.fromEntries(
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: `${value}${queryString && !value.includes("?") ? `?${queryString}` : ""}`,
408
+ href: stack.currentMenuData.url + (queryString && !stack.currentMenuData.url.includes("?") ? `?${queryString}` : ""),
467
409
  className: styles.menuItem,
468
- children: /* @__PURE__ */ jsx("span", { children: key })
410
+ children: /* @__PURE__ */ jsxs("span", { children: [
411
+ stack.currentMenuData.title,
412
+ " Home"
413
+ ] })
469
414
  }
470
- ) }, key);
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
- currentLevel.title
456
+ stack.currentMenuData?.title
474
457
  )
475
458
  }
476
459
  ) }),
477
- /* @__PURE__ */ jsx("div", { className: `${styles.quickLinks} flex middle between`, children: quickLinks.map((link) => /* @__PURE__ */ jsxs(
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": `Visit ${link.title} page`,
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.title })
477
+ /* @__PURE__ */ jsx("span", { children: link.label })
495
478
  ]
496
479
  },
497
- link.title
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: loginDrawerOpen && /* @__PURE__ */ jsx(
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: loginDrawerRef,
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__ */ jsx(
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: loginGroups.map((group) => /* @__PURE__ */ jsxs(
577
- "li",
578
- {
579
- className: styles.loginAccordionGroup,
580
- "aria-label": `${group.heading} login options`,
581
- children: [
582
- /* @__PURE__ */ jsx("span", { className: styles.loginAccordionHeading, children: group.heading }),
583
- /* @__PURE__ */ jsx("ul", { className: styles.loginAccordionGroupList, children: group.items.map((item) => /* @__PURE__ */ jsx(
584
- "li",
585
- {
586
- "aria-label": `access ${item.title}`,
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
- href: item.url + (queryString && !item.url.includes("?") ? `?${queryString}` : ""),
591
- className: styles.menuItem,
592
- children: /* @__PURE__ */ jsx("span", { children: item.title })
593
- }
594
- )
595
- },
596
- item.title
597
- )) })
598
- ]
599
- },
600
- group.heading
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
  ]