@axos-web-dev/shared-components 1.0.99-dev.1 → 1.0.99-dev.3

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 (95) hide show
  1. package/dist/ATMLocator/ATMLocator.js +1 -0
  2. package/dist/Auth/ErrorAlert.js +1 -0
  3. package/dist/Button/Button.js +1 -0
  4. package/dist/Calculators/Calculator.js +1 -0
  5. package/dist/Carousel/index.js +1 -0
  6. package/dist/Chevron/index.js +1 -0
  7. package/dist/Comparison/Comparison.js +1 -0
  8. package/dist/ExecutiveBio/ExecutiveBio.js +1 -0
  9. package/dist/FaqAccordion/index.js +1 -0
  10. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +1 -0
  11. package/dist/Forms/ApplicationStart.d.ts +1 -1
  12. package/dist/Forms/ApplicationStart.js +111 -89
  13. package/dist/Forms/ApplyNow.js +1 -0
  14. package/dist/Forms/ClearingForm.d.ts +1 -1
  15. package/dist/Forms/ClearingForm.js +184 -162
  16. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  17. package/dist/Forms/CommercialDeposits.js +201 -179
  18. package/dist/Forms/CommercialLending.d.ts +1 -1
  19. package/dist/Forms/CommercialLending.js +278 -256
  20. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  21. package/dist/Forms/CommercialPremiumFinance.js +128 -106
  22. package/dist/Forms/ContactCompany.d.ts +1 -1
  23. package/dist/Forms/ContactCompany.js +113 -91
  24. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  25. package/dist/Forms/ContactCompanyTitle.js +127 -105
  26. package/dist/Forms/ContactUs.d.ts +1 -1
  27. package/dist/Forms/ContactUs.js +99 -78
  28. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  29. package/dist/Forms/ContactUsAAS.js +180 -158
  30. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  31. package/dist/Forms/ContactUsBusiness.js +134 -112
  32. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  33. package/dist/Forms/ContactUsBusinessNameEmail.js +103 -81
  34. package/dist/Forms/ContactUsLVF.d.ts +1 -1
  35. package/dist/Forms/ContactUsLVF.js +120 -98
  36. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  37. package/dist/Forms/ContactUsNMLSId.js +117 -95
  38. package/dist/Forms/CpraRequest.d.ts +1 -1
  39. package/dist/Forms/CpraRequest.js +641 -619
  40. package/dist/Forms/CraPublicFile.d.ts +1 -1
  41. package/dist/Forms/CraPublicFile.js +109 -87
  42. package/dist/Forms/DealerServices.d.ts +1 -1
  43. package/dist/Forms/DealerServices.js +225 -204
  44. package/dist/Forms/EmailOnly.d.ts +1 -1
  45. package/dist/Forms/EmailOnly.js +56 -36
  46. package/dist/Forms/EmailUs.d.ts +1 -1
  47. package/dist/Forms/EmailUs.js +75 -53
  48. package/dist/Forms/FormProps.d.ts +3 -0
  49. package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -0
  50. package/dist/Forms/HoneyPot/HoneyPot.css.js +5 -0
  51. package/dist/Forms/HoneyPot/index.d.ts +24 -0
  52. package/dist/Forms/HoneyPot/index.js +71 -0
  53. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  54. package/dist/Forms/MortgageRate/MortgageRateForm.js +363 -342
  55. package/dist/Forms/MortgageRate/MortgageRateWatch.js +1 -0
  56. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  57. package/dist/Forms/QuickPricer/QuickPricerForm.js +624 -609
  58. package/dist/Forms/ScheduleCall.d.ts +1 -1
  59. package/dist/Forms/ScheduleCall.js +156 -134
  60. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  61. package/dist/Forms/ScheduleCallPremier.js +178 -156
  62. package/dist/Forms/SuccesForm.js +1 -0
  63. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  64. package/dist/Forms/VendorQuestionnaire.js +817 -795
  65. package/dist/Forms/WcplSurvey.d.ts +1 -1
  66. package/dist/Forms/WcplSurvey.js +112 -90
  67. package/dist/Forms/index.d.ts +1 -0
  68. package/dist/Forms/index.js +4 -0
  69. package/dist/Hyperlink/index.js +1 -0
  70. package/dist/ImageLink/ImageLink.js +1 -0
  71. package/dist/ImageLink/ImageLinkSet.js +1 -0
  72. package/dist/ImageLink/index.js +1 -0
  73. package/dist/Input/Input.js +3 -1
  74. package/dist/Insight/Featured/CategorySelector.js +1 -0
  75. package/dist/Insight/Featured/Featured.js +1 -0
  76. package/dist/Insight/Featured/Header.js +1 -0
  77. package/dist/Modal/Modal.js +1 -0
  78. package/dist/NavigationMenu/AxosALTS/NavData.js +1 -0
  79. package/dist/NavigationMenu/AxosALTS/index.js +1 -0
  80. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +1 -0
  81. package/dist/NavigationMenu/AxosBank/NavData.js +1 -0
  82. package/dist/NavigationMenu/AxosBank/SubNavBar.js +1 -0
  83. package/dist/NavigationMenu/AxosBank/index.js +1 -0
  84. package/dist/NavigationMenu/LaVictoire/NavData.js +1 -0
  85. package/dist/NavigationMenu/LaVictoire/index.js +1 -0
  86. package/dist/NavigationMenu/NavDataJson.js +1 -0
  87. package/dist/NavigationMenu/Navbar.js +1 -0
  88. package/dist/NavigationMenu/SignInNavButton.js +1 -0
  89. package/dist/SetContainer/SetContainer.js +1 -0
  90. package/dist/SocialMediaBar/iconsRepository.js +1 -0
  91. package/dist/VideoTile/VideoTile.js +1 -0
  92. package/dist/VideoWrapper/index.js +1 -0
  93. package/dist/assets/Forms/HoneyPot/HoneyPot.css +4 -0
  94. package/dist/main.js +4 -0
  95. package/package.json +1 -1
