@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 CommercialPremiumFinance = ({
46
46
  headline,
47
47
  callToAction,
48
48
  validateEmail,
49
+ onValidate,
49
50
  description,
50
51
  id
51
52
  }) => {
@@ -110,101 +111,112 @@ const CommercialPremiumFinance = ({
110
111
  }
111
112
  )
112
113
  ] }),
113
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
114
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
115
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
116
- Input,
117
- {
118
- id: "first_name",
119
- ...register("first_name", { required: true }),
120
- label: "First Name",
121
- sizes: "medium",
122
- required: true,
123
- error: !!errors.first_name,
124
- helperText: errors.first_name?.message,
125
- variant
126
- }
127
- ) }),
128
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
129
- Input,
130
- {
131
- id: "last_name",
132
- ...register("last_name", { required: true }),
133
- label: "Last Name",
134
- sizes: "medium",
135
- required: true,
136
- error: !!errors.last_name,
137
- helperText: errors.last_name?.message,
138
- variant
139
- }
140
- ) }),
141
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
142
- Input,
143
- {
144
- id: "email",
145
- ...register("email", {
146
- required: true,
147
- validate: {
148
- isValid: associatedEmail
114
+ /* @__PURE__ */ jsxs(
115
+ "form",
116
+ {
117
+ className: form,
118
+ onSubmit: async (e) => {
119
+ onValidate && onValidate(e);
120
+ await handleSubmit(submitForm)(e);
121
+ e.preventDefault();
122
+ },
123
+ children: [
124
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
125
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
126
+ Input,
127
+ {
128
+ id: "first_name",
129
+ ...register("first_name", { required: true }),
130
+ label: "First Name",
131
+ sizes: "medium",
132
+ required: true,
133
+ error: !!errors.first_name,
134
+ helperText: errors.first_name?.message,
135
+ variant
149
136
  }
150
- }),
151
- label: "Email",
152
- sizes: "medium",
153
- required: true,
154
- error: !!errors.email,
155
- helperText: errors.email?.message,
156
- variant
157
- }
158
- ) }),
159
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
160
- Input,
161
- {
162
- id: "Insurance_Company__c",
163
- ...register("Insurance_Company__c", {}),
164
- label: "Insurance Company",
165
- sizes: "medium",
166
- error: !!errors.Insurance_Company__c,
167
- helperText: errors.Insurance_Company__c?.message,
168
- variant
169
- }
170
- ) }),
171
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
172
- Dropdown,
173
- {
174
- id: "Type_of_Policy__c",
175
- ...register("Type_of_Policy__c", {}),
176
- label: "Type of Policy",
177
- sizes: "medium",
178
- variant,
179
- defaultValue: "",
180
- children: [
181
- /* @__PURE__ */ jsx("option", { value: "" }),
182
- /* @__PURE__ */ jsx("option", { value: "Whole life", children: "Whole life" }),
183
- /* @__PURE__ */ jsx("option", { value: "Index Universal Life", children: "Index Universal Life" })
184
- ]
185
- }
186
- ) }),
187
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
188
- ] }),
189
- children,
190
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
191
- /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
192
- LoadingIndicator,
193
- {
194
- style: { marginInline: "auto" },
195
- variant
196
- }
197
- ) : /* @__PURE__ */ jsx(
198
- Button,
199
- {
200
- color: getVariant(callToAction?.variant),
201
- as: "button",
202
- type: "submit",
203
- disabled: !isValid || isSubmitting,
204
- children: callToAction?.displayText
205
- }
206
- ) })
207
- ] })
137
+ ) }),
138
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
139
+ Input,
140
+ {
141
+ id: "last_name",
142
+ ...register("last_name", { required: true }),
143
+ label: "Last Name",
144
+ sizes: "medium",
145
+ required: true,
146
+ error: !!errors.last_name,
147
+ helperText: errors.last_name?.message,
148
+ variant
149
+ }
150
+ ) }),
151
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
152
+ Input,
153
+ {
154
+ id: "email",
155
+ ...register("email", {
156
+ required: true,
157
+ validate: {
158
+ isValid: associatedEmail
159
+ }
160
+ }),
161
+ label: "Email",
162
+ sizes: "medium",
163
+ required: true,
164
+ error: !!errors.email,
165
+ helperText: errors.email?.message,
166
+ variant
167
+ }
168
+ ) }),
169
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
170
+ Input,
171
+ {
172
+ id: "Insurance_Company__c",
173
+ ...register("Insurance_Company__c", {}),
174
+ label: "Insurance Company",
175
+ sizes: "medium",
176
+ error: !!errors.Insurance_Company__c,
177
+ helperText: errors.Insurance_Company__c?.message,
178
+ variant
179
+ }
180
+ ) }),
181
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
182
+ Dropdown,
183
+ {
184
+ id: "Type_of_Policy__c",
185
+ ...register("Type_of_Policy__c", {}),
186
+ label: "Type of Policy",
187
+ sizes: "medium",
188
+ variant,
189
+ defaultValue: "",
190
+ children: [
191
+ /* @__PURE__ */ jsx("option", { value: "" }),
192
+ /* @__PURE__ */ jsx("option", { value: "Whole life", children: "Whole life" }),
193
+ /* @__PURE__ */ jsx("option", { value: "Index Universal Life", children: "Index Universal Life" })
194
+ ]
195
+ }
196
+ ) }),
197
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
198
+ ] }),
199
+ children,
200
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
201
+ /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
202
+ LoadingIndicator,
203
+ {
204
+ style: { marginInline: "auto" },
205
+ variant
206
+ }
207
+ ) : /* @__PURE__ */ jsx(
208
+ Button,
209
+ {
210
+ color: getVariant(callToAction?.variant),
211
+ as: "button",
212
+ type: "submit",
213
+ disabled: !isValid || isSubmitting,
214
+ children: callToAction?.displayText
215
+ }
216
+ ) })
217
+ ]
218
+ }
219
+ )
208
220
  ] }) }) }, id);
