@axos-web-dev/shared-components 1.0.99 → 1.0.100-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/ATMLocator/ATMLocator.js +8 -1
  2. package/dist/ArticlesSet/ArticlesSet.js +2 -2
  3. package/dist/Auth/ErrorAlert.js +10 -3
  4. package/dist/Blockquote/Blockquote.module.js +3 -3
  5. package/dist/Button/Button.js +10 -3
  6. package/dist/Calculators/Calculator.js +22 -3
  7. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.d.ts +9 -0
  8. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +219 -0
  9. package/dist/Calculators/MaxLoanCalculator/index.js +22 -5
  10. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.d.ts +1 -0
  11. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +2 -0
  12. package/dist/Calculators/MonthlyPaymentCalculator/index.js +15 -5
  13. package/dist/Calculators/index.d.ts +2 -1
  14. package/dist/Calculators/index.js +3 -1
  15. package/dist/Carousel/index.js +10 -3
  16. package/dist/Chatbot/Bubble.css.d.ts +1 -0
  17. package/dist/Chatbot/Bubble.css.js +5 -0
  18. package/dist/Chatbot/Bubble.d.ts +3 -0
  19. package/dist/Chatbot/Bubble.js +48 -0
  20. package/dist/Chatbot/Chat.d.ts +1 -0
  21. package/dist/Chatbot/Chat.js +165 -0
  22. package/dist/Chatbot/ChatWindow.css.d.ts +11 -0
  23. package/dist/Chatbot/ChatWindow.css.js +25 -0
  24. package/dist/Chatbot/ChatWindow.d.ts +23 -0
  25. package/dist/Chatbot/ChatWindow.js +202 -0
  26. package/dist/Chatbot/Chatbot.css.d.ts +1 -0
  27. package/dist/Chatbot/Chatbot.css.js +5 -0
  28. package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
  29. package/dist/Chatbot/Chatbot.d.ts +1 -0
  30. package/dist/Chatbot/Chatbot.js +39 -0
  31. package/dist/Chatbot/authenticate.d.ts +3 -0
  32. package/dist/Chatbot/authenticate.js +16 -0
  33. package/dist/Chatbot/index.d.ts +9 -0
  34. package/dist/Chatbot/index.js +31 -0
  35. package/dist/Chatbot/store/chat.d.ts +9 -0
  36. package/dist/Chatbot/store/chat.js +11 -0
  37. package/dist/Chatbot/store/messages.d.ts +14 -0
  38. package/dist/Chatbot/store/messages.js +12 -0
  39. package/dist/Chatbot/useHeadlessChat.d.ts +22 -0
  40. package/dist/Chatbot/useHeadlessChat.js +157 -0
  41. package/dist/Chevron/index.js +10 -3
  42. package/dist/Comparison/Comparison.js +10 -3
  43. package/dist/ExecutiveBio/ExecutiveBio.js +10 -3
  44. package/dist/FaqAccordion/index.js +10 -3
  45. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +10 -3
  46. package/dist/Forms/ApplicationStart.d.ts +1 -1
  47. package/dist/Forms/ApplicationStart.js +111 -89
  48. package/dist/Forms/ApplyNow.d.ts +2 -2
  49. package/dist/Forms/ApplyNow.js +178 -146
  50. package/dist/Forms/ClearingForm.d.ts +1 -1
  51. package/dist/Forms/ClearingForm.js +184 -162
  52. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  53. package/dist/Forms/CommercialDeposits.js +201 -179
  54. package/dist/Forms/CommercialLending.d.ts +1 -1
  55. package/dist/Forms/CommercialLending.js +278 -256
  56. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  57. package/dist/Forms/CommercialPremiumFinance.js +128 -106
  58. package/dist/Forms/ContactCompany.d.ts +1 -1
  59. package/dist/Forms/ContactCompany.js +113 -91
  60. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  61. package/dist/Forms/ContactCompanyTitle.js +127 -105
  62. package/dist/Forms/ContactUs.d.ts +1 -1
  63. package/dist/Forms/ContactUs.js +99 -77
  64. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  65. package/dist/Forms/ContactUsAAS.js +180 -158
  66. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  67. package/dist/Forms/ContactUsBusiness.js +143 -115
  68. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  69. package/dist/Forms/ContactUsBusinessNameEmail.js +112 -84
  70. package/dist/Forms/ContactUsLVF.d.ts +3 -1
  71. package/dist/Forms/ContactUsLVF.js +127 -101
  72. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  73. package/dist/Forms/ContactUsNMLSId.js +126 -98
  74. package/dist/Forms/CpraRequest.d.ts +1 -1
  75. package/dist/Forms/CpraRequest.js +641 -619
  76. package/dist/Forms/CraPublicFile.d.ts +1 -1
  77. package/dist/Forms/CraPublicFile.js +118 -90
  78. package/dist/Forms/DealerServices.d.ts +1 -1
  79. package/dist/Forms/DealerServices.js +225 -204
  80. package/dist/Forms/EmailOnly.d.ts +1 -1
  81. package/dist/Forms/EmailOnly.js +65 -39
  82. package/dist/Forms/EmailUs.d.ts +1 -1
  83. package/dist/Forms/EmailUs.js +75 -53
  84. package/dist/Forms/FormProps.d.ts +3 -0
  85. package/dist/Forms/Forms.css.d.ts +18 -0
  86. package/dist/Forms/Forms.css.js +44 -38
  87. package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -0
  88. package/dist/Forms/HoneyPot/HoneyPot.css.js +5 -0
  89. package/dist/Forms/HoneyPot/index.d.ts +23 -0
  90. package/dist/Forms/HoneyPot/index.js +69 -0
  91. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  92. package/dist/Forms/MortgageRate/MortgageRateForm.js +376 -348
  93. package/dist/Forms/MortgageRate/MortgageRateWatch.js +10 -3
  94. package/dist/Forms/MortgageWarehouseLending.d.ts +11 -0
  95. package/dist/Forms/MortgageWarehouseLending.js +343 -0
  96. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  97. package/dist/Forms/QuickPricer/QuickPricerForm.js +624 -609
  98. package/dist/Forms/ScheduleCall.d.ts +1 -1
  99. package/dist/Forms/ScheduleCall.js +156 -134
  100. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  101. package/dist/Forms/ScheduleCallPremier.js +178 -156
  102. package/dist/Forms/SuccesForm.js +13 -6
  103. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  104. package/dist/Forms/VendorQuestionnaire.js +817 -795
  105. package/dist/Forms/WcplSurvey.d.ts +1 -1
  106. package/dist/Forms/WcplSurvey.js +112 -90
  107. package/dist/Forms/applynow-utils.d.ts +1 -0
  108. package/dist/Forms/applynow-utils.js +48 -0
  109. package/dist/Forms/index.d.ts +3 -0
  110. package/dist/Forms/index.js +12 -2
  111. package/dist/HeroBanner/HeroBanner.js +42 -1
  112. package/dist/Hyperlink/index.js +10 -3
  113. package/dist/IconBillboard/sections/CallToActionSection.js +2 -1
  114. package/dist/ImageBillboard/ExitIntentModal/useExitIntentModal.js +6 -1
  115. package/dist/ImageLink/ImageLink.js +10 -3
  116. package/dist/ImageLink/ImageLinkSet.js +10 -3
  117. package/dist/ImageLink/index.js +10 -3
  118. package/dist/Input/Input.js +3 -1
  119. package/dist/Insight/Featured/CategorySelector.js +10 -3
  120. package/dist/Insight/Featured/Featured.js +10 -3
  121. package/dist/Insight/Featured/Header.js +10 -3
  122. package/dist/Modal/Modal.js +10 -3
  123. package/dist/NavigationMenu/AxosALTS/NavData.js +10 -3
  124. package/dist/NavigationMenu/AxosALTS/index.js +10 -3
  125. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +16 -16
  126. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +1 -0
  127. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +25 -7
  128. package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
  129. package/dist/NavigationMenu/AxosBank/NavData.js +10 -3
  130. package/dist/NavigationMenu/AxosBank/SubNavBar.js +32 -8
  131. package/dist/NavigationMenu/AxosBank/index.js +10 -3
  132. package/dist/NavigationMenu/LaVictoire/NavData.js +10 -3
  133. package/dist/NavigationMenu/LaVictoire/index.js +10 -3
  134. package/dist/NavigationMenu/NavDataJson.d.ts +2 -0
  135. package/dist/NavigationMenu/NavDataJson.js +315 -0
  136. package/dist/NavigationMenu/Navbar.d.ts +5 -0
  137. package/dist/NavigationMenu/Navbar.js +201 -0
  138. package/dist/NavigationMenu/SignInNavButton.d.ts +1 -0
  139. package/dist/NavigationMenu/SignInNavButton.js +369 -0
  140. package/dist/SetContainer/SetContainer.js +10 -3
  141. package/dist/SocialMediaBar/iconsRepository.js +10 -3
  142. package/dist/Table/Table.d.ts +1 -1
  143. package/dist/VideoTile/VideoTile.js +10 -3
  144. package/dist/VideoWrapper/index.js +10 -3
  145. package/dist/assets/Blockquote/Blockquote.css.css +68 -68
  146. package/dist/assets/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css +3 -0
  147. package/dist/assets/Chatbot/Bubble.css +40 -0
  148. package/dist/assets/Chatbot/ChatWindow.css +107 -0
  149. package/dist/assets/Forms/Forms.css +135 -105
  150. package/dist/assets/Forms/HoneyPot/HoneyPot.css +8 -0
  151. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +191 -191
  152. package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +473 -473
  153. package/dist/assets/utils/optimizeImage/optimizeImage.css.css +47 -47
  154. package/dist/icons/Logos/AXB.d.ts +8 -0
  155. package/dist/icons/Logos/AXB.js +74 -0
  156. package/dist/main.d.ts +1 -0
  157. package/dist/main.js +43 -3
  158. package/dist/utils/allowedAxosDomains.js +2 -1
  159. package/dist/utils/optimizeImage/optimizeImage.module.js +3 -3
  160. package/package.json +136 -133
