@axos-web-dev/shared-components 1.0.99-feature-brand.3 → 1.0.99-feature-newQPvalues

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 (254) hide show
  1. package/dist/ATMLocator/ATMLocator.js +1 -0
  2. package/dist/Article/Article.css.d.ts +36 -8
  3. package/dist/ArticlesSet/ArticlesSet.css.d.ts +70 -10
  4. package/dist/ArticlesSet/ArticlesSet.js +1 -1
  5. package/dist/Auth/ErrorAlert.js +1 -0
  6. package/dist/AwardsBanner/AwardsBanner.css.js +1 -4
  7. package/dist/AwardsItem/AwardsItem.css.js +2 -1
  8. package/dist/Blockquote/Blockquote.module.js +3 -3
  9. package/dist/Button/Button.css.d.ts +3 -3
  10. package/dist/Button/Button.js +1 -0
  11. package/dist/Calculators/ApyCalculator/ApyCalculator.css.d.ts +30 -2
  12. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.d.ts +0 -1
  13. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +1 -3
  14. package/dist/Calculators/AxosOneCalculator/index.d.ts +0 -3
  15. package/dist/Calculators/AxosOneCalculator/index.js +20 -48
  16. package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.d.ts +30 -2
  17. package/dist/Calculators/Calculator.d.ts +0 -3
  18. package/dist/Calculators/Calculator.js +3 -6
  19. package/dist/Calculators/MaxLoanCalculator/index.js +8 -1
  20. package/dist/Calculators/calculator.css.d.ts +8 -2
  21. package/dist/CallToActionBar/index.js +1 -1
  22. package/dist/Carousel/Carousel.css.d.ts +19 -8
  23. package/dist/Carousel/index.js +1 -0
  24. package/dist/Chevron/Chevron.css.d.ts +2 -2
  25. package/dist/Chevron/index.js +1 -0
  26. package/dist/CollectInformationAlert/index.js +1 -1
  27. package/dist/Comparison/Comparison.js +3 -2
  28. package/dist/ExecutiveBio/ExecutiveBio.js +1 -0
  29. package/dist/FaqAccordion/index.js +1 -0
  30. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +4 -3
  31. package/dist/Forms/ApplicationStart.d.ts +1 -1
  32. package/dist/Forms/ApplicationStart.js +111 -89
  33. package/dist/Forms/ApplyNow.js +1 -0
  34. package/dist/Forms/ClearingForm.d.ts +1 -1
  35. package/dist/Forms/ClearingForm.js +184 -162
  36. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  37. package/dist/Forms/CommercialDeposits.js +201 -179
  38. package/dist/Forms/CommercialLending.d.ts +1 -1
  39. package/dist/Forms/CommercialLending.js +278 -256
  40. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  41. package/dist/Forms/CommercialPremiumFinance.js +128 -106
  42. package/dist/Forms/ContactCompany.d.ts +1 -1
  43. package/dist/Forms/ContactCompany.js +113 -91
  44. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  45. package/dist/Forms/ContactCompanyTitle.js +127 -105
  46. package/dist/Forms/ContactUs.d.ts +1 -1
  47. package/dist/Forms/ContactUs.js +99 -77
  48. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  49. package/dist/Forms/ContactUsAAS.js +180 -158
  50. package/dist/Forms/ContactUsBusiness.d.ts +2 -2
  51. package/dist/Forms/ContactUsBusiness.js +135 -113
  52. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  53. package/dist/Forms/ContactUsBusinessNameEmail.js +103 -81
  54. package/dist/Forms/ContactUsLVF.d.ts +1 -1
  55. package/dist/Forms/ContactUsLVF.js +119 -98
  56. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  57. package/dist/Forms/ContactUsNMLSId.js +117 -95
  58. package/dist/Forms/CpraRequest.d.ts +1 -1
  59. package/dist/Forms/CpraRequest.js +641 -619
  60. package/dist/Forms/CraPublicFile.d.ts +1 -1
  61. package/dist/Forms/CraPublicFile.js +109 -87
  62. package/dist/Forms/DealerServices.d.ts +1 -1
  63. package/dist/Forms/DealerServices.js +225 -204
  64. package/dist/Forms/EmailOnly.d.ts +1 -1
  65. package/dist/Forms/EmailOnly.js +56 -36
  66. package/dist/Forms/EmailUs.d.ts +1 -1
  67. package/dist/Forms/EmailUs.js +75 -53
  68. package/dist/Forms/FormEnums.js +4 -1
  69. package/dist/Forms/FormProps.d.ts +3 -0
  70. package/dist/Forms/Forms.css.d.ts +30 -2
  71. package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -0
  72. package/dist/Forms/HoneyPot/HoneyPot.css.js +5 -0
  73. package/dist/Forms/HoneyPot/index.d.ts +23 -0
  74. package/dist/Forms/HoneyPot/index.js +69 -0
  75. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  76. package/dist/Forms/MortgageRate/MortgageRateForm.js +369 -350
  77. package/dist/Forms/MortgageRate/MortgageRateWatch.js +1 -0
  78. package/dist/Forms/MortgageWarehouseLending.d.ts +1 -3
  79. package/dist/Forms/MortgageWarehouseLending.js +13 -3
  80. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  81. package/dist/Forms/QuickPricer/QuickPricerForm.js +624 -609
  82. package/dist/Forms/ScheduleCall.d.ts +1 -1
  83. package/dist/Forms/ScheduleCall.js +156 -134
  84. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  85. package/dist/Forms/ScheduleCallPremier.js +178 -156
  86. package/dist/Forms/SuccesForm.js +1 -0
  87. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  88. package/dist/Forms/VendorQuestionnaire.js +817 -795
  89. package/dist/Forms/WcplSurvey.d.ts +1 -1
  90. package/dist/Forms/WcplSurvey.js +112 -90
  91. package/dist/Forms/index.d.ts +1 -0
  92. package/dist/Forms/index.js +4 -0
  93. package/dist/HeroBanner/HeroBanner.css.d.ts +17 -5
  94. package/dist/HeroBanner/HeroBanner.js +54 -2
  95. package/dist/HeroBanner/SelectionBanner.css.d.ts +19 -1
  96. package/dist/HeroBanner/SelectionBanner.css.js +6 -6
  97. package/dist/Hyperlink/index.js +1 -0
  98. package/dist/IconBillboard/IconBillboard.css.d.ts +40 -6
  99. package/dist/IconBillboard/sections/CallToActionSection.js +1 -1
  100. package/dist/ImageBillboard/ImageBillboard.css.d.ts +61 -5
  101. package/dist/ImageLink/ImageLink.js +1 -0
  102. package/dist/ImageLink/ImageLinkSet.js +1 -0
  103. package/dist/ImageLink/index.js +1 -0
  104. package/dist/Input/Input.js +3 -1
  105. package/dist/Insight/Featured/CategorySelector.js +1 -0
  106. package/dist/Insight/Featured/Featured.js +1 -0
  107. package/dist/Insight/Featured/Header.js +1 -0
  108. package/dist/LoadingIndicator/LoadingIndicator.css.d.ts +4 -4
  109. package/dist/Modal/Modal.css.d.ts +0 -1
  110. package/dist/Modal/Modal.css.js +3 -5
  111. package/dist/Modal/Modal.js +4 -3
  112. package/dist/NavigationMenu/AxosALTS/NavData.js +1 -0
  113. package/dist/NavigationMenu/AxosALTS/index.js +1 -0
  114. package/dist/NavigationMenu/AxosAdvisor/NavBar.css.d.ts +0 -2
  115. package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +2 -7
  116. package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
  117. package/dist/NavigationMenu/AxosAdvisor/index.js +21 -39
  118. package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.d.ts +0 -2
  119. package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.js +2 -7
  120. package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +53 -53
  121. package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.d.ts +1 -1
  122. package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.js +2 -2
  123. package/dist/NavigationMenu/AxosAdvisorServices/index.js +8 -14
  124. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +2 -2
  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 +4 -0
  128. package/dist/NavigationMenu/AxosBank/NavBar.css.js +1 -2
  129. package/dist/NavigationMenu/AxosBank/NavBar.module.js +41 -41
  130. package/dist/NavigationMenu/AxosBank/NavData.js +1 -0
  131. package/dist/NavigationMenu/AxosBank/SubNavBar.js +230 -227
  132. package/dist/NavigationMenu/AxosBank/SubNavbar.css.d.ts +0 -2
  133. package/dist/NavigationMenu/AxosBank/SubNavbar.css.js +0 -4
  134. package/dist/NavigationMenu/AxosBank/index.js +1 -0
  135. package/dist/NavigationMenu/AxosClearing/NavBar.module.js +37 -37
  136. package/dist/NavigationMenu/LaVictoire/NavData.js +1 -0
  137. package/dist/NavigationMenu/LaVictoire/index.js +1 -0
  138. package/dist/NavigationMenu/NavDataJson.d.ts +2 -0
  139. package/dist/NavigationMenu/NavDataJson.js +309 -0
  140. package/dist/NavigationMenu/Navbar.d.ts +5 -0
  141. package/dist/NavigationMenu/Navbar.js +195 -0
  142. package/dist/NavigationMenu/SignInNavButton.d.ts +1 -0
  143. package/dist/NavigationMenu/SignInNavButton.js +363 -0
  144. package/dist/PageNavItem/PageNavItem.css.d.ts +22 -4
  145. package/dist/Pagination/Pagination.js +6 -6
  146. package/dist/SetContainer/SetContainer.js +1 -0
  147. package/dist/SocialMediaBar/iconsRepository.js +1 -0
  148. package/dist/StepItem/StepItem.css.d.ts +36 -8
  149. package/dist/StepItemSet/StepItemSet.css.d.ts +32 -4
  150. package/dist/StepItemSet/StepItemSet.d.ts +1 -1
  151. package/dist/StepItemSet/StepItemSet.js +82 -18
  152. package/dist/StepItemSet/index.d.ts +0 -5
  153. package/dist/StepItemSet/index.js +0 -10
  154. package/dist/Table/Table.css.d.ts +2 -3
  155. package/dist/Table/Table.d.ts +1 -1
  156. package/dist/Table/Table.js +1 -1
  157. package/dist/VideoTile/VideoTile.js +1 -0
  158. package/dist/VideoWrapper/index.js +1 -0
  159. package/dist/WalnutIframe/wrapper.module.js +3 -3
  160. package/dist/assets/Accordion/Accordion.css +1 -1
  161. package/dist/assets/Article/Article.css +59 -47
  162. package/dist/assets/ArticlesSet/ArticlesSet.css +56 -26
  163. package/dist/assets/Auth/SignIn.css +12 -12
  164. package/dist/assets/AwardsBanner/AwardsBanner.css +1 -1
  165. package/dist/assets/AwardsItem/AwardsItem.css +4 -3
  166. package/dist/assets/Blockquote/Blockquote.css.css +68 -68
  167. package/dist/assets/Button/Button.css +21 -21
  168. package/dist/assets/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css +8 -8
  169. package/dist/assets/Calculators/ApyCalculator/ApyCalculator.css +21 -12
  170. package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +9 -21
  171. package/dist/assets/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css +31 -19
  172. package/dist/assets/Calculators/BuyDownCalculator/BuyDownCalculator.css +14 -14
  173. package/dist/assets/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css +9 -9
  174. package/dist/assets/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css +9 -9
  175. package/dist/assets/Calculators/SummitApyCalculator/BalanceAPYCalculator.css +9 -9
  176. package/dist/assets/Calculators/calculator.css +15 -9
  177. package/dist/assets/CallToActionBar/CallToActionBar.css +4 -1
  178. package/dist/assets/Carousel/Carousel.css +41 -27
  179. package/dist/assets/Chevron/Chevron.css +6 -6
  180. package/dist/assets/CollectInformationAlert/CollectInformationAlert.css +3 -4
  181. package/dist/assets/Comparison/Comparison.css +3 -3
  182. package/dist/assets/ContentBanner/ContentBanner.css +8 -8
  183. package/dist/assets/DownloadTile/DownloadTile.css +5 -5
  184. package/dist/assets/ExecutiveBio/ExecutiveBio.css +23 -23
  185. package/dist/assets/FaqAccordion/FaqAccordion.css +4 -4
  186. package/dist/assets/FooterDisclosure/FooterDisclosure.css +1 -1
  187. package/dist/assets/FooterSiteMap/AxosBank/FooterSiteMap.css +8 -3
  188. package/dist/assets/Forms/Forms.css +63 -45
  189. package/dist/assets/Forms/HoneyPot/HoneyPot.css +8 -0
  190. package/dist/assets/Forms/QuickPricer/UserInformation.css +1 -1
  191. package/dist/assets/HeroBanner/HeroBanner.css +76 -81
  192. package/dist/assets/HeroBanner/LargeBanner.css +13 -13
  193. package/dist/assets/HeroBanner/SelectionBanner.css +29 -15
  194. package/dist/assets/IconBillboard/IconBillboard.css +48 -25
  195. package/dist/assets/ImageBillboard/ImageBillboard.css +61 -28
  196. package/dist/assets/Input/Input.css +6 -6
  197. package/dist/assets/Inputs/Input.css +4 -4
  198. package/dist/assets/Insight/Featured/CategorySelector.css +1 -1
  199. package/dist/assets/Interstitial/Interstitial-variants.css +3 -3
  200. package/dist/assets/LandingPageHeader/LandingPageHeader.css +1 -1
  201. package/dist/assets/LoadingIndicator/LoadingIndicator.css +5 -5
  202. package/dist/assets/Modal/Modal.css +28 -17
  203. package/dist/assets/NavigationMenu/AxosALTS/NavBar.css +1 -1
  204. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css +2 -25
  205. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css.css +597 -609
  206. package/dist/assets/NavigationMenu/AxosAdvisor/SubNavbar.css +4 -5
  207. package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css +2 -25
  208. package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css.css +618 -630
  209. package/dist/assets/NavigationMenu/AxosAdvisorServices/SubNavbar.css +4 -22
  210. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +191 -192
  211. package/dist/assets/NavigationMenu/AxosBank/NavBar.css +9 -19
  212. package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +473 -445
  213. package/dist/assets/NavigationMenu/AxosBank/SubNavbar.css +1 -35
  214. package/dist/assets/NavigationMenu/AxosClearing/NavBar.css.css +458 -484
  215. package/dist/assets/PageNavItem/PageNavItem.css +33 -16
  216. package/dist/assets/Pagination/Pagination.css +1 -1
  217. package/dist/assets/SetContainer/SetContainer.css +4 -4
  218. package/dist/assets/StepItem/StepItem.css +42 -26
  219. package/dist/assets/StepItemSet/StepItemSet.css +26 -13
  220. package/dist/assets/Tab/Tab.css +12 -12
  221. package/dist/assets/Table/Table.css +56 -48
  222. package/dist/assets/TextBlock/TextBlock.css +1 -1
  223. package/dist/assets/TopicalNavItem/TopicalNavItem.css +2 -2
  224. package/dist/assets/TopicalNavSet/TopicalNavSet.css +1 -1
  225. package/dist/assets/VideoTile/VideoTile.css +1 -1
  226. package/dist/assets/WalnutIframe/wrapper.css.css +49 -48
  227. package/dist/assets/globals.css +6 -5
  228. package/dist/assets/icons/ArrowIcon/ArrowIcon.css +3 -3
  229. package/dist/assets/icons/DownloadIcon/DownloadIcon.css +1 -1
  230. package/dist/assets/icons/FollowIcon/FollowIcon.css +1 -1
  231. package/dist/assets/themes/axos.css +30 -30
  232. package/dist/assets/themes/premier.css +31 -31
  233. package/dist/assets/themes/victorie.css +23 -23
  234. package/dist/icons/CheckCircle.js +1 -1
  235. package/dist/icons/CheckCircleLight.js +1 -1
  236. package/dist/icons/CheckIcon/index.js +1 -1
  237. package/dist/icons/Logos/AXB.d.ts +8 -0
  238. package/dist/icons/Logos/AXB.js +74 -0
  239. package/dist/icons/QuoteIconGrey.js +2 -2
  240. package/dist/main.js +4 -10
  241. package/dist/themes/axos.css.d.ts +12 -12
  242. package/dist/themes/axos.css.js +1 -1
  243. package/dist/utils/allowedAxosDomains.js +2 -1
  244. package/package.json +1 -1
  245. package/dist/StepItemSet/sections/AdditionalDetailsSection.d.ts +0 -7
  246. package/dist/StepItemSet/sections/AdditionalDetailsSection.js +0 -11
  247. package/dist/StepItemSet/sections/CallToActionSection.d.ts +0 -8
  248. package/dist/StepItemSet/sections/CallToActionSection.js +0 -39
  249. package/dist/StepItemSet/sections/HeaderSection.d.ts +0 -10
  250. package/dist/StepItemSet/sections/HeaderSection.js +0 -45
  251. package/dist/StepItemSet/sections/ImageSection.d.ts +0 -8
  252. package/dist/StepItemSet/sections/ImageSection.js +0 -10
  253. package/dist/StepItemSet/sections/StepsList.d.ts +0 -10
  254. package/dist/StepItemSet/sections/StepsList.js +0 -21
