@axos-web-dev/shared-components 2.2.24-url → 2.2.25

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 (102) hide show
  1. package/dist/ATMLocator/ATMLocator.js +8 -8
  2. package/dist/Article/Article.css.d.ts +8 -4
  3. package/dist/ArticlesSet/ArticlesSet.css.d.ts +23 -1
  4. package/dist/ArticlesSet/ArticlesSet.css.js +7 -7
  5. package/dist/ArticlesSet/ArticlesSet.js +3 -4
  6. package/dist/Auth/ErrorAlert.js +7 -7
  7. package/dist/Auth/SignInPassword.js +1 -1
  8. package/dist/Button/Button.js +9 -9
  9. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +2 -1
  10. package/dist/Calculators/Calculator.js +3 -3
  11. package/dist/Calculators/MarginTradingCalculator/index.js +9 -9
  12. package/dist/Carousel/index.js +7 -7
  13. package/dist/Chevron/index.js +9 -9
  14. package/dist/Comparison/Comparison.css.d.ts +1 -0
  15. package/dist/Comparison/Comparison.css.js +16 -17
  16. package/dist/Comparison/Comparison.js +7 -7
  17. package/dist/Comparison/ComparisonSet.js +2 -1
  18. package/dist/Comparison/index.js +2 -1
  19. package/dist/ExecutiveBio/ExecutiveBio.js +7 -7
  20. package/dist/FaqAccordion/index.js +9 -9
  21. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +7 -7
  22. package/dist/Forms/ApplyNow.js +7 -7
  23. package/dist/Forms/ContactUsBusiness.js +9 -9
  24. package/dist/Forms/ContactUsBusinessNameEmail.js +9 -9
  25. package/dist/Forms/ContactUsNMLSId.js +9 -9
  26. package/dist/Forms/CpraRequest.js +9 -9
  27. package/dist/Forms/CraPublicFile.js +9 -9
  28. package/dist/Forms/EmailOnly.js +9 -9
  29. package/dist/Forms/Forms.css.d.ts +3 -0
  30. package/dist/Forms/MortgageRate/MortgageRateForm.js +7 -7
  31. package/dist/Forms/MortgageRate/MortgageRateWatch.js +7 -7
  32. package/dist/Forms/MortgageWarehouseLending.js +9 -9
  33. package/dist/Forms/SuccesForm.js +7 -7
  34. package/dist/Hyperlink/index.js +7 -7
  35. package/dist/IconBillboard/IconBillboard.css.d.ts +16 -0
  36. package/dist/IconBillboard/IconBillboard.css.js +5 -3
  37. package/dist/IconBillboard/IconBillboardSet.js +68 -62
  38. package/dist/IconBillboard/index.js +2 -1
  39. package/dist/ImageLink/ImageLink.js +3 -3
  40. package/dist/ImageLink/ImageLinkSet.js +3 -3
  41. package/dist/ImageLink/index.js +7 -7
  42. package/dist/Insight/Featured/CategorySelector.js +7 -7
  43. package/dist/Insight/Featured/Featured.js +7 -7
  44. package/dist/Insight/Featured/Header.js +7 -7
  45. package/dist/LandingPageHeader/LandingPageHeader.css.d.ts +5 -0
  46. package/dist/LandingPageHeader/LandingPageHeader.css.js +10 -0
  47. package/dist/LandingPageHeader/LandingPageHeader.d.ts +2 -1
  48. package/dist/LandingPageHeader/LandingPageHeader.js +35 -21
  49. package/dist/LandingPageHeader/WithLogin.d.ts +4 -0
  50. package/dist/LandingPageHeader/WithLogin.js +458 -0
  51. package/dist/LandingPageHeader/index.js +6 -1
  52. package/dist/Modal/Modal.js +9 -9
  53. package/dist/Modal/contextApi/store.d.ts +4 -0
  54. package/dist/NavigationMenu/AxosALTS/index.js +7 -7
  55. package/dist/NavigationMenu/AxosAdvisorServices/index.js +20 -20
  56. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +6 -6
  57. package/dist/NavigationMenu/AxosBank/SubNavBar.js +8 -8
  58. package/dist/NavigationMenu/AxosBank/index.js +9 -9
  59. package/dist/NavigationMenu/LaVictoire/index.js +9 -9
  60. package/dist/NavigationMenu/Navbar.js +7 -7
  61. package/dist/NavigationMenu/SignInNavButton.js +9 -9
  62. package/dist/SecondaryFooter/index.js +8 -1
  63. package/dist/SetContainer/SetContainer.css.d.ts +3 -0
  64. package/dist/SetContainer/SetContainer.js +4 -4
  65. package/dist/SocialMediaBar/iconsRepository.js +7 -7
  66. package/dist/StepItemSet/StepItemSet.css.d.ts +3 -0
  67. package/dist/Table/Table.css.d.ts +3 -0
  68. package/dist/Table/Table.css.js +22 -17
  69. package/dist/Table/Table.d.ts +1 -1
  70. package/dist/Table/Table.interface.d.ts +5 -8
  71. package/dist/Table/Table.js +29 -39
  72. package/dist/Table/index.js +3 -1
  73. package/dist/TopicalNavItem/TopicalNavItem.css.d.ts +0 -1
  74. package/dist/TopicalNavItem/TopicalNavItem.css.js +2 -4
  75. package/dist/TopicalNavItem/TopicalNavItem.js +11 -33
  76. package/dist/TopicalNavItem/index.js +1 -2
  77. package/dist/VideoTile/VideoTile.js +7 -7
  78. package/dist/VideoWrapper/index.js +7 -7
  79. package/dist/assets/Article/Article.css +8 -4
  80. package/dist/assets/ArticlesSet/ArticlesSet.css +54 -39
  81. package/dist/assets/Auth/SignIn.css +2 -1
  82. package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +2 -2
  83. package/dist/assets/CallToActionBar/CallToActionBar.css +2 -0
  84. package/dist/assets/Comparison/Comparison.css +32 -29
  85. package/dist/assets/DownloadTile/DownloadTile.css +0 -5
  86. package/dist/assets/FaqAccordion/FaqAccordion.css +1 -1
  87. package/dist/assets/FooterSiteMap/AxosBank/FooterSiteMap.css +2 -2
  88. package/dist/assets/Forms/Forms.css +3 -2
  89. package/dist/assets/IconBillboard/IconBillboard.css +27 -12
  90. package/dist/assets/ImageBillboard/ImageBillboard.css +0 -12
  91. package/dist/assets/LandingPageHeader/LandingPageHeader.css +68 -0
  92. package/dist/assets/SetContainer/SetContainer.css +7 -10
  93. package/dist/assets/StepItemSet/StepItemSet.css +3 -3
  94. package/dist/assets/Table/Table.css +103 -78
  95. package/dist/assets/TopicalNavItem/TopicalNavItem.css +25 -52
  96. package/dist/assets/TopicalNavSet/TopicalNavSet.css +28 -6
  97. package/dist/assets/VideoTile/VideoTile.css +0 -3
  98. package/dist/assets/globals.css +46 -2
  99. package/dist/globals.css.js +8 -1
  100. package/dist/index.css.js +8 -1
  101. package/dist/main.js +14 -6
  102. package/package.json +147 -147
