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

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