@axos-web-dev/shared-components 2.0.0-dev.17-nav-1 → 2.0.0-dev.17-nav-2
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,7 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import "../../IconBillboard/IconBillboard.css.js";
|
|
4
|
+
import "../../icons/ArrowIcon/ArrowIcon.css.js";
|
|
5
|
+
import "../../icons/CheckIcon/CheckIcon.css.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
/* empty css */
|
|
12
|
+
import { forwardRef } from "react";
|
|
2
13
|
import clsx from "clsx";
|
|
14
|
+
/* empty css */
|
|
15
|
+
/* empty css */
|
|
16
|
+
import "../../Chevron/Chevron.css.js";
|
|
17
|
+
import "../../Interstitial/Interstitial-variants.css.js";
|
|
18
|
+
import "../../Button/Button.css.js";
|
|
19
|
+
import "react-use";
|
|
20
|
+
/* empty css */
|
|
21
|
+
import { useGlobalContext } from "../../Modal/contextApi/store.js";
|
|
3
22
|
import Link from "next/link.js";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
23
|
import styles from "./NavBar.module.js";
|
|
6
24
|
import { dd_media } from "./SubNavbar.css.js";
|
|
7
25
|
const Menu = forwardRef(
|
|
@@ -17,6 +35,7 @@ const Menu = forwardRef(
|
|
|
17
35
|
onDownKeyContainer: handleKeyDownContainer,
|
|
18
36
|
onMouseLeave: handleMouseLeave
|
|
19
37
|
}, containerRef) => {
|
|
38
|
+
const { resolveUrl } = useGlobalContext();
|
|
20
39
|
const renderNavItems = Array.isArray(subNavItems) ? subNavItems.map((item) => /* @__PURE__ */ jsx(SubNavItem, { ...item }, item.id)) : [];
|
|
21
40
|
return /* @__PURE__ */ jsx(
|
|
22
41
|
"div",
|
|
@@ -50,7 +69,7 @@ const Menu = forwardRef(
|
|
|
50
69
|
(cta, index) => /* @__PURE__ */ jsx(
|
|
51
70
|
Link,
|
|
52
71
|
{
|
|
53
|
-
href: cta.url ?? "",
|
|
72
|
+
href: resolveUrl(cta.url) ?? "",
|
|
54
73
|
"aria-label": cta.ariaLabel,
|
|
55
74
|
className: clsx(
|
|
56
75
|
"text_center",
|
|
@@ -85,7 +104,7 @@ const Menu = forwardRef(
|
|
|
85
104
|
/* @__PURE__ */ jsx("div", { className: `${styles.headline_cta} ${styles.ml_8}`, children: /* @__PURE__ */ jsx(
|
|
86
105
|
Link,
|
|
87
106
|
{
|
|
88
|
-
href: helpUrl
|
|
107
|
+
href: helpUrl ? resolveUrl(helpUrl) : "{AXOSBANK}/partners/wholesale-correspondent-portfolio-lending/support",
|
|
89
108
|
children: "Help & Support"
|
|
90
109
|
}
|
|
91
110
|
) })
|
|
@@ -102,13 +121,14 @@ const Menu = forwardRef(
|
|
|
102
121
|
}
|
|
103
122
|
);
|
|
104
123
|
const SubNavItem = ({ icon, label, url, items }) => {
|
|
124
|
+
const { resolveUrl } = useGlobalContext();
|
|
105
125
|
const renderItems = items?.map((item) => {
|
|
106
|
-
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: item.url, children: item.label }) }, item.id);
|
|
126
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: resolveUrl(item.url), children: item.label }) }, item.id);
|
|
107
127
|
});
|
|
108
128
|
return /* @__PURE__ */ jsxs("div", { className: "flex_row", children: [
|
|
109
129
|
/* @__PURE__ */ jsx("img", { src: icon, alt: "", width: 20, height: 20 }),
|
|
110
130
|
/* @__PURE__ */ jsxs("ul", { className: `${styles.ml_8} list_unstyled`, children: [
|
|
111
|
-
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: url ?? "", role: "heading", children: label }) }),
|
|
131
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Link, { href: resolveUrl(url) ?? "", role: "heading", children: label }) }),
|
|
112
132
|
renderItems
|
|
113
133
|
] })
|
|
114
134
|
] });
|
package/package.json
CHANGED