@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
@@ -47,6 +47,7 @@ const ScheduleCallPremier = ({
47
47
  description,
48
48
  callToAction,
49
49
  validateEmail,
50
+ onValidate,
50
51
  id
51
52
  }) => {
52
53
  const schema = z.object({
@@ -123,163 +124,174 @@ const ScheduleCallPremier = ({
123
124
  }
124
125
  )
125
126
  ] }),
126
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
127
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
128
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
129
- Input,
130
- {
131
- id: "first_name",
132
- ...register("first_name", { required: true }),
133
- label: "First Name",
134
- sizes: "medium",
135
- placeholder: "First Name",
136
- required: true,
137
- error: !!errors.first_name,
138
- helperText: errors.first_name?.message,
139
- variant
140
- }
141
- ) }),
142
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
143
- Input,
144
- {
145
- id: "last_name",
146
- ...register("last_name", { required: true }),
147
- label: "Last Name",
148
- sizes: "medium",
149
- placeholder: "Last Name",
150
- required: true,
151
- error: !!errors.last_name,
152
- helperText: errors.last_name?.message,
153
- variant
154
- }
155
- ) }),
156
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
157
- Input,
158
- {
159
- id: "email",
160
- ...register("email", {
161
- required: true,
162
- validate: {
163
- isValid: associatedEmail
127
+ /* @__PURE__ */ jsxs(
128
+ "form",
129
+ {
130
+ className: form,
131
+ onSubmit: async (e) => {
132
+ onValidate && onValidate(e);
133
+ await handleSubmit(submitForm)(e);
134
+ e.preventDefault();
135
+ },
136
+ children: [
137
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
138
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
139
+ Input,
140
+ {
141
+ id: "first_name",
142
+ ...register("first_name", { required: true }),
143
+ label: "First Name",
144
+ sizes: "medium",
145
+ placeholder: "First Name",
146
+ required: true,
147
+ error: !!errors.first_name,
148
+ helperText: errors.first_name?.message,
149
+ variant
164
150
  }
165
- }),
166
- label: "Email",
167
- sizes: "medium",
168
- placeholder: "Email",
169
- required: true,
170
- error: !!errors.email,
171
- helperText: errors.email?.message,
172
- variant
173
- }
174
- ) }),
175
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
176
- InputPhone,
177
- {
178
- id: "phone",
179
- ...register("phone", { required: true, maxLength: 12 }),
180
- label: "Phone",
181
- sizes: "medium",
182
- placeholder: "Phone",
183
- required: true,
184
- error: !!errors.phone,
185
- helperText: errors.phone?.message,
186
- variant
187
- }
188
- ) }),
189
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
190
- Input,
191
- {
192
- id: "Best_Contact_Date__c",
193
- ...register("Best_Contact_Date__c", {
194
- required: true
195
- }),
196
- type: "date",
197
- label: "Best Date to Call",
198
- sizes: "medium",
199
- placeholder: "Best Date to Call",
200
- min: (/* @__PURE__ */ new Date()).toJSON().slice(0, 10),
201
- required: true,
202
- error: !!errors.Best_Contact_Date__c,
203
- helperText: errors.Best_Contact_Date__c?.message,
204
- variant
205
- }
206
- ) }),
207
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
208
- Dropdown,
209
- {
210
- id: "Best_Time_To_Call__c",
211
- ...register("Best_Time_To_Call__c", {
212
- required: true,
213
- maxLength: 12
214
- }),
215
- label: "Best Time to Call",
216
- sizes: "medium",
217
- required: true,
218
- error: !!errors.Best_Time_To_Call__c,
219
- helperText: errors.Best_Time_To_Call__c?.message,
220
- variant,
221
- defaultValue: "Best Time to Call",
222
- children: [
223
- /* @__PURE__ */ jsx("option", { value: "Best Time to Call", disabled: true, children: "Best Time to Call" }),
224
- /* @__PURE__ */ jsx("option", { value: "8:00 am", children: "8:00 am" }),
225
- /* @__PURE__ */ jsx("option", { value: "8:30 am", children: "8:30 am" }),
226
- /* @__PURE__ */ jsx("option", { value: "9:00 am", children: "9:00 am" }),
227
- /* @__PURE__ */ jsx("option", { value: "9:30 am", children: "9:30 am" }),
228
- /* @__PURE__ */ jsx("option", { value: "10:00 am", children: "10:00 am" }),
229
- /* @__PURE__ */ jsx("option", { value: "10:30 am", children: "10:30 am" }),
230
- /* @__PURE__ */ jsx("option", { value: "11:00 am", children: "11:00 am" }),
231
- /* @__PURE__ */ jsx("option", { value: "11:30 am", children: "11:30 am" }),
232
- /* @__PURE__ */ jsx("option", { value: "12:00 pm", children: "12:00 pm" }),
233
- /* @__PURE__ */ jsx("option", { value: "12:30 pm", children: "12:30 pm" }),
234
- /* @__PURE__ */ jsx("option", { value: "1:00 pm", children: "1:00 pm" }),
235
- /* @__PURE__ */ jsx("option", { value: "1:30 pm", children: "1:30 pm" }),
236
- /* @__PURE__ */ jsx("option", { value: "2:00 pm", children: "2:00 pm" }),
237
- /* @__PURE__ */ jsx("option", { value: "2:30 pm", children: "2:30 pm" }),
238
- /* @__PURE__ */ jsx("option", { value: "3:00 pm", children: "3:00 pm" }),
239
- /* @__PURE__ */ jsx("option", { value: "3:30 pm", children: "3:30 pm" }),
240
- /* @__PURE__ */ jsx("option", { value: "4:00 pm", children: "4:00 pm" }),
241
- /* @__PURE__ */ jsx("option", { value: "4:30 pm", children: "4:30 pm" }),
242
- /* @__PURE__ */ jsx("option", { value: "5:00 pm", children: "5:00 pm" })
243
- ]
244
- }
245
- ) }),
246
- /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
247
- CurrencyInput,
248
- {
249
- id: "Potential_Funding__c",
250
- ...register("Potential_Funding__c", {
251
- required: true
252
- }),
253
- label: "Potential Funding",
254
- placeholder: "Potential Funding",
255
- sizes: "medium",
256
- required: true,
257
- error: !!errors.Potential_Funding__c,
258
- helperText: errors.Potential_Funding__c?.message,
259
- variant
260
- }
261
- ) }),
262
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
263
- ] }),
264
- children,
265
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
266
- /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
267
- LoadingIndicator,
268
- {
269
- style: { marginInline: "auto" },
270
- variant
271
- }
272
- ) : /* @__PURE__ */ jsx(
273
- Button,
274
- {
275
- color: getVariant(callToAction?.variant),
276
- as: "button",
277
- type: "submit",
278
- disabled: !isValid || isSubmitting,
279
- children: callToAction?.displayText
280
- }
281
- ) })
282
- ] })
151
+ ) }),
152
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
153
+ Input,
154
+ {
155
+ id: "last_name",
156
+ ...register("last_name", { required: true }),
157
+ label: "Last Name",
158
+ sizes: "medium",
159
+ placeholder: "Last Name",
160
+ required: true,
161
+ error: !!errors.last_name,
162
+ helperText: errors.last_name?.message,
163
+ variant
164
+ }
165
+ ) }),
166
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
167
+ Input,
168
+ {
169
+ id: "email",
170
+ ...register("email", {
171
+ required: true,
172
+ validate: {
173
+ isValid: associatedEmail
174
+ }
175
+ }),
176
+ label: "Email",
177
+ sizes: "medium",
178
+ placeholder: "Email",
179
+ required: true,
180
+ error: !!errors.email,
181
+ helperText: errors.email?.message,
182
+ variant
183
+ }
184
+ ) }),
185
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
186
+ InputPhone,
187
+ {
188
+ id: "phone",
189
+ ...register("phone", { required: true, maxLength: 12 }),
190
+ label: "Phone",
191
+ sizes: "medium",
192
+ placeholder: "Phone",
193
+ required: true,
194
+ error: !!errors.phone,
195
+ helperText: errors.phone?.message,
196
+ variant
197
+ }
198
+ ) }),
199
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
200
+ Input,
201
+ {
202
+ id: "Best_Contact_Date__c",
203
+ ...register("Best_Contact_Date__c", {
204
+ required: true
205
+ }),
206
+ type: "date",
207
+ label: "Best Date to Call",
208
+ sizes: "medium",
209
+ placeholder: "Best Date to Call",
210
+ min: (/* @__PURE__ */ new Date()).toJSON().slice(0, 10),
211
+ required: true,
212
+ error: !!errors.Best_Contact_Date__c,
213
+ helperText: errors.Best_Contact_Date__c?.message,
214
+ variant
215
+ }
216
+ ) }),
217
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
218
+ Dropdown,
219
+ {
220
+ id: "Best_Time_To_Call__c",
221
+ ...register("Best_Time_To_Call__c", {
222
+ required: true,
223
+ maxLength: 12
224
+ }),
225
+ label: "Best Time to Call",
226
+ sizes: "medium",
227
+ required: true,
228
+ error: !!errors.Best_Time_To_Call__c,
229
+ helperText: errors.Best_Time_To_Call__c?.message,
230
+ variant,
231
+ defaultValue: "Best Time to Call",
232
+ children: [
233
+ /* @__PURE__ */ jsx("option", { value: "Best Time to Call", disabled: true, children: "Best Time to Call" }),
234
+ /* @__PURE__ */ jsx("option", { value: "8:00 am", children: "8:00 am" }),
235
+ /* @__PURE__ */ jsx("option", { value: "8:30 am", children: "8:30 am" }),
236
+ /* @__PURE__ */ jsx("option", { value: "9:00 am", children: "9:00 am" }),
237
+ /* @__PURE__ */ jsx("option", { value: "9:30 am", children: "9:30 am" }),
238
+ /* @__PURE__ */ jsx("option", { value: "10:00 am", children: "10:00 am" }),
239
+ /* @__PURE__ */ jsx("option", { value: "10:30 am", children: "10:30 am" }),
240
+ /* @__PURE__ */ jsx("option", { value: "11:00 am", children: "11:00 am" }),
241
+ /* @__PURE__ */ jsx("option", { value: "11:30 am", children: "11:30 am" }),
242
+ /* @__PURE__ */ jsx("option", { value: "12:00 pm", children: "12:00 pm" }),
243
+ /* @__PURE__ */ jsx("option", { value: "12:30 pm", children: "12:30 pm" }),
244
+ /* @__PURE__ */ jsx("option", { value: "1:00 pm", children: "1:00 pm" }),
245
+ /* @__PURE__ */ jsx("option", { value: "1:30 pm", children: "1:30 pm" }),
246
+ /* @__PURE__ */ jsx("option", { value: "2:00 pm", children: "2:00 pm" }),
247
+ /* @__PURE__ */ jsx("option", { value: "2:30 pm", children: "2:30 pm" }),
248
+ /* @__PURE__ */ jsx("option", { value: "3:00 pm", children: "3:00 pm" }),
249
+ /* @__PURE__ */ jsx("option", { value: "3:30 pm", children: "3:30 pm" }),
250
+ /* @__PURE__ */ jsx("option", { value: "4:00 pm", children: "4:00 pm" }),
251
+ /* @__PURE__ */ jsx("option", { value: "4:30 pm", children: "4:30 pm" }),
252
+ /* @__PURE__ */ jsx("option", { value: "5:00 pm", children: "5:00 pm" })
253
+ ]
254
+ }
255
+ ) }),
256
+ /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
257
+ CurrencyInput,
258
+ {
259
+ id: "Potential_Funding__c",
260
+ ...register("Potential_Funding__c", {
261
+ required: true
262
+ }),
263
+ label: "Potential Funding",
264
+ placeholder: "Potential Funding",
265
+ sizes: "medium",
266
+ required: true,
267
+ error: !!errors.Potential_Funding__c,
268
+ helperText: errors.Potential_Funding__c?.message,
269
+ variant
270
+ }
271
+ ) }),
272
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
273
+ ] }),
274
+ children,
275
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
276
+ /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
277
+ LoadingIndicator,
278
+ {
279
+ style: { marginInline: "auto" },
280
+ variant
281
+ }
282
+ ) : /* @__PURE__ */ jsx(
283
+ Button,
284
+ {
285
+ color: getVariant(callToAction?.variant),
286
+ as: "button",
287
+ type: "submit",
288
+ disabled: !isValid || isSubmitting,
289
+ children: callToAction?.displayText
290
+ }
291
+ ) })
292
+ ]
293
+ }
294
+ )
283
295
  ] }) }) }, id);
284
296
  };
285
297
  export {
@@ -55,4 +55,4 @@ export type VendorQuestionnaireInputs = {
55
55
  "jobtitle/0-1": string;
56
56
  "email/0-1": string;
57
57
  };
58
- export declare const VendorQuestionnaire: ({ children, onSubmit, variant: fullVariant, validateEmail, callToAction, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
58
+ export declare const VendorQuestionnaire: ({ children, onSubmit, variant: fullVariant, validateEmail, onValidate, callToAction, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;