@axos-web-dev/shared-components 1.0.100-dev.69 → 1.0.100-dev.69-mobileLogin

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.
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
- import { useState, useRef, useEffect } from "react";
3
+ import { useState, useRef, useMemo, useEffect } from "react";
4
4
  import { AnimatePresence, motion } from "framer-motion";
5
5
  import { usePathname } from "next/navigation.js";
6
6
  import Link from "next/link.js";
7
- import { menuData, getQuickLinks } from "./MobileNavData.js";
7
+ import { menuData, getLoginGroups, getQuickLinks } from "./MobileNavData.js";
8
8
  import styles from "./MobileMenu.module.js";
9
9
  const slideVariants = {
10
10
  enter: (direction) => ({
@@ -24,6 +24,18 @@ const slideVariants = {
24
24
  position: "absolute"
25
25
  })
26
26
  };
27
+ const loginAccordionTransition = {
28
+ duration: 0.35,
29
+ ease: [0.4, 0, 0.2, 1]
30
+ };
31
+ const loginLinksContainerVariants = {
32
+ hidden: {},
33
+ visible: {}
34
+ };
35
+ const loginLinkItemVariants = {
36
+ hidden: { opacity: 0, y: -8 },
37
+ visible: { opacity: 1, y: 0 }
38
+ };
27
39
  const MobileDrawerMenu = () => {
28
40
  const pathname = usePathname();
29
41
  const [queryString, setQueryString] = useState("");
@@ -34,7 +46,9 @@ const MobileDrawerMenu = () => {
34
46
  const [hasOpenedOnce, setHasOpenedOnce] = useState(false);
35
47
  const [direction, setDirection] = useState("forward");
36
48
  const [quickLinks, setQuickLinks] = useState([]);
49
+ const [loginAccordionOpen, setLoginAccordionOpen] = useState(false);
37
50
  const drawerRef = useRef(null);
51
+ const loginGroups = useMemo(() => getLoginGroups(), []);
38
52
  const currentLevel = stack[stack.length - 1];
39
53
  const prevLevel = stack[stack.length - 2];
40
54
  useEffect(() => {
@@ -52,6 +66,10 @@ const MobileDrawerMenu = () => {
52
66
  }
53
67
  }, []);
54
68
  const handleClick = (key) => {
69
+ if (stack.length === 1 && key === "Log in") {
70
+ setLoginAccordionOpen((prev) => !prev);
71
+ return;
72
+ }
55
73
  const item = currentLevel.items[key];
56
74
  if (typeof item === "object") {
57
75
  setDirection("forward");
@@ -71,6 +89,7 @@ const MobileDrawerMenu = () => {
71
89
  setHasOpenedOnce(true);
72
90
  setStack([{ title: "Menu", items: menuData }]);
73
91
  }
92
+ if (!isOpening) setLoginAccordionOpen(false);
74
93
  return isOpening;
75
94
  });
76
95
  };
@@ -147,192 +166,342 @@ const MobileDrawerMenu = () => {
147
166
  "aria-describedby": "menu-description",
148
167
  children: [
149
168
  /* @__PURE__ */ jsx("p", { id: "menu-description", className: styles.sr_only, children: "Use tab to navigate this menu. Press Escape to close." }),
150
- /* @__PURE__ */ jsxs("div", { className: styles.header, children: [
151
- stack.length > 1 ? /* @__PURE__ */ jsxs(
152
- "button",
153
- {
154
- onClick: handleBack,
155
- className: styles.back,
156
- "aria-label": "return to previous menu",
157
- children: [
158
- /* @__PURE__ */ jsx(
159
- "svg",
160
- {
161
- width: 15,
162
- height: 12,
163
- viewBox: "0 0 20 12",
164
- fill: "none",
165
- xmlns: "http://www.w3.org/2000/svg",
166
- style: { marginRight: 8, transform: "rotate(90deg)" },
167
- children: /* @__PURE__ */ jsx(
168
- "path",
169
+ /* @__PURE__ */ jsxs(
170
+ "div",
171
+ {
172
+ className: styles.header,
173
+ style: loginAccordionOpen ? { background: "#e9f8ff" } : void 0,
174
+ children: [
175
+ stack.length > 1 ? /* @__PURE__ */ jsxs(
176
+ "button",
177
+ {
178
+ onClick: handleBack,
179
+ className: styles.back,
180
+ "aria-label": "return to previous menu",
181
+ children: [
182
+ /* @__PURE__ */ jsx(
183
+ "svg",
169
184
  {
170
- d: "M0.46875 1.76574L9.99908 11.2961L19.5294 1.76574L18.4687 0.705078L9.99908 9.17491L1.52941 0.705078L0.46875 1.76574Z",
171
- fill: "#2F5B88"
185
+ width: 15,
186
+ height: 12,
187
+ viewBox: "0 0 20 12",
188
+ fill: "none",
189
+ xmlns: "http://www.w3.org/2000/svg",
190
+ style: { marginRight: 8, transform: "rotate(90deg)" },
191
+ children: /* @__PURE__ */ jsx(
192
+ "path",
193
+ {
194
+ d: "M0.46875 1.76574L9.99908 11.2961L19.5294 1.76574L18.4687 0.705078L9.99908 9.17491L1.52941 0.705078L0.46875 1.76574Z",
195
+ fill: "#2F5B88"
196
+ }
197
+ )
172
198
  }
173
- )
174
- }
175
- ),
176
- /* @__PURE__ */ jsx("span", { className: styles.prevlevel, children: prevLevel.title })
177
- ]
178
- }
179
- ) : /* @__PURE__ */ jsx(
180
- "a",
181
- {
182
- href: window.location.href.split("/")[3] === "invest" ? "/invest" : "/",
183
- "aria-label": "return to home page",
184
- children: /* @__PURE__ */ jsx(
185
- "img",
199
+ ),
200
+ /* @__PURE__ */ jsx("span", { className: styles.prevlevel, children: prevLevel.title })
201
+ ]
202
+ }
203
+ ) : /* @__PURE__ */ jsx(
204
+ "a",
186
205
  {
187
- src: "https://www.axos.com/images/1sBwCIn5mqOg5DK2uXDJPc/axb_mobile_logo.png",
188
- alt: "",
189
- width: 86,
190
- height: 19
206
+ href: window.location.href.split("/")[3] === "invest" ? "/invest" : "/",
207
+ "aria-label": "return to home page",
208
+ children: /* @__PURE__ */ jsx(
209
+ "img",
210
+ {
211
+ src: "https://www.axos.com/images/1sBwCIn5mqOg5DK2uXDJPc/axb_mobile_logo.png",
212
+ alt: "",
213
+ width: 86,
214
+ height: 19
215
+ }
216
+ )
191
217
  }
192
- )
193
- }
194
- ),
195
- /* @__PURE__ */ jsx(
196
- "button",
197
- {
198
- className: `${styles.close} flex_col`,
199
- "aria-label": "close navigation menu",
200
- onClick: handleToggle,
201
- children: /* @__PURE__ */ jsx(
202
- "svg",
218
+ ),
219
+ /* @__PURE__ */ jsx(
220
+ "button",
203
221
  {
204
- xmlns: "http://www.w3.org/2000/svg",
205
- width: "24",
206
- height: "24",
207
- viewBox: "0 0 24 24",
208
- fill: "none",
209
- "aria-hidden": "true",
222
+ className: `${styles.close} flex_col`,
223
+ "aria-label": "close navigation menu",
224
+ onClick: handleToggle,
210
225
  children: /* @__PURE__ */ jsx(
211
- "path",
226
+ "svg",
212
227
  {
213
- d: "M20.2812 2.65625L21.3419 3.71691L13.0602 11.9982L21.3419 20.2812L20.2812 21.3419L11.9982 13.0602L3.71691 21.3419L2.65625 20.2812L10.9377 11.9982L2.65625 3.71691L3.71691 2.65625L11.9982 10.9377L20.2812 2.65625Z",
214
- fill: "#14263D"
228
+ xmlns: "http://www.w3.org/2000/svg",
229
+ width: "24",
230
+ height: "24",
231
+ viewBox: "0 0 24 24",
232
+ fill: "none",
233
+ "aria-hidden": "true",
234
+ children: /* @__PURE__ */ jsx(
235
+ "path",
236
+ {
237
+ d: "M20.2812 2.65625L21.3419 3.71691L13.0602 11.9982L21.3419 20.2812L20.2812 21.3419L11.9982 13.0602L3.71691 21.3419L2.65625 20.2812L10.9377 11.9982L2.65625 3.71691L3.71691 2.65625L11.9982 10.9377L20.2812 2.65625Z",
238
+ fill: "#14263D"
239
+ }
240
+ )
215
241
  }
216
242
  )
217
243
  }
218
244
  )
219
- }
220
- )
221
- ] }),
222
- /* @__PURE__ */ jsx("div", { className: styles.levelContainer, children: /* @__PURE__ */ jsxs("div", { className: "bg_white", children: [
223
- /* @__PURE__ */ jsxs(
224
- "span",
245
+ ]
246
+ }
247
+ ),
248
+ /* @__PURE__ */ jsxs("div", { className: styles.levelContainer, children: [
249
+ stack.length === 1 && /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: loginAccordionOpen && /* @__PURE__ */ jsx(
250
+ motion.div,
225
251
  {
226
- className: `${styles.level} flex middle`,
227
- "aria-label": "current menu level",
228
- children: [
229
- /* @__PURE__ */ jsx("h2", { className: styles.levelTitle, id: "menu-level", children: currentLevel.title }),
252
+ className: styles.loginAccordionOverlay,
253
+ initial: { opacity: 0, y: -12 },
254
+ animate: {
255
+ opacity: 1,
256
+ y: 0,
257
+ transition: loginAccordionTransition
258
+ },
259
+ exit: {
260
+ opacity: 0,
261
+ y: -12,
262
+ transition: loginAccordionTransition
263
+ },
264
+ "aria-expanded": loginAccordionOpen,
265
+ "aria-label": "Login options",
266
+ children: /* @__PURE__ */ jsxs("div", { className: styles.loginAccordion, children: [
267
+ /* @__PURE__ */ jsxs(
268
+ "button",
269
+ {
270
+ type: "button",
271
+ className: styles.menuItem,
272
+ onClick: () => setLoginAccordionOpen(false),
273
+ "aria-label": "Close login options",
274
+ children: [
275
+ /* @__PURE__ */ jsxs("span", { className: styles.loginHeading, children: [
276
+ "Log in",
277
+ /* @__PURE__ */ jsx(
278
+ "img",
279
+ {
280
+ src: "https://www.axos.com/images/1Nb30NbckAMdQNJv7IldNW/user-interface.png",
281
+ alt: "",
282
+ width: 18,
283
+ height: 18,
284
+ "aria-hidden": "true"
285
+ }
286
+ )
287
+ ] }),
288
+ /* @__PURE__ */ jsx(
289
+ "span",
290
+ {
291
+ className: styles.chevron,
292
+ "aria-hidden": "true",
293
+ style: { transform: "rotate(180deg)" },
294
+ children: /* @__PURE__ */ jsx(
295
+ "svg",
296
+ {
297
+ className: styles.chevronIcon,
298
+ width: 12,
299
+ height: 20,
300
+ viewBox: "0 0 12 20",
301
+ fill: "none",
302
+ xmlns: "http://www.w3.org/2000/svg",
303
+ style: {
304
+ maxWidth: "none",
305
+ verticalAlign: "middle",
306
+ marginLeft: 11
307
+ },
308
+ children: /* @__PURE__ */ jsx(
309
+ "path",
310
+ {
311
+ d: "M1.76378 0.46875L11.2941 9.99908L1.76378 19.5294L0.703125 18.4687L9.17295 9.99908L0.703125 1.52941L1.76378 0.46875Z",
312
+ fill: "#98DDFF"
313
+ }
314
+ )
315
+ }
316
+ )
317
+ }
318
+ )
319
+ ]
320
+ }
321
+ ),
230
322
  /* @__PURE__ */ jsx(
231
- "svg",
323
+ motion.ul,
232
324
  {
233
- width: 15,
234
- height: 12,
235
- viewBox: "0 0 20 12",
236
- fill: "none",
237
- xmlns: "http://www.w3.org/2000/svg",
238
- style: { marginLeft: 12 },
239
- children: /* @__PURE__ */ jsx(
240
- "path",
325
+ className: styles.loginAccordionList,
326
+ "aria-label": "Login options",
327
+ variants: loginLinksContainerVariants,
328
+ initial: "hidden",
329
+ animate: "visible",
330
+ transition: {
331
+ staggerChildren: 0.06,
332
+ delayChildren: 0.12
333
+ },
334
+ children: loginGroups.map((group, groupIndex) => /* @__PURE__ */ jsxs(
335
+ motion.li,
241
336
  {
242
- d: "M0.46875 1.76574L9.99908 11.2961L19.5294 1.76574L18.4687 0.705078L9.99908 9.17491L1.52941 0.705078L0.46875 1.76574Z",
243
- fill: "white"
244
- }
245
- )
337
+ className: styles.loginAccordionGroup,
338
+ variants: loginLinkItemVariants,
339
+ transition: {
340
+ duration: 0.25,
341
+ ease: "easeOut",
342
+ delay: 0.12 + groupIndex * 0.05
343
+ },
344
+ children: [
345
+ /* @__PURE__ */ jsx("span", { className: styles.loginAccordionHeading, children: group.heading }),
346
+ /* @__PURE__ */ jsx(
347
+ motion.ul,
348
+ {
349
+ className: styles.loginAccordionGroupList,
350
+ variants: loginLinksContainerVariants,
351
+ initial: "hidden",
352
+ animate: "visible",
353
+ transition: {
354
+ staggerChildren: 0.04,
355
+ delayChildren: 0.18 + groupIndex * 0.1
356
+ },
357
+ children: group.items.map((item) => /* @__PURE__ */ jsx(
358
+ motion.li,
359
+ {
360
+ variants: loginLinkItemVariants,
361
+ transition: {
362
+ duration: 0.25,
363
+ ease: "easeOut"
364
+ },
365
+ children: /* @__PURE__ */ jsx(
366
+ Link,
367
+ {
368
+ href: item.url + (queryString && !item.url.includes("?") ? `?${queryString}` : ""),
369
+ className: styles.menuItem,
370
+ children: /* @__PURE__ */ jsx("span", { children: item.title })
371
+ }
372
+ )
373
+ },
374
+ item.title
375
+ ))
376
+ }
377
+ )
378
+ ]
379
+ },
380
+ group.heading
381
+ ))
246
382
  }
247
383
  )
248
- ]
384
+ ] })
249
385
  }
250
- ),
251
- /* @__PURE__ */ jsx("nav", { "aria-label": "main navigation menu", children: /* @__PURE__ */ jsx(
252
- AnimatePresence,
253
- {
254
- custom: direction,
255
- mode: "sync",
256
- initial: false,
257
- children: /* @__PURE__ */ jsx(
258
- motion.ul,
259
- {
260
- className: styles.menu,
261
- custom: direction,
262
- variants: slideVariants,
263
- initial: "enter",
264
- animate: "center",
265
- exit: "exit",
266
- transition: { duration: 0.3, ease: "linear" },
267
- children: Object.entries(currentLevel.items).map(
268
- ([key, value]) => {
269
- const hasChildren = typeof value === "object";
270
- return /* @__PURE__ */ jsx("li", { children: hasChildren ? /* @__PURE__ */ jsxs(
271
- "button",
272
- {
273
- className: styles.menuItem,
274
- onClick: () => handleClick(key),
275
- "aria-label": `open submenu for ${key}`,
276
- children: [
277
- /* @__PURE__ */ jsx("span", { children: key }),
278
- /* @__PURE__ */ jsx("span", { className: styles.chevron, children: /* @__PURE__ */ jsx(
279
- "svg",
280
- {
281
- className: styles.chevronIcon,
282
- width: 12,
283
- height: 20,
284
- viewBox: "0 0 12 20",
285
- fill: "none",
286
- xmlns: "http://www.w3.org/2000/svg",
287
- children: /* @__PURE__ */ jsx(
288
- "path",
289
- {
290
- d: "M1.76378 0.46875L11.2941 9.99908L1.76378 19.5294L0.703125 18.4687L9.17295 9.99908L0.703125 1.52941L1.76378 0.46875Z",
291
- fill: "#4A5560"
292
- }
293
- )
294
- }
295
- ) })
296
- ]
297
- }
298
- ) : /* @__PURE__ */ jsx(
299
- Link,
386
+ ) }),
387
+ /* @__PURE__ */ jsxs("div", { className: "bg_white", children: [
388
+ /* @__PURE__ */ jsxs(
389
+ "span",
390
+ {
391
+ className: `${styles.level} flex middle`,
392
+ "aria-label": "current menu level",
393
+ children: [
394
+ /* @__PURE__ */ jsx("h2", { className: styles.levelTitle, id: "menu-level", children: currentLevel.title }),
395
+ /* @__PURE__ */ jsx(
396
+ "svg",
397
+ {
398
+ width: 15,
399
+ height: 12,
400
+ viewBox: "0 0 20 12",
401
+ fill: "none",
402
+ xmlns: "http://www.w3.org/2000/svg",
403
+ style: { marginLeft: 12 },
404
+ children: /* @__PURE__ */ jsx(
405
+ "path",
300
406
  {
301
- href: value + (queryString && !value.includes("?") ? `?${queryString}` : ""),
302
- className: styles.menuItem,
303
- children: /* @__PURE__ */ jsx("span", { children: key })
407
+ d: "M0.46875 1.76574L9.99908 11.2961L19.5294 1.76574L18.4687 0.705078L9.99908 9.17491L1.52941 0.705078L0.46875 1.76574Z",
408
+ fill: "white"
304
409
  }
305
- ) }, key);
410
+ )
306
411
  }
307
412
  )
308
- },
309
- currentLevel.title
310
- )
311
- }
312
- ) }),
313
- /* @__PURE__ */ jsx("div", { className: `${styles.quickLinks} flex middle between`, children: quickLinks.map((link) => /* @__PURE__ */ jsxs(
314
- "a",
315
- {
316
- href: link.url + (queryString && !link.url.includes("?") ? `?${queryString}` : ""),
317
- className: `${styles.quickLink} flex_col middle`,
318
- "aria-label": `Visit ${link.title} page`,
319
- children: [
320
- /* @__PURE__ */ jsx(
321
- "img",
413
+ ]
414
+ }
415
+ ),
416
+ /* @__PURE__ */ jsx("nav", { "aria-label": "main navigation menu", children: /* @__PURE__ */ jsx(
417
+ AnimatePresence,
418
+ {
419
+ custom: direction,
420
+ mode: "sync",
421
+ initial: false,
422
+ children: /* @__PURE__ */ jsx(
423
+ motion.ul,
322
424
  {
323
- src: link.icon,
324
- alt: "",
325
- height: 20,
326
- width: 20,
327
- loading: "lazy"
328
- }
329
- ),
330
- /* @__PURE__ */ jsx("span", { children: link.title })
331
- ]
332
- },
333
- link.title
334
- )) })
335
- ] }) })
425
+ className: styles.menu,
426
+ custom: direction,
427
+ variants: slideVariants,
428
+ initial: "enter",
429
+ animate: "center",
430
+ exit: "exit",
431
+ transition: { duration: 0.3, ease: "linear" },
432
+ children: Object.entries(currentLevel.items).map(
433
+ ([key, value]) => {
434
+ const hasChildren = typeof value === "object";
435
+ const isLogin = key === "Log in";
436
+ return /* @__PURE__ */ jsx("li", { children: hasChildren ? /* @__PURE__ */ jsxs(
437
+ "button",
438
+ {
439
+ className: styles.menuItem,
440
+ onClick: () => handleClick(key),
441
+ "aria-label": isLogin ? "Open login options" : `open submenu for ${key}`,
442
+ "aria-expanded": isLogin ? loginAccordionOpen : void 0,
443
+ children: [
444
+ /* @__PURE__ */ jsx("span", { children: key }),
445
+ /* @__PURE__ */ jsx("span", { className: styles.chevron, children: /* @__PURE__ */ jsx(
446
+ "svg",
447
+ {
448
+ className: styles.chevronIcon,
449
+ width: 12,
450
+ height: 20,
451
+ viewBox: "0 0 12 20",
452
+ fill: "none",
453
+ xmlns: "http://www.w3.org/2000/svg",
454
+ style: isLogin && loginAccordionOpen ? { transform: "rotate(180deg)" } : void 0,
455
+ children: /* @__PURE__ */ jsx(
456
+ "path",
457
+ {
458
+ d: "M1.76378 0.46875L11.2941 9.99908L1.76378 19.5294L0.703125 18.4687L9.17295 9.99908L0.703125 1.52941L1.76378 0.46875Z",
459
+ fill: "#4A5560"
460
+ }
461
+ )
462
+ }
463
+ ) })
464
+ ]
465
+ }
466
+ ) : /* @__PURE__ */ jsx(
467
+ Link,
468
+ {
469
+ href: `${value}${queryString && !value.includes("?") ? `?${queryString}` : ""}`,
470
+ className: styles.menuItem,
471
+ children: /* @__PURE__ */ jsx("span", { children: key })
472
+ }
473
+ ) }, key);
474
+ }
475
+ )
476
+ },
477
+ currentLevel.title
478
+ )
479
+ }
480
+ ) }),
481
+ /* @__PURE__ */ jsx("div", { className: `${styles.quickLinks} flex middle between`, children: quickLinks.map((link) => /* @__PURE__ */ jsxs(
482
+ "a",
483
+ {
484
+ href: link.url + (queryString && !link.url.includes("?") ? `?${queryString}` : ""),
485
+ className: `${styles.quickLink} flex_col middle`,
486
+ "aria-label": `Visit ${link.title} page`,
487
+ children: [
488
+ /* @__PURE__ */ jsx(
489
+ "img",
490
+ {
491
+ src: link.icon,
492
+ alt: "",
493
+ height: 20,
494
+ width: 20,
495
+ loading: "lazy"
496
+ }
497
+ ),
498
+ /* @__PURE__ */ jsx("span", { children: link.title })
499
+ ]
500
+ },
501
+ link.title
502
+ )) })
503
+ ] })
504
+ ] })
336
505
  ]
337
506
  }
338
507
  )
