@axos-web-dev/shared-components 0.0.10 → 0.0.12
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/ApyCalculator/index.js +3 -2
- package/dist/Button/Button.d.ts +24 -0
- package/dist/Button/Button.js +31 -0
- package/dist/Button/GoBackButton.d.ts +3 -0
- package/dist/Button/GoBackButton.js +15 -0
- package/dist/Button/index.d.ts +3 -21
- package/dist/Button/index.js +5 -20
- package/dist/CallToActionBar/index.js +30 -36
- package/dist/CollectInformationAlert/index.js +4 -1
- package/dist/ContentBanner/index.js +4 -1
- package/dist/Forms/ScheduleCall.d.ts +2 -1
- package/dist/Forms/ScheduleCall.js +9 -11
- package/dist/HeroBanner/index.js +6 -5
- package/dist/IconBillboard/IconBillboard.d.ts +3 -1
- package/dist/IconBillboard/IconBillboard.interface.d.ts +2 -0
- package/dist/IconBillboard/IconBillboard.js +49 -34
- package/dist/IconBillboard/IconBillboardSet.js +50 -56
- package/dist/ImageBillboard/ImageBillboard.css.d.ts +1 -0
- package/dist/ImageBillboard/ImageBillboard.interface.d.ts +3 -0
- package/dist/ImageBillboard/ImageBillboard.js +4 -1
- package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
- package/dist/ImageBillboard/ImageBillboardSet.js +12 -3
- package/dist/Input/Input.css.js +5 -0
- package/dist/MainHTML/index.d.ts +1 -1
- package/dist/Modal/index.js +4 -2
- package/dist/NavigationMenu/AxosAdvisor/NavBar.css.d.ts +1 -0
- package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +7 -0
- package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
- package/dist/NavigationMenu/AxosAdvisor/NavData.d.ts +4 -0
- package/dist/NavigationMenu/AxosAdvisor/NavData.js +10 -0
- package/dist/NavigationMenu/AxosAdvisor/SubNavBar.js +46 -30
- package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.d.ts +4 -0
- package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.js +13 -0
- package/dist/NavigationMenu/AxosAdvisor/index.js +184 -142
- package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +40 -40
- package/dist/NavigationMenu/AxosFiduciary/NavData.d.ts +4 -0
- package/dist/NavigationMenu/AxosFiduciary/NavData.js +9 -0
- package/dist/NavigationMenu/AxosFiduciary/index.js +41 -13
- package/dist/NavigationMenu/NavItem/index.d.ts +10 -0
- package/dist/NavigationMenu/NavItem/index.js +25 -0
- package/dist/SetContainer/SetContainer.js +1 -0
- package/dist/Table/Table.css.d.ts +19 -6
- package/dist/Table/Table.css.js +5 -1
- package/dist/Table/Table.d.ts +3 -3
- package/dist/Table/Table.interface.d.ts +2 -0
- package/dist/Table/Table.js +8 -5
- package/dist/Table/index.js +3 -1
- package/dist/VideoTile/VideoTile.js +2 -2
- package/dist/assets/Button/Button.css +3 -0
- package/dist/assets/CallToActionBar/CallToActionBar.css +19 -8
- package/dist/assets/ContentBanner/ContentBanner.css +2 -0
- package/dist/assets/Forms/Forms.css +7 -5
- package/dist/assets/HeroBanner/HeroBanner.css +3 -0
- package/dist/assets/IconBillboard/IconBillboard.css +8 -2
- package/dist/assets/ImageBillboard/ImageBillboard.css +29 -1
- package/dist/assets/Input/Input.css +5 -1
- package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +5 -0
- package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css.css +125 -122
- package/dist/assets/NavigationMenu/AxosAdvisor/SubNavbar.css +17 -0
- package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css.css +82 -82
- package/dist/assets/SetContainer/SetContainer.css +6 -1
- package/dist/assets/Table/Table.css +61 -21
- package/dist/assets/VideoTile/VideoTile.css +1 -0
- package/dist/assets/globals.css +5 -3
- package/dist/main.js +8 -2
- package/package.json +1 -2
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { Button } from "../../Button/Button.js";
|
|
4
|
+
import "../../Button/Button.css.js";
|
|
5
|
+
import { useState, useRef, useEffect } from "react";
|
|
5
6
|
import { useClickAway } from "react-use";
|
|
7
|
+
import clsx from "clsx";
|
|
8
|
+
import { NavItem } from "../NavItem/index.js";
|
|
9
|
+
import { Sign_in_btn } from "./NavBar.css.js";
|
|
6
10
|
import styles from "./NavBar.module.js";
|
|
11
|
+
import { navItems } from "./NavData.js";
|
|
7
12
|
import SubNavBar from "./SubNavBar.js";
|
|
8
13
|
var define_process_env_default = {};
|
|
9
14
|
function NavBar() {
|
|
10
15
|
const [isOpenSignIn, setisOpenSignIn] = useState(false);
|
|
11
16
|
const [isOpenMobile, setisOpenMobile] = useState(false);
|
|
17
|
+
const [activeIndex, setActiveIndex] = useState();
|
|
18
|
+
const [lastNavItem, setLastNavItem] = useState();
|
|
12
19
|
const ref = useRef(null);
|
|
13
20
|
const toggle = () => setisOpenSignIn(!isOpenSignIn);
|
|
14
21
|
const mobileToggle = () => setisOpenMobile(!isOpenMobile);
|
|
22
|
+
const handleClick = (index) => setActiveIndex(index);
|
|
23
|
+
const getActiveIndex = () => {
|
|
24
|
+
const pathname = "/" + location.pathname.split("/")[1];
|
|
25
|
+
const index = navItems.findIndex(
|
|
26
|
+
(path) => path.url === pathname
|
|
27
|
+
);
|
|
28
|
+
setActiveIndex(index);
|
|
29
|
+
};
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
getActiveIndex();
|
|
32
|
+
}, [activeIndex]);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
setLastNavItem(navItems[navItems.length - 1]);
|
|
35
|
+
}, [navItems]);
|
|
15
36
|
useClickAway(ref, (e) => {
|
|
16
37
|
var _a;
|
|
17
38
|
if (((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.tagName) !== "A") {
|
|
@@ -30,12 +51,20 @@ function NavBar() {
|
|
|
30
51
|
height: 51
|
|
31
52
|
}
|
|
32
53
|
) }) }),
|
|
33
|
-
/* @__PURE__ */ jsx("div", { className: styles.primary_links, children: /* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
/* @__PURE__ */ jsx("div", { className: styles.primary_links, children: /* @__PURE__ */ jsx("ul", { className: "list_unstyled flex_row middle", role: "menu", children: navItems.map(
|
|
55
|
+
(item, i, arr) => arr.length - 1 !== i && /* @__PURE__ */ jsx(
|
|
56
|
+
NavItem,
|
|
57
|
+
{
|
|
58
|
+
className: styles.main_nav_link,
|
|
59
|
+
onClick: handleClick,
|
|
60
|
+
index: i,
|
|
61
|
+
name: item.name,
|
|
62
|
+
url: item.url,
|
|
63
|
+
isActive: activeIndex == i
|
|
64
|
+
},
|
|
65
|
+
i
|
|
66
|
+
)
|
|
67
|
+
) }) })
|
|
39
68
|
] }) }),
|
|
40
69
|
/* @__PURE__ */ jsx(
|
|
41
70
|
"button",
|
|
@@ -53,8 +82,8 @@ function NavBar() {
|
|
|
53
82
|
children: /* @__PURE__ */ jsx(
|
|
54
83
|
"path",
|
|
55
84
|
{
|
|
56
|
-
|
|
57
|
-
|
|
85
|
+
fillRule: "evenodd",
|
|
86
|
+
clipRule: "evenodd",
|
|
58
87
|
d: "M22.5 15.75V17.25H1.5V15.75H22.5ZM22.5 11.25V12.75H1.5V11.25H22.5ZM22.5 6.75V8.25H1.5V6.75H22.5Z",
|
|
59
88
|
fill: "#4A5560"
|
|
60
89
|
}
|
|
@@ -72,133 +101,139 @@ function NavBar() {
|
|
|
72
101
|
height: 33
|
|
73
102
|
}
|
|
74
103
|
) }) }),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: styles.signin_wrap, children: /* @__PURE__ */ jsxs(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: `${styles.desktop_only} flex_row middle relative`,
|
|
108
|
+
ref,
|
|
109
|
+
children: [
|
|
110
|
+
lastNavItem && /* @__PURE__ */ jsx(
|
|
111
|
+
NavItem,
|
|
112
|
+
{
|
|
113
|
+
url: lastNavItem.url,
|
|
114
|
+
name: lastNavItem.name,
|
|
115
|
+
className: `link list_unstyled ${styles.main_nav_link}`,
|
|
116
|
+
isActive: activeIndex == navItems.length + 1,
|
|
117
|
+
onClick: handleClick,
|
|
118
|
+
index: navItems.length + 1
|
|
119
|
+
},
|
|
120
|
+
navItems.length + 1
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ jsxs(
|
|
123
|
+
Button,
|
|
124
|
+
{
|
|
125
|
+
className: clsx(
|
|
126
|
+
styles.signin_btn,
|
|
127
|
+
"flex_row",
|
|
128
|
+
"center",
|
|
129
|
+
"middle",
|
|
130
|
+
isOpenSignIn ? styles.open : "",
|
|
131
|
+
Sign_in_btn
|
|
132
|
+
),
|
|
133
|
+
as: "button",
|
|
134
|
+
type: "button",
|
|
135
|
+
color: "primary",
|
|
136
|
+
id: "signIn",
|
|
137
|
+
action: toggle,
|
|
138
|
+
size: "small",
|
|
139
|
+
"aria-controls": "signin-drop-menu",
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ jsx("span", { children: "Sign In" }),
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
"svg",
|
|
144
|
+
{
|
|
145
|
+
width: "20",
|
|
146
|
+
height: "12",
|
|
147
|
+
viewBox: "0 0 20 12",
|
|
148
|
+
fill: "none",
|
|
149
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
150
|
+
children: /* @__PURE__ */ jsx(
|
|
151
|
+
"path",
|
|
152
|
+
{
|
|
153
|
+
d: "M0.46875 1.76574L9.99908 11.2961L19.5294 1.76574L18.4687 0.705078L9.99908 9.17491L1.52941 0.705078L0.46875 1.76574Z",
|
|
154
|
+
fill: "white"
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: `${styles.signin_dropdown} ${styles.shadow} rounded bg_white`,
|
|
166
|
+
children: /* @__PURE__ */ jsx("div", { className: styles.opacity, children: /* @__PURE__ */ jsxs(
|
|
167
|
+
"ul",
|
|
168
|
+
{
|
|
169
|
+
className: "list_unstyled",
|
|
170
|
+
role: "menu",
|
|
171
|
+
"aria-expanded": isOpenSignIn,
|
|
172
|
+
id: "signin-drop-menu",
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ jsxs("li", { role: "heading", children: [
|
|
175
|
+
/* @__PURE__ */ jsx("a", { href: "#", className: styles.signin_header, children: "Personal" }),
|
|
176
|
+
/* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: /* @__PURE__ */ jsx("li", { className: styles.signin_subheader, children: /* @__PURE__ */ jsx(
|
|
177
|
+
"a",
|
|
116
178
|
{
|
|
117
|
-
|
|
118
|
-
|
|
179
|
+
href: `${define_process_env_default.NEXT_PUBLIC_LOGIN_APP_LOGIN_URL}/auth/login`,
|
|
180
|
+
role: "menuitem",
|
|
181
|
+
children: "Account Login"
|
|
119
182
|
}
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
) }) })
|
|
159
|
-
] }),
|
|
160
|
-
/* @__PURE__ */ jsxs("li", { role: "heading", children: [
|
|
161
|
-
/* @__PURE__ */ jsx(
|
|
162
|
-
"a",
|
|
163
|
-
{
|
|
164
|
-
href: "#",
|
|
165
|
-
role: "menuitem",
|
|
166
|
-
className: `${styles.signin_header}`,
|
|
167
|
-
children: "Advisors"
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
/* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: /* @__PURE__ */ jsx("li", { className: styles.signin_subheader, children: /* @__PURE__ */ jsx(
|
|
183
|
+
) }) })
|
|
184
|
+
] }),
|
|
185
|
+
/* @__PURE__ */ jsxs("li", { role: "heading", children: [
|
|
186
|
+
/* @__PURE__ */ jsx("a", { href: "#", className: `${styles.signin_header}`, children: "Business" }),
|
|
187
|
+
/* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: /* @__PURE__ */ jsx("li", { className: styles.signin_subheader, children: /* @__PURE__ */ jsx(
|
|
188
|
+
"a",
|
|
189
|
+
{
|
|
190
|
+
href: "https://www.netteller.com/axosbank",
|
|
191
|
+
role: "menuitem",
|
|
192
|
+
children: "Business Banking Login"
|
|
193
|
+
}
|
|
194
|
+
) }) })
|
|
195
|
+
] }),
|
|
196
|
+
/* @__PURE__ */ jsxs("li", { role: "heading", children: [
|
|
197
|
+
/* @__PURE__ */ jsx(
|
|
198
|
+
"a",
|
|
199
|
+
{
|
|
200
|
+
href: "#",
|
|
201
|
+
role: "menuitem",
|
|
202
|
+
className: `${styles.signin_header}`,
|
|
203
|
+
children: "Advisors"
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
/* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: /* @__PURE__ */ jsx("li", { className: styles.signin_subheader, children: /* @__PURE__ */ jsx(
|
|
207
|
+
"a",
|
|
208
|
+
{
|
|
209
|
+
href: "https://arms.axosadvisor.com/",
|
|
210
|
+
role: "menuitem",
|
|
211
|
+
children: "Advisor Login"
|
|
212
|
+
}
|
|
213
|
+
) }) })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ jsx(
|
|
216
|
+
"li",
|
|
217
|
+
{
|
|
218
|
+
className: `${styles.signin_subheader} ${styles.footer} relative`,
|
|
219
|
+
children: /* @__PURE__ */ jsx(
|
|
171
220
|
"a",
|
|
172
221
|
{
|
|
173
|
-
href: "
|
|
222
|
+
href: "{AXOSBANK}/Return-to-Application",
|
|
174
223
|
role: "menuitem",
|
|
175
|
-
children: "
|
|
224
|
+
children: "Return to Application"
|
|
176
225
|
}
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
children: "Return to Application"
|
|
189
|
-
}
|
|
190
|
-
)
|
|
191
|
-
}
|
|
192
|
-
)
|
|
193
|
-
]
|
|
194
|
-
}
|
|
195
|
-
) })
|
|
196
|
-
}
|
|
197
|
-
)
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
)
|
|
201
|
-
] })
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
) })
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
) })
|
|
202
237
|
] }) }) }),
|
|
203
238
|
/* @__PURE__ */ jsx(SubNavBar, {}),
|
|
204
239
|
/* @__PURE__ */ jsx(
|
|
@@ -274,20 +309,20 @@ function NavBar() {
|
|
|
274
309
|
/* @__PURE__ */ jsx(
|
|
275
310
|
"a",
|
|
276
311
|
{
|
|
277
|
-
href: "/
|
|
312
|
+
href: "/products/select-high-yield-money-market",
|
|
278
313
|
role: "menuitem",
|
|
279
314
|
children: "Select High Yield Money Market"
|
|
280
315
|
}
|
|
281
316
|
),
|
|
282
|
-
/* @__PURE__ */ jsx("a", { href: "/
|
|
283
|
-
/* @__PURE__ */ jsx("a", { href: "/
|
|
284
|
-
/* @__PURE__ */ jsx("a", { href: "/
|
|
285
|
-
/* @__PURE__ */ jsx("a", { href: "/
|
|
286
|
-
/* @__PURE__ */ jsx("a", { href: "/
|
|
317
|
+
/* @__PURE__ */ jsx("a", { href: "/products/select-cds", role: "menuitem", children: "Select CDs" }),
|
|
318
|
+
/* @__PURE__ */ jsx("a", { href: "/products/select-checking", role: "menuitem", children: "Select Checking" }),
|
|
319
|
+
/* @__PURE__ */ jsx("a", { href: "/products/select-savings", role: "menuitem", children: "Select Savings" }),
|
|
320
|
+
/* @__PURE__ */ jsx("a", { href: "/products/business-banking", role: "menuitem", children: "Business Banking" }),
|
|
321
|
+
/* @__PURE__ */ jsx("a", { href: "/products/mortgage", role: "menuitem", children: "Mortgage" }),
|
|
287
322
|
/* @__PURE__ */ jsx(
|
|
288
323
|
"a",
|
|
289
324
|
{
|
|
290
|
-
href: "/
|
|
325
|
+
href: "/products/premier-world-checking-and-savings",
|
|
291
326
|
className: styles.main,
|
|
292
327
|
role: "heading",
|
|
293
328
|
children: "Private Client"
|
|
@@ -296,16 +331,16 @@ function NavBar() {
|
|
|
296
331
|
/* @__PURE__ */ jsx(
|
|
297
332
|
"a",
|
|
298
333
|
{
|
|
299
|
-
href: "/
|
|
334
|
+
href: "/products/premier-private-client-banking",
|
|
300
335
|
role: "menuitem",
|
|
301
336
|
children: "Advisor Private Client Banking"
|
|
302
337
|
}
|
|
303
338
|
),
|
|
304
|
-
/* @__PURE__ */ jsx("a", { href: "/
|
|
339
|
+
/* @__PURE__ */ jsx("a", { href: "/products/insureGuard-for-advisor", role: "menuitem", children: "InsureGuard+" }),
|
|
305
340
|
/* @__PURE__ */ jsx(
|
|
306
341
|
"a",
|
|
307
342
|
{
|
|
308
|
-
href: "/
|
|
343
|
+
href: "/products/premier-world-checking-and-savings",
|
|
309
344
|
role: "menuitem",
|
|
310
345
|
children: "Advisor World Checking and Savings"
|
|
311
346
|
}
|
|
@@ -400,7 +435,14 @@ function NavBar() {
|
|
|
400
435
|
className: `${styles.mobile_footer_content} flex_col between`,
|
|
401
436
|
children: [
|
|
402
437
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: "Get personalized support" }) }),
|
|
403
|
-
/* @__PURE__ */ jsx("div", { className: styles.footer_cta, children: /* @__PURE__ */ jsx(
|
|
438
|
+
/* @__PURE__ */ jsx("div", { className: styles.footer_cta, children: /* @__PURE__ */ jsx(
|
|
439
|
+
Button,
|
|
440
|
+
{
|
|
441
|
+
color: "primary",
|
|
442
|
+
targetUrl: "mailto:support@axosadvisor.com",
|
|
443
|
+
children: "Contact Us"
|
|
444
|
+
}
|
|
445
|
+
) })
|
|
404
446
|
]
|
|
405
447
|
}
|
|
406
448
|
),
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
const header = "
|
|
2
|
-
const wrapper = "
|
|
3
|
-
const header_main_row = "
|
|
4
|
-
const mobile_header = "
|
|
5
|
-
const logo_wrap = "
|
|
6
|
-
const primary_links = "
|
|
7
|
-
const main_nav = "
|
|
8
|
-
const main_nav_link = "
|
|
9
|
-
const sub_nav_link = "
|
|
10
|
-
const signin_wrap = "
|
|
11
|
-
const signin_btn = "
|
|
12
|
-
const sub_nav = "
|
|
13
|
-
const header_sub_row = "
|
|
14
|
-
const shadow = "
|
|
15
|
-
const opacity = "
|
|
16
|
-
const fadeInDown = "
|
|
17
|
-
const footer = "
|
|
18
|
-
const open = "
|
|
19
|
-
const mt_8 = "
|
|
20
|
-
const mt_16 = "
|
|
21
|
-
const ml_8 = "
|
|
22
|
-
const reversed_row = "
|
|
23
|
-
const nav_anchor = "
|
|
24
|
-
const site_lists = "
|
|
25
|
-
const hamburger = "
|
|
26
|
-
const mobile_logo = "
|
|
27
|
-
const mobile_nav = "
|
|
28
|
-
const mobile_opened = "
|
|
29
|
-
const mobile_nav_item = "
|
|
30
|
-
const icon_wrap = "
|
|
31
|
-
const mobile_footer = "
|
|
32
|
-
const mobile_footer_content = "
|
|
33
|
-
const mobile_footer_media = "
|
|
34
|
-
const footer_cta = "
|
|
35
|
-
const inner_wrapper = "
|
|
36
|
-
const btn = "
|
|
37
|
-
const sub_menu = "
|
|
38
|
-
const main = "
|
|
39
|
-
const desktop_only = "
|
|
40
|
-
const mobile_only = "
|
|
1
|
+
const header = "_header_nlu6n_1";
|
|
2
|
+
const wrapper = "_wrapper_nlu6n_5";
|
|
3
|
+
const header_main_row = "_header_main_row_nlu6n_11";
|
|
4
|
+
const mobile_header = "_mobile_header_nlu6n_12";
|
|
5
|
+
const logo_wrap = "_logo_wrap_nlu6n_18";
|
|
6
|
+
const primary_links = "_primary_links_nlu6n_22";
|
|
7
|
+
const main_nav = "_main_nav_nlu6n_26";
|
|
8
|
+
const main_nav_link = "_main_nav_link_nlu6n_33";
|
|
9
|
+
const sub_nav_link = "_sub_nav_link_nlu6n_55";
|
|
10
|
+
const signin_wrap = "_signin_wrap_nlu6n_57";
|
|
11
|
+
const signin_btn = "_signin_btn_nlu6n_58";
|
|
12
|
+
const sub_nav = "_sub_nav_nlu6n_55";
|
|
13
|
+
const header_sub_row = "_header_sub_row_nlu6n_99";
|
|
14
|
+
const shadow = "_shadow_nlu6n_115";
|
|
15
|
+
const opacity = "_opacity_nlu6n_131";
|
|
16
|
+
const fadeInDown = "_fadeInDown_nlu6n_1";
|
|
17
|
+
const footer = "_footer_nlu6n_137";
|
|
18
|
+
const open = "_open_nlu6n_153";
|
|
19
|
+
const mt_8 = "_mt_8_nlu6n_161";
|
|
20
|
+
const mt_16 = "_mt_16_nlu6n_165";
|
|
21
|
+
const ml_8 = "_ml_8_nlu6n_169";
|
|
22
|
+
const reversed_row = "_reversed_row_nlu6n_173";
|
|
23
|
+
const nav_anchor = "_nav_anchor_nlu6n_177";
|
|
24
|
+
const site_lists = "_site_lists_nlu6n_188";
|
|
25
|
+
const hamburger = "_hamburger_nlu6n_192";
|
|
26
|
+
const mobile_logo = "_mobile_logo_nlu6n_206";
|
|
27
|
+
const mobile_nav = "_mobile_nav_nlu6n_229";
|
|
28
|
+
const mobile_opened = "_mobile_opened_nlu6n_241";
|
|
29
|
+
const mobile_nav_item = "_mobile_nav_item_nlu6n_245";
|
|
30
|
+
const icon_wrap = "_icon_wrap_nlu6n_260";
|
|
31
|
+
const mobile_footer = "_mobile_footer_nlu6n_265";
|
|
32
|
+
const mobile_footer_content = "_mobile_footer_content_nlu6n_271";
|
|
33
|
+
const mobile_footer_media = "_mobile_footer_media_nlu6n_285";
|
|
34
|
+
const footer_cta = "_footer_cta_nlu6n_292";
|
|
35
|
+
const inner_wrapper = "_inner_wrapper_nlu6n_324";
|
|
36
|
+
const btn = "_btn_nlu6n_328";
|
|
37
|
+
const sub_menu = "_sub_menu_nlu6n_333";
|
|
38
|
+
const main = "_main_nlu6n_26";
|
|
39
|
+
const desktop_only = "_desktop_only_nlu6n_362";
|
|
40
|
+
const mobile_only = "_mobile_only_nlu6n_409";
|
|
41
41
|
const styles = {
|
|
42
42
|
header,
|
|
43
43
|
wrapper,
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { useState } from "react";
|
|
4
|
+
import { useState, useEffect } from "react";
|
|
5
|
+
import { NavItem } from "../NavItem/index.js";
|
|
5
6
|
import styles from "./NavBar.module.js";
|
|
7
|
+
import { navItems } from "./NavData.js";
|
|
6
8
|
const NavBarAFS = () => {
|
|
7
9
|
const [isOpenMobile, setisOpenMobile] = useState(false);
|
|
8
10
|
const mobileToggle = () => setisOpenMobile(!isOpenMobile);
|
|
11
|
+
const [activeIndex, setActiveIndex] = useState();
|
|
12
|
+
const handleClick = (index) => setActiveIndex(index);
|
|
13
|
+
const getActiveIndex = () => {
|
|
14
|
+
const pathname = "/" + location.pathname.split("/")[1];
|
|
15
|
+
const index = navItems.findIndex(
|
|
16
|
+
(path) => path.url === pathname
|
|
17
|
+
);
|
|
18
|
+
setActiveIndex(index);
|
|
19
|
+
};
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
getActiveIndex();
|
|
22
|
+
}, [activeIndex]);
|
|
9
23
|
return /* @__PURE__ */ jsxs("header", { children: [
|
|
10
24
|
/* @__PURE__ */ jsx("div", { className: `${styles.header} bg_white`, children: /* @__PURE__ */ jsx("div", { className: styles.wrapper, children: /* @__PURE__ */ jsxs("div", { className: `${styles.header_main_row} flex_row between middle`, children: [
|
|
11
25
|
/* @__PURE__ */ jsx("div", { className: `${styles.desktop_only} flex_row middle`, children: /* @__PURE__ */ jsxs("div", { className: `${styles.main_nav} flex_row middle`, children: [
|
|
@@ -25,12 +39,20 @@ const NavBarAFS = () => {
|
|
|
25
39
|
)
|
|
26
40
|
}
|
|
27
41
|
) }),
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: styles.primary_links, children: /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
/* @__PURE__ */ jsx("div", { className: styles.primary_links, children: /* @__PURE__ */ jsx("ul", { className: "list_unstyled flex_row middle", role: "menu", children: navItems.map(
|
|
43
|
+
(item, i) => /* @__PURE__ */ jsx(
|
|
44
|
+
NavItem,
|
|
45
|
+
{
|
|
46
|
+
className: styles.main_nav_link,
|
|
47
|
+
onClick: handleClick,
|
|
48
|
+
index: i,
|
|
49
|
+
name: item.name,
|
|
50
|
+
url: item.url,
|
|
51
|
+
isActive: activeIndex == i
|
|
52
|
+
},
|
|
53
|
+
i
|
|
54
|
+
)
|
|
55
|
+
) }) })
|
|
34
56
|
] }) }),
|
|
35
57
|
/* @__PURE__ */ jsx(
|
|
36
58
|
"button",
|
|
@@ -101,12 +123,18 @@ const NavBarAFS = () => {
|
|
|
101
123
|
}
|
|
102
124
|
) })
|
|
103
125
|
] }),
|
|
104
|
-
/* @__PURE__ */ jsx("div", { className: styles.mobile_body, children: /* @__PURE__ */
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
/* @__PURE__ */ jsx("div", { className: styles.mobile_body, children: /* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: navItems.map(
|
|
127
|
+
(item, i) => /* @__PURE__ */ jsx(
|
|
128
|
+
NavItem,
|
|
129
|
+
{
|
|
130
|
+
className: styles.mobile_nav_item,
|
|
131
|
+
index: i,
|
|
132
|
+
name: item.name,
|
|
133
|
+
url: item.url
|
|
134
|
+
},
|
|
135
|
+
`dd_${i}`
|
|
136
|
+
)
|
|
137
|
+
) }) }),
|
|
110
138
|
/* @__PURE__ */ jsx("div", { className: styles.mobile_footer, children: /* @__PURE__ */ jsxs("div", { className: "flex_row between", children: [
|
|
111
139
|
/* @__PURE__ */ jsxs(
|
|
112
140
|
"div",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface NavItemProps {
|
|
2
|
+
className: string;
|
|
3
|
+
url: string;
|
|
4
|
+
index: number;
|
|
5
|
+
name: string;
|
|
6
|
+
onClick?: (index: number) => void;
|
|
7
|
+
isActive?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const NavItem: ({ className, url, name, index, onClick, isActive, }: NavItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default NavItem;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const NavItem = ({
|
|
3
|
+
className,
|
|
4
|
+
url,
|
|
5
|
+
name,
|
|
6
|
+
index,
|
|
7
|
+
onClick,
|
|
8
|
+
isActive
|
|
9
|
+
}) => {
|
|
10
|
+
const handleClick = () => onClick && onClick(index);
|
|
11
|
+
return /* @__PURE__ */ jsx("li", { className, children: /* @__PURE__ */ jsx(
|
|
12
|
+
"a",
|
|
13
|
+
{
|
|
14
|
+
href: url,
|
|
15
|
+
className: isActive ? "active" : "",
|
|
16
|
+
role: "menuitem",
|
|
17
|
+
onClick: handleClick,
|
|
18
|
+
children: name
|
|
19
|
+
}
|
|
20
|
+
) });
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
NavItem,
|
|
24
|
+
NavItem as default
|
|
25
|
+
};
|