@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.
Files changed (66) hide show
  1. package/dist/ApyCalculator/index.js +3 -2
  2. package/dist/Button/Button.d.ts +24 -0
  3. package/dist/Button/Button.js +31 -0
  4. package/dist/Button/GoBackButton.d.ts +3 -0
  5. package/dist/Button/GoBackButton.js +15 -0
  6. package/dist/Button/index.d.ts +3 -21
  7. package/dist/Button/index.js +5 -20
  8. package/dist/CallToActionBar/index.js +30 -36
  9. package/dist/CollectInformationAlert/index.js +4 -1
  10. package/dist/ContentBanner/index.js +4 -1
  11. package/dist/Forms/ScheduleCall.d.ts +2 -1
  12. package/dist/Forms/ScheduleCall.js +9 -11
  13. package/dist/HeroBanner/index.js +6 -5
  14. package/dist/IconBillboard/IconBillboard.d.ts +3 -1
  15. package/dist/IconBillboard/IconBillboard.interface.d.ts +2 -0
  16. package/dist/IconBillboard/IconBillboard.js +49 -34
  17. package/dist/IconBillboard/IconBillboardSet.js +50 -56
  18. package/dist/ImageBillboard/ImageBillboard.css.d.ts +1 -0
  19. package/dist/ImageBillboard/ImageBillboard.interface.d.ts +3 -0
  20. package/dist/ImageBillboard/ImageBillboard.js +4 -1
  21. package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
  22. package/dist/ImageBillboard/ImageBillboardSet.js +12 -3
  23. package/dist/Input/Input.css.js +5 -0
  24. package/dist/MainHTML/index.d.ts +1 -1
  25. package/dist/Modal/index.js +4 -2
  26. package/dist/NavigationMenu/AxosAdvisor/NavBar.css.d.ts +1 -0
  27. package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +7 -0
  28. package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
  29. package/dist/NavigationMenu/AxosAdvisor/NavData.d.ts +4 -0
  30. package/dist/NavigationMenu/AxosAdvisor/NavData.js +10 -0
  31. package/dist/NavigationMenu/AxosAdvisor/SubNavBar.js +46 -30
  32. package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.d.ts +4 -0
  33. package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.js +13 -0
  34. package/dist/NavigationMenu/AxosAdvisor/index.js +184 -142
  35. package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +40 -40
  36. package/dist/NavigationMenu/AxosFiduciary/NavData.d.ts +4 -0
  37. package/dist/NavigationMenu/AxosFiduciary/NavData.js +9 -0
  38. package/dist/NavigationMenu/AxosFiduciary/index.js +41 -13
  39. package/dist/NavigationMenu/NavItem/index.d.ts +10 -0
  40. package/dist/NavigationMenu/NavItem/index.js +25 -0
  41. package/dist/SetContainer/SetContainer.js +1 -0
  42. package/dist/Table/Table.css.d.ts +19 -6
  43. package/dist/Table/Table.css.js +5 -1
  44. package/dist/Table/Table.d.ts +3 -3
  45. package/dist/Table/Table.interface.d.ts +2 -0
  46. package/dist/Table/Table.js +8 -5
  47. package/dist/Table/index.js +3 -1
  48. package/dist/VideoTile/VideoTile.js +2 -2
  49. package/dist/assets/Button/Button.css +3 -0
  50. package/dist/assets/CallToActionBar/CallToActionBar.css +19 -8
  51. package/dist/assets/ContentBanner/ContentBanner.css +2 -0
  52. package/dist/assets/Forms/Forms.css +7 -5
  53. package/dist/assets/HeroBanner/HeroBanner.css +3 -0
  54. package/dist/assets/IconBillboard/IconBillboard.css +8 -2
  55. package/dist/assets/ImageBillboard/ImageBillboard.css +29 -1
  56. package/dist/assets/Input/Input.css +5 -1
  57. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +5 -0
  58. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css.css +125 -122
  59. package/dist/assets/NavigationMenu/AxosAdvisor/SubNavbar.css +17 -0
  60. package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css.css +82 -82
  61. package/dist/assets/SetContainer/SetContainer.css +6 -1
  62. package/dist/assets/Table/Table.css +61 -21
  63. package/dist/assets/VideoTile/VideoTile.css +1 -0
  64. package/dist/assets/globals.css +5 -3
  65. package/dist/main.js +8 -2
  66. package/package.json +1 -2