@@ -6,7 +6,7 @@ import SvgArrowIcon from "../../icons/ArrowIcon/index.js";
6
6
  import SvgAxosX from "../../icons/AxosX/index.js";
7
7
  import SvgComponent from "../../icons/AxosX/Blue.js";
8
8
  import "../../icons/CheckIcon/CheckIcon.css.js";
9
- 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/NavBar.css';import '../../assets/NavigationMenu/AxosALTS/NavBar.css';import '../../assets/NavigationMenu/AxosClearing/NavBar.css';import '../../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../../assets/NavigationMenu/AxosBank/NavBar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/NavBar.css';import '../../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisor/NavBar.css';import '../../assets/Insight/Insight.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/CallToActionBar/CallToActionBar.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/Modal/Modal.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/premier.css';import '../../assets/themes/axos.css';/* empty css */
9
+ 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/NavBar.css';import '../../assets/NavigationMenu/AxosALTS/NavBar.css';import '../../assets/NavigationMenu/AxosClearing/NavBar.css';import '../../assets/NavigationMenu/AxosBank/SubNavbar.css';import '../../assets/NavigationMenu/AxosBank/NavBar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisorServices/NavBar.css';import '../../assets/NavigationMenu/AxosAdvisor/SubNavbar.css';import '../../assets/NavigationMenu/AxosAdvisor/NavBar.css';import '../../assets/Insight/Insight.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/CallToActionBar/CallToActionBar.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/Modal/Modal.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/premier.css';import '../../assets/themes/axos.css';/* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
@@ -41,9 +41,12 @@ import { InputPhone } from "../../Input/InputPhone.js";
41
41
  import "../../Input/InputTextArea.js";