@@ -46,6 +46,7 @@ import { useForm, FormProvider } from "react-hook-form";
46
46
  import { z } from "zod";
47
47
  import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
48
48
  import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
49
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
49
50
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
50
51
  /* empty css */
51
52
  /* empty css */
@@ -138,6 +139,7 @@ const ContactUsBusiness = ({
138
139
  description,
139
140
  callToAction,
140
141
  validateEmail,
142
+ onValidate,
141
143
  id
142
144
  }) => {
143
145
  const schema = z.object({
@@ -162,12 +164,20 @@ const ContactUsBusiness = ({
162
164
  }
163
165
  return removeDashes;
164
166
  }),
165
- company: z.string().min(1),
167
+ Company: z.string().min(1),
166
168
  Company_NMLS_ID__c: z.string().min(6).max(7)
167
169
  });
170
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
171
+ if (!isValidHoneyPot(data)) {
172
+ ctx.addIssue({
173
+ code: z.ZodIssueCode.custom,
174
+ message: "fields are not valid."
175
+ });
176
+ }
177
+ });
168
178
  const methods = useForm({
169
179
  resolver: zodResolver(
170
- schema.merge(SalesforceSchema),
180
+ gen_schema,
171
181
  {
172
182
  async: true
173
183
  },
@@ -204,117 +214,129 @@ const ContactUsBusiness = ({
204
214
  }
205
215
  )
206
216
  ] }),
