@axos-web-dev/shared-components 2.0.0-dev.3-evo-ui → 2.0.0-dev.30-toast

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 (201) hide show
  1. package/dist/ATMLocator/ATMLocator.js +7 -5
  2. package/dist/Accordion/Accordion.js +3 -3
  3. package/dist/AlertBanner/index.js +1 -1
  4. package/dist/Article/Article.js +1 -1
  5. package/dist/Auth/ErrorAlert.js +8 -6
  6. package/dist/Button/Button.js +26 -6
  7. package/dist/Calculators/AnnualFeeCalculator/index.js +2 -2
  8. package/dist/Calculators/ApyCalculator/ApyCalculator.css.d.ts +46 -5
  9. package/dist/Calculators/ApyCalculator/ApyCalculator.css.js +72 -19
  10. package/dist/Calculators/ApyCalculator/index.js +583 -293
  11. package/dist/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.d.ts +95 -0
  12. package/dist/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css.js +101 -0
  13. package/dist/Calculators/ApyCalculatorUserTest/index.d.ts +12 -0
  14. package/dist/Calculators/ApyCalculatorUserTest/index.js +618 -0
  15. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +2 -1
  16. package/dist/Calculators/BuyDownCalculator/index.js +1 -1
  17. package/dist/Calculators/Calculator.js +19 -7
  18. package/dist/Calculators/MarginTradingCalculator/index.js +8 -6
  19. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +2 -2
  20. package/dist/Calculators/MaxLoanCalculator/index.js +2 -2
  21. package/dist/Calculators/MonthlyPaymentCalculator/index.js +2 -2
  22. package/dist/Calculators/MonthlyPaymentLVFCalculator/index.js +1 -1
  23. package/dist/Calculators/calculator.css.d.ts +21 -1
  24. package/dist/Calculators/calculator.css.js +3 -3
  25. package/dist/Calculators/index.d.ts +1 -0
  26. package/dist/Calculators/index.js +2 -0
  27. package/dist/Carousel/index.js +9 -7
  28. package/dist/Chatbot/AnimatedGradientBorder.css.d.ts +5 -0
  29. package/dist/Chatbot/AnimatedGradientBorder.css.js +13 -3
  30. package/dist/Chatbot/AudioManager.d.ts +19 -0
  31. package/dist/Chatbot/AudioManager.js +61 -0
  32. package/dist/Chatbot/Bubble.css.js +1 -0
  33. package/dist/Chatbot/Bubble.d.ts +1 -0
  34. package/dist/Chatbot/Bubble.js +3 -12
  35. package/dist/Chatbot/Chat.js +17 -7
  36. package/dist/Chatbot/ChatWindow.css.d.ts +8 -0
  37. package/dist/Chatbot/ChatWindow.css.js +49 -33
  38. package/dist/Chatbot/ChatWindow.js +459 -366
  39. package/dist/Chatbot/Chatbot.css.js +0 -1
  40. package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
  41. package/dist/Chatbot/Chatbot.d.ts +13 -2
  42. package/dist/Chatbot/Chatbot.js +200 -84
  43. package/dist/Chatbot/ChatbotMessage.d.ts +1 -0
  44. package/dist/Chatbot/ChatbotMessage.js +189 -160
  45. package/dist/Chatbot/EllipsisAnimation.js +0 -6
  46. package/dist/Chatbot/ExpandChatToggle.d.ts +8 -0
  47. package/dist/Chatbot/ExpandChatToggle.js +74 -0
  48. package/dist/Chatbot/index.js +11 -2
  49. package/dist/Chatbot/store/chat.d.ts +8 -0
  50. package/dist/Chatbot/store/chat.js +14 -2
  51. package/dist/Chatbot/useHeadlessChat.js +1 -2
  52. package/dist/Chevron/index.js +10 -5
  53. package/dist/Comparison/Comparison.css.js +3 -2
  54. package/dist/Comparison/Comparison.js +7 -5
  55. package/dist/ContentBanner/index.js +1 -1
  56. package/dist/ExecutiveBio/ExecutiveBio.js +115 -106
  57. package/dist/ExecutiveBio/ExecutiveBioSet.js +1 -1
  58. package/dist/FaqAccordion/index.js +8 -6
  59. package/dist/FooterDisclosure/FooterDisclosure.js +1 -1
  60. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +26 -6
  61. package/dist/Forms/ApplyNow.js +8 -6
  62. package/dist/Forms/BoatMooringLocation.d.ts +6 -1
  63. package/dist/Forms/BoatMooringLocation.js +145 -8
  64. package/dist/Forms/ContactUsBusiness.js +9 -7
  65. package/dist/Forms/ContactUsBusinessNameEmail.js +9 -7
  66. package/dist/Forms/ContactUsNMLSId.js +9 -7
  67. package/dist/Forms/ContactUsSchwabAAS.d.ts +11 -0
  68. package/dist/Forms/ContactUsSchwabAAS.js +263 -0
  69. package/dist/Forms/CpraRequest.js +8 -6
  70. package/dist/Forms/CraPublicFile.js +9 -7
  71. package/dist/Forms/EmailOnly.js +10 -8
  72. package/dist/Forms/FormEnums.js +2 -2
  73. package/dist/Forms/MortgageRate/MortgageRateForm.js +9 -7
  74. package/dist/Forms/MortgageRate/MortgageRateWatch.js +8 -6
  75. package/dist/Forms/MortgageWarehouseLending.d.ts +1 -1
  76. package/dist/Forms/MortgageWarehouseLending.js +16 -14
  77. package/dist/Forms/SuccesForm.js +9 -7
  78. package/dist/Forms/index.d.ts +1 -0
  79. package/dist/Forms/index.js +2 -0
  80. package/dist/HeroBanner/HeroBanner.css.d.ts +1 -0
  81. package/dist/HeroBanner/HeroBanner.css.js +19 -16
  82. package/dist/HeroBanner/HeroBanner.d.ts +1 -1
  83. package/dist/HeroBanner/HeroBanner.interface.d.ts +6 -1
  84. package/dist/HeroBanner/HeroBanner.js +54 -183
  85. package/dist/HeroBanner/HeroVideoPoster.d.ts +5 -0
  86. package/dist/HeroBanner/HeroVideoPoster.js +24 -0
  87. package/dist/HeroBanner/LargeBanner.css.d.ts +110 -0
  88. package/dist/HeroBanner/LargeBanner.css.js +22 -8
  89. package/dist/HeroBanner/LargeHeroBanner.d.ts +5 -0
  90. package/dist/HeroBanner/LargeHeroBanner.js +228 -0
  91. package/dist/HeroBanner/index.js +3 -2
  92. package/dist/Hyperlink/index.js +9 -7
  93. package/dist/IconBillboard/IconBillboard.css.js +2 -1
  94. package/dist/IconBillboard/IconBillboard.interface.d.ts +2 -0
  95. package/dist/IconBillboard/IconBillboardSet.js +1 -1
  96. package/dist/IconBillboard/sections/CallToActionSection.js +3 -1
  97. package/dist/ImageBillboard/ImageBillboard.interface.d.ts +2 -0
  98. package/dist/ImageBillboard/ImageBillboard.js +1 -1
  99. package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
  100. package/dist/ImageBillboard/ImageBillboardSet.js +4 -1
  101. package/dist/ImageLink/ImageLink.js +7 -5
  102. package/dist/ImageLink/ImageLinkSet.js +6 -4
  103. package/dist/ImageLink/index.js +8 -6
  104. package/dist/ImageToast/ImageToast.css.d.ts +5 -0
  105. package/dist/ImageToast/ImageToast.css.js +13 -0
  106. package/dist/ImageToast/index.d.ts +9 -0
  107. package/dist/ImageToast/index.js +188 -0
  108. package/dist/Input/Checkbox.js +2 -2
  109. package/dist/Input/DownPaymentInput.js +1 -1
  110. package/dist/Input/Dropdown.js +1 -1
  111. package/dist/Input/Input.js +1 -1
  112. package/dist/Input/InputTextArea.js +1 -1
  113. package/dist/Insight/Featured/CategorySelector.js +8 -6
  114. package/dist/Insight/Featured/Featured.js +10 -8
  115. package/dist/Insight/Featured/Header.js +8 -6
  116. package/dist/LandingPageHeader/LandingPageHeader.js +1 -1
  117. package/dist/Modal/Modal.js +8 -6
  118. package/dist/Modal/contextApi/store.d.ts +0 -3
  119. package/dist/Modal/contextApi/store.js +88 -2
  120. package/dist/NavigationMenu/AxosALTS/index.js +7 -5
  121. package/dist/NavigationMenu/AxosAdvisorServices/index.js +0 -1
  122. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +7 -5
  123. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +27 -27
  124. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +13 -8
  125. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +30 -25
  126. package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
  127. package/dist/NavigationMenu/AxosBank/SubNavBar.js +78 -41
  128. package/dist/NavigationMenu/AxosBank/index.js +50 -32
  129. package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +40 -43
  130. package/dist/NavigationMenu/AxosFiduciary/index.js +0 -1
  131. package/dist/NavigationMenu/LaVictoire/index.js +8 -6
  132. package/dist/NavigationMenu/Navbar.js +9 -7
  133. package/dist/NavigationMenu/SignInNavButton.js +10 -8
  134. package/dist/PageNavItem/PageNavItem.js +1 -1
  135. package/dist/SetContainer/SetContainer.css.d.ts +1 -0
  136. package/dist/SetContainer/SetContainer.css.js +5 -3
  137. package/dist/SetContainer/SetContainer.js +15 -7
  138. package/dist/SetContainer/index.js +2 -1
  139. package/dist/SocialMediaBar/iconsRepository.js +8 -6
  140. package/dist/StepItem/StepItem.js +1 -1
  141. package/dist/StepItemSet/StepItemSet.js +1 -1
  142. package/dist/Table/Table.css.d.ts +14 -1
  143. package/dist/Table/Table.css.js +21 -19
  144. package/dist/Table/Table.d.ts +1 -1
  145. package/dist/Table/Table.js +5 -3
  146. package/dist/Topic/Topic.js +1 -1
  147. package/dist/TopicalNavItem/TopicalNavItem.css.d.ts +0 -1
  148. package/dist/TopicalNavItem/TopicalNavItem.css.js +2 -4
  149. package/dist/TopicalNavItem/TopicalNavItem.js +11 -33
  150. package/dist/TopicalNavItem/index.js +1 -2
  151. package/dist/VideoTile/VideoTile.js +7 -5
  152. package/dist/VideoWrapper/index.js +8 -6
  153. package/dist/assets/Calculators/ApyCalculator/ApyCalculator.css +350 -64
  154. package/dist/assets/Calculators/ApyCalculatorUserTest/ApyCalculatorUserTest.css +424 -0
  155. package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +2 -2
  156. package/dist/assets/Calculators/calculator.css +25 -15
  157. package/dist/assets/Chatbot/AnimatedGradientBorder.css +104 -24
  158. package/dist/assets/Chatbot/Bubble.css +25 -7
  159. package/dist/assets/Chatbot/ChatWindow.css +181 -88
  160. package/dist/assets/Comparison/Comparison.css +2 -2
  161. package/dist/assets/DownloadTile/DownloadTile.css +7 -0
  162. package/dist/assets/ExecutiveBio/ExecutiveBio.css +38 -14
  163. package/dist/assets/HeroBanner/HeroBanner.css +83 -65
  164. package/dist/assets/HeroBanner/LargeBanner.css +126 -59
  165. package/dist/assets/IconBillboard/IconBillboard.css +33 -0
  166. package/dist/assets/ImageBillboard/ImageBillboard.css +1 -1
  167. package/dist/assets/ImageToast/ImageToast.css +33 -0
  168. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css +49 -49
  169. package/dist/assets/NavigationMenu/AxosBank/NavBar.css +88 -88
  170. package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css +82 -82
  171. package/dist/assets/SetContainer/SetContainer.css +25 -15
  172. package/dist/assets/Table/Table.css +85 -76
  173. package/dist/assets/TextBlock/TextBlock.css +7 -0
  174. package/dist/assets/TopicalNavItem/TopicalNavItem.css +25 -52
  175. package/dist/assets/TopicalNavSet/TopicalNavSet.css +29 -4
  176. package/dist/assets/VideoTile/VideoTile.css +6 -0
  177. package/dist/assets/globals.css +9 -9
  178. package/dist/assets/notification.mp3.js +4 -0
  179. package/dist/assets/themes/axos.css +8 -7
  180. package/dist/assets/themes/premier.css +9 -8
  181. package/dist/assets/themes/ufb.css +9 -8
  182. package/dist/assets/themes/victorie.css +9 -8
  183. package/dist/main.js +24 -8
  184. package/dist/themes/axos.css.d.ts +1 -0
  185. package/dist/themes/axos.css.js +1 -1
  186. package/dist/utils/allowedAxosDomains.js +2 -1
  187. package/dist/utils/appendQueryParams.d.ts +3 -1
  188. package/dist/utils/appendQueryParams.js +66 -66
  189. package/dist/utils/getPosition.d.ts +1 -0
  190. package/dist/utils/getPosition.js +17 -0
  191. package/dist/utils/index.js +3 -1
  192. package/dist/utils/tealiumOrganicFallback.d.ts +21 -0
  193. package/dist/utils/tealiumOrganicFallback.js +26 -0
  194. package/dist/utils/useVisibility.d.ts +1 -0
  195. package/dist/utils/useVisibility.js +18 -0
  196. package/dist/utils/variant.types.d.ts +1 -0
  197. package/dist/vite-env.d.js +1 -0
  198. package/package.json +148 -148
  199. package/dist/Chatbot/authenticate.d.ts +0 -3
  200. package/dist/Chatbot/authenticate.js +0 -16
  201. package/dist/assets/Chatbot/Chatbot.css +0 -3
