@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
@@ -45,7 +45,9 @@ const ContactUsLVF = ({
45
45
  description,
46
46
  callToAction,
47
47
  validateEmail,
48
- id
48
+ onValidate,
49
+ id,
50
+ dealerCheckbox = true
49
51
  }) => {
50
52
  const schema = z.object({
51
53
  firstname: z.string().regex(/^[a-zA-Z]*(?:[a-zA-Z][a-zA-Z'-]*\s{0,1}){2,}$/g, {
@@ -88,7 +90,10 @@ const ContactUsLVF = ({
88
90
  resolver: zodResolver(gen_schema, {
89
91
  async: true
90
92
  }),
91
- mode: "all"
93
+ mode: "all",
94
+ defaultValues: {
95
+ checkbox: false
96
+ }
92
97
  });
93
98
  const {
94
99
  handleSubmit,
@@ -121,7 +126,8 @@ const ContactUsLVF = ({
121
126
  await onSubmit({
122
127
  fields: formattedFieldsData,
123
128
  context: contextData,
124
- legalConsentOptions: legalConsentData
129
+ legalConsentOptions: legalConsentData,
130
+ form: "contactUSLVF"
125
131
  });
126
132
  };
127
133
  const variant = getVariant(fullVariant);
@@ -137,105 +143,115 @@ const ContactUsLVF = ({
137
143
  }
138
144
  )
139
145
  ] }),
140
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
141
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
142
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
143
- Input,
144
- {
145
- id: "firstname",
146
- ...register("firstname", { required: true }),
147
- sizes: "medium",
148
- placeholder: "First Name",
149
- required: true,
150
- error: !!errors.firstname,
151
- helperText: errors.firstname?.message,
152
- variant
153
- }
154
- ) }),
155
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
156
- Input,
157
- {
158
- id: "lastname",
159
- ...register("lastname", { required: true }),
160
- sizes: "medium",
161
- placeholder: "Last Name",
162
- required: true,
163
- error: !!errors.lastname,
164
- helperText: errors.lastname?.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
- validate: {
175
- isValid: associatedEmail
146
+ /* @__PURE__ */ jsxs(
147
+ "form",
148
+ {
149
+ className: form,
150
+ onSubmit: async (e) => {
151
+ onValidate && onValidate(e);
152
+ await handleSubmit(submitForm)(e);
153
+ e.preventDefault();
154
+ },
155
+ children: [
156
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
157
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
158
+ Input,
159
+ {
160
+ id: "firstname",
161
+ ...register("firstname", { required: true }),
162
+ sizes: "medium",
163
+ placeholder: "First Name",
164
+ required: true,
165
+ error: !!errors.firstname,
166
+ helperText: errors.firstname?.message,
167
+ variant
176
168
  }
177
- }),
178
- sizes: "medium",
179
- placeholder: "Email",
180
- required: true,
181
- error: !!errors.email,
182
- helperText: errors.email?.message,
183
- variant
184
- }
185
- ) }),
186
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
187
- InputPhone,
188
- {
189
- id: "phone",
190
- ...register("phone", { required: true, maxLength: 12 }),
191
- sizes: "medium",
192
- placeholder: "Phone Number",
193
- required: true,
194
- error: !!errors.phone,
195
- helperText: errors.phone?.message,
196
- variant
197
- }
198
- ) }),
199
- /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm), children: /* @__PURE__ */ jsx(
200
- InputTextArea,
201
- {
202
- id: "message",
203
- ...register("message"),
204
- sizes: "medium",
205
- placeholder: "Message",
206
- error: !!errors.message,
207
- helperText: errors.message?.message,
208
- variant
209
- }
210
- ) }),
211
- " ",
212
- /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
213
- Checkbox,
214
- {
215
- id: "checkbox",
216
- ...register("checkbox"),
217
- sizes: "medium",
218
- error: !!errors.checkbox,
219
- helperText: errors.checkbox?.message,
220
- variant,
221
- children: "I'm a Dealer interested in Inventory Financing."
222
- }
223
- ) }),
224
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
225
- ] }),
226
- children,
227
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
228
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
229
- Button,
230
- {
231
- color: getVariant(callToAction?.variant),
232
- as: "button",
233
- type: "submit",
234
- disabled: !isValid || isSubmitting,
235
- children: callToAction?.displayText
236
- }
237
- ) })
238
- ] })
169
+ ) }),
170
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
171
+ Input,
172
+ {
173
+ id: "lastname",
174
+ ...register("lastname", { required: true }),
175
+ sizes: "medium",
176
+ placeholder: "Last Name",
177
+ required: true,
178
+ error: !!errors.lastname,
179
+ helperText: errors.lastname?.message,
180
+ variant
181
+ }
182
+ ) }),
183
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
184
+ Input,
185
+ {
186
+ id: "email",
187
+ ...register("email", {
188
+ required: true,
189
+ validate: {
190
+ isValid: associatedEmail
191
+ }
192
+ }),
193
+ sizes: "medium",
194
+ placeholder: "Email",
195
+ required: true,
196
+ error: !!errors.email,
197
+ helperText: errors.email?.message,
198
+ variant
199
+ }
200
+ ) }),
201
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
202
+ InputPhone,
203
+ {
204
+ id: "phone",
205
+ ...register("phone", { required: true, maxLength: 12 }),
206
+ sizes: "medium",
207
+ placeholder: "Phone Number",
208
+ required: true,
209
+ error: !!errors.phone,
210
+ helperText: errors.phone?.message,
211
+ variant
212
+ }
213
+ ) }),
214
+ /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm), children: /* @__PURE__ */ jsx(
215
+ InputTextArea,
216
+ {
217
+ id: "message",
218
+ ...register("message"),
219
+ sizes: "medium",
220
+ placeholder: "Message",
221
+ error: !!errors.message,
222
+ helperText: errors.message?.message,
223
+ variant
224
+ }
225
+ ) }),
226
+ dealerCheckbox && /* @__PURE__ */ jsx("div", { className: clsx(fullRowForm), children: /* @__PURE__ */ jsx(
227
+ Checkbox,
228
+ {
229
+ id: "checkbox",
230
+ ...register("checkbox"),
231
+ sizes: "medium",
232
+ error: !!errors.checkbox,
233
+ helperText: errors.checkbox?.message,
234
+ variant,
235
+ children: "I'm a Dealer interested in Inventory Financing."
236
+ }
237
+ ) }),
238
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
239
+ ] }),
240
+ children,
241
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
242
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
243
+ Button,
244
+ {
245
+ color: getVariant(callToAction?.variant),
246
+ as: "button",
247
+ type: "submit",
248
+ disabled: !isValid || isSubmitting,
249
+ children: callToAction?.displayText
250
+ }
251
+ ) })
252
+ ]
253
+ }
254
+ )
239
255
  ] }) }) }, id);
