@axos-web-dev/shared-components 1.0.99 → 1.0.100-dev.2

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 (160) hide show
  1. package/dist/ATMLocator/ATMLocator.js +8 -1
  2. package/dist/ArticlesSet/ArticlesSet.js +2 -2
  3. package/dist/Auth/ErrorAlert.js +10 -3
  4. package/dist/Blockquote/Blockquote.module.js +3 -3
  5. package/dist/Button/Button.js +10 -3
  6. package/dist/Calculators/Calculator.js +22 -3
  7. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.d.ts +9 -0
  8. package/dist/Calculators/MarineLoanMonthlyPaymentCalculator/index.js +219 -0
  9. package/dist/Calculators/MaxLoanCalculator/index.js +22 -5
  10. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.d.ts +1 -0
  11. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +2 -0
  12. package/dist/Calculators/MonthlyPaymentCalculator/index.js +15 -5
  13. package/dist/Calculators/index.d.ts +2 -1
  14. package/dist/Calculators/index.js +3 -1
  15. package/dist/Carousel/index.js +10 -3
  16. package/dist/Chatbot/Bubble.css.d.ts +1 -0
  17. package/dist/Chatbot/Bubble.css.js +5 -0
  18. package/dist/Chatbot/Bubble.d.ts +3 -0
  19. package/dist/Chatbot/Bubble.js +48 -0
  20. package/dist/Chatbot/Chat.d.ts +1 -0
  21. package/dist/Chatbot/Chat.js +165 -0
  22. package/dist/Chatbot/ChatWindow.css.d.ts +11 -0
  23. package/dist/Chatbot/ChatWindow.css.js +25 -0
  24. package/dist/Chatbot/ChatWindow.d.ts +23 -0
  25. package/dist/Chatbot/ChatWindow.js +202 -0
  26. package/dist/Chatbot/Chatbot.css.d.ts +1 -0
  27. package/dist/Chatbot/Chatbot.css.js +5 -0
  28. package/dist/Chatbot/Chatbot.css.ts.vanilla.css.js +1 -0
  29. package/dist/Chatbot/Chatbot.d.ts +1 -0
  30. package/dist/Chatbot/Chatbot.js +39 -0
  31. package/dist/Chatbot/authenticate.d.ts +3 -0
  32. package/dist/Chatbot/authenticate.js +16 -0
  33. package/dist/Chatbot/index.d.ts +9 -0
  34. package/dist/Chatbot/index.js +31 -0
  35. package/dist/Chatbot/store/chat.d.ts +9 -0
  36. package/dist/Chatbot/store/chat.js +11 -0
  37. package/dist/Chatbot/store/messages.d.ts +14 -0
  38. package/dist/Chatbot/store/messages.js +12 -0
  39. package/dist/Chatbot/useHeadlessChat.d.ts +22 -0
  40. package/dist/Chatbot/useHeadlessChat.js +157 -0
  41. package/dist/Chevron/index.js +10 -3
  42. package/dist/Comparison/Comparison.js +10 -3
  43. package/dist/ExecutiveBio/ExecutiveBio.js +10 -3
  44. package/dist/FaqAccordion/index.js +10 -3
  45. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +10 -3
  46. package/dist/Forms/ApplicationStart.d.ts +1 -1
  47. package/dist/Forms/ApplicationStart.js +111 -89
  48. package/dist/Forms/ApplyNow.d.ts +2 -2
  49. package/dist/Forms/ApplyNow.js +178 -146
  50. package/dist/Forms/ClearingForm.d.ts +1 -1
  51. package/dist/Forms/ClearingForm.js +184 -162
  52. package/dist/Forms/CommercialDeposits.d.ts +1 -1
  53. package/dist/Forms/CommercialDeposits.js +201 -179
  54. package/dist/Forms/CommercialLending.d.ts +1 -1
  55. package/dist/Forms/CommercialLending.js +278 -256
  56. package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
  57. package/dist/Forms/CommercialPremiumFinance.js +128 -106
  58. package/dist/Forms/ContactCompany.d.ts +1 -1
  59. package/dist/Forms/ContactCompany.js +113 -91
  60. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  61. package/dist/Forms/ContactCompanyTitle.js +127 -105
  62. package/dist/Forms/ContactUs.d.ts +1 -1
  63. package/dist/Forms/ContactUs.js +99 -77
  64. package/dist/Forms/ContactUsAAS.d.ts +1 -1
  65. package/dist/Forms/ContactUsAAS.js +180 -158
  66. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  67. package/dist/Forms/ContactUsBusiness.js +143 -115
  68. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
  69. package/dist/Forms/ContactUsBusinessNameEmail.js +112 -84
  70. package/dist/Forms/ContactUsLVF.d.ts +3 -1
  71. package/dist/Forms/ContactUsLVF.js +127 -101
  72. package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
  73. package/dist/Forms/ContactUsNMLSId.js +126 -98
  74. package/dist/Forms/CpraRequest.d.ts +1 -1
  75. package/dist/Forms/CpraRequest.js +641 -619
  76. package/dist/Forms/CraPublicFile.d.ts +1 -1
  77. package/dist/Forms/CraPublicFile.js +118 -90
  78. package/dist/Forms/DealerServices.d.ts +1 -1
  79. package/dist/Forms/DealerServices.js +225 -204
  80. package/dist/Forms/EmailOnly.d.ts +1 -1
  81. package/dist/Forms/EmailOnly.js +65 -39
  82. package/dist/Forms/EmailUs.d.ts +1 -1
  83. package/dist/Forms/EmailUs.js +75 -53
  84. package/dist/Forms/FormProps.d.ts +3 -0
  85. package/dist/Forms/Forms.css.d.ts +18 -0
  86. package/dist/Forms/Forms.css.js +44 -38
  87. package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -0
  88. package/dist/Forms/HoneyPot/HoneyPot.css.js +5 -0
  89. package/dist/Forms/HoneyPot/index.d.ts +23 -0
  90. package/dist/Forms/HoneyPot/index.js +69 -0
  91. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
  92. package/dist/Forms/MortgageRate/MortgageRateForm.js +376 -348
  93. package/dist/Forms/MortgageRate/MortgageRateWatch.js +10 -3
  94. package/dist/Forms/MortgageWarehouseLending.d.ts +11 -0
  95. package/dist/Forms/MortgageWarehouseLending.js +343 -0
  96. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  97. package/dist/Forms/QuickPricer/QuickPricerForm.js +624 -609
  98. package/dist/Forms/ScheduleCall.d.ts +1 -1
  99. package/dist/Forms/ScheduleCall.js +156 -134
  100. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  101. package/dist/Forms/ScheduleCallPremier.js +178 -156
  102. package/dist/Forms/SuccesForm.js +13 -6
  103. package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
  104. package/dist/Forms/VendorQuestionnaire.js +817 -795
  105. package/dist/Forms/WcplSurvey.d.ts +1 -1
  106. package/dist/Forms/WcplSurvey.js +112 -90
  107. package/dist/Forms/applynow-utils.d.ts +1 -0
  108. package/dist/Forms/applynow-utils.js +48 -0
  109. package/dist/Forms/index.d.ts +3 -0
  110. package/dist/Forms/index.js +12 -2
  111. package/dist/HeroBanner/HeroBanner.js +42 -1
  112. package/dist/Hyperlink/index.js +10 -3
  113. package/dist/IconBillboard/sections/CallToActionSection.js +2 -1
  114. package/dist/ImageBillboard/ExitIntentModal/useExitIntentModal.js +6 -1
  115. package/dist/ImageLink/ImageLink.js +10 -3
  116. package/dist/ImageLink/ImageLinkSet.js +10 -3
  117. package/dist/ImageLink/index.js +10 -3
  118. package/dist/Input/Input.js +3 -1
  119. package/dist/Insight/Featured/CategorySelector.js +10 -3
  120. package/dist/Insight/Featured/Featured.js +10 -3
  121. package/dist/Insight/Featured/Header.js +10 -3
  122. package/dist/Modal/Modal.js +10 -3
  123. package/dist/NavigationMenu/AxosALTS/NavData.js +10 -3
  124. package/dist/NavigationMenu/AxosALTS/index.js +10 -3
  125. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +16 -16
  126. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +1 -0
  127. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +25 -7
  128. package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
  129. package/dist/NavigationMenu/AxosBank/NavData.js +10 -3
  130. package/dist/NavigationMenu/AxosBank/SubNavBar.js +32 -8
  131. package/dist/NavigationMenu/AxosBank/index.js +10 -3
  132. package/dist/NavigationMenu/LaVictoire/NavData.js +10 -3
  133. package/dist/NavigationMenu/LaVictoire/index.js +10 -3
  134. package/dist/NavigationMenu/NavDataJson.d.ts +2 -0
  135. package/dist/NavigationMenu/NavDataJson.js +315 -0
  136. package/dist/NavigationMenu/Navbar.d.ts +5 -0
  137. package/dist/NavigationMenu/Navbar.js +201 -0
  138. package/dist/NavigationMenu/SignInNavButton.d.ts +1 -0
  139. package/dist/NavigationMenu/SignInNavButton.js +369 -0
  140. package/dist/SetContainer/SetContainer.js +10 -3
  141. package/dist/SocialMediaBar/iconsRepository.js +10 -3
  142. package/dist/Table/Table.d.ts +1 -1
  143. package/dist/VideoTile/VideoTile.js +10 -3
  144. package/dist/VideoWrapper/index.js +10 -3
  145. package/dist/assets/Blockquote/Blockquote.css.css +68 -68
  146. package/dist/assets/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css +3 -0
  147. package/dist/assets/Chatbot/Bubble.css +40 -0
  148. package/dist/assets/Chatbot/ChatWindow.css +107 -0
  149. package/dist/assets/Forms/Forms.css +135 -105
  150. package/dist/assets/Forms/HoneyPot/HoneyPot.css +8 -0
  151. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +191 -191
  152. package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +473 -473
  153. package/dist/assets/utils/optimizeImage/optimizeImage.css.css +47 -47
  154. package/dist/icons/Logos/AXB.d.ts +8 -0
  155. package/dist/icons/Logos/AXB.js +74 -0
  156. package/dist/main.d.ts +1 -0
  157. package/dist/main.js +43 -3
  158. package/dist/utils/allowedAxosDomains.js +2 -1
  159. package/dist/utils/optimizeImage/optimizeImage.module.js +3 -3
  160. package/package.json +136 -133
