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

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 (119) hide show
  1. package/dist/Auth/ErrorAlert.js +2 -2
  2. package/dist/Button/Button.js +2 -2
  3. package/dist/Calculators/BuyDownCalculator/index.js +1 -1
  4. package/dist/Calculators/Calculator.js +14 -2
  5. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.d.ts +9 -0
  6. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +219 -0
  7. package/dist/Calculators/MaxLoanCalculator/index.js +22 -5
  8. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.d.ts +1 -0
  9. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +2 -0
  10. package/dist/Calculators/MonthlyPaymentCalculator/index.js +15 -5
  11. package/dist/Calculators/index.d.ts +2 -1
  12. package/dist/Calculators/index.js +3 -1
  13. package/dist/Carousel/index.js +2 -2
  14. package/dist/Chevron/index.js +2 -2
  15. package/dist/Comparison/Comparison.js +2 -2
  16. package/dist/ExecutiveBio/ExecutiveBio.js +2 -2
  17. package/dist/FaqAccordion/index.js +2 -2
  18. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +2 -2
  19. package/dist/Forms/ApplicationStart.d.ts +1 -1
  20. package/dist/Forms/ApplicationStart.js +101 -89
  21. package/dist/Forms/ApplyNow.d.ts +2 -2
  22. package/dist/Forms/ApplyNow.js +170 -145
  23. package/dist/Forms/ClearingForm.d.ts +1 -1
  24. package/dist/Forms/ClearingForm.js +174 -162
  25. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  26. package/dist/Forms/CommercialDeposits.js +191 -179
  27. package/dist/Forms/CommercialLending.d.ts +1 -1
  28. package/dist/Forms/CommercialLending.js +268 -256
  29. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  30. package/dist/Forms/CommercialPremiumFinance.js +106 -94
  31. package/dist/Forms/ContactCompany.d.ts +1 -1
  32. package/dist/Forms/ContactCompany.js +103 -91
  33. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  34. package/dist/Forms/ContactCompanyTitle.js +117 -105
  35. package/dist/Forms/ContactUs.d.ts +1 -1
  36. package/dist/Forms/ContactUs.js +90 -79
  37. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  38. package/dist/Forms/ContactUsAAS.js +170 -158
  39. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  40. package/dist/Forms/ContactUsBusiness.js +126 -114
  41. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  42. package/dist/Forms/ContactUsBusinessNameEmail.js +95 -83
  43. package/dist/Forms/ContactUsLVF.d.ts +3 -1
  44. package/dist/Forms/ContactUsLVF.js +117 -101
  45. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  46. package/dist/Forms/ContactUsNMLSId.js +109 -97
  47. package/dist/Forms/ContactUsNewTest.d.ts +3 -0
  48. package/dist/Forms/ContactUsNewTest.js +206 -0
  49. package/dist/Forms/CpraRequest.d.ts +1 -1
  50. package/dist/Forms/CpraRequest.js +630 -618
  51. package/dist/Forms/CraPublicFile.d.ts +1 -1
  52. package/dist/Forms/CraPublicFile.js +101 -89
  53. package/dist/Forms/DealerServices.d.ts +1 -1
  54. package/dist/Forms/DealerServices.js +215 -203
  55. package/dist/Forms/EmailOnly.d.ts +1 -1
  56. package/dist/Forms/EmailOnly.js +48 -36
  57. package/dist/Forms/EmailUs.d.ts +1 -1
  58. package/dist/Forms/EmailUs.js +65 -53
  59. package/dist/Forms/FormProps.d.ts +3 -0
  60. package/dist/Forms/Forms.css.d.ts +18 -0
  61. package/dist/Forms/Forms.css.js +44 -38
  62. package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -1
  63. package/dist/Forms/HoneyPot/HoneyPot.css.js +2 -2
  64. package/dist/Forms/HoneyPot/index.d.ts +10 -11
  65. package/dist/Forms/HoneyPot/index.js +21 -24
  66. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  67. package/dist/Forms/MortgageRate/MortgageRateForm.js +369 -348
  68. package/dist/Forms/MortgageRate/MortgageRateWatch.js +2 -2
  69. package/dist/Forms/MortgageWarehouseLending.d.ts +11 -0
  70. package/dist/Forms/MortgageWarehouseLending.js +337 -0
  71. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  72. package/dist/Forms/QuickPricer/QuickPricerForm.js +608 -596
  73. package/dist/Forms/SalesforceFieldsForm.d.ts +5 -0
  74. package/dist/Forms/SalesforceFieldsForm.js +11 -1
  75. package/dist/Forms/ScheduleCall.d.ts +1 -1
  76. package/dist/Forms/ScheduleCall.js +146 -134
  77. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  78. package/dist/Forms/ScheduleCallPremier.js +168 -156
  79. package/dist/Forms/SuccesForm.js +5 -5
  80. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  81. package/dist/Forms/VendorQuestionnaire.js +807 -795
  82. package/dist/Forms/WcplSurvey.d.ts +1 -1
  83. package/dist/Forms/WcplSurvey.js +102 -90
  84. package/dist/Forms/applynow-utils.d.ts +1 -0
  85. package/dist/Forms/applynow-utils.js +48 -0
  86. package/dist/Forms/index.d.ts +3 -0
  87. package/dist/Forms/index.js +10 -2
  88. package/dist/HeroBanner/HeroBanner.js +38 -1
  89. package/dist/Hyperlink/index.js +2 -2
  90. package/dist/IconBillboard/sections/CallToActionSection.js +2 -1
  91. package/dist/ImageBillboard/ExitIntentModal/useExitIntentModal.js +6 -1
  92. package/dist/ImageLink/ImageLink.js +2 -2
  93. package/dist/ImageLink/ImageLinkSet.js +2 -2
  94. package/dist/ImageLink/index.js +2 -2
  95. package/dist/Insight/Featured/CategorySelector.js +2 -2
  96. package/dist/Insight/Featured/Featured.js +2 -2
  97. package/dist/Insight/Featured/Header.js +2 -2
  98. package/dist/Modal/Modal.js +2 -2
  99. package/dist/NavigationMenu/AxosALTS/NavData.js +2 -2
  100. package/dist/NavigationMenu/AxosALTS/index.js +2 -2
  101. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +14 -6
  102. package/dist/NavigationMenu/AxosBank/NavData.js +2 -2
  103. package/dist/NavigationMenu/AxosBank/SubNavBar.js +15 -7
  104. package/dist/NavigationMenu/AxosBank/index.js +2 -2
  105. package/dist/NavigationMenu/LaVictoire/NavData.js +2 -2
  106. package/dist/NavigationMenu/LaVictoire/index.js +2 -2
  107. package/dist/NavigationMenu/NavDataJson.js +2 -2
  108. package/dist/NavigationMenu/Navbar.js +2 -2
  109. package/dist/NavigationMenu/SignInNavButton.js +2 -2
  110. package/dist/SetContainer/SetContainer.js +2 -2
  111. package/dist/SocialMediaBar/iconsRepository.js +2 -2
  112. package/dist/VideoTile/VideoTile.js +2 -2
  113. package/dist/VideoWrapper/index.js +2 -2
  114. package/dist/assets/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css +3 -0
  115. package/dist/assets/Forms/Forms.css +135 -105
  116. package/dist/assets/Forms/HoneyPot/HoneyPot.css +4 -0
  117. package/dist/main.js +13 -3
  118. package/dist/utils/allowedAxosDomains.js +2 -1
  119. package/package.json +1 -1