42
42
  import { DownPaymentInput } from "../../Input/DownPaymentInput.js";
43
43
  import "../../Input/RadioButton.js";
44
+ import "../../Input/PercentageInput.js";
44
45
  import { useForm, FormProvider } from "react-hook-form";
45
46
  import * as z from "zod";
47
+ import "../../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
46
48
  import { iconForm, headerForm, form, descriptionField, headerContainer, fullRowSelect, formWrapper, centerSelect, mt2rem, fullRowForm, disclosureForm, actions, formBtns, na_cursor, formContainer } from "../Forms.css.js";
49
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "../HoneyPot/index.js";
47
50
  import { SalesforceSchema } from "../SalesforceFieldsForm.js";
48
51
  import "../../Input/RadioButton.css.js";
49
52
  import "../../Input/Checkbox.css.js";
@@ -63,8 +66,6 @@ import "iframe-resizer";
63
66
  import "../../Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js";
64
67
  import "../../Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js";
65
68
  import "../../Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js";
66
- import "../../Input/PercentageInput.js";
67
- import "../../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
68
69
  /* empty css */
69
70
  import "react-dom";
70
71
  /* empty css */
@@ -73,6 +74,12 @@ import "../../Auth/SignInPassword.js";
73
74
  /* empty css */
74
75
  /* empty css */
75
76
  import "../../Carousel/index.js";
77
+ /* empty css */
78
+ import "../../Chatbot/store/chat.js";
79
+ import "../../Chatbot/authenticate.js";
80
+ /* empty css */
81
+ import "../../Chatbot/store/messages.js";
82
+ import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
76
83
  /* empty css */
77
84
  import "../../Comparison/Comparison.css.js";
78
85
  import "next/image.js";