@@ -34,3 +34,8 @@ export declare const svg_fill: import('@vanilla-extract/recipes').RuntimeFn<{
34
34
  };
35
35
  };
36
36
  }>;
37
+ export declare const lp_login_button: string;
38
+ export declare const mobile_only: string;
39
+ export declare const desktop_only: string;
40
+ export declare const btn_primary: string;
41
+ export declare const btn_secondary: string;
@@ -10,10 +10,20 @@ var spb_container = "_1o1hxre6";
10
10
  var lp_hover = "_1o1hxre7";
11
11
  var spb_hover = "_1o1hxre8";
12
12
  var svg_fill = createRuntimeFn({ defaultClassName: "_1o1hxre9", variantClassNames: { variant: { primary: "_1o1hxrea", secondary: "_1o1hxreb", tertiary: "_1o1hxrec", quaternary: "_1o1hxred" } }, defaultVariants: {}, compoundVariants: [] });
13
+ var lp_login_button = "_1o1hxree";
14
+ var mobile_only = "_1o1hxref";
15
+ var desktop_only = "_1o1hxreg";
16
+ var btn_primary = "_1o1hxreh";
17
+ var btn_secondary = "_1o1hxrei";
13
18
  export {
19
+ btn_primary,
20
+ btn_secondary,
21
+ desktop_only,
14
22
  lp_container,
15
23
  lp_hover,
24
+ lp_login_button,
16
25
  lp_theme,
26
+ mobile_only,
17
27
  spb_container,
18
28
  spb_hover,
19
29
  svg_fill
@@ -7,5 +7,6 @@ export interface LandingPageHeaderProps {
7
7
  project?: string;
8
8
  alt?: string;
9
9
  logo?: ImageInterface;
10
+ login?: boolean | undefined;
10
11
  }
11
- export declare const LandingPageHeader: ({ id, variant: fullVariant, project, alt, logo, }: LandingPageHeaderProps) => import("react").JSX.Element;
12
+ export declare const LandingPageHeader: ({ id, variant: fullVariant, project, alt, logo, login, }: LandingPageHeaderProps) => import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import "../icons/ArrowIcon/ArrowIcon.css.js";
3
3
  import "../icons/CheckIcon/CheckIcon.css.js";
4
4
  import '../assets/icons/FollowIcon/FollowIcon.css';import '../assets/icons/DownloadIcon/DownloadIcon.css';import '../assets/themes/victorie.css';import '../assets/themes/ufb.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
@@ -17,12 +17,14 @@ import SvgComponent$6 from "../icons/Logos/GBLVF.js";
17
17
  import SvgComponent$7 from "../icons/Logos/SPB.js";
18
18
  import { getVariant } from "../utils/getVariant.js";
19
19
  import { svg_fill, spb_container, lp_container, spb_hover, lp_hover, lp_theme } from "./LandingPageHeader.css.js";
20
+ import { WithLogin } from "./WithLogin.js";
20
21
  const LandingPageHeader = ({
21
22
  id,
22
23
  variant: fullVariant = "primary",
23
24
  project = "AXB",
24
25
  alt,
25
- logo
26
+ logo,
27
+ login = false
26
28
  }) => {
27
29
  const variant = getVariant(fullVariant);
28
30
  const website = /* @__PURE__ */ new Map([
@@ -54,30 +56,42 @@ const LandingPageHeader = ({
54
56
  ["SPB", /* @__PURE__ */ jsx(SvgComponent$7, { height: "100%", width: "100%" })]
55
57
  ]);
56
58
  const isSPBPage = project === "SPB";
57
- return /* @__PURE__ */ jsx("header", { className: `${lp_theme({ variant })}`, id: `id_${id}`, children: /* @__PURE__ */ jsx(
58
- "div",
59
+ return /* @__PURE__ */ jsx(
60
+ "header",
59
61
  {
60
- className: `${isSPBPage ? spb_container : lp_container} flex center middle`,
61
- children: /* @__PURE__ */ jsx(
62
- "a",
62
+ className: `${lp_theme({ variant })}`,
63
+ id: `id_${id}`,
64
+ "aria-label": "main header",
65
+ children: /* @__PURE__ */ jsxs(
66
+ "div",
63
67
  {
64
- href: project == "AXI" ? "/invest" : "/",
65
- className: isSPBPage ? spb_hover : lp_hover,
66
- "aria-label": alt ?? "return to homepage",
67
- children: logo ? /* @__PURE__ */ jsx(
68
- "img",
69
- {
70
- src: logo.src,
71
- alt: logo.alt ?? "",
72
- height: Number(logo.height),
73
- width: Number(logo.width),
74
- className: "img_fluid"
75
- }
76
- ) : website.get(project)
68
+ className: `${isSPBPage ? spb_container : lp_container} flex center middle`,
69
+ style: { justifyContent: login ? "space-between" : "center" },
70
+ children: [
71
+ /* @__PURE__ */ jsx(
72
+ "a",
73
+ {
74
+ href: project == "AXI" ? "/invest" : "/",
75
+ className: isSPBPage ? spb_hover : lp_hover,
76
+ "aria-label": alt ?? "return to homepage",
77
+ children: logo ? /* @__PURE__ */ jsx(
78
+ "img",
79
+ {
80
+ src: logo.src,
81
+ alt: logo.alt ?? "",
82
+ height: Number(logo.height),
83
+ width: Number(logo.width),
84
+ className: "img_fluid"
85
+ }
86
+ ) : website.get(project)
87
+ }
88
+ ),
89
+ login && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(WithLogin, { variant }) })
90
+ ]
77
91
  }
78
92
  )
79
93
  }
80
- ) });
94
+ );
81
95
  };
82
96
  export {
83
97
  LandingPageHeader
@@ -0,0 +1,4 @@
1
+ export interface WithLoginProps {
2
+ variant: string;
3
+ }
4
+ export declare const WithLogin: ({ variant }: WithLoginProps) => import("react").JSX.Element;
@@ -0,0 +1,458 @@
1
+ "use client";
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 Link from "next/link.js";
6
+ import { getLoginGroups } from "../NavigationMenu/AxosBank/MobileMenu/MobileNavData.js";
7
+ import { desktop_only, btn_primary, btn_secondary, mobile_only, lp_login_button } from "./LandingPageHeader.css.js";
8
+ import styles$1 from "../NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js";
9
+ import "../Chevron/Chevron.css.js";
10
+ import "../Accordion/Accordion.js";
11
+ import "../Accordion/Accordion.css.js";
12
+ import "../icons/ArrowIcon/ArrowIcon.css.js";
13
+ import "../icons/CheckIcon/CheckIcon.css.js";
14
+ import '../assets/Modal/Modal.css';import '../assets/VideoWrapper/VideoWrapper.css';import '../assets/TopicalNavSet/TopicalNavSet.css';import '../assets/TopicalNavItem/TopicalNavItem.css';import '../assets/Topic/Topic.css';import '../assets/TextBlock/TextBlock.css';import '../assets/SocialMediaBar/SocialMediaBar.css';import '../assets/SecondaryFooter/SecondaryFooter.css';import '../assets/Pagination/Pagination.css';import '../assets/PageNavSet/PageNavigationSet.css';import '../assets/NavigationMenu/LaVictoire/NavBar2.css';import '../assets/NavigationMenu/AxosALTS/NavBar2.css';import '../assets/NavigationMenu/AxosClearing/NavBar2.css';import '../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../assets/NavigationMenu/AxosAdvisorServices/NavBar2.css';import '../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../assets/NavigationMenu/AxosAdvisor/NavBar2.css';import '../assets/Insight/Featured/Header.css';import '../assets/Insight/Featured/CategorySelector.css';import '../assets/Insight/Featured/Featured.css';import '../assets/ImageLink/ImageLink.css';import '../assets/VideoTile/VideoTile.css';import '../assets/HelpArticle/HelpArticle.css';import '../assets/FooterSiteMap/AxosBank/FooterSiteMap.css';import '../assets/FooterDisclosure/LVF/LaVictorieFooter.css';import '../assets/DownloadTile/DownloadTile.css';import '../assets/CollectInformationAlert/CollectInformationAlert.css';import '../assets/Chatbot/ChatWindow.css';import '../assets/Chatbot/Bubble.css';import '../assets/Chatbot/AnimatedGradientBorder.css';import '../assets/CallToActionBar/CallToActionBar.css';import '../assets/Insight/Insight.css';import '../assets/AwardsItem/AwardsItem.css';import '../assets/AwardsBanner/AwardsBanner.css';import '../assets/Auth/SignIn.css';import '../assets/Auth/ErrorAlert.css';import '../assets/Calculators/MarginTradingCalculator/MarginTradingCalculator.css';import '../assets/Forms/QuickPricer/UserInformation.css';import '../assets/Forms/QuickPricer/QuickPricerResults.css';import '../assets/BulletItem/BulletItem.css';import '../assets/Typography/Typography.css';import '../assets/icons/FollowIcon/FollowIcon.css';import '../assets/icons/DownloadIcon/DownloadIcon.css';import '../assets/themes/victorie.css';import '../assets/themes/ufb.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
15
+ /* empty css */
16
+ /* empty css */
17
+ /* empty css */
18
+ /* empty css */
19
+ /* empty css */
20
+ import clsx from "clsx";
21
+ import "../AlertBanner/AlertBanner.css.js";
22
+ import "../Article/Article.css.js";
23
+ import { Button } from "../Button/Button.js";
24
+ import "../Button/Button.css.js";
25
+ import { useClickAway } from "react-use";
26
+ import "../ArticlesSet/ArticlesSet.css.js";
27
+ import "../IconBillboard/IconBillboard.css.js";
28
+ import "../Calculators/calculator.css.js";
29
+ import "../Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js";
30
+ import "../Calculators/ApyCalculator/ApyCalculator.css.js";
31
+ import { useGlobalContext } from "../Modal/contextApi/store.js";
32
+ import "next/image.js";
33
+ import "../Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.js";
34
+ import "../HeroBanner/LargeBanner.css.js";
35
+ import "../HeroBanner/HeroBanner.css.js";
36
+ import "../HeroBanner/SelectionBanner.css.js";
37
+ /* empty css */
38
+ /* empty css */
39
+ import "../SetContainer/SetContainer.css.js";
40
+ import "../Table/Table.css.js";
41
+ import "../Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js";
42
+ import "../Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js";
43
+ import "@hookform/resolvers/zod";
44
+ import "../Input/Checkbox.js";
45
+ import "../Input/CurrencyInput.js";
46
+ import "../Input/Dropdown.js";
47
+ import "../Input/Dropdown.css.js";
48
+ import "../Input/Input.js";
49
+ import "../Input/Input.css.js";
50
+ import "../Input/InputAmount.js";
51
+ import "../Input/InputPhone.js";
52
+ import "../Input/InputTextArea.js";
53
+ import "../Input/DownPaymentInput.js";
54
+ import "../Input/RadioButton.js";
55
+ import "../Input/PercentageInput.js";
56
+ import "react-hook-form";
57
+ import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
58
+ import "../Forms/Forms.css.js";
59
+ import "../Forms/HoneyPot/index.js";
60
+ import "../Forms/SalesforceFieldsForm.js";
61
+ import "../Input/RadioButton.css.js";
62
+ import "../Input/Checkbox.css.js";
63
+ import "../LoadingIndicator/LoadingIndicator.css.js";
64
+ import "../Interstitial/Interstitial-variants.css.js";
65
+ import "../Inputs/Input.css.js";
66
+ /* empty css */
67
+ import "../Hyperlink/Hyperlink.css.js";
68
+ /* empty css */
69
+ import "iframe-resizer";
70
+ /* empty css */
71
+ import "../Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js";
72
+ import "../Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js";
73
+ import "../Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js";
74
+ /* empty css */
75
+ import "react-dom";
76
+ /* empty css */
77
+ import "../Auth/SignInPassword.js";
78
+ /* empty css */
79
+ /* empty css */
80
+ /* empty css */
81
+ /* empty css */
82
+ import "../Carousel/index.js";
83
+ /* empty css */
84
+ /* empty css */
85
+ import "../Chatbot/store/chat.js";
86
+ import "../Chatbot/Chatbot.js";
87
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
88
+ /* empty css */
89
+ import "../Chatbot/store/messages.js";
90
+ /* empty css */
91
+ import "../Comparison/Comparison.css.js";
92
+ import "../Tab/Tab.css.js";
93
+ import "../icons/Star/Star.css.js";
94
+ import "../ContentBanner/ContentBanner.css.js";
95
+ /* empty css */
96
+ import "../ExecutiveBio/ExecutiveBio.css.js";
97
+ import "../FaqAccordion/index.js";
98
+ import "../FooterDisclosure/FooterDisclosure.css.js";
99
+ /* empty css */
100
+ /* empty css */
101
+ /* empty css */
102
+ import "../ImageBillboard/ImageBillboard.css.js";
103
+ import "next/script.js";
104
+ /* empty css */
105
+ /* empty css */
106
+ /* empty css */
107
+ /* empty css */
108
+ /* empty css */
109
+ /* empty css */
110
+ import "next/navigation.js";
111
+ /* empty css */
112
+ /* empty css */
113
+ /* empty css */
114
+ import { signin_subheader } from "../NavigationMenu/AxosBank/NavBar.css.js";
115
+ import styles from "../NavigationMenu/AxosBank/NavBar.module.js";
116
+ /* empty css */
117
+ /* empty css */
118
+ /* empty css */
119
+ /* empty css */
120
+ import "../PageNavItem/PageNavItem.css.js";
121
+ import "react-slick";
122
+ /* empty css */
123
+ /* empty css */
124
+ /* empty css */
125
+ /* empty css */
126
+ import "../StepItem/StepItem.css.js";
127
+ import "../StepItemSet/StepItemSet.css.js";
128
+ /* empty css */
129
+ /* empty css */
130
+ /* empty css */
131
+ /* empty css */
132
+ /* empty css */
133
+ /* empty css */
134
+ const WithLogin = ({ variant }) => {
135
+ const [open, setOpen] = useState(false);
136
+ const { resolveUrl } = useGlobalContext();
137
+ const [queryString, setQueryString] = useState("");
138
+ const [isOpenSignIn, setisOpenSignIn] = useState(false);
139
+ const [loginDrawerOpen, setLoginDrawerOpen] = useState(false);
140
+ const ref = useRef(null);
141
+ const toggle = () => setisOpenSignIn(!isOpenSignIn);
142
+ const [isClient, setIsClient] = useState(false);
143
+ const drawerRef = useRef(null);
144
+ const loginDrawerRef = useRef(null);
145
+ const loginGroups = useMemo(() => getLoginGroups(resolveUrl), [resolveUrl]);
146
+ const handleLoginDrawerOpen = () => setLoginDrawerOpen(true);
147
+ const handleLoginDrawerClose = () => setLoginDrawerOpen(false);
148
+ const handleLoginDrawerOutsideClick = (e) => {
149
+ if (loginDrawerRef.current && !loginDrawerRef.current.contains(e.target)) {
150
+ setLoginDrawerOpen(false);
151
+ }
152
+ };
153
+ const handleOutsideClick = (e) => {
154
+ if (drawerRef.current && !drawerRef.current.contains(e.target)) {
155
+ setOpen(false);
156
+ }
157
+ };
158
+ useEffect(() => {
159
+ if (typeof window !== "undefined") {
160
+ const search = window.location.search;
161
+ if (search.startsWith("?")) {
162
+ setQueryString(search.slice(1));
163
+ }
164
+ }
165
+ }, []);
166
+ useEffect(() => {
167
+ if (open) {
168
+ document.addEventListener("mousedown", handleOutsideClick);
169
+ } else {
170
+ document.removeEventListener("mousedown", handleOutsideClick);
171
+ }
172
+ return () => document.removeEventListener("mousedown", handleOutsideClick);
173
+ }, [open]);
174
+ useClickAway(ref, (e) => {
175
+ if (e?.target?.tagName !== "A") {
176
+ setisOpenSignIn(false);
177
+ }
178
+ });
179
+ useEffect(() => {
180
+ setIsClient(true);
181
+ }, []);
182
+ const handleKeyDownContainer = (e) => {
183
+ if (e.key === "Tab") {
184
+ const focusableElements = ref.current?.querySelectorAll(
185
+ 'button, [href], a, [tabindex]:not([tabindex="-1"])'
186
+ );
187
+ if (focusableElements && isClient) {
188
+ const lastElement = focusableElements[focusableElements.length - 1];
189
+ const isShiftPressed = e.shiftKey;
190
+ if (!isShiftPressed && document.activeElement === lastElement) {
191
+ e.preventDefault();
192
+ toggle();
193
+ }
194
+ }
195
+ }
196
+ };
197
+ useEffect(() => {
198
+ const onEsc = (e) => {
199
+ if (e.key === "Escape") setOpen(false);
200
+ };
201
+ if (open) {
202
+ document.addEventListener("keydown", onEsc);
203
+ }
204
+ return () => document.removeEventListener("keydown", onEsc);
205
+ }, [open]);
206
+ useEffect(() => {
207
+ if (!loginDrawerOpen) return;
208
+ document.addEventListener("mousedown", handleLoginDrawerOutsideClick);
209
+ return () => document.removeEventListener("mousedown", handleLoginDrawerOutsideClick);
210
+ }, [loginDrawerOpen]);
211
+ useEffect(() => {
212
+ const onEsc = (e) => {
213
+ if (e.key === "Escape") setLoginDrawerOpen(false);
214
+ };
215
+ if (loginDrawerOpen) {
216
+ document.addEventListener("keydown", onEsc);
217
+ }
218
+ return () => document.removeEventListener("keydown", onEsc);
219
+ }, [loginDrawerOpen]);
220
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
221
+ /* @__PURE__ */ jsxs(
222
+ "div",
223
+ {
224
+ className: `${desktop_only} ${styles.signin_wrap} flex_row middle relative`,
225
+ ref,
226
+ onKeyDown: handleKeyDownContainer,
227
+ children: [
228
+ /* @__PURE__ */ jsxs(
229
+ Button,
230
+ {
231
+ className: clsx(
232
+ styles.signin_btn,
233
+ "flex_row",
234
+ "center",
235
+ "middle",
236
+ isOpenSignIn ? styles.open : "",
237
+ variant === "primary" || variant === "secondary" ? btn_primary : btn_secondary
238
+ ),
239
+ as: "button",
240
+ type: "button",
241
+ color: "primary",
242
+ id: "signIn",
243
+ action: toggle,
244
+ size: "small",
245
+ "aria-controls": "signin-drop-menu",
246
+ children: [
247
+ /* @__PURE__ */ jsx("span", { children: "Log in" }),
248
+ /* @__PURE__ */ jsx(
249
+ "svg",
250
+ {
251
+ width: "20",
252
+ height: "12",
253
+ viewBox: "0 0 20 12",
254
+ fill: "none",
255
+ xmlns: "http://www.w3.org/2000/svg",
256
+ "aria-hidden": true,
257
+ children: /* @__PURE__ */ jsx(
258
+ "path",
259
+ {
260
+ d: "M0.46875 1.76574L9.99908 11.2961L19.5294 1.76574L18.4687 0.705078L9.99908 9.17491L1.52941 0.705078L0.46875 1.76574Z",
261
+ fill: "white"
262
+ }
263
+ )
264
+ }
265
+ )
266
+ ]
267
+ }
268
+ ),
269
+ /* @__PURE__ */ jsx(
270
+ "div",
271
+ {
272
+ className: `${styles.signin_dropdown} ${styles.shadow} rounded bg_white`,
273
+ children: /* @__PURE__ */ jsx("div", { className: styles.opacity, children: /* @__PURE__ */ jsx(
274
+ "ul",
275
+ {
276
+ className: "list_unstyled",
277
+ "aria-expanded": isOpenSignIn,
278
+ id: "signin-drop-menu",
279
+ children: loginGroups.map((group) => /* @__PURE__ */ jsxs(
280
+ "li",
281
+ {
282
+ "aria-label": `${group.heading} login options`,
283
+ role: "heading",
284
+ className: styles$1.loginAccordionGroup,
285
+ children: [
286
+ /* @__PURE__ */ jsx("span", { className: styles.signin_header, children: group.heading }),
287
+ /* @__PURE__ */ jsx("ul", { className: "list_unstyled", children: group.items.map((item) => /* @__PURE__ */ jsx(
288
+ "li",
289
+ {
290
+ className: `${styles.signin_subheader} ${signin_subheader}`,
291
+ "aria-label": `access ${item.title}`,
292
+ children: /* @__PURE__ */ jsx(
293
+ Link,
294
+ {
295
+ href: item.url + (queryString && !item.url.includes("?") ? `?${queryString}` : ""),
296
+ children: /* @__PURE__ */ jsx("span", { children: item.title })
297
+ }
298
+ )
299
+ },
300
+ item.title
301
+ )) })
302
+ ]
303
+ },
304
+ group.heading
305
+ ))
306
+ }
307
+ ) })
308
+ }
309
+ )
310
+ ]
311
+ }
312
+ ),
313
+ /* @__PURE__ */ jsxs("div", { className: mobile_only, children: [
314
+ /* @__PURE__ */ jsxs(
315
+ "button",
316
+ {
317
+ type: "button",
318
+ className: `${lp_login_button} flex`,
319
+ onClick: handleLoginDrawerOpen,
320
+ "aria-label": "Open login options",
321
+ style: {
322
+ color: variant === "primary" || variant === "secondary" ? "#14263D" : "#FFF"
323
+ },
324
+ children: [
325
+ /* @__PURE__ */ jsx("span", { children: "Log in" }),
326
+ /* @__PURE__ */ jsx(
327
+ "svg",
328
+ {
329
+ width: 24,
330
+ height: 24,
331
+ viewBox: "0 0 24 24",
332
+ fill: "none",
333
+ xmlns: "http://www.w3.org/2000/svg",
334
+ "aria-hidden": "true",
335
+ children: /* @__PURE__ */ jsx(
336
+ "path",
337
+ {
338
+ fillRule: "evenodd",
339
+ clipRule: "evenodd",
340
+ d: "M22.5 15.75V17.25H1.5V15.75H22.5ZM22.5 11.25V12.75H1.5V11.25H22.5ZM22.5 6.75V8.25H1.5V6.75H22.5Z",
341
+ fill: variant === "primary" || variant === "secondary" ? "#14263D" : "#FFF"
342
+ }
343
+ )
344
+ }
345
+ )
346
+ ]
347
+ }
348
+ ),
349
+ /* @__PURE__ */ jsx(AnimatePresence, { children: loginDrawerOpen && /* @__PURE__ */ jsx(
350
+ motion.div,
351
+ {
352
+ className: styles$1.overlay,
353
+ initial: { opacity: 0 },
354
+ animate: { opacity: 1 },
355
+ exit: { opacity: 0 },
356
+ children: /* @__PURE__ */ jsxs(
357
+ motion.div,
358
+ {
359
+ className: `${styles$1.drawer} flex_col`,
360
+ ref: loginDrawerRef,
361
+ initial: { x: "100%" },
362
+ animate: { x: 0 },
363
+ exit: { x: "30%" },
364
+ transition: { type: "tween", duration: 0.3 },
365
+ role: "dialog",
366
+ "aria-modal": "true",
367
+ "aria-label": "Login options",
368
+ children: [
369
+ /* @__PURE__ */ jsxs("div", { className: styles$1.header, children: [
370
+ /* @__PURE__ */ jsx(
371
+ "a",
372
+ {
373
+ href: window.location.href.split("/")[3] === "invest" ? "/invest" : "/",
374
+ "aria-label": "return to home page",
375
+ children: /* @__PURE__ */ jsx(
376
+ "img",
377
+ {
378
+ src: "https://www.axos.com/images/1sBwCIn5mqOg5DK2uXDJPc/axb_mobile_logo.png",
379
+ alt: "",
380
+ width: 86,
381
+ height: 19
382
+ }
383
+ )
384
+ }
385
+ ),
386
+ /* @__PURE__ */ jsx("span", { className: styles$1.loginDrawerTitle, children: "Log in" }),
387
+ /* @__PURE__ */ jsx(
388
+ "button",
389
+ {
390
+ type: "button",
391
+ className: `${styles$1.close} flex_col`,
392
+ "aria-label": "Close login options",
393
+ onClick: handleLoginDrawerClose,
394
+ children: /* @__PURE__ */ jsx(
395
+ "svg",
396
+ {
397
+ xmlns: "http://www.w3.org/2000/svg",
398
+ width: "24",
399
+ height: "24",
400
+ viewBox: "0 0 24 24",
401
+ fill: "none",
402
+ "aria-hidden": "true",
403
+ children: /* @__PURE__ */ jsx(
404
+ "path",
405
+ {
406
+ 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",
407
+ fill: "#14263D"
408
+ }
409
+ )
410
+ }
411
+ )
412
+ }
413
+ )
414
+ ] }),
415
+ /* @__PURE__ */ jsx("div", { className: styles$1.loginDrawerContent, children: /* @__PURE__ */ jsx("div", { className: styles$1.loginAccordion, children: /* @__PURE__ */ jsx(
416
+ "ul",
417
+ {
418
+ className: styles$1.loginAccordionList,
419
+ "aria-label": "Login options",
420
+ children: loginGroups.map((group) => /* @__PURE__ */ jsxs(
421
+ "li",
422
+ {
423
+ className: styles$1.loginAccordionGroup,
424
+ "aria-label": `${group.heading} login options`,
425
+ children: [
426
+ /* @__PURE__ */ jsx("span", { className: styles$1.loginAccordionHeading, children: group.heading }),
427
+ /* @__PURE__ */ jsx("ul", { className: styles$1.loginAccordionGroupList, children: group.items.map((item) => /* @__PURE__ */ jsx(
428
+ "li",
429
+ {
430
+ "aria-label": `access ${item.title}`,
431
+ children: /* @__PURE__ */ jsx(
432
+ Link,
433
+ {
434
+ href: item.url + (queryString && !item.url.includes("?") ? `?${queryString}` : ""),
435
+ className: styles$1.menuItem,
436
+ children: /* @__PURE__ */ jsx("span", { children: item.title })
437
+ }
438
+ )
439
+ },
440
+ item.title
441
+ )) })
442
+ ]
443
+ },
444
+ group.heading
445
+ ))
446
+ }
447
+ ) }) })
448
+ ]
449
+ }
450
+ )
451
+ }
452
+ ) })
453
+ ] })
454
+ ] });
455
+ };
456
+ export {
457
+ WithLogin
458
+ };
@@ -1,10 +1,15 @@
1
1
  import { LandingPageHeader } from "./LandingPageHeader.js";
2
- import { lp_container, lp_hover, lp_theme, spb_container, spb_hover, svg_fill } from "./LandingPageHeader.css.js";
2
+ import { btn_primary, btn_secondary, desktop_only, lp_container, lp_hover, lp_login_button, lp_theme, mobile_only, spb_container, spb_hover, svg_fill } from "./LandingPageHeader.css.js";
3
3
  export {
4
4
  LandingPageHeader,
5
+ btn_primary,
6
+ btn_secondary,
7
+ desktop_only,
5
8
  lp_container,
6
9
  lp_hover,
10
+ lp_login_button,
7
11
  lp_theme,
12
+ mobile_only,
8
13
  spb_container,
9
14
  spb_hover,
10
15
  svg_fill