@@ -1,19 +1,26 @@
1
- import '../../../assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css';const overlay = "_overlay_fwuiv_1";
2
- const drawer = "_drawer_fwuiv_9";
3
- const hamburger = "_hamburger_fwuiv_29";
4
- const header = "_header_fwuiv_40";
5
- const back = "_back_fwuiv_51";
6
- const close = "_close_fwuiv_59";
7
- const levelContainer = "_levelContainer_fwuiv_70";
8
- const level = "_level_fwuiv_70";
9
- const levelTitle = "_levelTitle_fwuiv_86";
10
- const menu = "_menu_fwuiv_91";
11
- const menuItem = "_menuItem_fwuiv_111";
12
- const chevron = "_chevron_fwuiv_127";
13
- const chevronIcon = "_chevronIcon_fwuiv_132";
14
- const quickLinks = "_quickLinks_fwuiv_143";
15
- const quickLink = "_quickLink_fwuiv_143";
16
- const sr_only = "_sr_only_fwuiv_167";
1
+ import '../../../assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css';const overlay = "_overlay_ph78c_1";
2
+ const drawer = "_drawer_ph78c_9";
3
+ const hamburger = "_hamburger_ph78c_29";
4
+ const header = "_header_ph78c_40";
5
+ const back = "_back_ph78c_51";
6
+ const close = "_close_ph78c_59";
7
+ const levelContainer = "_levelContainer_ph78c_70";
8
+ const level = "_level_ph78c_70";
9
+ const levelTitle = "_levelTitle_ph78c_86";
10
+ const menu = "_menu_ph78c_91";
11
+ const menuItem = "_menuItem_ph78c_107";
12
+ const loginAccordionOverlay = "_loginAccordionOverlay_ph78c_123";
13
+ const loginAccordion = "_loginAccordion_ph78c_123";
14
+ const loginAccordionList = "_loginAccordionList_ph78c_151";
15
+ const loginAccordionGroup = "_loginAccordionGroup_ph78c_157";
16
+ const loginAccordionHeading = "_loginAccordionHeading_ph78c_162";
17
+ const loginAccordionGroupList = "_loginAccordionGroupList_ph78c_173";
18
+ const loginHeading = "_loginHeading_ph78c_216";
19
+ const chevron = "_chevron_ph78c_226";
20
+ const chevronIcon = "_chevronIcon_ph78c_231";
21
+ const quickLinks = "_quickLinks_ph78c_242";
22
+ const quickLink = "_quickLink_ph78c_242";
23
+ const sr_only = "_sr_only_ph78c_266";
17
24
  const styles = {
18
25
  overlay,
19
26
  drawer,
@@ -26,6 +33,13 @@ const styles = {
26
33
  levelTitle,
27
34
  menu,
28
35
  menuItem,
36
+ loginAccordionOverlay,
37
+ loginAccordion,
38
+ loginAccordionList,
39
+ loginAccordionGroup,
40
+ loginAccordionHeading,
41
+ loginAccordionGroupList,
42
+ loginHeading,
29
43
  chevron,
30
44
  chevronIcon,
31
45
  quickLinks,
@@ -44,6 +58,13 @@ export {
44
58
  level,
45
59
  levelContainer,
46
60
  levelTitle,
61
+ loginAccordion,
62
+ loginAccordionGroup,
63
+ loginAccordionGroupList,
64
+ loginAccordionHeading,
65
+ loginAccordionList,
66
+ loginAccordionOverlay,
67
+ loginHeading,
47
68
  menu,
48
69
  menuItem,
49
70
  overlay,
@@ -242,24 +242,30 @@ export declare const menuData: {
242
242
  };
243
243
  "Log in": {
244
244
  Personal: {
245
- "Personal Banking Home": string;
246
245
  "Account Login": string;
247
246
  "Make a Payment": string;
248
247
  };
249
248
  Business: {
250
- "Business Banking Home": string;
251
249
  "Business Banking Login": string;
252
250
  "MWA Business Login": string;
253
251
  "Commercial Portal": string;
254
252
  };
255
253
  Partners: {
256
- "Partners Home": string;
257
254
  "Wholesale and Correspondent": string;
258
255
  "Advisor Login": string;
259
256
  };
260
257
  };
261
258
  "Return to Application": string;
262
259
  };
260
+ export type FlattenedLoginItem = {
261
+ title: string;
262
+ url: string;
263
+ };
264
+ export type LoginGroup = {
265
+ heading: string;
266
+ items: FlattenedLoginItem[];
267
+ };
268
+ export declare const getLoginGroups: () => LoginGroup[];
263
269
  export declare const getQuickLinks: (pathname: string) => {
264
270
  icon: string;
265
271
  title: string;
@@ -600,12 +600,12 @@ const menuData = {
600
600
  },
601
601
  "Log in": {
602
602
  Personal: {
603
- "Personal Banking Home": findMoreAxosDomains("{AXOSBANK}/personal"),
603
+ // "Personal Banking Home": findMoreAxosDomains("{AXOSBANK}/personal"),
604
604
  "Account Login": findMoreAxosDomains("{ONLINEBANKING}/auth/Login"),
605
605
  "Make a Payment": "https://loanpayment.axosbank.com"
606
606
  },
607
607
  Business: {
608
- "Business Banking Home": findMoreAxosDomains("{AXOSBANK}/business"),
608
+ // "Business Banking Home": findMoreAxosDomains("{AXOSBANK}/business"),
609
609
  "Business Banking Login": findMoreAxosDomains(
610
610
  "{AXOSBANK}/business/login"
611
611
  ),
@@ -617,7 +617,7 @@ const menuData = {
617
617
  )
618
618
  },
619
619
  Partners: {
620
- "Partners Home": findMoreAxosDomains("{AXOSBANK}/partners"),
620
+ // "Partners Home": findMoreAxosDomains("{AXOSBANK}/partners"),
621
621
  "Wholesale and Correspondent": "https://thirdpartylending.axosbank.com/index",
622
622
  "Advisor Login": findMoreAxosDomains("{ARMS}")
623
623
  }
@@ -626,6 +626,26 @@ const menuData = {
626
626
  "{AXOSBANK}/return-to-application"
627
627
  )
628
628
  };
629
+ const getLoginGroups = () => {
630
+ const loginSection = menuData["Log in"];
631
+ if (!loginSection || typeof loginSection !== "object") return [];
632
+ const groups = [];
633
+ for (const [heading, category] of Object.entries(
634
+ loginSection
635
+ )) {
636
+ if (!category || typeof category !== "object") continue;
637
+ const items = [];
638
+ for (const [title, url] of Object.entries(category)) {
639
+ if (typeof url === "string") {
640
+ items.push({ title, url });
641
+ }
642
+ }
643
+ if (items.length) {
644
+ groups.push({ heading, items });
645
+ }
646
+ }
647
+ return groups;
648
+ };
629
649
  const getQuickLinks = (pathname) => {
630
650
  let insightsUrl = findMoreAxosDomains("{AXOSBANK}/personal/insights");
631
651
  switch (true) {
@@ -666,6 +686,7 @@ const getQuickLinks = (pathname) => {
666
686
  ];
667
687
  };
668
688
  export {
689
+ getLoginGroups,
669
690
  getQuickLinks,
670
691
  menuData
671
692
  };
@@ -61,7 +61,7 @@ export declare const TableCell: ({ children, as, variant, highlighted, colSpan,
61
61
  is?: string | undefined;
62
62
  exportparts?: string | undefined;
63
63
  part?: string | undefined;
64
- popover?: "" | "auto" | "manual" | undefined;
64
+ popover?: "" | "auto" | "manual" | "hint" | undefined;
65
65
  popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
66
66
  popoverTarget?: string | undefined;
67
67
  onToggle?: import('react').ToggleEventHandler<HTMLTableCellElement> | undefined;
@@ -1,4 +1,4 @@
1
- ._overlay_fwuiv_1 {
1
+ ._overlay_ph78c_1 {
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  height: 100vh;
@@ -6,7 +6,7 @@
6
6
  z-index: 10000;
7
7
  }
8
8
 
9
- ._drawer_fwuiv_9 {
9
+ ._drawer_ph78c_9 {
10
10
  background: #fff;
11
11
  border-radius: 0 0 0 1rem;
12
12
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
@@ -22,22 +22,22 @@
22
22
  z-index: 10001;
23
23
  }
24
24
 
25
- ._drawer_fwuiv_9::-webkit-scrollbar {
25
+ ._drawer_ph78c_9::-webkit-scrollbar {
26
26
  display: none;
27
27
  }
28
28
 
29
- ._hamburger_fwuiv_29 {
29
+ ._hamburger_ph78c_29 {
30
30
  background: transparent;
31
31
  border: none;
32
32
  cursor: pointer;
33
33
  transition: opacity 0.3s ease;
34
34
  }
35
35
 
36
- ._hamburger_fwuiv_29:hover {
36
+ ._hamburger_ph78c_29:hover {
37
37
  opacity: 0.8;
38
38
  }
39
39
 
40
- ._header_fwuiv_40 {
40
+ ._header_ph78c_40 {
41
41
  display: flex;
42
42
  align-items: center;
43
43
  background: #f4f4f4;
@@ -48,7 +48,7 @@
48
48
  z-index: 1;
49
49
  }
50
50
 
51
- ._back_fwuiv_51 {
51
+ ._back_ph78c_51 {
52
52
  color: var(--_1073cm83);
53
53
  font-size: 1rem;
54
54
  font-weight: 700;
@@ -56,23 +56,23 @@
56
56
  padding: 0;
57
57
  }
58
58
 
59
- ._close_fwuiv_59 {
59
+ ._close_ph78c_59 {
60
60
  font-size: 1.3rem;
61
61
  }
62
62
 
63
- ._back_fwuiv_51,
64
- ._close_fwuiv_59 {
63
+ ._back_ph78c_51,
64
+ ._close_ph78c_59 {
65
65
  background: none;
66
66
  border: none;
67
67
  cursor: pointer;
68
68
  }
69
69
 
70
- ._levelContainer_fwuiv_70 {
70
+ ._levelContainer_ph78c_70 {
71
71
  height: 100%;
72
72
  position: relative;
73
73
  }
74
74
 
75
- ._level_fwuiv_70 {
75
+ ._level_ph78c_70 {
76
76
  background: var(--_1073cm86);
77
77
  color: var(--_1073cm85);
78
78
  font-size: 0.9rem;
@@ -83,12 +83,12 @@
83
83
  z-index: 1;
84
84
  }
85
85
 
86
- ._levelTitle_fwuiv_86 {
86
+ ._levelTitle_ph78c_86 {
87
87
  font: 700 0.9rem / 1.39 var(--main-font-family);
88
88
  letter-spacing: 0.4px;
89
89
  }
90
90
 
91
- ._menu_fwuiv_91 {
91
+ ._menu_ph78c_91 {
92
92
  background-color: transparent;
93
93
  list-style: none;
94
94
  margin: 0;
@@ -97,18 +97,14 @@
97
97
  position: relative;
98
98
  }
99
99
 
100
- ._menu_fwuiv_91 li {
100
+ ._menu_ph78c_91 li {
101
101
  color: var(--_1073cm83);
102
102
  font-family: var(--header-font-family);
103
103
  font-weight: 500;
104
104
  border-top: 1px solid #e9e9e9;
105
105
  }
106
106
 
107
- ._menu_fwuiv_91 li + li {
108
- margin-top: 0.5rem;
109
- }
110
-
111
- ._menuItem_fwuiv_111 {
107
+ ._menuItem_ph78c_107 {
112
108
  display: flex;
113
109
  align-items: center;
114
110
  background: none;
@@ -124,23 +120,126 @@
124
120
  width: 100%;
125
121
  }
126
122
 
127
- ._chevron_fwuiv_127 {
123
+ ._loginAccordionOverlay_ph78c_123 {
124
+ position: absolute;
125
+ inset: 0;
126
+ z-index: 10;
127
+ background: #14263d;
128
+ color: #fff;
129
+ overflow: auto;
130
+ padding: 1rem 1.2rem 1.2rem;
131
+ isolation: isolate;
132
+ }
133
+
134
+ ._loginAccordionOverlay_ph78c_123::before {
135
+ content: "";
136
+ position: absolute;
137
+ bottom: 0;
138
+ right: 0;
139
+ height: 100%;
140
+ width: 76%;
141
+ background: url("https://www.axos.com/images/4rvifCx4C5Z57fagaQiEKl/current__1_.png")
142
+ left top / cover no-repeat;
143
+ z-index: -1;
144
+ opacity: 0.2;
145
+ }
146
+
147
+ ._loginAccordion_ph78c_123 {
148
+ padding: 0;
149
+ }
150
+
151
+ ._loginAccordionList_ph78c_151 {
152
+ list-style: none;
153
+ margin: 0;
154
+ padding: 0;
155
+ }
156
+
157
+ ._loginAccordionGroup_ph78c_157 {
158
+ margin-top: 12px;
159
+ padding-block: 4px;
160
+ }
161
+
162
+ ._loginAccordionHeading_ph78c_162 {
163
+ display: block;
164
+ font-family: var(--header-font-family);
165
+ font-weight: 700;
166
+ font-size: 0.85rem;
167
+ text-transform: uppercase;
168
+ letter-spacing: 0.04em;
169
+ color: var(--_1073cm83);
170
+ padding: 0.35rem 0 0.2rem;
171
+ }
172
+
173
+ ._loginAccordionGroupList_ph78c_173 {
174
+ list-style: none;
175
+ margin: 0;
176
+ padding: 0 0 0 16px;
177
+ }
178
+
179
+ ._loginAccordionList_ph78c_151 li {
180
+ font-family: var(--header-font-family);
181
+ font-weight: 500;
182
+ }
183
+
184
+ ._loginAccordionList_ph78c_151 li li {
185
+ border-top: none;
186
+ color: #98ddff;
187
+ font-weight: 700;
188
+ padding-block: 3px;
189
+ }
190
+
191
+ ._loginAccordionList_ph78c_151 ._menuItem_ph78c_107 {
192
+ display: inline;
193
+ padding-block: 0px;
194
+ }
195
+
196
+ ._loginAccordionList_ph78c_151 ._menuItem_ph78c_107:hover {
197
+ opacity: 0.7;
198
+ }
199
+
200
+ ._loginAccordion_ph78c_123 > ._menuItem_ph78c_107 {
201
+ padding-block: 4px;
202
+ position: relative;
203
+ isolation: isolate;
204
+ }
205
+
206
+ ._loginAccordion_ph78c_123 > ._menuItem_ph78c_107::after {
207
+ content: "return to menu";
208
+ position: absolute;
209
+ right: 36px;
210
+ bottom: 50%;
211
+ font-size: 12px;
212
+ transform: translateY(50%);
213
+ letter-spacing: 0.5px;
214
+ }
215
+
216
+ ._loginHeading_ph78c_216 {
217
+ font-family: var(--header-font-family);
218
+ font-size: 20px;
219
+ font-weight: 700;
220
+ line-height: 1;
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 8px;
224
+ }
225
+
226
+ ._chevron_ph78c_226 {
128
227
  font-size: 1.2rem;
129
228
  margin-left: auto;
130
229
  }
131
230
 
132
- ._chevronIcon_fwuiv_132 {
231
+ ._chevronIcon_ph78c_231 {
133
232
  height: auto;
134
233
  margin-right: 10px;
135
234
  max-width: 8px;
136
235
  }
137
236
 
138
- body:has(._drawer_fwuiv_9) {
237
+ body:has(._drawer_ph78c_9) {
139
238
  overflow-y: hidden;
140
239
  position: relative;
141
240
  }
142
241
 
143
- ._quickLinks_fwuiv_143 {
242
+ ._quickLinks_ph78c_242 {
144
243
  background-color: #e8f7ff;
145
244
  bottom: 0;
146
245
  box-shadow: 0 15px 10px -20px rgba(0, 0, 0, 0.45) inset;
@@ -150,7 +249,7 @@ body:has(._drawer_fwuiv_9) {
150
249
  position: sticky;
151
250
  }
152
251
 
153
- ._quickLink_fwuiv_143 {
252
+ ._quickLink_ph78c_242 {
154
253
  display: flex;
155
254
  align-items: center;
156
255
  color: var(--_1073cm83);
@@ -164,7 +263,7 @@ body:has(._drawer_fwuiv_9) {
164
263
  text-transform: uppercase;
165
264
  }
166
265
 
167
- ._sr_only_fwuiv_167 {
266
+ ._sr_only_ph78c_266 {
168
267
  position: absolute;
169
268
  border: 0;
170
269
  clip: rect(0, 0, 0, 0);
@@ -177,16 +276,19 @@ body:has(._drawer_fwuiv_9) {
177
276
  }
178
277
 
179
278
  @media (max-width: 540px) {
180
- ._drawer_fwuiv_9 {
279
+ ._drawer_ph78c_9 {
181
280
  border-radius: 0;
182
281
  max-width: none;
183
282
  width: 100%;
184
283
  }
185
- ._menu_fwuiv_91 li + li {
284
+ ._menu_ph78c_91 li + li {
186
285
  margin-top: 3px;
187
286
  }
188
- ._menuItem_fwuiv_111 {
287
+ ._menuItem_ph78c_107 {
189
288
  font-size: 0.9rem;
190
289
  padding: 0.65rem 0;
191
290
  }
291
+ ._loginAccordionOverlay_ph78c_123::before {
292
+ opacity: 0.1;
293
+ }
192
294
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "1.0.100-dev.69",
4
+ "version": "1.0.100-dev.69-mobileLogin",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",