@@ -140,7 +147,8 @@ const MortgageRate = ({
140
147
  rateWatchOnSubmit,
141
148
  setRateWatchSubmitted,
142
149
  hideModalValue,
143
- showingTables
150
+ showingTables,
151
+ onValidate
144
152
  }) => {
145
153
  const [loanPurpose, setLoanPurpose] = useState(1);
146
154
  const [rateType, setRateType] = useState("Purchase");
@@ -219,8 +227,16 @@ const MortgageRate = ({
219
227
  cashOut: z.number({ message: "Cash Out is required." }).optional(),
220
228
  loanPurpose: z.number({ message: "Loan Purpose is required." })
221
229
  });
230
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
231
+ if (!isValidHoneyPot(data)) {
232
+ ctx.addIssue({
233
+ code: z.ZodIssueCode.custom,
234
+ message: "fields are not valid."
235
+ });
236
+ }
237
+ });
222
238
  const methods = useForm({
223
- resolver: zodResolver(schema.merge(SalesforceSchema), {
239
+ resolver: zodResolver(gen_schema, {
224
240
  async: true
225
241
  }),
226
242
  mode: "all"
@@ -407,361 +423,373 @@ const MortgageRate = ({
407
423
  children: "Tell us about your property and loan to personalize your rate."
408
424
  }
409
425
  ) }),
410
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
411
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
412
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
413
- Dropdown,
414
- {
415
- id: "propertyType",
416
- ...register("propertyType", {
417
- required: true,
418
- setValueAs: (value) => Number(value)
419
- }),
420
- label: "Property Type",
421
- sizes: "medium",
422
- required: true,
423
- error: !!errors.propertyType,
424
- helperText: errors.propertyType?.message,
425
- variant,
426
- defaultValue: "Select option",
427
- children: [
428
- /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
429
- /* @__PURE__ */ jsx("option", { value: "1", children: "Single Family Home" }),
430
- /* @__PURE__ */ jsx("option", { value: "3", children: "Condo" }),
431
- /* @__PURE__ */ jsx("option", { value: "5", children: "Hi-Rise Condo" }),
432
- /* @__PURE__ */ jsx("option", { value: "2", children: "Co-op" }),
433
- /* @__PURE__ */ jsx("option", { value: "4", children: "2-4 Unit" }),
434
- /* @__PURE__ */ jsx("option", { value: "6", children: "Manufactured" })
435
- ]
436
- }
437
- ) }),
438
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
439
- Dropdown,
440
- {
441
- id: "occupancy",
442
- ...register("occupancy", {
443
- required: true,
444
- setValueAs: (value) => Number(value)
445
- }),
446
- label: "Property Usage",
447
- sizes: "medium",
448
- required: true,
449
- error: !!errors.occupancy,
450
- helperText: errors.occupancy?.message,
451
- variant,
452
- defaultValue: "Select option",
453
- children: [
454
- /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
455
- /* @__PURE__ */ jsx("option", { value: "1", children: "Primary Residence" }),
456
- /* @__PURE__ */ jsx("option", { value: "2", children: "Vacation Home" }),
457
- /* @__PURE__ */ jsx("option", { value: "3", children: "Investment" })
458
- ]
459
- }
460
- ) }),
461
- loanPurpose === 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
462
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
463
- Input,
464
- {
465
- id: "salesPrice",
466
- type: "text",
467
- ...register("salesPrice", {
426
+ /* @__PURE__ */ jsxs(
427
+ "form",
428
+ {
429
+ className: form,
430
+ onSubmit: async (e) => {
431
+ onValidate && onValidate(e);
432
+ await handleSubmit(submitForm)(e);
433
+ e.preventDefault();
434
+ },
435
+ children: [
436
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
437
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
438
+ Dropdown,
439
+ {
440
+ id: "propertyType",
441
+ ...register("propertyType", {
442
+ required: true,
443
+ setValueAs: (value) => Number(value)
444
+ }),
445
+ label: "Property Type",
446
+ sizes: "medium",
468
447
  required: true,
469
- setValueAs: (value) => parseCurrency(value)
470
- }),
471
- label: "Purchase Price",
472
- sizes: "medium",
473
- required: true,
474
- error: !!errors.salesPrice,
475
- helperText: errors.salesPrice?.message,
476
- variant,
477
- onBlur: (e) => {
478
- setIsTypingDownPayment(false);
479
- const rawValue = e.target.value;
480
- const parsedValue = parseCurrency(rawValue);
481
- if (parsedValue === 0) {
482
- methods.setError("salesPrice", {
483
- type: "manual",
484
- message: "Purchase Price is required."
485
- });
486
- } else {
487
- methods.setValue("salesPrice", parsedValue);
448
+ error: !!errors.propertyType,
449
+ helperText: errors.propertyType?.message,
450
+ variant,
451
+ defaultValue: "Select option",
452
+ children: [
453
+ /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
454
+ /* @__PURE__ */ jsx("option", { value: "1", children: "Single Family Home" }),
455
+ /* @__PURE__ */ jsx("option", { value: "3", children: "Condo" }),
456
+ /* @__PURE__ */ jsx("option", { value: "5", children: "Hi-Rise Condo" }),
457
+ /* @__PURE__ */ jsx("option", { value: "2", children: "Co-op" }),
458
+ /* @__PURE__ */ jsx("option", { value: "4", children: "2-4 Unit" }),
459
+ /* @__PURE__ */ jsx("option", { value: "6", children: "Manufactured" })
460
+ ]
461
+ }
462
+ ) }),
463
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
464
+ Dropdown,
465
+ {
466
+ id: "occupancy",
467
+ ...register("occupancy", {
468
+ required: true,
469
+ setValueAs: (value) => Number(value)
470
+ }),
471
+ label: "Property Usage",
472
+ sizes: "medium",
473
+ required: true,
474
+ error: !!errors.occupancy,
475
+ helperText: errors.occupancy?.message,
476
+ variant,
477
+ defaultValue: "Select option",
478
+ children: [
479
+ /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
480
+ /* @__PURE__ */ jsx("option", { value: "1", children: "Primary Residence" }),
481
+ /* @__PURE__ */ jsx("option", { value: "2", children: "Vacation Home" }),
482
+ /* @__PURE__ */ jsx("option", { value: "3", children: "Investment" })
483
+ ]
484
+ }
485
+ ) }),
486
+ loanPurpose === 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
487
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
488
+ Input,
489
+ {
490
+ id: "salesPrice",
491
+ type: "text",
492
+ ...register("salesPrice", {
493
+ required: true,
494
+ setValueAs: (value) => parseCurrency(value)
495
+ }),
496
+ label: "Purchase Price",
497
+ sizes: "medium",
498
+ required: true,
499
+ error: !!errors.salesPrice,
500
+ helperText: errors.salesPrice?.message,
501
+ variant,
502
+ onBlur: (e) => {
503
+ setIsTypingDownPayment(false);
504
+ const rawValue = e.target.value;
505
+ const parsedValue = parseCurrency(rawValue);
506
+ if (parsedValue === 0) {
507
+ methods.setError("salesPrice", {
508
+ type: "manual",
509
+ message: "Purchase Price is required."
510
+ });
511
+ } else {
512
+ methods.setValue("salesPrice", parsedValue);
513
+ e.target.value = formatCurrency(parsedValue);
514
+ }
515
+ methods.trigger("downPayment");
516
+ },
517
+ onFocus: (e) => {
518
+ const currentValue = e.target.value;
519
+ e.target.value = currentValue.replace(/[$,]/g, "");
520
+ }
521
+ }
522
+ ) }),
523
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
524
+ DownPaymentInput,
525
+ {
526
+ id: "downPayment",
527
+ type: "text",
528
+ ...register("downPayment", {
529
+ required: true,
530
+ setValueAs: (value) => parseCurrency(value)
531
+ }),
532
+ salesPrice: watch("salesPrice"),
533
+ downPaymentPercentage,
534
+ setDownPaymentPercentage,
535
+ label: "Down Payment",
536
+ sizes: "medium",
537
+ error: !!errors.downPayment,
538
+ helperText: errors.downPayment?.message,
539
+ onChange: (e) => {
540
+ const value = parseCurrency(e.target.value);
541
+ methods.setValue("downPayment", value);
542
+ },
543
+ variant,
544
+ isTypingDownPayment,
545
+ setIsTypingDownPayment,
546
+ methods
547
+ }
548
+ ) })
549
+ ] }),
550
+ loanPurpose === 2 && /* @__PURE__ */ jsxs(Fragment, { children: [
551
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
552
+ Input,
553
+ {
554
+ id: "appraisedValue",
555
+ type: "text",
556
+ ...register("appraisedValue", {
557
+ required: true,
558
+ setValueAs: (value) => parseCurrency(value)
559
+ }),
560
+ label: "Home Value",
561
+ sizes: "medium",
562
+ required: true,
563
+ error: !!errors.appraisedValue,
564
+ helperText: errors.appraisedValue?.message,
565
+ variant,
566
+ onBlur: (e) => {
567
+ const rawValue = e.target.value;
568
+ const parsedValue = parseCurrency(rawValue);
569
+ methods.setValue("appraisedValue", parsedValue);
570
+ e.target.value = formatCurrency(parsedValue);
571
+ },
572
+ onFocus: (e) => {
573
+ const currentValue = e.target.value;
574
+ e.target.value = currentValue.replace(/[$,]/g, "");
575
+ }
576
+ }
577
+ ) }),
578
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
579
+ Input,
580
+ {
581
+ id: "mortgageBalance",
582
+ type: "text",
583
+ ...register("mortgageBalance", {
584
+ required: true,
585
+ setValueAs: (value) => parseCurrency(value)
586
+ }),
587
+ label: "Mortgage Balance",
588
+ sizes: "medium",
589
+ required: true,
590
+ error: !!errors.mortgageBalance,
591
+ helperText: errors.mortgageBalance?.message,
592
+ variant,
593
+ onBlur: (e) => {
594
+ const rawValue = e.target.value;
595
+ const parsedValue = parseCurrency(rawValue);
596
+ methods.setValue("mortgageBalance", parsedValue);
597
+ e.target.value = formatCurrency(parsedValue);
598
+ },
599
+ onFocus: (e) => {
600
+ const currentValue = e.target.value;
601
+ e.target.value = currentValue.replace(/[$,]/g, "");
602
+ }
603
+ }
604
+ ) })
605
+ ] }),
606
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
607
+ Dropdown,
608
+ {
609
+ id: "creditScore",
610
+ ...register("creditScore", {
611
+ required: true,
612
+ setValueAs: (value) => value === "" ? void 0 : Number(value)
613
+ }),
614
+ label: "Credit Score",
615
+ sizes: "medium",
616
+ required: true,
617
+ error: !!errors.creditScore,
618
+ helperText: errors.creditScore?.message,
619
+ variant,
620
+ defaultValue: "Select option",
621
+ children: [
622
+ /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
623
+ /* @__PURE__ */ jsx("option", { value: "740", children: "740+" }),
624
+ /* @__PURE__ */ jsx("option", { value: "720", children: "739-720" }),
625
+ /* @__PURE__ */ jsx("option", { value: "700", children: "719-700" }),
626
+ /* @__PURE__ */ jsx("option", { value: "680", children: "699-680" }),
627
+ /* @__PURE__ */ jsx("option", { value: "660", children: "679-660" }),
628
+ /* @__PURE__ */ jsx("option", { value: "640", children: "659-640" }),
629
+ /* @__PURE__ */ jsx("option", { value: "620", children: "639-620" }),
630
+ /* @__PURE__ */ jsx("option", { value: "600", children: "Below 620" })
631
+ ]
632
+ }
633
+ ) }),
634
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
635
+ Input,
636
+ {
637
+ id: "zipCode",
638
+ type: "number",
639
+ ...register("zipCode", {
640
+ required: true,
641
+ setValueAs: (value) => Number(value)
642
+ }),
643
+ label: "Zip Code",
644
+ sizes: "medium",
645
+ required: true,
646
+ error: !!errors.zipCode,
647
+ helperText: errors.zipCode?.message,
648
+ variant
649
+ }
650
+ ) }),
651
+ loanPurpose === 2 ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
652
+ Input,
653
+ {
654
+ id: "cashOut",
655
+ type: "text",
656
+ ...register("cashOut", {
657
+ required: true,
658
+ setValueAs: (value) => parseCurrency(value)
659
+ }),
660
+ label: "Cash Out (Optional)",
661
+ sizes: "medium",
662
+ error: !!errors.cashOut,
663
+ helperText: errors.cashOut?.message,
664
+ variant,
665
+ onBlur: (e) => {
666
+ const rawValue = e.target.value;
667
+ const parsedValue = parseCurrency(rawValue);
668
+ methods.setValue("cashOut", parsedValue);
488
669
  e.target.value = formatCurrency(parsedValue);
670
+ },
671
+ onFocus: (e) => {
672
+ const currentValue = e.target.value;
673
+ e.target.value = currentValue.replace(/[$,]/g, "");
489
674
  }
490
- methods.trigger("downPayment");
491
- },
492
- onFocus: (e) => {
493
- const currentValue = e.target.value;
494
- e.target.value = currentValue.replace(/[$,]/g, "");
495
675
  }