207
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
208
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
209
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
210
- Input,
211
- {
212
- id: "first_name",
213
- ...register("first_name", { required: true }),
214
- label: "First Name",
215
- sizes: "medium",
216
- placeholder: "First Name",
217
- required: true,
218
- error: !!errors.first_name,
219
- helperText: errors.first_name?.message,
220
- variant
221
- }
222
- ) }),
223
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
224
- Input,
225
- {
226
- id: "last_name",
227
- ...register("last_name", { required: true }),
228
- label: "Last Name",
229
- sizes: "medium",
230
- placeholder: "Last Name",
231
- required: true,
232
- error: !!errors.last_name,
233
- helperText: errors.last_name?.message,
234
- variant
235
- }
236
- ) }),
237
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
238
- Input,
239
- {
240
- id: "Company",
241
- ...register("company", {
242
- required: true
243
- }),
244
- type: "text",
245
- label: "Business Name",
246
- sizes: "medium",
247
- placeholder: "Business Name",
248
- required: true,
249
- error: !!errors.company,
250
- helperText: errors.company?.message,
251
- variant
252
- }
253
- ) }),
254
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
255
- Input,
256
- {
257
- id: "email",
258
- ...register("email", {
259
- required: true
260
- }),
261
- type: "email",
262
- label: "Email",
263
- sizes: "medium",
264
- placeholder: "Email",
265
- required: true,
266
- error: !!errors.email,
267
- helperText: errors.email?.message,
268
- variant
269
- }
270
- ) }),
271
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
272
- InputPhone,
273
- {
274
- id: "phone",
275
- ...register("phone", { required: true, maxLength: 12 }),
276
- label: "Phone",
277
- sizes: "medium",
278
- placeholder: "Phone",
279
- type: "tel",
280
- required: true,
281
- error: !!errors.phone,
282
- helperText: errors.phone?.message,
283
- variant
284
- }
285
- ) }),
286
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
287
- Input,
288
- {
289
- id: "Company_NMLS_ID__c",
290
- ...register("Company_NMLS_ID__c", {
291
- required: true,
292
- min: 6,
293
- max: 7
294
- }),
295
- label: "Company NMLS ID",
296
- placeholder: "Company NMLS ID",
297
- sizes: "medium",
298
- required: true,
299
- error: !!errors.Company_NMLS_ID__c,
300
- helperText: errors.Company_NMLS_ID__c?.message,
301
- variant
302
- }
303
- ) })
304
- ] }),
305
- children,
306
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
307
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
308
- Button,
309
- {
310
- color: getVariant(callToAction?.variant),
311
- as: "button",
312
- type: "submit",
313
- disabled: !isValid || isSubmitting,
314
- children: callToAction?.displayText
315
- }
316
- ) })
317
- ] })
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
+ )
318
340
  ] }) }) }, id);