@@ -33,6 +33,7 @@ import clsx from "clsx";
33
33
  import { useForm, FormProvider } from "react-hook-form";
34
34
  import * as z from "zod";
35
35
  import { iconForm, headerContainer, headerForm, form, descriptionField, fullRowForm, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
36
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
36
37
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
37
38
  const ScheduleCallPremier = ({
38
39
  icon = false,
@@ -46,6 +47,7 @@ const ScheduleCallPremier = ({
46
47
  description,
47
48
  callToAction,
48
49
  validateEmail,
50
+ onValidate,
49
51
  id
50
52
  }) => {
51
53
  const schema = z.object({
@@ -74,8 +76,16 @@ const ScheduleCallPremier = ({
74
76
  Best_Time_To_Call__c: z.string().min(1).refine((val) => /[ap]|m/.test(val)),
75
77
  Potential_Funding__c: z.string().min(1)
76
78
  });
79
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
80
+ if (!isValidHoneyPot(data)) {
81
+ ctx.addIssue({
82
+ code: z.ZodIssueCode.custom,
83
+ message: "fields are not valid."
84
+ });
85
+ }
86
+ });
77
87
  const methods = useForm({
78
- resolver: zodResolver(schema.merge(SalesforceSchema)),
88
+ resolver: zodResolver(gen_schema),
79
89
  mode: "all",
80
90
  defaultValues: {
81
91
  email: ""
@@ -114,162 +124,174 @@ const ScheduleCallPremier = ({
114
124
  }
115
125
  )
116
126
  ] }),
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
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
155
150
  }
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", { children: /* @__PURE__ */ jsx(
181
- Input,
182
- {
183
- id: "Best_Contact_Date__c",
184
- ...register("Best_Contact_Date__c", {
185
- required: true
186
- }),
187
- type: "date",
188
- label: "Best Date to Call",
189
- sizes: "medium",
190
- placeholder: "Best Date to Call",
191
- min: (/* @__PURE__ */ new Date()).toJSON().slice(0, 10),
192
- required: true,
193
- error: !!errors.Best_Contact_Date__c,
194
- helperText: errors.Best_Contact_Date__c?.message,
195
- variant
196
- }
197
- ) }),
198
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
199
- Dropdown,
200
- {
201
- id: "Best_Time_To_Call__c",
202
- ...register("Best_Time_To_Call__c", {
203
- required: true,
204
- maxLength: 12
205
- }),
206
- label: "Best Time to Call",
207
- sizes: "medium",
208
- required: true,
209
- error: !!errors.Best_Time_To_Call__c,
210
- helperText: errors.Best_Time_To_Call__c?.message,
211
- variant,
212
- defaultValue: "Best Time to Call",
213
- children: [
214
- /* @__PURE__ */ jsx("option", { value: "Best Time to Call", disabled: true, children: "Best Time to Call" }),
215
- /* @__PURE__ */ jsx("option", { value: "8:00 am", children: "8:00 am" }),
216
- /* @__PURE__ */ jsx("option", { value: "8:30 am", children: "8:30 am" }),
217
- /* @__PURE__ */ jsx("option", { value: "9:00 am", children: "9:00 am" }),
218
- /* @__PURE__ */ jsx("option", { value: "9:30 am", children: "9:30 am" }),
219
- /* @__PURE__ */ jsx("option", { value: "10:00 am", children: "10:00 am" }),
220
- /* @__PURE__ */ jsx("option", { value: "10:30 am", children: "10:30 am" }),
221
- /* @__PURE__ */ jsx("option", { value: "11:00 am", children: "11:00 am" }),
222
- /* @__PURE__ */ jsx("option", { value: "11:30 am", children: "11:30 am" }),
223
- /* @__PURE__ */ jsx("option", { value: "12:00 pm", children: "12:00 pm" }),
224
- /* @__PURE__ */ jsx("option", { value: "12:30 pm", children: "12:30 pm" }),
225
- /* @__PURE__ */ jsx("option", { value: "1:00 pm", children: "1:00 pm" }),
226
- /* @__PURE__ */ jsx("option", { value: "1:30 pm", children: "1:30 pm" }),
227
- /* @__PURE__ */ jsx("option", { value: "2:00 pm", children: "2:00 pm" }),
228
- /* @__PURE__ */ jsx("option", { value: "2:30 pm", children: "2:30 pm" }),
229
- /* @__PURE__ */ jsx("option", { value: "3:00 pm", children: "3:00 pm" }),
230
- /* @__PURE__ */ jsx("option", { value: "3:30 pm", children: "3:30 pm" }),
231
- /* @__PURE__ */ jsx("option", { value: "4:00 pm", children: "4:00 pm" }),
232
- /* @__PURE__ */ jsx("option", { value: "4:30 pm", children: "4:30 pm" }),
233
- /* @__PURE__ */ jsx("option", { value: "5:00 pm", children: "5:00 pm" })
234
- ]
235
- }
236
- ) }),
237
- /* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
238
- CurrencyInput,
239
- {
240
- id: "Potential_Funding__c",
241
- ...register("Potential_Funding__c", {
242
- required: true
243
- }),
244
- label: "Potential Funding",
245
- placeholder: "Potential Funding",
246
- sizes: "medium",
247
- required: true,
248
- error: !!errors.Potential_Funding__c,
249
- helperText: errors.Potential_Funding__c?.message,
250
- variant
251
- }
252
- ) })
253
- ] }),
254
- children,
255
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
256
- /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
257
- LoadingIndicator,
258
- {
259
- style: { marginInline: "auto" },
260
- variant
261
- }
262
- ) : /* @__PURE__ */ jsx(
263
- Button,
264
- {
265
- color: getVariant(callToAction?.variant),
266
- as: "button",
267
- type: "submit",
268
- disabled: !isValid || isSubmitting,
269
- children: callToAction?.displayText
270
- }
271
- ) })
272
- ] })
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
+ )
273
295
  ] }) }) }, id);
274
296
  };
275
297
  export {
@@ -115,6 +115,7 @@ import "../StepItemSet/StepItemSet.css.js";
115
115
  /* empty css */
116
116
  import "../Interstitial/Interstitial-variants.css.js";
117
117
  import { success_icon, success_circle, succes_check_mark, success_wrap } from "./Forms.css.js";
118
+ import "./HoneyPot/index.js";
118
119
  import "./SalesforceFieldsForm.js";
119
120
  import "../Input/RadioButton.css.js";
120
121
  import "../Input/Checkbox.css.js";
@@ -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;