496
- }
497
- ) }),
498
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
499
- DownPaymentInput,
500
- {
501
- id: "downPayment",
502
- type: "text",
503
- ...register("downPayment", {
676
+ ) }) }) : null,
677
+ /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm, "text_center"), children: /* @__PURE__ */ jsx(
678
+ "div",
679
+ {
680
+ className: clsx(
681
+ descriptionField({ variant }),
682
+ "text_center"
683
+ ),
684
+ children: "Almost there! Please provide your contact information to view rates and sign up for Rate Watch."
685
+ }
686
+ ) }),
687
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
688
+ Input,
689
+ {
690
+ id: "firstName",
691
+ ...register("firstName", {
692
+ required: "First Name is required"
693
+ }),
694
+ label: "First Name",
695
+ sizes: "medium",
504
696
  required: true,
505
- setValueAs: (value) => parseCurrency(value)
506
- }),
507
- salesPrice: watch("salesPrice"),
508
- downPaymentPercentage,
509
- setDownPaymentPercentage,
510
- label: "Down Payment",
511
- sizes: "medium",
512
- error: !!errors.downPayment,
513
- helperText: errors.downPayment?.message,
514
- onChange: (e) => {
515
- const value = parseCurrency(e.target.value);
516
- methods.setValue("downPayment", value);
517
- },
518
- variant,
519
- isTypingDownPayment,
520
- setIsTypingDownPayment,
521
- methods
522
- }
523
- ) })
524
- ] }),
525
- loanPurpose === 2 && /* @__PURE__ */ jsxs(Fragment, { children: [
526
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
527
- Input,
528
- {
529
- id: "appraisedValue",
530
- type: "text",
531
- ...register("appraisedValue", {
697
+ error: !!errors.firstName,
698
+ helperText: errors.firstName?.message,
699
+ variant
700
+ }
701
+ ) }),
702
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
703
+ Input,
704
+ {
705
+ id: "lastName",
706
+ ...register("lastName", { required: true }),
707
+ label: "Last Name",
708
+ sizes: "medium",
532
709
  required: true,
533
- setValueAs: (value) => parseCurrency(value)
534
- }),
535
- label: "Home Value",
536
- sizes: "medium",
537
- required: true,
538
- error: !!errors.appraisedValue,
539
- helperText: errors.appraisedValue?.message,
540
- variant,
541
- onBlur: (e) => {
542
- const rawValue = e.target.value;
543
- const parsedValue = parseCurrency(rawValue);
544
- methods.setValue("appraisedValue", parsedValue);
545
- e.target.value = formatCurrency(parsedValue);
546
- },
547
- onFocus: (e) => {
548
- const currentValue = e.target.value;
549
- e.target.value = currentValue.replace(/[$,]/g, "");
710
+ error: !!errors.lastName,
711
+ helperText: errors.lastName?.message,
712
+ variant
550
713
  }
551
- }
552
- ) }),
553
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
554
- Input,
555
- {
556
- id: "mortgageBalance",
557
- type: "text",
558
- ...register("mortgageBalance", {
714
+ ) }),
715
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
716
+ Input,
717
+ {
718
+ id: "email",
719
+ ...register("email", {
720
+ required: true,
721
+ validate: {
722
+ isValid: associatedEmail
723
+ }
724
+ }),
725
+ label: "Email",
726
+ sizes: "medium",
559
727
  required: true,
560
- setValueAs: (value) => parseCurrency(value)
561
- }),
562
- label: "Mortgage Balance",
563
- sizes: "medium",
564
- required: true,
565
- error: !!errors.mortgageBalance,
566
- helperText: errors.mortgageBalance?.message,
567
- variant,
568
- onBlur: (e) => {
569
- const rawValue = e.target.value;
570
- const parsedValue = parseCurrency(rawValue);
571
- methods.setValue("mortgageBalance", parsedValue);
572
- e.target.value = formatCurrency(parsedValue);
573
- },
574
- onFocus: (e) => {
575
- const currentValue = e.target.value;
576
- e.target.value = currentValue.replace(/[$,]/g, "");
728
+ error: !!errors.email,
729
+ helperText: errors.email?.message,
730
+ variant
577
731
  }