@@ -1,17 +1,38 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
- import clsx from "clsx";
4
- import { useState, useRef } from "react";
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__ */ jsxs("ul", { className: "list_unstyled flex_row middle", role: "menu", children: [
34
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "/products", className: "active", role: "menuitem", children: "Products" }) }),
35
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "/find-your-advisor", role: "menuitem", children: "Find Your Advisor" }) }),
36
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "/RIAs", role: "menuitem", children: "RIAs" }) }),
37
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "/resources", role: "menuitem", children: "Resources" }) })
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
- "fill-rule": "evenodd",
57
- "clip-rule": "evenodd",
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__ */ jsxs("div", { className: styles.signin_wrap, children: [
76
- /* @__PURE__ */ jsx("div", { className: styles.mobile_only, children: /* @__PURE__ */ jsx(
77
- "a",
78
- {
79
- href: `${define_process_env_default.NEXT_PUBLIC_LOGIN_APP_LOGIN_URL}/auth/login`,
80
- className: "link",
81
- children: "Sign In"
82
- }
83
- ) }),
84
- /* @__PURE__ */ jsxs(
85
- "div",
86
- {
87
- className: `${styles.desktop_only} flex_row middle relative`,
88
- ref,
89
- children: [
90
- /* @__PURE__ */ jsx("a", { href: "/Contact-Us", className: "link", children: "Contact Us" }),
91
- /* @__PURE__ */ jsxs(
92
- "button",
93
- {
94
- className: clsx(
95
- styles.signin_btn,
96
- "flex_row",
97
- "center",
98
- "middle",
99
- isOpenSignIn ? styles.open : ""
100
- ),
101
- id: "signIn",
102
- onClick: toggle,
103
- "aria-controls": "signin-drop-menu",
104
- children: [
105
- /* @__PURE__ */ jsx("span", { children: "Sign In" }),
106
- /* @__PURE__ */ jsx(
107
- "svg",
108
- {
109
- width: "20",
110
- height: "12",
111
- viewBox: "0 0 20 12",
112
- fill: "none",
113
- xmlns: "http://www.w3.org/2000/svg",
114
- children: /* @__PURE__ */ jsx(
115
- "path",
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
- d: "M0.46875 1.76574L9.99908 11.2961L19.5294 1.76574L18.4687 0.705078L9.99908 9.17491L1.52941 0.705078L0.46875 1.76574Z",
118
- fill: "white"
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
- /* @__PURE__ */ jsx(
127
- "div",
128
- {
129
- className: `${styles.signin_dropdown} ${styles.shadow} rounded bg_white`,
130
- children: /* @__PURE__ */ jsx("div", { className: styles.opacity, children: /* @__PURE__ */ jsxs(
131
- "ul",
132
- {
133
- className: "list_unstyled",
134
- role: "menu",
135
- "aria-expanded": isOpenSignIn,
136
- id: "signin-drop-menu",
137
- children: [
138
- /* @__PURE__ */ jsxs("li", { role: "heading", children: [
139
- /* @__PURE__ */ jsx("a", { href: "#", className: styles.signin_header, children: "Personal" }),
140
- /* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: /* @__PURE__ */ jsx("li", { className: styles.signin_subheader, children: /* @__PURE__ */ jsx(
141
- "a",
142
- {
143
- href: `${define_process_env_default.NEXT_PUBLIC_LOGIN_APP_LOGIN_URL}/auth/login`,
144
- role: "menuitem",
145
- children: "Account Login"
146
- }
147
- ) }) })
148
- ] }),
149
- /* @__PURE__ */ jsxs("li", { role: "heading", children: [
150
- /* @__PURE__ */ jsx("a", { href: "#", className: `${styles.signin_header}`, children: "Business" }),
151
- /* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: /* @__PURE__ */ jsx("li", { className: styles.signin_subheader, children: /* @__PURE__ */ jsx(
152
- "a",
153
- {
154
- href: "https://www.netteller.com/axosbank",
155
- role: "menuitem",
156
- children: "Business Banking Login"
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: "https://arms.axosadvisor.com/",
222
+ href: "{AXOSBANK}/Return-to-Application",
174
223
  role: "menuitem",
175
- children: "Advisor Login"
224
+ children: "Return to Application"
176
225
  }
177
- ) }) })
178
- ] }),
179
- /* @__PURE__ */ jsx(
180
- "li",
181
- {
182
- className: `${styles.signin_subheader} ${styles.footer} relative`,
183
- children: /* @__PURE__ */ jsx(
184
- "a",
185
- {
186
- href: "{AXOSBANK}/Return-to-Application",
187
- role: "menuitem",
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: "/Products/Select-High-Yield-Money-Market",
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: "/Products/Select-CDs", role: "menuitem", children: "Select CDs" }),
283
- /* @__PURE__ */ jsx("a", { href: "/Products/Select-Checking", role: "menuitem", children: "Select Checking" }),
284
- /* @__PURE__ */ jsx("a", { href: "/Products/Select-Savings", role: "menuitem", children: "Select Savings" }),
285
- /* @__PURE__ */ jsx("a", { href: "/Products/Business-Banking", role: "menuitem", children: "Business Banking" }),
286
- /* @__PURE__ */ jsx("a", { href: "/Products/Mortgage", role: "menuitem", children: "Mortgage" }),
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: "/Products/Premier-World-Checking-and-Savings",
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: "/Products/Premier-Private-Client-Banking",
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: "/Products/InsureGuard-for-Advisor", role: "menuitem", children: "InsureGuard+" }),
339
+ /* @__PURE__ */ jsx("a", { href: "/products/insureGuard-for-advisor", role: "menuitem", children: "InsureGuard+" }),
305
340
  /* @__PURE__ */ jsx(
306
341
  "a",
307
342
  {
308
- href: "/Products/Premier-World-Checking-and-Savings",
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("a", { href: "mailto:support@axosadvisor.com", children: "Contact Us" }) })
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 = "_header_106qs_1";
2
- const wrapper = "_wrapper_106qs_5";
3
- const header_main_row = "_header_main_row_106qs_11";
4
- const mobile_header = "_mobile_header_106qs_12";
5
- const logo_wrap = "_logo_wrap_106qs_18";
6
- const primary_links = "_primary_links_106qs_22";
7
- const main_nav = "_main_nav_106qs_26";
8
- const main_nav_link = "_main_nav_link_106qs_33";
9
- const sub_nav_link = "_sub_nav_link_106qs_55";
10
- const signin_wrap = "_signin_wrap_106qs_57";
11
- const signin_btn = "_signin_btn_106qs_58";
12
- const sub_nav = "_sub_nav_106qs_55";
13
- const header_sub_row = "_header_sub_row_106qs_99";
14
- const shadow = "_shadow_106qs_115";
15
- const opacity = "_opacity_106qs_131";
16
- const fadeInDown = "_fadeInDown_106qs_1";
17
- const footer = "_footer_106qs_137";
18
- const open = "_open_106qs_153";
19
- const mt_8 = "_mt_8_106qs_161";
20
- const mt_16 = "_mt_16_106qs_165";
21
- const ml_8 = "_ml_8_106qs_169";
22
- const reversed_row = "_reversed_row_106qs_173";
23
- const nav_anchor = "_nav_anchor_106qs_177";
24
- const site_lists = "_site_lists_106qs_188";
25
- const hamburger = "_hamburger_106qs_192";
26
- const mobile_logo = "_mobile_logo_106qs_206";
27
- const mobile_nav = "_mobile_nav_106qs_229";
28
- const mobile_opened = "_mobile_opened_106qs_241";
29
- const mobile_nav_item = "_mobile_nav_item_106qs_245";
30
- const icon_wrap = "_icon_wrap_106qs_260";
31
- const mobile_footer = "_mobile_footer_106qs_265";
32
- const mobile_footer_content = "_mobile_footer_content_106qs_271";
33
- const mobile_footer_media = "_mobile_footer_media_106qs_285";
34
- const footer_cta = "_footer_cta_106qs_292";
35
- const inner_wrapper = "_inner_wrapper_106qs_324";
36
- const btn = "_btn_106qs_328";
37
- const sub_menu = "_sub_menu_106qs_333";
38
- const main = "_main_106qs_26";
39
- const desktop_only = "_desktop_only_106qs_362";
40
- const mobile_only = "_mobile_only_106qs_409";
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,
@@ -0,0 +1,4 @@
1
+ export declare const navItems: {
2
+ name: string;
3
+ url: string;
4
+ }[];
@@ -0,0 +1,9 @@
1
+ const navItems = [
2
+ { name: "About Us", url: "/about-us" },
3
+ { name: "Services", url: "/services" },
4
+ { name: "Software", url: "/software" },
5
+ { name: "Contact", url: "/contact" }
6
+ ];
7
+ export {
8
+ navItems
9
+ };
@@ -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__ */ jsxs("ul", { className: "list_unstyled flex_row middle", role: "menu", children: [
29
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "/about-us", className: "active", role: "menuitem", children: "About Us" }) }),
30
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "/services", role: "menuitem", children: "Services" }) }),
31
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "/software", role: "menuitem", children: "Software" }) }),
32
- /* @__PURE__ */ jsx("li", { className: styles.main_nav_link, children: /* @__PURE__ */ jsx("a", { href: "contact", role: "menuitem", children: "Contact" }) })
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__ */ jsxs("ul", { className: "list_unstyled", children: [
105
- /* @__PURE__ */ jsx("li", { className: `${styles.mobile_nav_item}`, id: "dd_1", children: /* @__PURE__ */ jsx("a", { href: "#", children: "About Us" }) }),
106
- /* @__PURE__ */ jsx("li", { className: `${styles.mobile_nav_item}`, id: "dd_2", children: /* @__PURE__ */ jsx("a", { href: "/services", children: "Services" }) }),
107
- /* @__PURE__ */ jsx("li", { className: `${styles.mobile_nav_item}`, id: "dd_3", children: /* @__PURE__ */ jsx("a", { href: "/Software", children: "Software" }) }),
108
- /* @__PURE__ */ jsx("li", { className: `${styles.mobile_nav_item}`, id: "dd_4", children: /* @__PURE__ */ jsx("a", { href: "/Contact", children: "Contact" }) })
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
+ };
@@ -11,6 +11,7 @@ import "../Chevron/Chevron.css.js";
11
11
  import "clsx";
12
12
  import "react";
13
13
  import "../Button/Button.css.js";
14
+ import "react-use";
14
15
  import { inline_container } from "./SetContainer.css.js";
15
16
  const SetContainer = ({
16
17
  id,