@@ -32,6 +32,7 @@ import clsx from "clsx";
32
32
  import { useForm, FormProvider } from "react-hook-form";
33
33
  import * as z from "zod";
34
34
  import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
35
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
35
36
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
36
37
  const ContactCompanyTitle = ({
37
38
  icon = false,
@@ -45,6 +46,7 @@ const ContactCompanyTitle = ({
45
46
  description,
46
47
  callToAction,
47
48
  validateEmail,
49
+ onValidate,
48
50
  id
49
51
  }) => {
50
52
  const schema = z.object({
@@ -72,8 +74,16 @@ const ContactCompanyTitle = ({
72
74
  company: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Company is required." }).max(255, { message: "Company can have at most 255 characters." }),
73
75
  title: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Title is required." }).max(128, { message: "Title can have at most 128 characters." })
74
76
  });
77
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
78
+ if (!isValidHoneyPot(data)) {
79
+ ctx.addIssue({
80
+ code: z.ZodIssueCode.custom,
81
+ message: "fields are not valid."
82
+ });
83
+ }
84
+ });
75
85
  const methods = useForm({
76
- resolver: zodResolver(schema.merge(SalesforceSchema), {
86
+ resolver: zodResolver(gen_schema, {
77
87
  async: true
78
88
  }),
79
89
  mode: "all",
@@ -106,111 +116,123 @@ const ContactCompanyTitle = ({
106
116
  }
107
117
  )
108
118
  ] }),
109
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
110
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
111
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
112
- Input,
113
- {
114
- id: "first_name",
115
- ...register("first_name", { required: true }),
116
- label: "First Name",
117
- sizes: "medium",
118
- placeholder: "First Name",
119
- required: true,
120
- error: !!errors.first_name,
121
- helperText: errors.first_name?.message,
122
- variant
123
- }
124
- ) }),
125
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
126
- Input,
127
- {
128
- id: "last_name",
129
- ...register("last_name", { required: true }),
130
- label: "Last Name",
131
- sizes: "medium",
132
- placeholder: "Last Name",
133
- required: true,
134
- error: !!errors.last_name,
135
- helperText: errors.last_name?.message,
136
- variant
137
- }
138
- ) }),
139
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
140
- Input,
141
- {
142
- id: "email",
143
- ...register("email", {
144
- required: true,
145
- validate: {
146
- isValid: associatedEmail
119
+ /* @__PURE__ */ jsxs(
120
+ "form",
121
+ {
122
+ className: form,
123
+ onSubmit: async (e) => {
124
+ onValidate && onValidate(e);
125
+ await handleSubmit(submitForm)(e);
126
+ e.preventDefault();
127
+ },
128
+ children: [
129
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
130
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
131
+ Input,
132
+ {
133
+ id: "first_name",
134
+ ...register("first_name", { required: true }),
135
+ label: "First Name",
136
+ sizes: "medium",
137
+ placeholder: "First Name",
138
+ required: true,
139
+ error: !!errors.first_name,
140
+ helperText: errors.first_name?.message,
141
+ variant
147
142
  }
148
- }),
149
- label: "Email",
150
- sizes: "medium",
151
- placeholder: "Email",
152
- required: true,
153
- error: !!errors.email,
154
- helperText: errors.email?.message,
155
- variant
156
- }
157
- ) }),
158
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
159
- InputPhone,
160
- {
161
- id: "phone",
162
- ...register("phone", { required: true, maxLength: 12 }),
163
- label: "Phone",
164
- sizes: "medium",
165
- placeholder: "Phone",
166
- required: true,
167
- error: !!errors.phone,
168
- helperText: errors.phone?.message,
169
- variant
170
- }
171
- ) }),
172
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
173
- Input,
174
- {
175
- id: "company",
176
- ...register("company", { required: true }),
177
- label: "Company",
178
- sizes: "medium",
179
- placeholder: "Company",
180
- required: true,
181
- error: !!errors.company,
182
- helperText: errors.company?.message,
183
- variant
184
- }
185
- ) }),
186
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
187
- Input,
188
- {
189
- id: "title",
190
- ...register("title", { required: true }),
191
- label: "Title",
192
- sizes: "medium",
193
- placeholder: "Title",
194
- required: true,
195
- error: !!errors.title,
196
- helperText: errors.title?.message,
197
- variant
198
- }
199
- ) })
200
- ] }),
201
- children,
202
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
203
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
204
- Button,
205
- {
206
- color: getVariant(callToAction?.variant),
207
- as: "button",
208
- type: "submit",
209
- disabled: !isValid || isSubmitting,
210
- children: callToAction?.displayText
211
- }
212
- ) })
213
- ] })
143
+ ) }),
144
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
145
+ Input,
146
+ {
147
+ id: "last_name",
148
+ ...register("last_name", { required: true }),
149
+ label: "Last Name",
150
+ sizes: "medium",
151
+ placeholder: "Last Name",
152
+ required: true,
153
+ error: !!errors.last_name,
154
+ helperText: errors.last_name?.message,
155
+ variant
156
+ }
157
+ ) }),
158
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
159
+ Input,
160
+ {
161
+ id: "email",
162
+ ...register("email", {
163
+ required: true,
164
+ validate: {
165
+ isValid: associatedEmail
166
+ }
167
+ }),
168
+ label: "Email",
169
+ sizes: "medium",
170
+ placeholder: "Email",
171
+ required: true,
172
+ error: !!errors.email,
173
+ helperText: errors.email?.message,
174
+ variant
175
+ }
176
+ ) }),
177
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
178
+ InputPhone,
179
+ {
180
+ id: "phone",
181
+ ...register("phone", { required: true, maxLength: 12 }),
182
+ label: "Phone",
183
+ sizes: "medium",
184
+ placeholder: "Phone",
185
+ required: true,
186
+ error: !!errors.phone,
187
+ helperText: errors.phone?.message,
188
+ variant
189
+ }
190
+ ) }),
191
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
192
+ Input,
193
+ {
194
+ id: "company",
195
+ ...register("company", { required: true }),
196
+ label: "Company",
197
+ sizes: "medium",
198
+ placeholder: "Company",
199
+ required: true,
200
+ error: !!errors.company,
201
+ helperText: errors.company?.message,
202
+ variant
203
+ }
204
+ ) }),
205
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
206
+ Input,
207
+ {
208
+ id: "title",
209
+ ...register("title", { required: true }),
210
+ label: "Title",
211
+ sizes: "medium",
212
+ placeholder: "Title",
213
+ required: true,
214
+ error: !!errors.title,
215
+ helperText: errors.title?.message,
216
+ variant
217
+ }
218
+ ) }),
219
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
220
+ ] }),
221
+ children,
222
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
223
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
224
+ Button,
225
+ {
226
+ color: getVariant(callToAction?.variant),
227
+ as: "button",
228
+ type: "submit",
229
+ disabled: !isValid || isSubmitting,
230
+ children: callToAction?.displayText
231
+ }
232
+ ) })
233
+ ]
234
+ }
235
+ )
214
236
  ] }) }) }, id);