319
341
  };
320
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;
@@ -46,6 +46,7 @@ import { useForm, FormProvider } from "react-hook-form";
46
46
  import { z } from "zod";
47
47
  import "../Calculators/BuyDownCalculator/BuyDownCalculator.css.js";
48
48
  import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
49
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
49
50
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
50
51
  /* empty css */
51
52
  /* empty css */
@@ -138,6 +139,7 @@ const ContactUsBusinessNameAndEmail = ({
138
139
  description,
139
140
  callToAction,
140
141
  validateEmail,
142
+ onValidate,
141
143
  id
142
144
  }) => {
143
145
  const schema = z.object({
@@ -146,9 +148,17 @@ const ContactUsBusinessNameAndEmail = ({
146
148
  email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
147
149
  Business_Name__c: z.string().min(1)
148
150
  });
151
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
152
+ if (!isValidHoneyPot(data)) {
153
+ ctx.addIssue({
154
+ code: z.ZodIssueCode.custom,
155
+ message: "fields are not valid."
156
+ });
157
+ }
158
+ });
149
159
  const methods = useForm({
150
160
  resolver: zodResolver(
151
- schema.merge(SalesforceSchema),
161
+ gen_schema,
152
162
  {
153
163
  async: true
154
164
  },
@@ -185,86 +195,98 @@ const ContactUsBusinessNameAndEmail = ({
185
195
  }
186
196
  )
187
197
  ] }),
188
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
189
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
190
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
191
- Input,
192
- {
193
- id: "first_name",
194
- ...register("first_name", { required: true }),
195
- label: "First Name",
196
- sizes: "medium",
197
- required: true,
198
- error: !!errors.first_name,
199
- helperText: errors.first_name?.message,
200
- variant
201
- }
202
- ) }),
203
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
204
- Input,
205
- {
206
- id: "last_name",
207
- ...register("last_name", { required: true }),
208
- label: "Last Name",
209
- sizes: "medium",
210
- required: true,
211
- error: !!errors.last_name,
212
- helperText: errors.last_name?.message,
213
- variant
214
- }
215
- ) }),
216
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
217
- Input,
218
- {
219
- id: "Business_Name__c",
220
- ...register("Business_Name__c", {
221
- required: true
222
- }),
223
- type: "text",
224
- label: "Business Name",
225
- sizes: "medium",
226
- required: true,
227
- error: !!errors.Business_Name__c,
228
- helperText: errors.Business_Name__c?.message,
229
- variant
230
- }
231
- ) }),
232
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
233
- Input,
234
- {
235
- id: "email",
236
- ...register("email", {
237
- required: true
238
- }),
239
- type: "email",
240
- label: "Business Email",
241
- sizes: "medium",
242
- required: true,
243
- error: !!errors.email,
244
- helperText: errors.email?.message,
245
- variant
246
- }
247
- ) })
248
- ] }),
249
- children,
250
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
251
- /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
252
- LoadingIndicator,
253
- {
254
- style: { marginInline: "auto" },
255
- variant
256
- }
257
- ) : /* @__PURE__ */ jsx(
258
- Button,
259
- {
260
- color: getVariant(callToAction?.variant),
261
- as: "button",
262
- type: "submit",
263
- disabled: !isValid || isSubmitting,
264
- children: callToAction?.displayText
265
- }
266
- ) })
267
- ] })
198
+ /* @__PURE__ */ jsxs(
199
+ "form",
200
+ {
201
+ className: form,
202
+ onSubmit: async (e) => {
203
+ onValidate && onValidate(e);
204
+ await handleSubmit(submitForm)(e);
205
+ e.preventDefault();
206
+ },
207
+ children: [
208
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
209
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
210
+ Input,
211
+ {
212
+ id: "first_name",
213
+ ...register("first_name", { required: true }),
214
+ label: "First Name",
215
+ sizes: "medium",
216
+ required: true,
217
+ error: !!errors.first_name,
218
+ helperText: errors.first_name?.message,
219
+ variant
220
+ }
221
+ ) }),
222
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
223
+ Input,
224
+ {
225
+ id: "last_name",
226
+ ...register("last_name", { required: true }),
227
+ label: "Last Name",
228
+ sizes: "medium",
229
+ required: true,
230
+ error: !!errors.last_name,
231
+ helperText: errors.last_name?.message,
232
+ variant
233
+ }
234
+ ) }),
235
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
236
+ Input,
237
+ {
238
+ id: "Business_Name__c",
239
+ ...register("Business_Name__c", {
240
+ required: true
241
+ }),
242
+ type: "text",
243
+ label: "Business Name",
244
+ sizes: "medium",
245
+ required: true,
246
+ error: !!errors.Business_Name__c,
247
+ helperText: errors.Business_Name__c?.message,
248
+ variant
249
+ }
250
+ ) }),
251
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
252
+ Input,
253
+ {
254
+ id: "email",
255
+ ...register("email", {
256
+ required: true
257
+ }),
258
+ type: "email",
259
+ label: "Business Email",
260
+ sizes: "medium",
261
+ required: true,
262
+ error: !!errors.email,
263
+ helperText: errors.email?.message,
264
+ variant
265
+ }
266
+ ) }),
267
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
268
+ ] }),
269
+ children,
270
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
271
+ /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
272
+ LoadingIndicator,
273
+ {
274
+ style: { marginInline: "auto" },
275
+ variant
276
+ }
277
+ ) : /* @__PURE__ */ jsx(
278
+ Button,
279
+ {
280
+ color: getVariant(callToAction?.variant),
281
+ as: "button",
282
+ type: "submit",
283
+ disabled: !isValid || isSubmitting,
284
+ children: callToAction?.displayText
285
+ }
286
+ ) })
287
+ ]
288
+ }
289
+ )
268
290
  ] }) }) }, id);
269
291
  };
270
292
  export {
@@ -8,6 +8,6 @@ export type ContactUsLaVictoireInputs = {
8
8
  message: string;
9
9
  checkbox: boolean;
10
10
  };
11
- export declare const ContactUsLVF: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, dealerCheckbox, }: FormProps & {
11
+ export declare const ContactUsLVF: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, dealerCheckbox, }: FormProps & {
12
12
  dealerCheckbox?: boolean;
13
13
  }) => import("react/jsx-runtime").JSX.Element;