@@ -1,76 +1,76 @@
1
- const appendQueryParams = () => {
2
- const currentOrigin = window.location.origin;
3
- const currentPathname = window.location.pathname;
4
- const filterParams = (href, currentSearch) => {
5
- try {
6
- const search = currentSearch ?? window.location.search;
7
- const searchParams = new URLSearchParams(search);
8
- const base = window.location.origin + window.location.pathname + window.location.search;
9
- const url = new URL(href, base);
10
- const existingParams = new URLSearchParams(url.search);
11
- const newParams = new URLSearchParams();
12
- const addedKeys = /* @__PURE__ */ new Set();
13
- for (const key of existingParams.keys()) {
14
- addedKeys.add(decodeURIComponent(key));
15
- }
1
+ const filterParams = (href, currentSearch) => {
2
+ if (typeof window === "undefined") return href;
3
+ try {
4
+ if (!href || href.startsWith("tel:") || href.startsWith("mailto:") || href === "#" || href === "") {
5
+ return href;
6
+ }
7
+ const search = currentSearch ?? window.location.search;
8
+ const searchParams = new URLSearchParams(search);
9
+ const base = window.location.href;
10
+ const url = new URL(href, base);
11
+ if (url.pathname === window.location.pathname && url.hash) {
12
+ const existingInHash = new URLSearchParams(url.search);
16
13
  for (const [key, value] of searchParams.entries()) {
17
- const decodedKey = decodeURIComponent(key);
18
- const decodedValue = decodeURIComponent(value);
19
- const lowerKey = decodedKey.toLowerCase();
20
- if (!addedKeys.has(lowerKey) && !decodedKey.includes("[]")) {
21
- newParams.append(lowerKey, decodedValue);
22
- addedKeys.add(lowerKey);
23
- } else if (decodedKey.includes("[]")) {
24
- const existingValues = existingParams.getAll(key).map(decodeURIComponent);
25
- if (!existingValues.includes(decodedValue)) {
26
- newParams.append(decodedKey, decodedValue);
27
- }
14
+ const decodedKey = decodeURIComponent(key).toLowerCase();
15
+ if (!existingInHash.has(decodedKey) && !decodedKey.includes("[]")) {
16
+ existingInHash.set(decodedKey, decodeURIComponent(value));
28
17
  }
29
18
  }
30
- const mergedParams = new URLSearchParams(existingParams);
31
- newParams.forEach((value, key) => mergedParams.append(key, value));
32
- return `${url.origin}${url.pathname}?${mergedParams.toString()}${url.hash}`;
33
- } catch (e) {
34
- console.error(e);
35
- return href;
19
+ return `?${existingInHash.toString()}${url.hash}`;
36
20
  }
37
- };
38
- const handleSamePageClick = (e) => {
39
- const anchor = e.target?.closest?.("a[href]");
40
- if (!anchor || anchor.classList.contains("ext-link"))
41
- return;
42
- const href = anchor.getAttribute("href")?.trim();
43
- if (!href || href.startsWith("tel:") || href.startsWith("mailto:") || href === "#" || href === "" || href.startsWith("#"))
44
- return;
45
- const base = window.location.origin + window.location.pathname + window.location.search;
46
- const url = new URL(href, base);
47
- if (url.origin !== currentOrigin || url.pathname !== currentPathname)
48
- return;
49
- e.preventDefault();
50
- e.stopImmediatePropagation();
51
- const merged = filterParams(href, window.location.search);
52
- const mergedUrl = new URL(merged, window.location.origin);
53
- const fullUrl = `${mergedUrl.pathname}${mergedUrl.search}${mergedUrl.hash}`;
54
- window.history.replaceState({ ...window.history.state }, "", fullUrl);
55
- window.dispatchEvent(
56
- new PopStateEvent("popstate", { state: window.history.state })
57
- );
58
- if (mergedUrl.hash) {
59
- const el = document.querySelector(mergedUrl.hash);
60
- el?.scrollIntoView({ behavior: "smooth" });
21
+ const existingParams = new URLSearchParams(url.search);
22
+ const newParams = new URLSearchParams();
23
+ const addedKeys = /* @__PURE__ */ new Set();
24
+ for (const key of existingParams.keys()) {
25
+ addedKeys.add(decodeURIComponent(key));
61
26
  }
62
- };
63
- document.addEventListener("click", handleSamePageClick, true);
64
- if (window.location.search.length) {
65
- const searchParams = new URLSearchParams(window.location.search);
66
- document.querySelectorAll("a[href]:not(.ext-link)").forEach((anchor) => {
67
- const href = anchor.getAttribute("href")?.trim();
68
- if (href && !href.startsWith("tel:") && !href.startsWith("mailto:") && href !== "#" && href !== "" && !href.startsWith("#")) {
69
- anchor.href = filterParams(href, searchParams.toString());
27
+ for (const [key, value] of searchParams.entries()) {
28
+ const decodedKey = decodeURIComponent(key);
29
+ const decodedValue = decodeURIComponent(value);
30
+ const lowerKey = decodedKey.toLowerCase();
31
+ if (!addedKeys.has(lowerKey) && !decodedKey.includes("[]")) {
32
+ newParams.append(lowerKey, decodedValue);
33
+ addedKeys.add(lowerKey);
34
+ } else if (decodedKey.includes("[]")) {
35
+ const existingValues = existingParams.getAll(key).map(decodeURIComponent);
36
+ if (!existingValues.includes(decodedValue)) {
37
+ newParams.append(decodedKey, decodedValue);
38
+ }
70
39
  }
71
- });
40
+ }
41
+ const mergedParams = new URLSearchParams(existingParams);
42
+ newParams.forEach((value, key) => mergedParams.append(key, value));
43
+ return `${url.origin}${url.pathname}?${mergedParams.toString()}${url.hash}`;
44
+ } catch (e) {
45
+ console.error(e);
46
+ return href;
47
+ }
48
+ };
49
+ const handleAnchorClick = (e, resolved) => {
50
+ if (resolved.includes("#") && !resolved.startsWith("http")) {
51
+ e.preventDefault();
52
+ const hash = resolved.split("#")[1];
53
+ const fullUrl = new URL(resolved, window.location.href);
54
+ window.history.pushState(null, "", fullUrl.search + fullUrl.hash);
55
+ window.dispatchEvent(new PopStateEvent("popstate"));
56
+ document.getElementById(hash)?.scrollIntoView({ behavior: "smooth" });
57
+ return true;
72
58
  }
59
+ return false;
60
+ };
61
+ const appendQueryParams = (currentSearch) => {
62
+ const search = currentSearch ?? window.location.search;
63
+ if (!search.length) return;
64
+ const searchParams = new URLSearchParams(search);
65
+ document.querySelectorAll("a[href]:not(.ext-link)").forEach((anchor) => {
66
+ const href = anchor.getAttribute("href")?.trim();
67
+ if (href && !href.startsWith("tel:") && !href.startsWith("mailto:") && href !== "#" && href !== "" && !href.startsWith("#")) {
68
+ anchor.href = filterParams(href, searchParams.toString());
69
+ }
70
+ });
73
71
  };
74
72
  export {
75
- appendQueryParams
73
+ appendQueryParams,
74
+ filterParams,
75
+ handleAnchorClick
76
76
  };
@@ -0,0 +1 @@
1
+ export declare const getPosition: (text: string | undefined) => "default" | "top left" | "top right" | "bottom left" | "bottom right";
@@ -0,0 +1,17 @@
1
+ const getPosition = (text) => {
2
+ switch (text) {
3
+ case "top left":
4
+ return "top left";
5
+ case "top right":
6
+ return "top right";
7
+ case "bottom left":
8
+ return "bottom left";
9
+ case "bottom right":
10
+ return "bottom right";
11
+ default:
12
+ return "default";
13
+ }
14
+ };
15
+ export {
16
+ getPosition
17
+ };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { findMoreAxosDomains, getMoreDomains, isAllowedUrl } from "./allowedAxosDomains.js";
3
- import { appendQueryParams } from "./appendQueryParams.js";
3
+ import { appendQueryParams, filterParams, handleAnchorClick } from "./appendQueryParams.js";
4
4
  import { createCachedEmailValidator } from "./emailValidation.js";
5
5
  import { associatedEmail } from "./EverestValidity.js";
6
6
  import { getVariant, getVariantWithRegex } from "./getVariant.js";
@@ -14,10 +14,12 @@ export {
14
14
  columnValues,
15
15
  createCachedEmailValidator,
16
16
  createCachedNMLSValidator,
17
+ filterParams,
17
18
  findMoreAxosDomains,
18
19
  getMoreDomains,
19
20
  getVariant,
20
21
  getVariantWithRegex,
22
+ handleAnchorClick,
21
23
  isAbsoluteUrl,
22
24
  isAllowedUrl,
23
25
  isEmailLink,
@@ -0,0 +1,21 @@
1
+ interface UtagData {
2
+ traffic_type?: string;
3
+ traffic_source?: string;
4
+ [key: string]: unknown;
5
+ }
6
+ declare global {
7
+ interface Window {
8
+ utag?: {
9
+ data: UtagData;
10
+ };
11
+ utag_data?: UtagData;
12
+ }
13
+ }
14
+ export interface OrganicUtms {
15
+ utm_source: string;
16
+ utm_medium: string;
17
+ utm_campaign: string;
18
+ }
19
+ export declare const getTealiumOrganicFallback: () => OrganicUtms | null;
20
+ export declare const hasNoUtms: (params: URLSearchParams) => boolean;
21
+ export {};
@@ -0,0 +1,26 @@
1
+ const getTealiumOrganicFallback = () => {
2
+ if (typeof window === "undefined") return null;
3
+ try {
4
+ const utagData = window.utag?.data ?? window.utag_data ?? {};
5
+ const trafficType = utagData.traffic_type ?? "";
6
+ const trafficSource = utagData.traffic_source ?? "";
7
+ if (trafficType !== "organic" || !trafficSource) return null;
8
+ let sourceName = trafficSource;
9
+ try {
10
+ sourceName = new URL(trafficSource).hostname.replace(/^www\./, "").split(".")[0];
11
+ } catch (_) {
12
+ }
13
+ return {
14
+ utm_source: sourceName,
15
+ utm_medium: "organic",
16
+ utm_campaign: "organic-search"
17
+ };
18
+ } catch {
19
+ return null;
20
+ }
21
+ };
22
+ const hasNoUtms = (params) => !params.has("utm_source") && !params.has("utm_medium") && !params.has("utm_campaign") && !params.has("utm_content") && !params.has("utm_term");
23
+ export {
24
+ getTealiumOrganicFallback,
25
+ hasNoUtms
26
+ };
@@ -0,0 +1 @@
1
+ export declare function usePageVisibility(): boolean;
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { useState, useEffect } from "react";
3
+ function usePageVisibility() {
4
+ const [isVisible, setIsVisible] = useState(!document.hidden);
5
+ useEffect(() => {
6
+ const handleVisibilityChange = () => {
7
+ setIsVisible(!document.hidden);
8
+ };
9
+ document.addEventListener("visibilitychange", handleVisibilityChange);
10
+ return () => {
11
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
12
+ };
13
+ }, []);
14
+ return isVisible;
15
+ }
16
+ export {
17
+ usePageVisibility
18
+ };
@@ -6,3 +6,4 @@ export type SideProps = "left" | "right";
6
6
  export type StarIconTypes = "gold" | "gray";
7
7
  export declare const columnValues: readonly [1, 2, 3, 4, undefined];
8
8
  export type ColumnTypes = (typeof columnValues)[number];
9
+ export type AnchorPointTypes = "default" | "top left" | "top right" | "bottom left" | "bottom right";
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,148 +1,148 @@
1
- {
2
- "name": "@axos-web-dev/shared-components",
3
- "description": "Axos shared components library for web.",
4
- "version": "2.0.0-dev.3-evo-ui",
5
- "type": "module",
6
- "main": "index.js",
7
- "module": "dist/main.js",
8
- "types": "dist/main.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/main.d.ts",
12
- "import": "./dist/main.js"
13
- },
14
- "./styles.css": "./dist/assets/index.css",
15
- "./globals.css": "./dist/assets/globals.css",
16
- "./themes/axos.css": "./dist/assets/themes/axos.css",
17
- "./themes/premier.css": "./dist/assets/themes/premier.css",
18
- "./dist/*": "./dist/*"
19
- },
20
- "files": [
21
- "dist"
22
- ],
23
- "sideEffects": [
24
- "dist/assets/**/*.css"
25
- ],
26
- "scripts": {
27
- "dev": "vite",
28
- "build": "tsc --p ./tsconfig.build.json && vite build",
29
- "lint": "eslint . --report-unused-disable-directives --max-warnings 0",
30
- "preview": "vite preview",
31
- "prepublishOnly": "npm run build",
32
- "check-types": "tsc --pretty --noEmit",
33
- "check-format": "prettier --check .",
34
- "check-lint": "eslint .",
35
- "format": "prettier --write .",
36
- "test-all": "npm run check-format && npm run check-lint && npm run check-types && npm run build",
37
- "prepare": "husky",
38
- "storybook": "storybook dev -p 6006",
39
- "build-storybook": "storybook build",
40
- "npm:link": "npm run build && npm link"
41
- },
42
- "dependencies": {
43
- "@headlessui/react": "^2.2.0",
44
- "@hookform/resolvers": "^5.0.1",
45
- "@next-safe-action/adapter-react-hook-form": "^2.0.2",
46
- "@react-input/mask": "^1.2.15",
47
- "@react-input/number-format": "^1.1.3",
48
- "@storybook/icons": "^1.3.0",
49
- "@storybook/preview-api": "^8.4.7",
50
- "@ts-stack/markdown": "^1.5.0",
51
- "@types/iframe-resizer": "3.5.13",
52
- "@ujet/websdk-headless": "^3.41.4",
53
- "@vanilla-extract/css": "^1.16.1",
54
- "@vanilla-extract/recipes": "^0.5.1 || ^0.5.5",
55
- "antd": "^5.22.5",
56
- "clsx": "^2.1.1",
57
- "framer-motion": "^12.9.2",
58
- "iframe-resizer": "^3.6.6",
59
- "lodash": "^4.17.21",
60
- "moment": "^2.30.1",
61
- "next-safe-action": "^8.0.2",
62
- "react-date-picker": "^11.0.0",
63
- "react-date-range": "^2.0.1",
64
- "react-hook-form": "^7.56.4",
65
- "react-markdown": "^9.1.0",
66
- "react-slick": "^0.30.2",
67
- "react-use": "^17.6.0",
68
- "react-wrap-balancer": "^1.1.1",
69
- "remark-gfm": "^4.0.1",
70
- "rsuite": "^5.75.0",
71
- "slick-carousel": "^1.8.1",
72
- "typed-css-modules": "^0.9.1",
73
- "vite-plugin-svgr": "^4.3.0",
74
- "zod": "^3.24.1",
75
- "zustand": "^4.5.5"
76
- },
77
- "peerDependencies": {
78
- "@vanilla-extract/css-utils": "^0.1.3 || ^0.1.4",
79
- "@vanilla-extract/recipes": "^0.5.1 || ^0.5.5",
80
- "@vanilla-extract/vite-plugin": "^4.0.3 || ^4.0.18",
81
- "next": "^14.1.4 || ^15.0.0 || ^16.0.0",
82
- "react": "^18.2.0 || ^19.0.0",
83
- "react-date-range": "^2.0.1",
84
- "react-dom": "^18.2.0 || ^19.0.0",
85
- "react-slick": "^0.30.2",
86
- "slick-carousel": "^1.8.1"
87
- },
88
- "devDependencies": {
89
- "@chromatic-com/storybook": "^1.9.0",
90
- "@eslint/js": "^9.39.4",
91
- "@rollup/plugin-alias": "^5.1.1",
92
- "@storybook/addon-essentials": "^8.4.7",
93
- "@storybook/addon-interactions": "^8.4.7",
94
- "@storybook/addon-links": "^8.4.7",
95
- "@storybook/addon-mdx-gfm": "^8.4.7",
96
- "@storybook/addon-onboarding": "^8.4.7",
97
- "@storybook/addon-themes": "^8.4.7",
98
- "@storybook/blocks": "^8.4.7",
99
- "@storybook/react": "^8.6.14",
100
- "@storybook/react-vite": "^8.4.7",
101
- "@storybook/test": "^8.6.14",
102
- "@svgr/core": "^8.1.0",
103
- "@svgr/plugin-prettier": "^8.1.0",
104
- "@svgr/plugin-svgo": "^8.1.0",
105
- "@types/lodash": "^4.17.17",
106
- "@types/node": "^20.19.0",
107
- "@types/react": "^19.0.0",
108
- "@types/react-date-range": "^1.4.9",
109
- "@types/react-datepicker": "^6.2.0",
110
- "@types/react-dom": "^19.0.0",
111
- "@types/react-slick": "^0.23.13",
112
- "@typescript-eslint/eslint-plugin": "^8.0.0",
113
- "@typescript-eslint/parser": "^8.0.0",
114
- "@vanilla-extract/css-utils": "^0.1.4",
115
- "@vanilla-extract/recipes": "^0.5.5",
116
- "@vanilla-extract/vite-plugin": "^4.0.18",
117
- "@vitejs/plugin-react-swc": "^3.7.2",
118
- "esbuild-vanilla-image-loader": "^0.1.3",
119
- "eslint": "^9.0.0",
120
- "eslint-plugin-react-hooks": "^5.1.0",
121
- "eslint-plugin-react-refresh": "^0.4.16",
122
- "eslint-plugin-storybook": "^0.8.0",
123
- "glob": "^10.4.5",
124
- "globals": "^15.15.0",
125
- "husky": "^9.1.7",
126
- "next": "^16.0.0",
127
- "prettier": "3.2.5",
128
- "react": "^19.0.0",
129
- "react-dom": "^19.0.0",
130
- "rollup-plugin-preserve-directives": "^0.4.0",
131
- "rollup-plugin-svg-import": "^3.0.0",
132
- "rollup-plugin-svgo": "^2.0.0",
133
- "storybook": "^8.4.7",
134
- "typescript": "^5.7.2",
135
- "typescript-eslint": "^8.57.0",
136
- "typescript-plugin-css-modules": "^5.1.0",
137
- "vite": "^5.4.11",
138
- "vite-plugin-dts": "^3.9.1",
139
- "vite-plugin-lib-inject-css": "^2.1.1",
140
- "vite-plugin-setting-css-module": "^1.1.4",
141
- "vite-tsconfig-paths": "^4.3.2"
142
- },
143
- "directories": {
144
- "lib": "lib"
145
- },
146
- "author": "axos-web-dev",
147
- "license": "ISC"
148
- }
1
+ {
2
+ "name": "@axos-web-dev/shared-components",
3
+ "description": "Axos shared components library for web.",
4
+ "version": "2.0.0-dev.30-toast",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "module": "dist/main.js",
8
+ "types": "dist/main.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/main.d.ts",
12
+ "import": "./dist/main.js"
13
+ },
14
+ "./styles.css": "./dist/assets/index.css",
15
+ "./globals.css": "./dist/assets/globals.css",
16
+ "./themes/axos.css": "./dist/assets/themes/axos.css",
17
+ "./themes/premier.css": "./dist/assets/themes/premier.css",
18
+ "./dist/*": "./dist/*"
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "sideEffects": [
24
+ "dist/assets/**/*.css"
25
+ ],
26
+ "scripts": {
27
+ "dev": "vite",
28
+ "build": "tsc --p ./tsconfig.build.json && vite build",
29
+ "lint": "eslint . --report-unused-disable-directives --max-warnings 0",
30
+ "preview": "vite preview",
31
+ "prepublishOnly": "npm run build",
32
+ "check-types": "tsc --pretty --noEmit",
33
+ "check-format": "prettier --check .",
34
+ "check-lint": "eslint .",
35
+ "format": "prettier --write .",
36
+ "test-all": "npm run check-format && npm run check-lint && npm run check-types && npm run build",
37
+ "prepare": "npm run build",
38
+ "storybook": "storybook dev -p 6006",
39
+ "build-storybook": "storybook build",
40
+ "npm:link": "npm run build && npm link"
41
+ },
42
+ "dependencies": {
43
+ "@headlessui/react": "^2.2.0",
44
+ "@hookform/resolvers": "^5.0.1",
45
+ "@next-safe-action/adapter-react-hook-form": "^2.0.2",
46
+ "@react-input/mask": "^1.2.15",
47
+ "@react-input/number-format": "^1.1.3",
48
+ "@storybook/icons": "^1.3.0",
49
+ "@storybook/preview-api": "^8.4.7",
50
+ "@ts-stack/markdown": "^1.5.0",
51
+ "@types/iframe-resizer": "3.5.13",
52
+ "@ujet/websdk-headless": "^4.22.0",
53
+ "@vanilla-extract/css": "^1.16.1",
54
+ "@vanilla-extract/recipes": "^0.5.1 || ^0.5.5",
55
+ "antd": "^5.22.5",
56
+ "clsx": "^2.1.1",
57
+ "framer-motion": "^12.9.2",
58
+ "iframe-resizer": "^3.6.6",
59
+ "lodash": "^4.17.21",
60
+ "moment": "^2.30.1",
61
+ "next-safe-action": "^8.0.2",
62
+ "react-date-picker": "^11.0.0",
63
+ "react-date-range": "^2.0.1",
64
+ "react-hook-form": "^7.56.4",
65
+ "react-markdown": "^9.1.0",
66
+ "react-slick": "^0.30.2",
67
+ "react-use": "^17.6.0",
68
+ "react-wrap-balancer": "^1.1.1",
69
+ "remark-gfm": "^4.0.1",
70
+ "rsuite": "^5.75.0",
71
+ "slick-carousel": "^1.8.1",
72
+ "typed-css-modules": "^0.9.1",
73
+ "vite-plugin-svgr": "^4.3.0",
74
+ "zod": "^3.24.1",
75
+ "zustand": "^4.5.5"
76
+ },
77
+ "peerDependencies": {
78
+ "@vanilla-extract/css-utils": "^0.1.3 || ^0.1.4",
79
+ "@vanilla-extract/recipes": "^0.5.1 || ^0.5.5",
80
+ "@vanilla-extract/vite-plugin": "^4.0.3 || ^4.0.18",
81
+ "next": "^14.1.4 || ^15.0.0 || ^16.0.0",
82
+ "react": "^18.2.0 || ^19.0.0",
83
+ "react-date-range": "^2.0.1",
84
+ "react-dom": "^18.2.0 || ^19.0.0",
85
+ "react-slick": "^0.30.2",
86
+ "slick-carousel": "^1.8.1"
87
+ },
88
+ "devDependencies": {
89
+ "@chromatic-com/storybook": "^1.9.0",
90
+ "@eslint/js": "^9.39.4",
91
+ "@rollup/plugin-alias": "^5.1.1",
92
+ "@storybook/addon-essentials": "^8.4.7",
93
+ "@storybook/addon-interactions": "^8.4.7",
94
+ "@storybook/addon-links": "^8.4.7",
95
+ "@storybook/addon-mdx-gfm": "^8.4.7",
96
+ "@storybook/addon-onboarding": "^8.4.7",
97
+ "@storybook/addon-themes": "^8.4.7",
98
+ "@storybook/blocks": "^8.4.7",
99
+ "@storybook/react": "^8.6.14",
100
+ "@storybook/react-vite": "^8.4.7",
101
+ "@storybook/test": "^8.6.14",
102
+ "@svgr/core": "^8.1.0",
103
+ "@svgr/plugin-prettier": "^8.1.0",
104
+ "@svgr/plugin-svgo": "^8.1.0",
105
+ "@types/lodash": "^4.17.17",
106
+ "@types/node": "^20.19.0",
107
+ "@types/react": "^19.0.0",
108
+ "@types/react-date-range": "^1.4.9",
109
+ "@types/react-datepicker": "^6.2.0",
110
+ "@types/react-dom": "^19.0.0",
111
+ "@types/react-slick": "^0.23.13",
112
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
113
+ "@typescript-eslint/parser": "^8.0.0",
114
+ "@vanilla-extract/css-utils": "^0.1.4",
115
+ "@vanilla-extract/recipes": "^0.5.5",
116
+ "@vanilla-extract/vite-plugin": "^4.0.18",
117
+ "@vitejs/plugin-react-swc": "^3.7.2",
118
+ "esbuild-vanilla-image-loader": "^0.1.3",
119
+ "eslint": "^9.0.0",
120
+ "eslint-plugin-react-hooks": "^5.1.0",
121
+ "eslint-plugin-react-refresh": "^0.4.16",
122
+ "eslint-plugin-storybook": "^0.8.0",
123
+ "glob": "^10.4.5",
124
+ "globals": "^15.15.0",
125
+ "husky": "^9.1.7",
126
+ "next": "^16.0.0",
127
+ "prettier": "3.2.5",
128
+ "react": "^19.0.0",
129
+ "react-dom": "^19.0.0",
130
+ "rollup-plugin-preserve-directives": "^0.4.0",
131
+ "rollup-plugin-svg-import": "^3.0.0",
132
+ "rollup-plugin-svgo": "^2.0.0",
133
+ "storybook": "^8.4.7",
134
+ "typescript": "^5.7.2",
135
+ "typescript-eslint": "^8.57.0",
136
+ "typescript-plugin-css-modules": "^5.1.0",
137
+ "vite": "^5.4.11",
138
+ "vite-plugin-dts": "^3.9.1",
139
+ "vite-plugin-lib-inject-css": "^2.1.1",
140
+ "vite-plugin-setting-css-module": "^1.1.4",
141
+ "vite-tsconfig-paths": "^4.3.2"
142
+ },
143
+ "directories": {
144
+ "lib": "lib"
145
+ },
146
+ "author": "axos-web-dev",
147
+ "license": "ISC"
148
+ }
@@ -1,3 +0,0 @@
1
- export declare const authenticate: () => Promise<{
2
- token: any;
3
- }>;
@@ -1,16 +0,0 @@
1
- const AUTH_URL = process.env.AUTH_CHAT_URL || "http://localhost:3000/api/auth/token";
2
- const authenticate = async () => {
3
- const res = await fetch(AUTH_URL, {
4
- method: "GET",
5
- headers: {
6
- "Content-Type": "application/json"
7
- }
8
- });
9
- const data = await res.json();
10
- return {
11
- token: data.token
12
- };
13
- };
14
- export {
15
- authenticate
16
- };
@@ -1,3 +0,0 @@
1
- ._1hpv6vm0 *, ._1hpv6vm1 * {
2
- font-family: var(--chat-font-family);
3
- }