578
- }
579
- ) })
580
- ] }),
581
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
582
- Dropdown,
583
- {
584
- id: "creditScore",
585
- ...register("creditScore", {
586
- required: true,
587
- setValueAs: (value) => value === "" ? void 0 : Number(value)
588
- }),
589
- label: "Credit Score",
590
- sizes: "medium",
591
- required: true,
592
- error: !!errors.creditScore,
593
- helperText: errors.creditScore?.message,
594
- variant,
595
- defaultValue: "Select option",
596
- children: [
597
- /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
598
- /* @__PURE__ */ jsx("option", { value: "740", children: "740+" }),
599
- /* @__PURE__ */ jsx("option", { value: "720", children: "739-720" }),
600
- /* @__PURE__ */ jsx("option", { value: "700", children: "719-700" }),
601
- /* @__PURE__ */ jsx("option", { value: "680", children: "699-680" }),
602
- /* @__PURE__ */ jsx("option", { value: "660", children: "679-660" }),
603
- /* @__PURE__ */ jsx("option", { value: "640", children: "659-640" }),
604
- /* @__PURE__ */ jsx("option", { value: "620", children: "639-620" }),
605
- /* @__PURE__ */ jsx("option", { value: "600", children: "Below 620" })
606
- ]
607
- }
608
- ) }),
609
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
610
- Input,
611
- {
612
- id: "zipCode",
613
- type: "number",
614
- ...register("zipCode", {
615
- required: true,
616
- setValueAs: (value) => Number(value)
617
- }),
618
- label: "Zip Code",
619
- sizes: "medium",
620
- required: true,
621
- error: !!errors.zipCode,
622
- helperText: errors.zipCode?.message,
623
- variant
624
- }
625
- ) }),
626
- loanPurpose === 2 ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
627
- Input,
628
- {
629
- id: "cashOut",
630
- type: "text",
631
- ...register("cashOut", {
632
- required: true,
633
- setValueAs: (value) => parseCurrency(value)
634
- }),
635
- label: "Cash Out (Optional)",
636
- sizes: "medium",
637
- error: !!errors.cashOut,
638
- helperText: errors.cashOut?.message,
639
- variant,
640
- onBlur: (e) => {
641
- const rawValue = e.target.value;
642
- const parsedValue = parseCurrency(rawValue);
643
- methods.setValue("cashOut", parsedValue);
644
- e.target.value = formatCurrency(parsedValue);
645
- },
646
- onFocus: (e) => {
647
- const currentValue = e.target.value;
648
- e.target.value = currentValue.replace(/[$,]/g, "");
649
- }
650
- }
651
- ) }) }) : null,
652
- /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm, "text_center"), children: /* @__PURE__ */ jsx(
653
- "div",
654
- {
655
- className: clsx(
656
- descriptionField({ variant }),
657
- "text_center"
658
- ),
659
- children: "Almost there! Please provide your contact information to view rates and sign up for Rate Watch."
660
- }
661
- ) }),
662
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
663
- Input,
664
- {
665
- id: "firstName",
666
- ...register("firstName", {
667
- required: "First Name is required"
668
- }),
669
- label: "First Name",
670
- sizes: "medium",
671
- required: true,
672
- error: !!errors.firstName,
673
- helperText: errors.firstName?.message,
674
- variant
675
- }
676
- ) }),
677
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
678
- Input,
679
- {
680
- id: "lastName",
681
- ...register("lastName", { required: true }),
682
- label: "Last Name",
683
- sizes: "medium",
684
- required: true,
685
- error: !!errors.lastName,
686
- helperText: errors.lastName?.message,
687
- variant
688
- }
689
- ) }),
690
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
691
- Input,
692
- {
693
- id: "email",
694
- ...register("email", {
695
- required: true,
696
- validate: {
697
- isValid: associatedEmail
732
+ ) }),
733
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
734
+ InputPhone,
735
+ {
736
+ id: "phone",
737
+ ...register("phone", { required: true, maxLength: 12 }),
738
+ label: "Phone Number",
739
+ sizes: "medium",
740
+ required: true,
741
+ error: !!errors.phone,
742
+ helperText: errors.phone?.message,
743
+ variant
698
744
  }
699
- }),
700
- label: "Email",
701
- sizes: "medium",
702
- required: true,
703
- error: !!errors.email,
704
- helperText: errors.email?.message,
705
- variant
706
- }
707
- ) }),
708
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
709
- InputPhone,
710
- {
711
- id: "phone",
712
- ...register("phone", { required: true, maxLength: 12 }),
713
- label: "Phone Number",
714
- sizes: "medium",
715
- required: true,
716
- error: !!errors.phone,
717
- helperText: errors.phone?.message,
718
- variant
719
- }
720
- ) })
721
- ] }),
722
- children,
723
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
724
- /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
725
- LoadingIndicator,
726
- {
727
- style: { marginInline: "auto" },
728
- variant
729
- }
730
- ) : /* @__PURE__ */ jsxs("div", { className: formBtns, children: [
731
- /* @__PURE__ */ jsx(
732
- "button",
733
- {
734
- type: "submit",
735
- disabled: !isValid,
736
- className: button({
737
- color: "secondary",
738
- size: "large",
739
- rounded: "medium",
740
- disabled: !isValid
741
- }),
742
- children: "Get My Rate"
743
- }
744
- ),
745
- /* @__PURE__ */ jsxs("span", { className: `sc__btn ${chevron_wrapper}`, children: [
746
- /* @__PURE__ */ jsx(
747
- "a",
745
+ ) })
746
+ ] }),
747
+ children,
748
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
749
+ /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
750
+ LoadingIndicator,
748
751
  {
749
- id,
750
- className: `${chevron({ variant })} ${!isValid ? na_cursor : ""}`,
751
- onClick: isValid ? handleSubmit(async (data) => {
752
- await onSubmit(data);
753
- toggleModal();
754
- setHideModal(false);
755
- }) : (e) => {
756
- e.preventDefault();
757
- },
758
- children: "Sign Up For Ratewatch"
752
+ style: { marginInline: "auto" },
753
+ variant
759
754
  }
760
- ),
761
- /* @__PURE__ */ jsx(SvgArrowIcon, { className: "arrow", variant: "tertiary" })
762
- ] })
763
- ] }) })
764
- ] })
755
+ ) : /* @__PURE__ */ jsxs("div", { className: formBtns, children: [
756
+ /* @__PURE__ */ jsx(
757
+ "button",
758
+ {
759
+ type: "submit",
760
+ disabled: !isValid,
761
+ className: button({
762
+ color: "secondary",
763
+ size: "large",
764
+ rounded: "medium",
765
+ disabled: !isValid
766
+ }),
767
+ children: "Get My Rate"
768
+ }
769
+ ),
770
+ /* @__PURE__ */ jsxs("span", { className: `sc__btn ${chevron_wrapper}`, children: [
771
+ /* @__PURE__ */ jsx(
772
+ "a",
773
+ {
774
+ id,
775
+ className: `${chevron({ variant })} ${!isValid ? na_cursor : ""}`,
776
+ onClick: isValid ? handleSubmit(async (data) => {
777
+ await onSubmit(data);
778
+ toggleModal();
779
+ setHideModal(false);
780
+ }) : (e) => {
781
+ e.preventDefault();
782
+ },
783
+ children: "Sign Up For Ratewatch"
784
+ }
785
+ ),
786
+ /* @__PURE__ */ jsx(SvgArrowIcon, { className: "arrow", variant: "tertiary" })
787
+ ] })
788
+ ] }) }),
789
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
790
+ ]
791
+ }
792
+ )
765
793
  ] }) })
766
794
  },
767
795
  id