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

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 (106) hide show
  1. package/dist/ATMLocator/ATMLocator.js +1 -0
  2. package/dist/Auth/ErrorAlert.js +1 -0
  3. package/dist/Button/Button.js +1 -0
  4. package/dist/Calculators/BuyDownCalculator/index.js +1 -1
  5. package/dist/Calculators/Calculator.d.ts +3 -1
  6. package/dist/Calculators/Calculator.js +5 -2
  7. package/dist/Calculators/MonthlyPaymentCalculator/index.d.ts +3 -1
  8. package/dist/Calculators/MonthlyPaymentCalculator/index.js +23 -15
  9. package/dist/Carousel/index.js +1 -0
  10. package/dist/Chevron/index.js +1 -0
  11. package/dist/Comparison/Comparison.js +1 -0
  12. package/dist/ExecutiveBio/ExecutiveBio.js +1 -0
  13. package/dist/FaqAccordion/index.js +1 -0
  14. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +1 -0
  15. package/dist/Forms/ApplicationStart.d.ts +1 -1
  16. package/dist/Forms/ApplicationStart.js +111 -89
  17. package/dist/Forms/ApplyNow.d.ts +2 -2
  18. package/dist/Forms/ApplyNow.js +164 -139
  19. package/dist/Forms/ClearingForm.d.ts +1 -1
  20. package/dist/Forms/ClearingForm.js +184 -162
  21. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  22. package/dist/Forms/CommercialDeposits.js +201 -179
  23. package/dist/Forms/CommercialLending.d.ts +1 -1
  24. package/dist/Forms/CommercialLending.js +278 -256
  25. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  26. package/dist/Forms/CommercialPremiumFinance.js +128 -106
  27. package/dist/Forms/ContactCompany.d.ts +1 -1
  28. package/dist/Forms/ContactCompany.js +113 -91
  29. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  30. package/dist/Forms/ContactCompanyTitle.js +127 -105
  31. package/dist/Forms/ContactUs.d.ts +1 -1
  32. package/dist/Forms/ContactUs.js +99 -77
  33. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  34. package/dist/Forms/ContactUsAAS.js +180 -158
  35. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  36. package/dist/Forms/ContactUsBusiness.js +134 -112
  37. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  38. package/dist/Forms/ContactUsBusinessNameEmail.js +103 -81
  39. package/dist/Forms/ContactUsLVF.d.ts +3 -1
  40. package/dist/Forms/ContactUsLVF.js +127 -101
  41. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  42. package/dist/Forms/ContactUsNMLSId.js +117 -95
  43. package/dist/Forms/CpraRequest.d.ts +1 -1
  44. package/dist/Forms/CpraRequest.js +641 -619
  45. package/dist/Forms/CraPublicFile.d.ts +1 -1
  46. package/dist/Forms/CraPublicFile.js +109 -87
  47. package/dist/Forms/DealerServices.d.ts +1 -1
  48. package/dist/Forms/DealerServices.js +225 -204
  49. package/dist/Forms/EmailOnly.d.ts +1 -1
  50. package/dist/Forms/EmailOnly.js +56 -36
  51. package/dist/Forms/EmailUs.d.ts +1 -1
  52. package/dist/Forms/EmailUs.js +75 -53
  53. package/dist/Forms/FormProps.d.ts +3 -0
  54. package/dist/Forms/Forms.css.d.ts +18 -0
  55. package/dist/Forms/Forms.css.js +44 -38
  56. package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -0
  57. package/dist/Forms/HoneyPot/HoneyPot.css.js +5 -0
  58. package/dist/Forms/HoneyPot/index.d.ts +24 -0
  59. package/dist/Forms/HoneyPot/index.js +71 -0
  60. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  61. package/dist/Forms/MortgageRate/MortgageRateForm.js +363 -342
  62. package/dist/Forms/MortgageRate/MortgageRateWatch.js +1 -0
  63. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  64. package/dist/Forms/QuickPricer/QuickPricerForm.js +624 -609
  65. package/dist/Forms/ScheduleCall.d.ts +1 -1
  66. package/dist/Forms/ScheduleCall.js +156 -134
  67. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  68. package/dist/Forms/ScheduleCallPremier.js +178 -156
  69. package/dist/Forms/SuccesForm.js +1 -0
  70. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  71. package/dist/Forms/VendorQuestionnaire.js +817 -795
  72. package/dist/Forms/WcplSurvey.d.ts +1 -1
  73. package/dist/Forms/WcplSurvey.js +112 -90
  74. package/dist/Forms/applynow-utils.d.ts +1 -0
  75. package/dist/Forms/applynow-utils.js +48 -0
  76. package/dist/Forms/index.d.ts +2 -0
  77. package/dist/Forms/index.js +10 -2
  78. package/dist/Hyperlink/index.js +1 -0
  79. package/dist/IconBillboard/sections/CallToActionSection.js +2 -1
  80. package/dist/ImageLink/ImageLink.js +1 -0
  81. package/dist/ImageLink/ImageLinkSet.js +1 -0
  82. package/dist/ImageLink/index.js +1 -0
  83. package/dist/Input/Input.js +3 -1
  84. package/dist/Insight/Featured/CategorySelector.js +1 -0
  85. package/dist/Insight/Featured/Featured.js +1 -0
  86. package/dist/Insight/Featured/Header.js +1 -0
  87. package/dist/Modal/Modal.js +1 -0
  88. package/dist/NavigationMenu/AxosALTS/NavData.js +1 -0
  89. package/dist/NavigationMenu/AxosALTS/index.js +1 -0
  90. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +13 -4
  91. package/dist/NavigationMenu/AxosBank/NavData.js +1 -0
  92. package/dist/NavigationMenu/AxosBank/SubNavBar.js +14 -5
  93. package/dist/NavigationMenu/AxosBank/index.js +1 -0
  94. package/dist/NavigationMenu/LaVictoire/NavData.js +1 -0
  95. package/dist/NavigationMenu/LaVictoire/index.js +1 -0
  96. package/dist/NavigationMenu/NavDataJson.js +1 -0
  97. package/dist/NavigationMenu/Navbar.js +1 -0
  98. package/dist/NavigationMenu/SignInNavButton.js +1 -0
  99. package/dist/SetContainer/SetContainer.js +1 -0
  100. package/dist/SocialMediaBar/iconsRepository.js +1 -0
  101. package/dist/VideoTile/VideoTile.js +1 -0
  102. package/dist/VideoWrapper/index.js +1 -0
  103. package/dist/assets/Forms/Forms.css +136 -105
  104. package/dist/assets/Forms/HoneyPot/HoneyPot.css +4 -0
  105. package/dist/main.js +10 -2
  106. package/package.json +1 -1
