@axos-web-dev/shared-components 1.0.99-dev-2 → 1.0.99-dev-6

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 (53) hide show
  1. package/dist/Calculators/BuyDownCalculator/index.js +1 -1
  2. package/dist/Calculators/Calculator.d.ts +3 -1
  3. package/dist/Calculators/Calculator.js +4 -2
  4. package/dist/Calculators/MonthlyPaymentCalculator/index.d.ts +3 -1
  5. package/dist/Calculators/MonthlyPaymentCalculator/index.js +3 -8
  6. package/dist/Forms/ApplicationStart.d.ts +1 -1
  7. package/dist/Forms/ApplicationStart.js +101 -89
  8. package/dist/Forms/ClearingForm.d.ts +1 -1
  9. package/dist/Forms/ClearingForm.js +174 -162
  10. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  11. package/dist/Forms/CommercialDeposits.js +191 -179
  12. package/dist/Forms/CommercialLending.d.ts +1 -1
  13. package/dist/Forms/CommercialLending.js +268 -256
  14. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  15. package/dist/Forms/CommercialPremiumFinance.js +106 -94
  16. package/dist/Forms/ContactCompany.d.ts +1 -1
  17. package/dist/Forms/ContactCompany.js +103 -91
  18. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  19. package/dist/Forms/ContactCompanyTitle.js +117 -105
  20. package/dist/Forms/ContactUs.js +2 -1
  21. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  22. package/dist/Forms/ContactUsAAS.js +170 -158
  23. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  24. package/dist/Forms/ContactUsBusiness.js +124 -112
  25. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  26. package/dist/Forms/ContactUsBusinessNameEmail.js +93 -81
  27. package/dist/Forms/ContactUsLVF.d.ts +3 -1
  28. package/dist/Forms/ContactUsLVF.js +117 -101
  29. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  30. package/dist/Forms/ContactUsNMLSId.js +107 -95
  31. package/dist/Forms/CpraRequest.d.ts +1 -1
  32. package/dist/Forms/CpraRequest.js +630 -618
  33. package/dist/Forms/CraPublicFile.d.ts +1 -1
  34. package/dist/Forms/CraPublicFile.js +99 -87
  35. package/dist/Forms/DealerServices.d.ts +1 -1
  36. package/dist/Forms/DealerServices.js +215 -203
  37. package/dist/Forms/EmailOnly.d.ts +1 -1
  38. package/dist/Forms/EmailOnly.js +46 -34
  39. package/dist/Forms/EmailUs.d.ts +1 -1
  40. package/dist/Forms/EmailUs.js +65 -53
  41. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  42. package/dist/Forms/MortgageRate/MortgageRateForm.js +363 -343
  43. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  44. package/dist/Forms/QuickPricer/QuickPricerForm.js +608 -596
  45. package/dist/Forms/ScheduleCall.d.ts +1 -1
  46. package/dist/Forms/ScheduleCall.js +146 -134
  47. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  48. package/dist/Forms/ScheduleCallPremier.js +168 -156
  49. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  50. package/dist/Forms/VendorQuestionnaire.js +807 -795
  51. package/dist/Forms/WcplSurvey.d.ts +1 -1
  52. package/dist/Forms/WcplSurvey.js +102 -90
  53. package/package.json +133 -133
@@ -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, errors, 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;
@@ -139,6 +139,7 @@ const ContactUsBusinessNameAndEmail = ({
139
139
  description,
140
140
  callToAction,
141
141
  validateEmail,
142
+ onValidate,
142
143
  id
143
144
  }) => {
144
145
  const schema = z.object({
@@ -194,87 +195,98 @@ const ContactUsBusinessNameAndEmail = ({
194
195
  }
195
196
  )
196
197
  ] }),
197
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
198
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
199
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
200
- Input,
201
- {
202
- id: "first_name",
203
- ...register("first_name", { required: true }),
204
- label: "First Name",
205
- sizes: "medium",
206
- required: true,
207
- error: !!errors.first_name,
208
- helperText: errors.first_name?.message,
209
- variant
210
- }
211
- ) }),
212
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
213
- Input,
214
- {
215
- id: "last_name",
216
- ...register("last_name", { required: true }),
217
- label: "Last Name",
218
- sizes: "medium",
219
- required: true,
220
- error: !!errors.last_name,
221
- helperText: errors.last_name?.message,
222
- variant
223
- }
224
- ) }),
225
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
226
- Input,
227
- {
228
- id: "Business_Name__c",
229
- ...register("Business_Name__c", {
230
- required: true
231
- }),
232
- type: "text",
233
- label: "Business Name",
234
- sizes: "medium",
235
- required: true,
236
- error: !!errors.Business_Name__c,
237
- helperText: errors.Business_Name__c?.message,
238
- variant
239
- }
240
- ) }),
241
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
242
- Input,
243
- {
244
- id: "email",
245
- ...register("email", {
246
- required: true
247
- }),
248
- type: "email",
249
- label: "Business Email",
250
- sizes: "medium",
251
- required: true,
252
- error: !!errors.email,
253
- helperText: errors.email?.message,
254
- variant
255
- }
256
- ) }),
257
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
258
- ] }),
259
- children,
260
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
261
- /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
262
- LoadingIndicator,
263
- {
264
- style: { marginInline: "auto" },
265
- variant
266
- }
267
- ) : /* @__PURE__ */ jsx(
268
- Button,
269
- {
270
- color: getVariant(callToAction?.variant),
271
- as: "button",
272
- type: "submit",
273
- disabled: !isValid || isSubmitting,
274
- children: callToAction?.displayText
275
- }
276
- ) })
277
- ] })
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, errors, 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
+ )
278
290
  ] }) }) }, id);
279
291
  };
280
292
  export {
@@ -8,4 +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, }: FormProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const ContactUsLVF: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, dealerCheckbox, }: FormProps & {
12
+ dealerCheckbox?: boolean;
13
+ }) => import("react/jsx-runtime").JSX.Element;