@@ -47,6 +47,7 @@ const ContactUsAAS = ({
47
47
  description,
48
48
  callToAction,
49
49
  validateEmail,
50
+ onValidate,
50
51
  id
51
52
  }) => {
52
53
  const schema = z.object({
@@ -125,164 +126,175 @@ const ContactUsAAS = ({
125
126
  }
126
127
  )
127
128
  ] }),
128
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
129
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
130
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
131
- Input,
132
- {
133
- id: "first_name",
134
- ...register("first_name", { required: true }),
135
- label: "First Name*",
136
- sizes: "medium",
137
- placeholder: "",
138
- required: true,
139
- error: !!errors.first_name,
140
- helperText: errors.first_name?.message,
141
- variant
142
- }
143
- ) }),
144
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
145
- Input,
146
- {
147
- id: "last_name",
148
- ...register("last_name", { required: true }),
149
- label: "Last Name*",
150
- sizes: "medium",
151
- placeholder: "",
152
- required: true,
153
- error: !!errors.last_name,
154
- helperText: errors.last_name?.message,
155
- variant
156
- }
157
- ) }),
158
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
159
- Input,
160
- {
161
- id: "email",
162
- ...register("email", {
163
- required: true
164
- }),
165
- type: "email",
166
- label: "Email*",
167
- sizes: "medium",
168
- placeholder: "",
169
- required: true,
170
- error: !!errors.email,
171
- helperText: errors.email?.message,
172
- variant
173
- }
174
- ) }),
175
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
176
- InputPhone,
177
- {
178
- id: "phone",
179
- ...register("phone", {
180
- required: true,
181
- maxLength: 12
182
- }),
183
- label: "Phone*",
184
- sizes: "medium",
185
- placeholder: "",
186
- type: "tel",
187
- required: true,
188
- error: !!errors.phone,
189
- helperText: errors.phone?.message,
190
- variant
191
- }
192
- ) }),
193
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
194
- Input,
195
- {
196
- id: "company",
197
- ...register("company"),
198
- label: "Company",
199
- sizes: "medium",
200
- placeholder: "",
201
- error: !!errors.company,
202
- helperText: errors.company?.message,
203
- variant
204
- }
205
- ) }),
206
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
207
- Dropdown,
208
- {
209
- id: "Current_Assets_Under_Management__c",
210
- ...register("Current_Assets_Under_Management__c"),
211
- label: "Current AUM",
212
- sizes: "medium",
213
- error: !!errors.Current_Assets_Under_Management__c,
214
- helperText: errors.Current_Assets_Under_Management__c?.message,
215
- variant,
216
- defaultValue: "",
217
- children: [
218
- /* @__PURE__ */ jsx("option", { value: "", children: "Select Option" }),
219
- /* @__PURE__ */ jsx("option", { value: "$0 - $25M", children: "$0 — $25M" }),
220
- /* @__PURE__ */ jsx("option", { value: "$26M - $150M", children: "$26M — $150M" }),
221
- /* @__PURE__ */ jsx("option", { value: "$151M - $500M", children: "$151M — $500M" }),
222
- /* @__PURE__ */ jsx("option", { value: "$501M - $1B", children: "$501M — $1B" }),
223
- /* @__PURE__ */ jsx("option", { value: "$1B+", children: "$1B+" })
224
- ]
225
- }
226
- ) }),
227
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
228
- Dropdown,
229
- {
230
- id: "Role__c",
231
- ...register("Role__c", {
232
- required: true
233
- }),
234
- label: "What best describes your role?*",
235
- sizes: "medium",
236
- required: true,
237
- error: !!errors.Role__c,
238
- helperText: errors.Role__c?.message,
239
- variant,
240
- defaultValue: "Select option",
241
- children: [
242
- /* @__PURE__ */ jsx("option", { value: "Select option", disabled: true, children: "Select Option" }),
243
- /* @__PURE__ */ jsx("option", { value: "RIA Principal", children: "RIA Principal" }),
244
- /* @__PURE__ */ jsx("option", { value: "Advisor (IAR)", children: "Advisor (IAR)" }),
245
- /* @__PURE__ */ jsx("option", { value: "Broker-Dealer Affiliated Advisor", children: "Broker-Dealer Affiliated Advisor" }),
246
- /* @__PURE__ */ jsx("option", { value: "I am not a Financial Advisor", children: "I am not a Financial Advisor" }),
247
- /* @__PURE__ */ jsx("option", { value: "Other", children: "Other" })
248
- ]
249
- }
250
- ) }),
251
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
252
- InputTextArea,
253
- {
254
- id: "description",
255
- ...register("description"),
256
- label: "Comments",
257
- sizes: "medium",
258
- placeholder: "",
259
- error: !!errors.description,
260
- helperText: errors.description?.message,
261
- variant,
262
- rows: 1
263
- }
264
- ) }),
265
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
266
- ] }),
267
- children,
268
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
269
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
270
- LoadingIndicator,
271
- {
272
- style: { marginInline: "auto" },
273
- variant
274
- }
275
- ) : /* @__PURE__ */ jsx(
276
- Button,
277
- {
278
- color: getVariant(callToAction?.variant),
279
- as: "button",
280
- type: "submit",
281
- disabled: !isValid || isSubmitting,
282
- children: callToAction?.displayText
283
- }
284
- ) }) })
285
- ] })
129
+ /* @__PURE__ */ jsxs(
130
+ "form",
131
+ {
132
+ className: form,
133
+ onSubmit: async (e) => {
134
+ onValidate && onValidate(e);
135
+ await handleSubmit(submitForm)(e);
136
+ e.preventDefault();
137
+ },
138
+ children: [
139
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
140
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
141
+ Input,
142
+ {
143
+ id: "first_name",
144
+ ...register("first_name", { required: true }),
145
+ label: "First Name*",
146
+ sizes: "medium",
147
+ placeholder: "",
148
+ required: true,
149
+ error: !!errors.first_name,
150
+ helperText: errors.first_name?.message,
151
+ variant
152
+ }
153
+ ) }),
154
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
155
+ Input,
156
+ {
157
+ id: "last_name",
158
+ ...register("last_name", { required: true }),
159
+ label: "Last Name*",
160
+ sizes: "medium",
161
+ placeholder: "",
162
+ required: true,
163
+ error: !!errors.last_name,
164
+ helperText: errors.last_name?.message,
165
+ variant
166
+ }
167
+ ) }),
168
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
169
+ Input,
170
+ {
171
+ id: "email",
172
+ ...register("email", {
173
+ required: true
174
+ }),
175
+ type: "email",
176
+ label: "Email*",
177
+ sizes: "medium",
178
+ placeholder: "",
179
+ required: true,
180
+ error: !!errors.email,
181
+ helperText: errors.email?.message,
182
+ variant
183
+ }
184
+ ) }),
185
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
186
+ InputPhone,
187
+ {
188
+ id: "phone",
189
+ ...register("phone", {
190
+ required: true,
191
+ maxLength: 12
192
+ }),
193
+ label: "Phone*",
194
+ sizes: "medium",
195
+ placeholder: "",
196
+ type: "tel",
197
+ required: true,
198
+ error: !!errors.phone,
199
+ helperText: errors.phone?.message,
200
+ variant
201
+ }
202
+ ) }),
203
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
204
+ Input,
205
+ {
206
+ id: "company",
207
+ ...register("company"),
208
+ label: "Company",
209
+ sizes: "medium",
210
+ placeholder: "",
211
+ error: !!errors.company,
212
+ helperText: errors.company?.message,
213
+ variant
214
+ }
215
+ ) }),
216
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
217
+ Dropdown,
218
+ {
219
+ id: "Current_Assets_Under_Management__c",
220
+ ...register("Current_Assets_Under_Management__c"),
221
+ label: "Current AUM",
222
+ sizes: "medium",
223
+ error: !!errors.Current_Assets_Under_Management__c,
224
+ helperText: errors.Current_Assets_Under_Management__c?.message,
225
+ variant,
226
+ defaultValue: "",
227
+ children: [
228
+ /* @__PURE__ */ jsx("option", { value: "", children: "Select Option" }),
229
+ /* @__PURE__ */ jsx("option", { value: "$0 - $25M", children: "$0 — $25M" }),
230
+ /* @__PURE__ */ jsx("option", { value: "$26M - $150M", children: "$26M — $150M" }),
231
+ /* @__PURE__ */ jsx("option", { value: "$151M - $500M", children: "$151M — $500M" }),
232
+ /* @__PURE__ */ jsx("option", { value: "$501M - $1B", children: "$501M — $1B" }),
233
+ /* @__PURE__ */ jsx("option", { value: "$1B+", children: "$1B+" })
234
+ ]
235
+ }
236
+ ) }),
237
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
238
+ Dropdown,
239
+ {
240
+ id: "Role__c",
241
+ ...register("Role__c", {
242
+ required: true
243
+ }),
244
+ label: "What best describes your role?*",
245
+ sizes: "medium",
246
+ required: true,
247
+ error: !!errors.Role__c,
248
+ helperText: errors.Role__c?.message,
249
+ variant,
250
+ defaultValue: "Select option",
251
+ children: [
252
+ /* @__PURE__ */ jsx("option", { value: "Select option", disabled: true, children: "Select Option" }),
253
+ /* @__PURE__ */ jsx("option", { value: "RIA Principal", children: "RIA Principal" }),
254
+ /* @__PURE__ */ jsx("option", { value: "Advisor (IAR)", children: "Advisor (IAR)" }),
255
+ /* @__PURE__ */ jsx("option", { value: "Broker-Dealer Affiliated Advisor", children: "Broker-Dealer Affiliated Advisor" }),
256
+ /* @__PURE__ */ jsx("option", { value: "I am not a Financial Advisor", children: "I am not a Financial Advisor" }),
257
+ /* @__PURE__ */ jsx("option", { value: "Other", children: "Other" })
258
+ ]
259
+ }
260
+ ) }),
261
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
262
+ InputTextArea,
263
+ {
264
+ id: "description",
265
+ ...register("description"),
266
+ label: "Comments",
267
+ sizes: "medium",
268
+ placeholder: "",
269
+ error: !!errors.description,
270
+ helperText: errors.description?.message,
271
+ variant,
272
+ rows: 1
273
+ }
274
+ ) }),
275
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
276
+ ] }),
277
+ children,
278
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
279
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
280
+ LoadingIndicator,
281
+ {
282
+ style: { marginInline: "auto" },
283
+ variant
284
+ }
285
+ ) : /* @__PURE__ */ jsx(
286
+ Button,
287
+ {
288
+ color: getVariant(callToAction?.variant),
289
+ as: "button",
290
+ type: "submit",
291
+ disabled: !isValid || isSubmitting,
292
+ children: callToAction?.displayText
293
+ }
294
+ ) }) })
295
+ ]
296
+ }
297
+ )
286
298
  ] }) }) }, id);