@@ -7,4 +7,4 @@ export type CraPublicFileInputs = {
7
7
  Customer_Phone__c: string;
8
8
  description: string;
9
9
  };
10
- export declare const CraPublicFile: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const CraPublicFile: ({ 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, fullRowForm, 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 CraPublicFile = ({
138
139
  description,
139
140
  callToAction,
140
141
  validateEmail,
142
+ onValidate,
141
143
  id
142
144
  }) => {
143
145
  const schema = z.object({
@@ -166,9 +168,17 @@ const CraPublicFile = ({
166
168
  message: "Comments/Questions should have at least 10 chars."
167
169
  })
168
170
  });
171
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
172
+ if (!isValidHoneyPot(data)) {
173
+ ctx.addIssue({
174
+ code: z.ZodIssueCode.custom,
175
+ message: "fields are not valid."
176
+ });
177
+ }
178
+ });
169
179
  const methods = useForm({
170
180
  resolver: zodResolver(
171
- schema.merge(SalesforceSchema),
181
+ gen_schema,
172
182
  {
173
183
  async: true
174
184
  },
@@ -205,92 +215,104 @@ const CraPublicFile = ({
205
215
  }
206
216
  )
207
217
  ] }),
208
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
209
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
210
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
211
- Input,
212
- {
213
- id: "First_Name__c",
214
- ...register("First_Name__c"),
215
- label: "First Name",
216
- sizes: "medium",
217
- placeholder: "First Name",
218
- error: !!errors.First_Name__c,
219
- helperText: errors.First_Name__c?.message,
220
- variant
221
- }
222
- ) }),
223
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
224
- Input,
225
- {
226
- id: "Last_Name__c",
227
- ...register("Last_Name__c"),
228
- label: "Last Name",
229
- sizes: "medium",
230
- placeholder: "Last Name",
231
- error: !!errors.Last_Name__c,
232
- helperText: errors.Last_Name__c?.message,
233
- variant
234
- }
235
- ) }),
236
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
237
- Input,
238
- {
239
- id: "Customer_Email__c",
240
- ...register("Customer_Email__c"),
241
- type: "email",
242
- label: "Email",
243
- sizes: "medium",
244
- placeholder: "Email",
245
- error: !!errors.Customer_Email__c,
246
- helperText: errors.Customer_Email__c?.message,
247
- variant
248
- }
249
- ) }),
250
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
251
- InputPhone,
252
- {
253
- id: "Customer_Phone__c",
254
- ...register("Customer_Phone__c", {
255
- maxLength: 12
256
- }),
257
- label: "Phone",
258
- sizes: "medium",
259
- placeholder: "Phone",
260
- type: "tel",
261
- error: !!errors.Customer_Phone__c,
262
- helperText: errors.Customer_Phone__c?.message,
263
- variant
264
- }
265
- ) }),
266
- /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
267
- InputTextArea,
268
- {
269
- id: "description",
270
- ...register("description", { required: true }),
271
- label: "Comments/Questions",
272
- sizes: "medium",
273
- placeholder: "",
274
- error: !!errors.description,
275
- helperText: errors.description?.message,
276
- variant,
277
- rows: 1
278
- }
279
- ) })
280
- ] }),
281
- children,
282
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
283
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
284
- Button,
285
- {
286
- color: getVariant(callToAction?.variant),
287
- as: "button",
288
- type: "submit",
289
- disabled: isSubmitting,
290
- children: callToAction?.displayText
291
- }
292
- ) })
293
- ] })
218
+ /* @__PURE__ */ jsxs(
219
+ "form",
220
+ {
221
+ className: form,
222
+ onSubmit: async (e) => {
223
+ onValidate && onValidate(e);
224
+ await handleSubmit(submitForm)(e);
225
+ e.preventDefault();
226
+ },
227
+ children: [
228
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
229
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
230
+ Input,
231
+ {
232
+ id: "First_Name__c",
233
+ ...register("First_Name__c"),
234
+ label: "First Name",
235
+ sizes: "medium",
236
+ placeholder: "First Name",
237
+ error: !!errors.First_Name__c,
238
+ helperText: errors.First_Name__c?.message,
239
+ variant
240
+ }
241
+ ) }),
242
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
243
+ Input,
244
+ {
245
+ id: "Last_Name__c",
246
+ ...register("Last_Name__c"),
247
+ label: "Last Name",
248
+ sizes: "medium",
249
+ placeholder: "Last Name",
250
+ error: !!errors.Last_Name__c,
251
+ helperText: errors.Last_Name__c?.message,
252
+ variant
253
+ }
254
+ ) }),
255
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
256
+ Input,
257
+ {
258
+ id: "Customer_Email__c",
259
+ ...register("Customer_Email__c"),
260
+ type: "email",
261
+ label: "Email",
262
+ sizes: "medium",
263
+ placeholder: "Email",
264
+ error: !!errors.Customer_Email__c,
265
+ helperText: errors.Customer_Email__c?.message,
266
+ variant
267
+ }
268
+ ) }),
269
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
270
+ InputPhone,
271
+ {
272
+ id: "Customer_Phone__c",
273
+ ...register("Customer_Phone__c", {
274
+ maxLength: 12
275
+ }),
276
+ label: "Phone",
277
+ sizes: "medium",
278
+ placeholder: "Phone",
279
+ type: "tel",
280
+ error: !!errors.Customer_Phone__c,
281
+ helperText: errors.Customer_Phone__c?.message,
282
+ variant
283
+ }
284
+ ) }),
285
+ /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
286
+ InputTextArea,
287
+ {
288
+ id: "description",
289
+ ...register("description", { required: true }),
290
+ label: "Comments/Questions",
291
+ sizes: "medium",
292
+ placeholder: "",
293
+ error: !!errors.description,
294
+ helperText: errors.description?.message,
295
+ variant,
296
+ rows: 1
297
+ }
298
+ ) }),
299
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
300
+ ] }),
301
+ children,
302
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
303
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
304
+ Button,
305
+ {
306
+ color: getVariant(callToAction?.variant),
307
+ as: "button",
308
+ type: "submit",
309
+ disabled: isSubmitting,
310
+ children: callToAction?.displayText
311
+ }
312
+ ) })
313
+ ]
314
+ }
315
+ )
294
316
  ] }) }) }, id);
295
317
  };
296
318
  export {
@@ -14,4 +14,4 @@ export type DealerServicesInputs = {
14
14
  zip: string;
15
15
  description: string;
16
16
  };
17
- export declare const DealerServices: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const DealerServices: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;