@axos-web-dev/shared-components 0.0.147 → 0.0.148

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 (69) hide show
  1. package/dist/ATMLocator/ATMLocator.js +5 -3
  2. package/dist/Button/Button.js +5 -2
  3. package/dist/Calculators/Calculator.js +3 -1
  4. package/dist/Carousel/index.js +3 -1
  5. package/dist/Chevron/index.js +5 -2
  6. package/dist/Comparison/Comparison.js +6 -4
  7. package/dist/FaqAccordion/index.js +6 -4
  8. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +3 -1
  9. package/dist/Forms/ApplicationStart.js +2 -2
  10. package/dist/Forms/ClearingForm.js +2 -2
  11. package/dist/Forms/CommercialDeposits.js +2 -2
  12. package/dist/Forms/CommercialLending.js +2 -2
  13. package/dist/Forms/ContactCompany.js +2 -2
  14. package/dist/Forms/ContactUs.js +2 -2
  15. package/dist/Forms/ContactUsAAS.js +2 -2
  16. package/dist/Forms/ContactUsBusiness.js +5 -3
  17. package/dist/Forms/ContactUsNMLSId.js +5 -3
  18. package/dist/Forms/CpraRequest.js +2 -2
  19. package/dist/Forms/DealerServices.js +2 -2
  20. package/dist/Forms/EmailOnly.js +5 -3
  21. package/dist/Forms/Forms.css.d.ts +13 -0
  22. package/dist/Forms/Forms.css.js +26 -0
  23. package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +26 -0
  24. package/dist/Forms/MortgageRate/MortgageRateForm.js +735 -0
  25. package/dist/Forms/MortgageRate/MortgageRateModal.d.ts +16 -0
  26. package/dist/Forms/MortgageRate/MortgageRateModal.js +65 -0
  27. package/dist/Forms/MortgageRate/MortgageRateQuoteFilters.d.ts +16 -0
  28. package/dist/Forms/MortgageRate/MortgageRateQuoteFilters.js +428 -0
  29. package/dist/Forms/MortgageRate/MortgageRateWatch.d.ts +28 -0
  30. package/dist/Forms/MortgageRate/MortgageRateWatch.js +484 -0
  31. package/dist/Forms/QuickPricer.js +2 -2
  32. package/dist/Forms/ScheduleCall.js +2 -2
  33. package/dist/Forms/ScheduleCallPremier.js +2 -2
  34. package/dist/Forms/SuccesForm.js +3 -1
  35. package/dist/Forms/WcplSurvey.js +2 -2
  36. package/dist/Forms/index.d.ts +4 -0
  37. package/dist/Forms/index.js +24 -1
  38. package/dist/Hyperlink/index.js +3 -1
  39. package/dist/ImageLink/ImageLink.js +5 -3
  40. package/dist/ImageLink/ImageLinkSet.js +5 -3
  41. package/dist/ImageLink/index.js +3 -1
  42. package/dist/Input/CurrencyInput.js +2 -2
  43. package/dist/Input/DownPaymentInput.d.ts +12 -0
  44. package/dist/Input/DownPaymentInput.js +123 -0
  45. package/dist/Input/Dropdown.css.d.ts +5 -0
  46. package/dist/Input/Dropdown.css.js +3 -0
  47. package/dist/Input/Input.js +3 -1
  48. package/dist/Input/InputAmount.js +2 -2
  49. package/dist/Input/InputPhone.js +2 -2
  50. package/dist/Input/InputProps.d.ts +3 -0
  51. package/dist/Input/index.d.ts +1 -0
  52. package/dist/Input/index.js +4 -1
  53. package/dist/Insight/Featured/CategorySelector.js +3 -1
  54. package/dist/Insight/Featured/Featured.js +3 -1
  55. package/dist/Interstitial/Interstitial.module.js +14 -11
  56. package/dist/Modal/Modal.js +5 -3
  57. package/dist/NavigationMenu/AxosBank/NavData.js +3 -1
  58. package/dist/NavigationMenu/AxosBank/SubNavBar.js +3 -1
  59. package/dist/NavigationMenu/AxosBank/index.js +5 -3
  60. package/dist/SetContainer/SetContainer.js +5 -3
  61. package/dist/Table/Table.css.d.ts +1 -0
  62. package/dist/Table/Table.css.js +2 -0
  63. package/dist/Table/index.js +2 -1
  64. package/dist/assets/Forms/Forms.css +81 -3
  65. package/dist/assets/Input/Dropdown.css +3 -0
  66. package/dist/assets/Interstitial/Interstitial.css.css +141 -137
  67. package/dist/assets/Table/Table.css +6 -0
  68. package/dist/main.js +29 -5
  69. package/package.json +124 -124
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { RateWatchInputs } from '../MortgageRate/MortgageRateWatch';
3
+
4
+ type MortgageRateModalProps = {
5
+ email: string;
6
+ lastName: string;
7
+ rateWatchOnSubmit: (values: RateWatchInputs & {
8
+ email: string;
9
+ lastName: string;
10
+ }) => Promise<void>;
11
+ isOpen: boolean;
12
+ toggleModal: () => void;
13
+ isSubmitting?: boolean;
14
+ };
15
+ declare const MortgageRateModal: React.FC<MortgageRateModalProps>;
16
+ export default MortgageRateModal;
@@ -0,0 +1,65 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { RateWatchForm } from "./MortgageRateWatch.js";
3
+ import { LoadingIndicator } from "../../LoadingIndicator/index.js";
4
+ import { marketing_tile } from "../../Interstitial/Interstitial-variants.css.js";
5
+ import css from "../../Interstitial/Interstitial.module.js";
6
+ const MortgageRateModal = ({
7
+ email,
8
+ lastName,
9
+ rateWatchOnSubmit,
10
+ isOpen,
11
+ toggleModal,
12
+ isSubmitting
13
+ }) => {
14
+ if (!isOpen) return null;
15
+ return /* @__PURE__ */ jsx(
16
+ "div",
17
+ {
18
+ className: `${marketing_tile} ${css.overlay} ${css.white_modal} active interstitial`,
19
+ onClick: toggleModal,
20
+ children: /* @__PURE__ */ jsxs(
21
+ "div",
22
+ {
23
+ className: `${css.modal} active ${css.modalMobile}`,
24
+ role: "dialog",
25
+ "aria-modal": "true",
26
+ tabIndex: -1,
27
+ onClick: (e) => e.stopPropagation(),
28
+ children: [
29
+ /* @__PURE__ */ jsx(
30
+ "button",
31
+ {
32
+ className: css.close_button,
33
+ onClick: toggleModal,
34
+ "aria-label": "Close modal",
35
+ children: "×"
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsxs("div", { className: `${css.modal_content} text_center`, children: [
39
+ /* @__PURE__ */ jsx("h2", { className: `header_3`, children: "Set Up Rate Watch" }),
40
+ /* @__PURE__ */ jsx("div", { className: css.body_copy, children: "We have assumed you will use the same criteria you used for your rate search." }),
41
+ isSubmitting ? /* @__PURE__ */ jsx(
42
+ LoadingIndicator,
43
+ {
44
+ style: { marginInline: "auto" },
45
+ variant: "primary"
46
+ }
47
+ ) : /* @__PURE__ */ jsx(
48
+ RateWatchForm,
49
+ {
50
+ email,
51
+ lastName,
52
+ rateWatchOnSubmit,
53
+ toggleModal
54
+ }
55
+ )
56
+ ] })
57
+ ]
58
+ }
59
+ )
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ MortgageRateModal as default
65
+ };
@@ -0,0 +1,16 @@
1
+ export type MortgageRateFilterInputs = {
2
+ loanPurpose: number;
3
+ propertyType: string;
4
+ occupancy: string;
5
+ salesPrice: number;
6
+ downPayment: number;
7
+ creditScore: string;
8
+ zipCode: number;
9
+ appraisedValue: number;
10
+ mortgageBalance: number;
11
+ cashOut: number;
12
+ };
13
+ export declare const MortgageRateFilters: ({ onSubmit, initialLoanPurpose, }: {
14
+ onSubmit?: ((values: MortgageRateFilterInputs) => void) | undefined;
15
+ initialLoanPurpose?: number | undefined;
16
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,428 @@
1
+ "use client";
2
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import { Button } from "../../Button/Button.js";
5
+ import "../../Button/Button.css.js";
6
+ import { useState, useEffect } from "react";
7
+ import "react-use";
8
+ import "../../Input/Checkbox.js";
9
+ import "../../Input/CurrencyInput.js";
10
+ import { Dropdown } from "../../Input/Dropdown.js";
11
+ import { dp_input } from "../../Input/Dropdown.css.js";
12
+ import { Input } from "../../Input/Input.js";
13
+ import "../../Input/Input.css.js";
14
+ import "../../Input/InputAmount.js";
15
+ import "../../Input/InputPhone.js";
16
+ import "../../Input/InputTextArea.js";
17
+ import { DownPaymentInput } from "../../Input/DownPaymentInput.js";
18
+ import clsx from "clsx";
19
+ import { useForm, FormProvider } from "react-hook-form";
20
+ import * as z from "zod";
21
+ import { formContainer, headerContainer, headerForm, form, formWrapper, fullRowForm, actions } from "../Forms.css.js";
22
+ import { SalesforceSchema } from "../SalesforceFieldsForm.js";
23
+ import { LoadingIndicator } from "../../LoadingIndicator/index.js";
24
+ const MortgageRateFilters = ({
25
+ onSubmit = (values) => {
26
+ console.log(values);
27
+ },
28
+ initialLoanPurpose = 1
29
+ }) => {
30
+ const [loanPurpose, setLoanPurpose] = useState(initialLoanPurpose);
31
+ const [salesPriceVal, setSalesPriceVal] = useState(0);
32
+ const [isTypingDownPayment, setIsTypingDownPayment] = useState(false);
33
+ const [downPaymentPercentage, setDownPaymentPercentage] = useState(10);
34
+ const [_downPayment, setDownPayment] = useState(0);
35
+ const schema = z.object({
36
+ loanPurpose: z.number({ message: "Loan Purpose is required." }).positive({ message: "Loan Purpose is required." }),
37
+ propertyType: z.number({ message: "Property Type is required." }).positive({ message: "Property Type is required." }),
38
+ occupancy: z.number({ message: "Property Usage is required." }).positive({ message: "Property Usage is required." }),
39
+ salesPrice: z.number({ message: "Purchase Price is required." }).optional().refine((val) => loanPurpose === 1 ? val != null : true, {
40
+ message: "Sales Price is required."
41
+ }).refine(
42
+ (val) => {
43
+ if (loanPurpose === 1) {
44
+ return val != null && val >= 5e4 && val <= 25e6;
45
+ }
46
+ return true;
47
+ },
48
+ { message: "Value must be between $50,000 and $25,000,000." }
49
+ ),
50
+ downPayment: z.number({ message: "Down Payment is required." }).optional().refine((val) => loanPurpose === 1 ? val != null : true, {
51
+ message: "Down Payment is required."
52
+ }).refine(
53
+ (val) => {
54
+ if (loanPurpose === 1) {
55
+ return val != null && val >= salesPriceVal * 0.01 && val <= salesPriceVal;
56
+ }
57
+ return true;
58
+ },
59
+ {
60
+ message: `Value must be between ${salesPriceVal * 0.01} and ${salesPriceVal}.`
61
+ }
62
+ ),
63
+ creditScore: z.number({ message: "Credit Score is required." }).positive({ message: "Credit Score is required." }),
64
+ zipCode: z.number().positive({ message: "Zip Code is required." }),
65
+ appraisedValue: z.number({ message: "Home Price is required." }).optional().refine(
66
+ (val) => {
67
+ if (loanPurpose === 2 && val == null) {
68
+ return false;
69
+ }
70
+ return true;
71
+ },
72
+ { message: "Appraised Value is required for refinance" }
73
+ ),
74
+ mortgageBalance: z.number({ message: "Mortgage Balance is required." }).optional().refine(
75
+ (val) => {
76
+ if (loanPurpose === 2 && val == null) {
77
+ return false;
78
+ }
79
+ return true;
80
+ },
81
+ { message: "Mortgage Balance is required for refinance" }
82
+ ),
83
+ cashOut: z.number({ message: "Cash Out is required." }).optional().refine(
84
+ (val) => {
85
+ if (loanPurpose === 2 && val == null) {
86
+ return false;
87
+ }
88
+ return true;
89
+ },
90
+ { message: "Cash Out is required for refinance" }
91
+ )
92
+ });
93
+ const methods = useForm({
94
+ resolver: zodResolver(schema.merge(SalesforceSchema), {
95
+ async: true
96
+ }),
97
+ mode: "all"
98
+ });
99
+ const {
100
+ handleSubmit,
101
+ register,
102
+ formState: { errors, isValid, isSubmitting },
103
+ watch
104
+ } = methods;
105
+ const salesPrice = watch("salesPrice");
106
+ useEffect(() => {
107
+ setSalesPriceVal(salesPrice);
108
+ });
109
+ useEffect(() => {
110
+ if (salesPrice > 0 && !isTypingDownPayment) {
111
+ const calculatedDownPayment = Math.round(
112
+ salesPrice * downPaymentPercentage / 100
113
+ );
114
+ if (!isTypingDownPayment) setDownPayment(calculatedDownPayment);
115
+ methods.setValue("downPayment", calculatedDownPayment);
116
+ }
117
+ }, [salesPrice, downPaymentPercentage]);
118
+ const submitForm = async (data) => {
119
+ const processData = {
120
+ ...data
121
+ };
122
+ await onSubmit(processData);
123
+ };
124
+ const formatCurrency = (value) => {
125
+ return `$${value.toLocaleString()}`;
126
+ };
127
+ const parseCurrency = (value) => {
128
+ if (typeof value === "string") {
129
+ const cleanedValue = value?.replace(/[^0-9.-]+/g, "");
130
+ return cleanedValue ? Number(cleanedValue) : 0;
131
+ }
132
+ return value;
133
+ };
134
+ return /* @__PURE__ */ jsx(
135
+ "section",
136
+ {
137
+ className: clsx(formContainer({ variant: "tertiary" }), "section_spacer"),
138
+ children: /* @__PURE__ */ jsx("div", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
139
+ /* @__PURE__ */ jsx("div", { className: clsx(headerContainer, "text_center"), children: /* @__PURE__ */ jsx(
140
+ "h2",
141
+ {
142
+ className: clsx("header_2", headerForm({ variant: "tertiary" })),
143
+ children: "Use the available options to create your personalized rate quote."
144
+ }
145
+ ) }),
146
+ /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
147
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant: "tertiary" })), children: [
148
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
149
+ Dropdown,
150
+ {
151
+ id: "loanPurpose",
152
+ ...register("loanPurpose", {
153
+ required: true,
154
+ setValueAs: (value) => Number(value)
155
+ }),
156
+ label: "Loan Purpose",
157
+ sizes: "medium",
158
+ required: true,
159
+ error: !!errors.loanPurpose,
160
+ helperText: errors.loanPurpose?.message,
161
+ variant: "tertiary",
162
+ onChange: (e) => {
163
+ const value = Number(e.target.value);
164
+ setLoanPurpose(value);
165
+ },
166
+ defaultValue: loanPurpose === 2 ? "2" : "1",
167
+ children: [
168
+ /* @__PURE__ */ jsx("option", { value: "1", children: "Purchase" }),
169
+ /* @__PURE__ */ jsx("option", { value: "2", children: "Refinance" })
170
+ ]
171
+ }
172
+ ) }),
173
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
174
+ Dropdown,
175
+ {
176
+ id: "propertyType",
177
+ ...register("propertyType", {
178
+ required: true,
179
+ setValueAs: (value) => Number(value)
180
+ }),
181
+ label: "Property Type",
182
+ sizes: "medium",
183
+ required: true,
184
+ error: !!errors.propertyType,
185
+ helperText: errors.propertyType?.message,
186
+ variant: "tertiary",
187
+ defaultValue: "Select option",
188
+ children: [
189
+ /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
190
+ /* @__PURE__ */ jsx("option", { value: "1", children: "Single Family Home" }),
191
+ /* @__PURE__ */ jsx("option", { value: "3", children: "Condo" }),
192
+ /* @__PURE__ */ jsx("option", { value: "5", children: "Hi-Rise Condo" }),
193
+ /* @__PURE__ */ jsx("option", { value: "2", children: "Co-op" }),
194
+ /* @__PURE__ */ jsx("option", { value: "4", children: "2-4 Unit" }),
195
+ /* @__PURE__ */ jsx("option", { value: "6", children: "Manufactured" })
196
+ ]
197
+ }
198
+ ) }),
199
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
200
+ Dropdown,
201
+ {
202
+ id: "occupancy",
203
+ ...register("occupancy", {
204
+ required: true,
205
+ setValueAs: (value) => Number(value)
206
+ }),
207
+ label: "Property Usage",
208
+ sizes: "medium",
209
+ required: true,
210
+ error: !!errors.occupancy,
211
+ helperText: errors.occupancy?.message,
212
+ variant: "tertiary",
213
+ defaultValue: "Select option",
214
+ children: [
215
+ /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
216
+ /* @__PURE__ */ jsx("option", { value: "1", children: "Primary Residence" }),
217
+ /* @__PURE__ */ jsx("option", { value: "2", children: "Vacation Home" }),
218
+ /* @__PURE__ */ jsx("option", { value: "3", children: "Investment" })
219
+ ]
220
+ }
221
+ ) }),
222
+ loanPurpose === 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
223
+ /* @__PURE__ */ jsx("div", { className: dp_input(), children: /* @__PURE__ */ jsx(
224
+ Input,
225
+ {
226
+ id: "salesPrice",
227
+ type: "text",
228
+ ...register("salesPrice", {
229
+ required: true,
230
+ setValueAs: (value) => parseCurrency(value)
231
+ }),
232
+ label: "Purchase Price",
233
+ sizes: "medium",
234
+ required: true,
235
+ error: !!errors.salesPrice,
236
+ helperText: errors.salesPrice?.message,
237
+ variant: "tertiary",
238
+ onBlur: (e) => {
239
+ setIsTypingDownPayment(false);
240
+ const rawValue = e.target.value;
241
+ const parsedValue = parseCurrency(rawValue);
242
+ if (parsedValue === 0) {
243
+ methods.setError("salesPrice", {
244
+ type: "manual",
245
+ message: "Purchase Price is required."
246
+ });
247
+ } else {
248
+ methods.setValue("salesPrice", parsedValue);
249
+ e.target.value = formatCurrency(parsedValue);
250
+ }
251
+ methods.trigger("downPayment");
252
+ },
253
+ onFocus: (e) => {
254
+ const currentValue = e.target.value;
255
+ e.target.value = currentValue.replace(/[$,]/g, "");
256
+ }
257
+ }
258
+ ) }),
259
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
260
+ DownPaymentInput,
261
+ {
262
+ id: "downPayment",
263
+ type: "text",
264
+ ...register("downPayment", {
265
+ required: true,
266
+ setValueAs: (value) => parseCurrency(value)
267
+ }),
268
+ salesPrice: watch("salesPrice"),
269
+ downPaymentPercentage,
270
+ setDownPaymentPercentage,
271
+ label: "Down Payment",
272
+ sizes: "medium",
273
+ error: !!errors.downPayment,
274
+ helperText: errors.downPayment?.message,
275
+ onChange: (e) => {
276
+ const value = parseCurrency(e.target.value);
277
+ methods.setValue("downPayment", value);
278
+ },
279
+ variant: "tertiary",
280
+ isTypingDownPayment,
281
+ setIsTypingDownPayment,
282
+ methods
283
+ }
284
+ ) })
285
+ ] }),
286
+ loanPurpose === 2 && /* @__PURE__ */ jsxs(Fragment, { children: [
287
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
288
+ Input,
289
+ {
290
+ id: "appraisedValue",
291
+ type: "number",
292
+ ...register("appraisedValue", {
293
+ required: true,
294
+ setValueAs: (value) => parseCurrency(value)
295
+ }),
296
+ label: "Home Value",
297
+ sizes: "medium",
298
+ required: true,
299
+ variant: "tertiary",
300
+ error: !!errors.appraisedValue,
301
+ helperText: errors.appraisedValue?.message,
302
+ onBlur: (e) => {
303
+ const rawValue = e.target.value;
304
+ const parsedValue = parseCurrency(rawValue);
305
+ methods.setValue("appraisedValue", parsedValue);
306
+ e.target.value = formatCurrency(parsedValue);
307
+ },
308
+ onFocus: (e) => {
309
+ const currentValue = e.target.value;
310
+ e.target.value = currentValue.replace(/[$,]/g, "");
311
+ }
312
+ }
313
+ ) }),
314
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
315
+ Input,
316
+ {
317
+ id: "mortgageBalance",
318
+ type: "number",
319
+ ...register("mortgageBalance", {
320
+ required: true,
321
+ setValueAs: (value) => parseCurrency(value)
322
+ }),
323
+ label: "Mortgage Balance",
324
+ sizes: "medium",
325
+ required: true,
326
+ variant: "tertiary",
327
+ error: !!errors.mortgageBalance,
328
+ helperText: errors.mortgageBalance?.message,
329
+ onBlur: (e) => {
330
+ const rawValue = e.target.value;
331
+ const parsedValue = parseCurrency(rawValue);
332
+ methods.setValue("cashOut", parsedValue);
333
+ e.target.value = formatCurrency(parsedValue);
334
+ },
335
+ onFocus: (e) => {
336
+ const currentValue = e.target.value;
337
+ e.target.value = currentValue.replace(/[$,]/g, "");
338
+ }
339
+ }
340
+ ) })
341
+ ] }),
342
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
343
+ Dropdown,
344
+ {
345
+ id: "creditScore",
346
+ ...register("creditScore", {
347
+ required: true,
348
+ setValueAs: (value) => Number(value)
349
+ }),
350
+ label: "Credit Score",
351
+ sizes: "medium",
352
+ required: true,
353
+ error: !!errors.creditScore,
354
+ helperText: errors.creditScore?.message,
355
+ variant: "tertiary",
356
+ defaultValue: "Select option",
357
+ children: [
358
+ /* @__PURE__ */ jsx("option", { disabled: true, value: "Select option", children: "Select Option" }),
359
+ /* @__PURE__ */ jsx("option", { value: "740", children: "740+" }),
360
+ /* @__PURE__ */ jsx("option", { value: "720", children: "739-720" }),
361
+ /* @__PURE__ */ jsx("option", { value: "700", children: "719-700" }),
362
+ /* @__PURE__ */ jsx("option", { value: "680", children: "699-680" }),
363
+ /* @__PURE__ */ jsx("option", { value: "660", children: "679-660" }),
364
+ /* @__PURE__ */ jsx("option", { value: "640", children: "659-640" }),
365
+ /* @__PURE__ */ jsx("option", { value: "620", children: "639-620" }),
366
+ /* @__PURE__ */ jsx("option", { value: "600", children: "Below 620" })
367
+ ]
368
+ }
369
+ ) }),
370
+ /* @__PURE__ */ jsx("div", { className: loanPurpose === 1 ? fullRowForm : "", children: /* @__PURE__ */ jsx(
371
+ Input,
372
+ {
373
+ id: "zipCode",
374
+ type: "number",
375
+ ...register("zipCode", {
376
+ required: true,
377
+ setValueAs: (value) => Number(value)
378
+ }),
379
+ label: "Zip Code",
380
+ sizes: "medium",
381
+ required: true,
382
+ error: !!errors.zipCode,
383
+ helperText: errors.zipCode?.message,
384
+ variant: "tertiary"
385
+ }
386
+ ) }),
387
+ loanPurpose === 2 ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
388
+ Input,
389
+ {
390
+ id: "cashOut",
391
+ type: "number",
392
+ ...register("cashOut", {
393
+ required: true,
394
+ setValueAs: (value) => Number(value)
395
+ }),
396
+ label: "Cash Out (Optional)",
397
+ sizes: "medium",
398
+ required: true,
399
+ error: !!errors.cashOut,
400
+ helperText: errors.cashOut?.message,
401
+ variant: "tertiary"
402
+ }
403
+ ) }) }) : null
404
+ ] }),
405
+ /* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
406
+ LoadingIndicator,
407
+ {
408
+ style: { marginInline: "auto" },
409
+ variant: "tertiary"
410
+ }
411
+ ) : /* @__PURE__ */ jsx(
412
+ Button,
413
+ {
414
+ color: "secondary",
415
+ as: "button",
416
+ type: "submit",
417
+ disabled: !isValid || isSubmitting,
418
+ children: "Apply Filters"
419
+ }
420
+ ) })
421
+ ] })
422
+ ] }) })
423
+ }
424
+ );
425
+ };
426
+ export {
427
+ MortgageRateFilters
428
+ };
@@ -0,0 +1,28 @@
1
+ export type RateWatchInputs = {
2
+ updateType: "Target Rate" | "Frequency";
3
+ updateCadence: "Daily" | "Weekly" | "Monthly";
4
+ loanTerms?: string;
5
+ hasSmsConsent: boolean;
6
+ tR1DesiredRate?: string;
7
+ tR1DiscountPoints?: string;
8
+ tR1LoanTerm?: string;
9
+ tR2DesiredRate?: string;
10
+ tR2DiscountPoints?: string;
11
+ tR2LoanTerm?: string;
12
+ tR3DesiredRate?: string;
13
+ tR3DiscountPoints?: string;
14
+ tR3LoanTerm?: string;
15
+ email: string;
16
+ lastName: string;
17
+ };
18
+ type RateWatchFormProps = {
19
+ email: string;
20
+ lastName: string;
21
+ rateWatchOnSubmit: (values: RateWatchInputs & {
22
+ email: string;
23
+ lastName: string;
24
+ }) => void;
25
+ toggleModal: () => void;
26
+ };
27
+ export declare const RateWatchForm: ({ email, lastName, rateWatchOnSubmit, toggleModal, }: RateWatchFormProps) => import("react/jsx-runtime").JSX.Element;
28
+ export {};