215
237
  };
216
238
  export {
@@ -6,4 +6,4 @@ export type Inputs = {
6
6
  email: string;
7
7
  phone: string;
8
8
  };
9
- export declare const ContactUs: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ContactUs: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -32,6 +32,7 @@ import clsx from "clsx";
32
32
  import { useForm, FormProvider } from "react-hook-form";
33
33
  import * as z from "zod";
34
34
  import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
35
+ import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
35
36
  import { SalesforceSchema } from "./SalesforceFieldsForm.js";
36
37
  const ContactUs = ({
37
38
  icon = false,
@@ -45,6 +46,7 @@ const ContactUs = ({
45
46
  description,
46
47
  callToAction,
47
48
  validateEmail,
49
+ onValidate,
48
50
  id
49
51
  }) => {
50
52
  const schema = z.object({
@@ -70,8 +72,16 @@ const ContactUs = ({
70
72
  return removeDashes;
71
73
  })
72
74
  });
75
+ const gen_schema = schema.merge(SalesforceSchema).merge(honeyPotSchema).superRefine((data, ctx) => {
76
+ if (!isValidHoneyPot(data)) {
77
+ ctx.addIssue({
78
+ code: z.ZodIssueCode.custom,
79
+ message: "fields are not valid."
80
+ });
81
+ }
82
+ });
73
83
  const methods = useForm({
74
- resolver: zodResolver(schema.merge(SalesforceSchema), {
84
+ resolver: zodResolver(gen_schema, {
75
85
  async: true
76
86
  }),
77
87
  mode: "all",
@@ -100,83 +110,95 @@ const ContactUs = ({
100
110
  }
101
111
  )
102
112
  ] }),
103
- /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
104
- /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
105
- /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
106
- Input,
107
- {
108
- id: "first_name",
109
- ...register("first_name", { required: true }),
110
- label: "First Name",
111
- sizes: "medium",
112
- placeholder: "First Name",
113
- required: true,
114
- error: !!errors.first_name,
115
- helperText: errors.first_name?.message,
116
- variant
117
- }
118
- ) }),
119
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
120
- Input,
121
- {
122
- id: "last_name",
123
- ...register("last_name", { required: true }),
124
- label: "Last Name",
125
- sizes: "medium",
126
- placeholder: "Last Name",
127
- required: true,
128
- error: !!errors.last_name,
129
- helperText: errors.last_name?.message,
130
- variant
131
- }
132
- ) }),
133
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
134
- Input,
135
- {
136
- id: "email",
137
- ...register("email", {
138
- required: true,
139
- validate: {
140
- isValid: associatedEmail
113
+ /* @__PURE__ */ jsxs(
114
+ "form",
115
+ {
116
+ className: form,
117
+ onSubmit: async (e) => {
118
+ onValidate && onValidate(e);
119
+ await handleSubmit(submitForm)(e);
120
+ e.preventDefault();
121
+ },
122
+ children: [
123
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
124
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
125
+ Input,
126
+ {
127
+ id: "first_name",
128
+ ...register("first_name", { required: true }),
129
+ label: "First Name",
130
+ sizes: "medium",
131
+ placeholder: "First Name",
132
+ required: true,
133
+ error: !!errors.first_name,
134
+ helperText: errors.first_name?.message,
135
+ variant
141
136
  }
142
- }),
143
- label: "Email",
144
- sizes: "medium",
145
- placeholder: "Email",
146
- required: true,
147
- error: !!errors.email,
148
- helperText: errors.email?.message,
149
- variant
150
- }
151
- ) }),
152
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
153
- InputPhone,
154
- {
155
- id: "phone",
156
- ...register("phone", { required: true, maxLength: 12 }),
157
- label: "Phone",
158
- sizes: "medium",
159
- placeholder: "Phone",
160
- required: true,
161
- error: !!errors.phone,
162
- helperText: errors.phone?.message,
163
- variant
164
- }
165
- ) })
166
- ] }),
167
- children,
168
- /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
169
- /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
170
- Button,
171
- {
172
- color: getVariant(callToAction?.variant),
173
- as: "button",
174
- type: "submit",
175
- disabled: !isValid || isSubmitting,
176
- children: callToAction?.displayText
177
- }
178
- ) })
179
- ] })
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
+ placeholder: "Last Name",
146
+ required: true,
147
+ error: !!errors.last_name,
148
+ helperText: errors.last_name?.message,
149
+ variant
150
+ }
151
+ ) }),
152
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
153
+ Input,
154
+ {
155
+ id: "email",
156
+ ...register("email", {
157
+ required: true,
158
+ validate: {
159
+ isValid: associatedEmail
160
+ }
161
+ }),
162
+ label: "Email",
163
+ sizes: "medium",
164
+ placeholder: "Email",
165
+ required: true,
166
+ error: !!errors.email,
167
+ helperText: errors.email?.message,
168
+ variant
169
+ }
170
+ ) }),
171
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
172
+ InputPhone,
173
+ {
174
+ id: "phone",
175
+ ...register("phone", { required: true, maxLength: 12 }),
176
+ label: "Phone",
177
+ sizes: "medium",
178
+ placeholder: "Phone",
179
+ required: true,
180
+ error: !!errors.phone,
181
+ helperText: errors.phone?.message,
182
+ variant
183
+ }
184
+ ) }),
185
+ /* @__PURE__ */ jsx(HoneyPot, { register, variant })
186
+ ] }),
187
+ children,
188
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
189
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
190
+ Button,
191
+ {
192
+ color: getVariant(callToAction?.variant),
193
+ as: "button",
194
+ type: "submit",
195
+ disabled: !isValid || isSubmitting,
196
+ children: callToAction?.displayText
197
+ }
198
+ ) })
199
+ ]
200
+ }
201
+ )
180
202
  ] }) }) }, id);
181
203
  };
182
204
  export {
@@ -10,4 +10,4 @@ export type ContactUsAASInputs = {
10
10
  Role__c: string;
11
11
  description: string;
12
12
  };
13
- export declare const ContactUsAAS: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const ContactUsAAS: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, onValidate, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;