@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
@@ -46,6 +46,7 @@ const DealerServices = ({
46
46
  description,
47
47
  callToAction,
48
48
  validateEmail,
49
+ onValidate,
49
50
  id
50
51
  }) => {
51
52
  const schema = z.object({
@@ -126,210 +127,221 @@ const DealerServices = ({
126
127
  }
127
128
  )
128
129
  ] }),
129
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
130
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
131
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
132
- Input,
133
- {
134
- id: "first_name",
135
- ...register("first_name", { required: true }),
136
- label: "First Name",
137
- sizes: "medium",
138
- placeholder: "First Name",
139
- required: true,
140
- error: !!errors.first_name,
141
- helperText: errors.first_name?.message,
142
- variant
143
- }
144
- ) }),
145
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
146
- Input,
147
- {
148
- id: "last_name",
149
- ...register("last_name", { required: true }),
150
- label: "Last Name",
151
- sizes: "medium",
152
- placeholder: "Last Name",
153
- required: true,
154
- error: !!errors.last_name,
155
- helperText: errors.last_name?.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: async (val) => await associatedEmail(val) && await validateEmail(val)
130
+ /* @__PURE__ */ jsxs(
131
+ "form",
132
+ {
133
+ className: form,
134
+ onSubmit: async (e) => {
135
+ onValidate && onValidate(e);
136
+ await handleSubmit(submitForm)(e);
137
+ e.preventDefault();
138
+ },
139
+ children: [
140
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
141
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
142
+ Input,
143
+ {
144
+ id: "first_name",
145
+ ...register("first_name", { required: true }),
146
+ label: "First Name",
147
+ sizes: "medium",
148
+ placeholder: "First Name",
149
+ required: true,
150
+ error: !!errors.first_name,
151
+ helperText: errors.first_name?.message,
152
+ variant
167
153
  }
168
- }),
169
- label: "Email",
170
- sizes: "medium",
171
- placeholder: "Email",
172
- required: true,
173
- error: !!errors.email,
174
- helperText: errors.email?.message,
175
- variant
176
- }
177
- ) }),
178
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
179
- InputPhone,
180
- {
181
- id: "phone",
182
- ...register("phone", { required: true, maxLength: 12 }),
183
- label: "Phone",
184
- sizes: "medium",
185
- placeholder: "Phone",
186
- required: true,
187
- error: !!errors.phone,
188
- helperText: errors.phone?.message,
189
- variant
190
- }
191
- ) }),
192
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
193
- Input,
194
- {
195
- id: "title",
196
- ...register("title", { required: true }),
197
- label: "Title",
198
- sizes: "medium",
199
- placeholder: "Title",
200
- required: true,
201
- error: !!errors.title,
202
- helperText: errors.title?.message,
203
- variant
204
- }
205
- ) }),
206
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
207
- Input,
208
- {
209
- id: "company",
210
- ...register("company", { required: true }),
211
- label: "Company Name",
212
- sizes: "medium",
213
- placeholder: "Company Name",
214
- required: true,
215
- error: !!errors.company,
216
- helperText: errors.company?.message,
217
- variant
218
- }
219
- ) }),
220
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
221
- Dropdown,
222
- {
223
- id: "Dealer_Type__c",
224
- ...register("Dealer_Type__c", {
225
- required: true,
226
- maxLength: 12
227
- }),
228
- label: "Franchise or Independent",
229
- sizes: "medium",
230
- required: true,
231
- error: !!errors.Dealer_Type__c,
232
- helperText: errors.Dealer_Type__c?.message,
233
- variant,
234
- defaultValue: "Franchise",
235
- children: [
236
- /* @__PURE__ */ jsx("option", { value: "Franchise", children: "Franchise" }),
237
- /* @__PURE__ */ jsx("option", { value: "Independent", children: "Independent" })
238
- ]
239
- }
240
- ) }),
241
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
242
- Dropdown,
243
- {
244
- id: "Lead_Source_Detail_SFDC2__c2",
245
- ...register("Lead_Source_Detail_SFDC2__c2", {
246
- required: true,
247
- maxLength: 12
248
- }),
249
- label: "Dealer Services or Collector Car Program",
250
- sizes: "medium",
251
- required: true,
252
- error: !!errors.Lead_Source_Detail_SFDC2__c2,
253
- helperText: errors.Lead_Source_Detail_SFDC2__c2?.message,
254
- variant,
255
- defaultValue: "Dealer Services",
256
- children: [
257
- /* @__PURE__ */ jsx("option", { value: "Dealer Services", children: "Dealer Services" }),
258
- /* @__PURE__ */ jsx("option", { value: "Collector Car Program", children: "Collector Car Program" })
259
- ]
260
- }
261
- ) }),
262
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
263
- Input,
264
- {
265
- id: "city",
266
- ...register("city", { required: true }),
267
- label: "City",
268
- sizes: "medium",
269
- placeholder: "City",
270
- required: true,
271
- error: !!errors.city,
272
- helperText: errors.city?.message,
273
- variant
274
- }
275
- ) }),
276
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
277
- Input,
278
- {
279
- id: "state",
280
- ...register("state", { required: true }),
281
- label: "State",
282
- sizes: "medium",
283
- placeholder: "State",
284
- required: true,
285
- error: !!errors.state,
286
- helperText: errors.state?.message,
287
- variant
288
- }
289
- ) }),
290
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
291
- Input,
292
- {
293
- id: "zip",
294
- ...register("zip", { required: true }),
295
- label: "Zip Code",
296
- sizes: "medium",
297
- placeholder: "Zip Code",
298
- required: true,
299
- error: !!errors.zip,
300
- helperText: errors.zip?.message,
301
- variant
302
- }
303
- ) }),
304
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
305
- InputTextArea,
306
- {
307
- id: "description",
308
- ...register("description"),
309
- label: "Additional Details",
310
- sizes: "medium",
311
- placeholder: "Additional Details",
312
- error: !!errors.description,
313
- helperText: errors.description?.message,
314
- variant,
315
- rows: 1
316
- }
317
- ) }),
318
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
319
- ] }),
320
- children,
321
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
322
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
323
- Button,
324
- {
325
- color: getVariant(callToAction?.variant),
326
- as: "button",
327
- type: "submit",
328
- disabled: !isValid || isSubmitting,
329
- children: callToAction?.displayText
330
- }
331
- ) })
332
- ] })
154
+ ) }),
155
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
156
+ Input,
157
+ {
158
+ id: "last_name",
159
+ ...register("last_name", { required: true }),
160
+ label: "Last Name",
161
+ sizes: "medium",
162
+ placeholder: "Last Name",
163
+ required: true,
164
+ error: !!errors.last_name,
165
+ helperText: errors.last_name?.message,
166
+ variant
167
+ }
168
+ ) }),
169
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
170
+ Input,
171
+ {
172
+ id: "email",
173
+ ...register("email", {
174
+ required: true,
175
+ validate: {
176
+ isValid: async (val) => await associatedEmail(val) && await validateEmail(val)
177
+ }
178
+ }),
179
+ label: "Email",
180
+ sizes: "medium",
181
+ placeholder: "Email",
182
+ required: true,
183
+ error: !!errors.email,
184
+ helperText: errors.email?.message,
185
+ variant
186
+ }
187
+ ) }),
188
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
189
+ InputPhone,
190
+ {
191
+ id: "phone",
192
+ ...register("phone", { required: true, maxLength: 12 }),
193
+ label: "Phone",
194
+ sizes: "medium",
195
+ placeholder: "Phone",
196
+ required: true,
197
+ error: !!errors.phone,
198
+ helperText: errors.phone?.message,
199
+ variant
200
+ }
201
+ ) }),
202
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
203
+ Input,
204
+ {
205
+ id: "title",
206
+ ...register("title", { required: true }),
207
+ label: "Title",
208
+ sizes: "medium",
209
+ placeholder: "Title",
210
+ required: true,
211
+ error: !!errors.title,
212
+ helperText: errors.title?.message,
213
+ variant
214
+ }
215
+ ) }),
216
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
217
+ Input,
218
+ {
219
+ id: "company",
220
+ ...register("company", { required: true }),
221
+ label: "Company Name",
222
+ sizes: "medium",
223
+ placeholder: "Company Name",
224
+ required: true,
225
+ error: !!errors.company,
226
+ helperText: errors.company?.message,
227
+ variant
228
+ }
229
+ ) }),
230
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
231
+ Dropdown,
232
+ {
233
+ id: "Dealer_Type__c",
234
+ ...register("Dealer_Type__c", {
235
+ required: true,
236
+ maxLength: 12
237
+ }),
238
+ label: "Franchise or Independent",
239
+ sizes: "medium",
240
+ required: true,
241
+ error: !!errors.Dealer_Type__c,
242
+ helperText: errors.Dealer_Type__c?.message,
243
+ variant,
244
+ defaultValue: "Franchise",
245
+ children: [
246
+ /* @__PURE__ */ jsx("option", { value: "Franchise", children: "Franchise" }),
247
+ /* @__PURE__ */ jsx("option", { value: "Independent", children: "Independent" })
248
+ ]
249
+ }
250
+ ) }),
251
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
252
+ Dropdown,
253
+ {
254
+ id: "Lead_Source_Detail_SFDC2__c2",
255
+ ...register("Lead_Source_Detail_SFDC2__c2", {
256
+ required: true,
257
+ maxLength: 12
258
+ }),
259
+ label: "Dealer Services or Collector Car Program",
260
+ sizes: "medium",
261
+ required: true,
262
+ error: !!errors.Lead_Source_Detail_SFDC2__c2,
263
+ helperText: errors.Lead_Source_Detail_SFDC2__c2?.message,
264
+ variant,
265
+ defaultValue: "Dealer Services",
266
+ children: [
267
+ /* @__PURE__ */ jsx("option", { value: "Dealer Services", children: "Dealer Services" }),
268
+ /* @__PURE__ */ jsx("option", { value: "Collector Car Program", children: "Collector Car Program" })
269
+ ]
270
+ }
271
+ ) }),
272
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
273
+ Input,
274
+ {
275
+ id: "city",
276
+ ...register("city", { required: true }),
277
+ label: "City",
278
+ sizes: "medium",
279
+ placeholder: "City",
280
+ required: true,
281
+ error: !!errors.city,
282
+ helperText: errors.city?.message,
283
+ variant
284
+ }
285
+ ) }),
286
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
287
+ Input,
288
+ {
289
+ id: "state",
290
+ ...register("state", { required: true }),
291
+ label: "State",
292
+ sizes: "medium",
293
+ placeholder: "State",
294
+ required: true,
295
+ error: !!errors.state,
296
+ helperText: errors.state?.message,
297
+ variant
298
+ }
299
+ ) }),
300
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
301
+ Input,
302
+ {
303
+ id: "zip",
304
+ ...register("zip", { required: true }),
305
+ label: "Zip Code",
306
+ sizes: "medium",
307
+ placeholder: "Zip Code",
308
+ required: true,
309
+ error: !!errors.zip,
310
+ helperText: errors.zip?.message,
311
+ variant
312
+ }
313
+ ) }),
314
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
315
+ InputTextArea,
316
+ {
317
+ id: "description",
318
+ ...register("description"),
319
+ label: "Additional Details",
320
+ sizes: "medium",
321
+ placeholder: "Additional Details",
322
+ error: !!errors.description,
323
+ helperText: errors.description?.message,
324
+ variant,
325
+ rows: 1
326
+ }
327
+ ) }),
328
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
329
+ ] }),
330
+ children,
331
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
332
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
333
+ Button,
334
+ {
335
+ color: getVariant(callToAction?.variant),
336
+ as: "button",
337
+ type: "submit",
338
+ disabled: !isValid || isSubmitting,
339
+ children: callToAction?.displayText
340
+ }
341
+ ) })
342
+ ]
343
+ }
344
+ )
333
345
  ] }) }) }, id);