240
256
  };
241
257
  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;
@@ -139,6 +139,7 @@ const ContactUsNMLSId = ({
139
139
  description,
140
140
  callToAction,
141
141
  validateEmail,
142
+ onValidate,
142
143
  id
143
144
  }) => {
144
145
  const schema = z.object({
@@ -212,101 +213,112 @@ const ContactUsNMLSId = ({
212
213
  }
213
214
  )
214
215
  ] }),
215
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
216
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
217
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
218
- Input,
219
- {
220
- id: "first_name",
221
- ...register("first_name", { required: true }),
222
- label: "First Name",
223
- sizes: "medium",
224
- placeholder: "First Name",
225
- required: true,
226
- error: !!errors.first_name,
227
- helperText: errors.first_name?.message,
228
- variant
229
- }
230
- ) }),
231
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
232
- Input,
233
- {
234
- id: "last_name",
235
- ...register("last_name", { required: true }),
236
- label: "Last Name",
237
- sizes: "medium",
238
- placeholder: "Last Name",
239
- required: true,
240
- error: !!errors.last_name,
241
- helperText: errors.last_name?.message,
242
- variant
243
- }
244
- ) }),
245
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
246
- Input,
247
- {
248
- id: "email",
249
- ...register("email", {
250
- required: true
251
- }),
252
- type: "email",
253
- label: "Email",
254
- sizes: "medium",
255
- placeholder: "Email",
256
- required: true,
257
- error: !!errors.email,
258
- helperText: errors.email?.message,
259
- variant
260
- }
261
- ) }),
262
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
263
- InputPhone,
264
- {
265
- id: "phone",
266
- ...register("phone", { required: true, maxLength: 12 }),
267
- label: "Phone",
268
- sizes: "medium",
269
- placeholder: "Phone",
270
- type: "tel",
271
- required: true,
272
- error: !!errors.phone,
273
- helperText: errors.phone?.message,
274
- variant
275
- }
276
- ) }),
277
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
278
- Input,
279
- {
280
- id: "NMLS_ID__c",
281
- ...register("NMLS_ID__c", {
282
- required: true,
283
- min: 6,
284
- max: 7
285
- }),
286
- label: "Company NMLS ID",
287
- placeholder: "Company NMLS ID",
288
- sizes: "medium",
289
- required: true,
290
- error: !!errors.NMLS_ID__c,
291
- helperText: errors.NMLS_ID__c?.message,
292
- variant
293
- }
294
- ) }),
295
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
296
- ] }),
297
- children,
298
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
299
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
300
- Button,
301
- {
302
- color: getVariant(callToAction?.variant),
303
- as: "button",
304
- type: "submit",
305
- disabled: !isValid || isSubmitting,
306
- children: callToAction?.displayText
307
- }
308
- ) })
309
- ] })
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
+ )
310
322
  ] }) }) }, id);
311
323
  };
312
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;