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