@axos-web-dev/shared-components 1.0.99-dev.1 → 1.0.99-dev.3

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