209
221
  };
210
222
  export {
@@ -7,4 +7,4 @@ export type ContactCompanyInputs = {
7
7
  phone: string;
8
8
  company: string;
9
9
  };
10
- export declare const ContactCompany: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const ContactCompany: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -46,6 +46,7 @@ const ContactCompany = ({
46
46
  description,
47
47
  callToAction,
48
48
  validateEmail,
49
+ onValidate,
49
50
  id
50
51
  }) => {
51
52
  const schema = z.object({
@@ -114,98 +115,109 @@ const ContactCompany = ({
114
115
  }
115
116
  )
116
117
  ] }),
117
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
118
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
119
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
120
- Input,
121
- {
122
- id: "first_name",
123
- ...register("first_name", { required: true }),
124
- label: "First Name",
125
- sizes: "medium",
126
- placeholder: "First Name",
127
- required: true,
128
- error: !!errors.first_name,
129
- helperText: errors.first_name?.message,
130
- variant
131
- }
132
- ) }),
133
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
134
- Input,
135
- {
136
- id: "last_name",
137
- ...register("last_name", { required: true }),
138
- label: "Last Name",
139
- sizes: "medium",
140
- placeholder: "Last Name",
141
- required: true,
142
- error: !!errors.last_name,
143
- helperText: errors.last_name?.message,
144
- variant
145
- }
146
- ) }),
147
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
148
- Input,
149
- {
150
- id: "email",
151
- ...register("email", {
152
- required: true,
153
- validate: {
154
- isValid: associatedEmail
118
+ /* @__PURE__ */ jsxs(
119
+ "form",
120
+ {
121
+ className: form,
122
+ onSubmit: async (e) => {
123
+ onValidate && onValidate(e);
124
+ await handleSubmit(submitForm)(e);
125
+ e.preventDefault();
126
+ },
127
+ children: [
128
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
129
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
130
+ Input,
131
+ {
132
+ id: "first_name",
133
+ ...register("first_name", { required: true }),
134
+ label: "First Name",
135
+ sizes: "medium",
136
+ placeholder: "First Name",
137
+ required: true,
138
+ error: !!errors.first_name,
139
+ helperText: errors.first_name?.message,
140
+ variant
155
141
  }
156
- }),
157
- label: "Email",
158
- sizes: "medium",
159
- placeholder: "Email",
160
- required: true,
161
- error: !!errors.email,
162
- helperText: errors.email?.message,
163
- variant
164
- }
165
- ) }),
166
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
167
- InputPhone,
168
- {
169
- id: "phone",
170
- ...register("phone", { required: true, maxLength: 12 }),
171
- label: "Phone",
172
- sizes: "medium",
173
- placeholder: "Phone",
174
- required: true,
175
- error: !!errors.phone,
176
- helperText: errors.phone?.message,
177
- variant
178
- }
179
- ) }),
180
- /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
181
- Input,
182
- {
183
- id: "company",
184
- ...register("company", { required: true }),
185
- label: "Company",
186
- sizes: "medium",
187
- placeholder: "Company",
188
- required: true,
189
- error: !!errors.company,
190
- helperText: errors.company?.message,
191
- variant
192
- }
193
- ) }),
194
- /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
195
- ] }),
196
- children,
197
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
198
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
199
- Button,
200
- {
201
- color: getVariant(callToAction?.variant),
202
- as: "button",
203
- type: "submit",
204
- disabled: !isValid || isSubmitting,
205
- children: callToAction?.displayText
206
- }
207
- ) })
208
- ] })
142
+ ) }),
143
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
144
+ Input,
145
+ {
146
+ id: "last_name",
147
+ ...register("last_name", { required: true }),
148
+ label: "Last Name",
149
+ sizes: "medium",
150
+ placeholder: "Last Name",
151
+ required: true,
152
+ error: !!errors.last_name,
153
+ helperText: errors.last_name?.message,
154
+ variant
155
+ }
156
+ ) }),
157
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
158
+ Input,
159
+ {
160
+ id: "email",
161
+ ...register("email", {
162
+ required: true,
163
+ validate: {
164
+ isValid: associatedEmail
165
+ }
166
+ }),
167
+ label: "Email",
168
+ sizes: "medium",
169
+ placeholder: "Email",
170
+ required: true,
171
+ error: !!errors.email,
172
+ helperText: errors.email?.message,
173
+ variant
174
+ }
175
+ ) }),
176
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
177
+ InputPhone,
178
+ {
179
+ id: "phone",
180
+ ...register("phone", { required: true, maxLength: 12 }),
181
+ label: "Phone",
182
+ sizes: "medium",
183
+ placeholder: "Phone",
184
+ required: true,
185
+ error: !!errors.phone,
186
+ helperText: errors.phone?.message,
187
+ variant
188
+ }
189
+ ) }),
190
+ /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
191
+ Input,
192
+ {
193
+ id: "company",
194
+ ...register("company", { required: true }),
195
+ label: "Company",
196
+ sizes: "medium",
197
+ placeholder: "Company",
198
+ required: true,
199
+ error: !!errors.company,
200
+ helperText: errors.company?.message,
201
+ variant
202
+ }
203
+ ) }),
204
+ /* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
205
+ ] }),
206
+ children,
207
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
208
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
209
+ Button,
210
+ {
211
+ color: getVariant(callToAction?.variant),
212
+ as: "button",
213
+ type: "submit",
214
+ disabled: !isValid || isSubmitting,
215
+ children: callToAction?.displayText
216
+ }
217
+ ) })
218
+ ]
219
+ }
220
+ )
209
221
  ] }) }) }, id);
210
222
  };
211
223
  export {
@@ -8,4 +8,4 @@ export type ContactCompanyTitleInputs = {
8
8
  company: string;
9
9
  title: string;
10
10
  };
11
- export declare const ContactCompanyTitle: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const ContactCompanyTitle: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;