334
346
  };
335
347
  export {
@@ -3,4 +3,4 @@ import { FormProps } from './FormProps';
3
3
  export type EmailOnlyInputs = {
4
4
  email: string;
5
5
  };
6
- export declare const EmailOnly: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const EmailOnly: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -140,6 +140,7 @@ const EmailOnly = ({
140
140
  description,
141
141
  callToAction,
142
142
  validateEmail,
143
+ onValidate,
143
144
  id
144
145
  }) => {
145
146
  const schema = z.object({
@@ -188,41 +189,52 @@ const EmailOnly = ({
188
189
  }
189
190
  )
190
191
  ] }),
191
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
192
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant, formType })), children: [
193
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
194
- Input,
195
- {
196
- id: "email",
197
- ...register("email", {
198
- required: true,
199
- validate: {
200
- isValid: associatedEmail
192
+ /* @__PURE__ */ jsxs(
193
+ "form",
194
+ {
195
+ className: form,
196
+ onSubmit: async (e) => {
197
+ onValidate && onValidate(e);
198
+ await handleSubmit(submitForm)(e);
199
+ e.preventDefault();
200
+ },
201
+ children: [
202
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant, formType })), children: [
203
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
204
+ Input,
205
+ {
206
+ id: "email",
207
+ ...register("email", {
208
+ required: true,
209
+ validate: {
210
+ isValid: associatedEmail
211
+ }
212
+ }),
213
+ sizes: "medium",
214
+ placeholder: "Enter Email",
215
+ required: true,
216
+ error: !!errors.email,
217
+ helperText: errors.email?.message,
218
+ variant
201
219
  }
202
- }),
203
- sizes: "medium",
204
- placeholder: "Enter Email",
205
- required: true,
206
- error: !!errors.email,
207
- helperText: errors.email?.message,
208
- variant
209
- }
210
- ) }),
211
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
212
- ] }),
213
- children,
214
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
215
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
216
- Button,
217
- {
218
- color: getVariant(callToAction?.variant),
219
- as: "button",
220
- type: "submit",
221
- disabled: !isValid || isSubmitting,
222
- children: callToAction?.displayText
223
- }
224
- ) })
225
- ] })
220
+ ) }),
221
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
222
+ ] }),
223
+ children,
224
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
225
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
226
+ Button,
227
+ {
228
+ color: getVariant(callToAction?.variant),
229
+ as: "button",
230
+ type: "submit",
231
+ disabled: !isValid || isSubmitting,
232
+ children: callToAction?.displayText
233
+ }
234
+ ) })
235
+ ]
236
+ }
237
+ )
226
238
  ] }) }) }, id);
227
239
  };
228
240
  export {
@@ -4,4 +4,4 @@ export type EmailUsInputs = {
4
4
  email: string;
5
5
  message: string;
6
6
  };
7
- export declare const EmailUs: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, callToAction, validateEmail, description, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const EmailUs: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, callToAction, validateEmail, onValidate, description, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;