287
299
  };
288
300
  export {
@@ -8,4 +8,4 @@ export type ContactUsBusinessNmlsIdInputs = {
8
8
  phone: string;
9
9
  Company_NMLS_ID__c: string;
10
10
  };
11
- export declare const ContactUsBusiness: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const ContactUsBusiness: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -41,8 +41,10 @@ import "../Calculators/ApyCalculator/ApyCalculator.css.js";
41
41
  import "../Table/Table.css.js";
42
42
  import "../Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js";
43
43
  import "../Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js";
44
+ import "../Input/PercentageInput.js";
44
45
  import { useForm, FormProvider } from "react-hook-form";
45
46
  import { z } from "zod";
47
+ import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
46
48
  import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
47
49
  import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
48
50
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
@@ -63,8 +65,6 @@ import "iframe-resizer";
63
65
  import "../Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js";
64
66
  import "../Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js";
65
67
  import "../Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js";
66
- import "../Input/PercentageInput.js";
67
- import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
68
68
  /* empty css */
69
69
  import "react-dom";
70
70
  /* empty css */
@@ -139,6 +139,7 @@ const ContactUsBusiness = ({
139
139
  description,
140
140
  callToAction,
141
141
  validateEmail,
142
+ onValidate,
142
143
  id
143
144
  }) => {
144
145
  const schema = z.object({
@@ -213,118 +214,129 @@ const ContactUsBusiness = ({
213
214
  }
214
215
  )
215
216
  ] }),
216
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
217
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
218
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
219
- Input,
220
- {
221
- id: "first_name",
222
- ...register("first_name", { required: true }),
223
- label: "First Name",
224
- sizes: "medium",
225
- placeholder: "First Name",
226
- required: true,
227
- error: !!errors.first_name,
228
- helperText: errors.first_name?.message,
229
- variant
230
- }
231
- ) }),
232
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
233
- Input,
234
- {
235
- id: "last_name",
236
- ...register("last_name", { required: true }),
237
- label: "Last Name",
238
- sizes: "medium",
239
- placeholder: "Last Name",
240
- required: true,
241
- error: !!errors.last_name,
242
- helperText: errors.last_name?.message,
243
- variant
244
- }
245
- ) }),
246
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
247
- Input,
248
- {
249
- id: "Company",
250
- ...register("Company", {
251
- required: true
252
- }),
253
- type: "text",
254
- label: "Business Name",
255
- sizes: "medium",
256
- placeholder: "Business Name",
257
- required: true,
258
- error: !!errors.Company,
259
- helperText: errors.Company?.message,
260
- variant
261
- }
262
- ) }),
263
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
264
- Input,
265
- {
266
- id: "email",
267
- ...register("email", {
268
- required: true
269
- }),
270
- type: "email",
271
- label: "Email",
272
- sizes: "medium",
273
- placeholder: "Email",
274
- required: true,
275
- error: !!errors.email,
276
- helperText: errors.email?.message,
277
- variant
278
- }
279
- ) }),
280
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
281
- InputPhone,
282
- {
283
- id: "phone",
284
- ...register("phone", { required: true, maxLength: 12 }),
285
- label: "Phone",
286
- sizes: "medium",
287
- placeholder: "Phone",
288
- type: "tel",
289
- required: true,
290
- error: !!errors.phone,
291
- helperText: errors.phone?.message,
292
- variant
293
- }
294
- ) }),
295
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
296
- Input,
297
- {
298
- id: "Company_NMLS_ID__c",
299
- ...register("Company_NMLS_ID__c", {
300
- required: true,
301
- min: 6,
302
- max: 7
303
- }),
304
- label: "Company NMLS ID",
305
- placeholder: "Company NMLS ID",
306
- sizes: "medium",
307
- required: true,
308
- error: !!errors.Company_NMLS_ID__c,
309
- helperText: errors.Company_NMLS_ID__c?.message,
310
- variant
311
- }
312
- ) }),
313
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
314
- ] }),
315
- children,
316
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
317
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
318
- Button,
319
- {
320
- color: getVariant(callToAction?.variant),
321
- as: "button",
322
- type: "submit",
323
- disabled: !isValid || isSubmitting,
324
- children: callToAction?.displayText
325
- }
326
- ) })
327
- ] })
217
+ /* @__PURE__ */ jsxs(
218
+ "form",
219
+ {
220
+ className: form,
221
+ onSubmit: async (e) => {
222
+ onValidate && onValidate(e);
223
+ await handleSubmit(submitForm)(e);
224
+ e.preventDefault();
225
+ },
226
+ children: [
227
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
228
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
229
+ Input,
230
+ {
231
+ id: "first_name",
232
+ ...register("first_name", { required: true }),
233
+ label: "First Name",
234
+ sizes: "medium",
235
+ placeholder: "First Name",
236
+ required: true,
237
+ error: !!errors.first_name,
238
+ helperText: errors.first_name?.message,
239
+ variant
240
+ }
241
+ ) }),
242
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
243
+ Input,
244
+ {
245
+ id: "last_name",
246
+ ...register("last_name", { required: true }),
247
+ label: "Last Name",
248
+ sizes: "medium",
249
+ placeholder: "Last Name",
250
+ required: true,
251
+ error: !!errors.last_name,
252
+ helperText: errors.last_name?.message,
253
+ variant
254
+ }
255
+ ) }),
256
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
257
+ Input,
258
+ {
259
+ id: "Company",
260
+ ...register("Company", {
261
+ required: true
262
+ }),
263
+ type: "text",
264
+ label: "Business Name",
265
+ sizes: "medium",
266
+ placeholder: "Business Name",
267
+ required: true,
268
+ error: !!errors.Company,
269
+ helperText: errors.Company?.message,
270
+ variant
271
+ }
272
+ ) }),
273
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
274
+ Input,
275
+ {
276
+ id: "email",
277
+ ...register("email", {
278
+ required: true
279
+ }),
280
+ type: "email",
281
+ label: "Email",
282
+ sizes: "medium",
283
+ placeholder: "Email",
284
+ required: true,
285
+ error: !!errors.email,
286
+ helperText: errors.email?.message,
287
+ variant
288
+ }
289
+ ) }),
290
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
291
+ InputPhone,
292
+ {
293
+ id: "phone",
294
+ ...register("phone", { required: true, maxLength: 12 }),
295
+ label: "Phone",
296
+ sizes: "medium",
297
+ placeholder: "Phone",
298
+ type: "tel",
299
+ required: true,
300
+ error: !!errors.phone,
301
+ helperText: errors.phone?.message,
302
+ variant
303
+ }
304
+ ) }),
305
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
306
+ Input,
307
+ {
308
+ id: "Company_NMLS_ID__c",
309
+ ...register("Company_NMLS_ID__c", {
310
+ required: true,
311
+ min: 6,
312
+ max: 7
313
+ }),
314
+ label: "Company NMLS ID",
315
+ placeholder: "Company NMLS ID",
316
+ sizes: "medium",
317
+ required: true,
318
+ error: !!errors.Company_NMLS_ID__c,
319
+ helperText: errors.Company_NMLS_ID__c?.message,
320
+ variant
321
+ }
322
+ ) }),
323
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
324
+ ] }),
325
+ children,
326
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
327
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
328
+ Button,
329
+ {
330
+ color: getVariant(callToAction?.variant),
331
+ as: "button",
332
+ type: "submit",
333
+ disabled: !isValid || isSubmitting,
334
+ children: callToAction?.displayText
335
+ }
336
+ ) })
337
+ ]
338
+ }
339
+ )
328
340
  ] }) }) }, id);
329
341
  };
330
342
  export {
@@ -6,4 +6,4 @@ export type ContactUsBusinessNameAndEmailInputs = {
6
6
  Business_Name__c: string;
7
7
  email: string;
8
8
  };
9
- export declare const ContactUsBusinessNameAndEmail: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ContactUsBusinessNameAndEmail: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;