@axos-web-dev/shared-components 0.0.133 → 0.0.135
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.
- package/dist/FdicCallout/FdicCallout.module.js +2 -2
- package/dist/FdicCallout/index.js +13 -16
- package/dist/Forms/BlendPurchase.d.ts +11 -0
- package/dist/Forms/BlendPurchase.js +215 -0
- package/dist/Forms/BlendRefinance.d.ts +11 -0
- package/dist/Forms/BlendRefinance.js +215 -0
- package/dist/Forms/FormEnums.js +3 -2
- package/dist/Forms/QuickPricer.d.ts +17 -13
- package/dist/Forms/QuickPricer.js +203 -114
- package/dist/Forms/SalesforceFieldsForm.d.ts +5 -0
- package/dist/Forms/SalesforceFieldsForm.js +10 -0
- package/dist/Input/DatePicker.css.d.ts +1 -0
- package/dist/Input/DatePicker.css.js +6 -0
- package/dist/Input/Datepicker.d.ts +3 -0
- package/dist/Input/Datepicker.js +47 -0
- package/dist/Input/InputDate.css.d.ts +6 -0
- package/dist/Input/InputDate.css.js +15 -0
- package/dist/Input/InputDate.d.ts +3 -0
- package/dist/Input/InputDate.js +47 -0
- package/dist/Input/InputProps.d.ts +6 -0
- package/dist/Table/Table.d.ts +1 -2
- package/dist/assets/FdicCallout/FdicCallout.css.css +19 -21
- package/dist/assets/Input/DatePicker.css +95 -0
- package/dist/assets/Input/InputDate.css +39 -0
- package/dist/assets/Table/Table.css +2 -0
- package/package.json +1 -1
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import css from "./FdicCallout.module.js";
|
|
3
3
|
const FdicBanner = () => {
|
|
4
|
-
return /* @__PURE__ */ jsx("header", { className: css.fdic_callout, children: /* @__PURE__ */ jsx("div", { className: css.inner_container, children: /* @__PURE__ */
|
|
4
|
+
return /* @__PURE__ */ jsx("header", { className: css.fdic_callout, children: /* @__PURE__ */ jsx("div", { className: css.inner_container, children: /* @__PURE__ */ jsx("div", { className: "flex middle", children: /* @__PURE__ */ jsxs("picture", { children: [
|
|
5
5
|
/* @__PURE__ */ jsx(
|
|
6
|
-
"
|
|
6
|
+
"source",
|
|
7
7
|
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
viewBox: "0 0 39 16",
|
|
11
|
-
fill: "none",
|
|
12
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
-
children: /* @__PURE__ */ jsx(
|
|
14
|
-
"path",
|
|
15
|
-
{
|
|
16
|
-
d: "M34.8999 3.9C36.1999 3.9 37.3999 4.5 38.1999 5.6V0.8C37.0999 0.3 35.9999 0 34.6999 0C32.6999 0 30.5999 0.9 29.1999 2.4C27.7999 4 27.0999 6 27.0999 8C27.0999 10.2 27.7999 12.2 29.3999 13.7C30.8999 15.1 32.7999 15.9 34.8999 15.9C36.0999 15.9 36.9999 15.6 38.1999 15.2V10.5C37.3999 11.5 36.1999 12.1 34.8999 12.1C32.4999 12.1 30.9999 10.4 30.9999 8C30.9999 5.6 32.5999 3.9 34.8999 3.9ZM22.7999 15.6H26.5999V0.5H22.7999V15.6ZM14.0999 12.2H13.1999V3.8H14.0999C16.4999 3.8 18.2999 5.3 18.2999 8C18.2999 10.9 16.3999 12.2 14.0999 12.2ZM14.8999 0.5H9.4999V15.6H14.8999C18.8999 15.6 22.2999 12.3 22.2999 8.1C22.2999 3.9 18.8999 0.5 14.8999 0.5ZM0.399902 15.5H4.1999V9.6H8.3999V6.3H4.1999V3.8H8.7999V0.5H0.399902V15.5Z",
|
|
17
|
-
fill: "#fff"
|
|
18
|
-
}
|
|
19
|
-
)
|
|
8
|
+
media: "(max-width:470px)",
|
|
9
|
+
srcSet: "https://images.axos.com/o9ov1v03uwqk/kntIyYva4pj4Lahj5IUiR/9a3f70731650a801033c3553a3c151d8/fdic-callout-mobile.png"
|
|
20
10
|
}
|
|
21
11
|
),
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
23
|
-
|
|
12
|
+
/* @__PURE__ */ jsx(
|
|
13
|
+
"img",
|
|
14
|
+
{
|
|
15
|
+
src: "https://images.axos.com/o9ov1v03uwqk/3ptbiM1tUeC10mwamc0Hvg/9d11b3170a9a42a853f7342199865260/fdic-callout.png",
|
|
16
|
+
alt: "fdic-insured - backed by the full faith and credit of the u.s. government",
|
|
17
|
+
className: "img_fluid"
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
] }) }) }) });
|
|
24
21
|
};
|
|
25
22
|
export {
|
|
26
23
|
FdicBanner
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormProps } from './FormProps';
|
|
2
|
+
|
|
3
|
+
export type BlendPurchaseInputs = {
|
|
4
|
+
property_Type: string;
|
|
5
|
+
Occupancy: string;
|
|
6
|
+
SalesPrice: string;
|
|
7
|
+
DownPayment: string;
|
|
8
|
+
CreditScore: string;
|
|
9
|
+
ZipCode: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const BlendPurchase: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } 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 "react";
|
|
7
|
+
import "react-use";
|
|
8
|
+
import "../Input/Checkbox.js";
|
|
9
|
+
import "../Input/CurrencyInput.js";
|
|
10
|
+
import "../Input/Dropdown.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import { Input } from "../Input/Input.js";
|
|
14
|
+
import "../Input/Input.css.js";
|
|
15
|
+
import "../Input/InputAmount.js";
|
|
16
|
+
import { InputPhone } from "../Input/InputPhone.js";
|
|
17
|
+
import "../Input/InputTextArea.js";
|
|
18
|
+
import "../icons/ArrowIcon/ArrowIcon.css.js";
|
|
19
|
+
import SvgAxosX from "../icons/AxosX/index.js";
|
|
20
|
+
import SvgComponent from "../icons/AxosX/Blue.js";
|
|
21
|
+
import "../icons/CheckIcon/CheckIcon.css.js";
|
|
22
|
+
/* empty css */
|
|
23
|
+
/* empty css */
|
|
24
|
+
/* empty css */
|
|
25
|
+
/* empty css */
|
|
26
|
+
import { associatedEmail } from "../utils/EverestValidity.js";
|
|
27
|
+
import "../utils/allowedAxosDomains.js";
|
|
28
|
+
import { getVariant } from "../utils/getVariant.js";
|
|
29
|
+
import clsx from "clsx";
|
|
30
|
+
import { useForm, FormProvider } from "react-hook-form";
|
|
31
|
+
import * as z from "zod";
|
|
32
|
+
import { formContainer, iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions } from "./Forms.css.js";
|
|
33
|
+
import { SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
34
|
+
const BlendPurchase = ({
|
|
35
|
+
icon = false,
|
|
36
|
+
children,
|
|
37
|
+
onSubmit = (values) => {
|
|
38
|
+
console.log(values);
|
|
39
|
+
},
|
|
40
|
+
disclosure,
|
|
41
|
+
variant: fullVariant = "primary",
|
|
42
|
+
headline,
|
|
43
|
+
description,
|
|
44
|
+
callToAction,
|
|
45
|
+
validateEmail,
|
|
46
|
+
id
|
|
47
|
+
}) => {
|
|
48
|
+
const schema = z.object({
|
|
49
|
+
property_Type: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "First Name is required." }),
|
|
50
|
+
Occupancy: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Last Name is required." }),
|
|
51
|
+
SalesPrice: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
|
|
52
|
+
DownPayment: z.string().regex(/[\d-]{10}/).min(10, { message: "Phone is required." }).max(12, { message: "Phone is required." }).transform((val, ctx) => {
|
|
53
|
+
const removeDashes = val.replace(/-/gi, "");
|
|
54
|
+
if (removeDashes.length !== 10) {
|
|
55
|
+
ctx.addIssue({
|
|
56
|
+
code: z.ZodIssueCode.custom,
|
|
57
|
+
message: "Phone must have at least 10 and no more than 10 characters."
|
|
58
|
+
});
|
|
59
|
+
return z.NEVER;
|
|
60
|
+
}
|
|
61
|
+
return removeDashes;
|
|
62
|
+
}),
|
|
63
|
+
CreditScore: z.string(),
|
|
64
|
+
ZipCode: z.string()
|
|
65
|
+
});
|
|
66
|
+
const methods = useForm({
|
|
67
|
+
resolver: zodResolver(schema.merge(SalesforceSchema), {
|
|
68
|
+
async: true
|
|
69
|
+
}),
|
|
70
|
+
mode: "all",
|
|
71
|
+
defaultValues: {}
|
|
72
|
+
});
|
|
73
|
+
const {
|
|
74
|
+
handleSubmit,
|
|
75
|
+
register,
|
|
76
|
+
formState: { errors, isValid, isSubmitting }
|
|
77
|
+
} = methods;
|
|
78
|
+
const submitForm = async (data) => {
|
|
79
|
+
await onSubmit(data);
|
|
80
|
+
};
|
|
81
|
+
const variant = getVariant(fullVariant);
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
"section",
|
|
84
|
+
{
|
|
85
|
+
id: `id_${id}`,
|
|
86
|
+
className: clsx(formContainer({ variant })),
|
|
87
|
+
children: /* @__PURE__ */ jsx("div", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
|
|
88
|
+
icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
|
|
89
|
+
/* @__PURE__ */ jsxs("div", { className: `${headerContainer} text_center`, children: [
|
|
90
|
+
/* @__PURE__ */ jsx("h2", { className: clsx("header_2", headerForm({ variant })), children: headline }),
|
|
91
|
+
description && /* @__PURE__ */ jsx(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: clsx(
|
|
95
|
+
"text_center",
|
|
96
|
+
form,
|
|
97
|
+
descriptionField({ variant })
|
|
98
|
+
),
|
|
99
|
+
children: description
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] }),
|
|
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: "property_Type",
|
|
109
|
+
...register("property_Type", { required: true }),
|
|
110
|
+
label: "Property Type",
|
|
111
|
+
sizes: "medium",
|
|
112
|
+
required: true,
|
|
113
|
+
error: !!errors.property_Type,
|
|
114
|
+
helperText: errors.property_Type?.message,
|
|
115
|
+
variant
|
|
116
|
+
}
|
|
117
|
+
) }),
|
|
118
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
119
|
+
Input,
|
|
120
|
+
{
|
|
121
|
+
id: "Occupancy",
|
|
122
|
+
...register("Occupancy", { required: true }),
|
|
123
|
+
label: "Property Usage",
|
|
124
|
+
sizes: "medium",
|
|
125
|
+
required: true,
|
|
126
|
+
error: !!errors.Occupancy,
|
|
127
|
+
helperText: errors.Occupancy?.message,
|
|
128
|
+
variant
|
|
129
|
+
}
|
|
130
|
+
) }),
|
|
131
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
132
|
+
Input,
|
|
133
|
+
{
|
|
134
|
+
id: "SalesPrice",
|
|
135
|
+
...register("SalesPrice", {
|
|
136
|
+
required: true,
|
|
137
|
+
validate: {
|
|
138
|
+
isValid: associatedEmail
|
|
139
|
+
}
|
|
140
|
+
}),
|
|
141
|
+
label: "Purchase Price",
|
|
142
|
+
sizes: "medium",
|
|
143
|
+
required: true,
|
|
144
|
+
error: !!errors.SalesPrice,
|
|
145
|
+
helperText: errors.SalesPrice?.message,
|
|
146
|
+
variant
|
|
147
|
+
}
|
|
148
|
+
) }),
|
|
149
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
150
|
+
InputPhone,
|
|
151
|
+
{
|
|
152
|
+
id: "DownPayment",
|
|
153
|
+
...register("DownPayment", {
|
|
154
|
+
required: true,
|
|
155
|
+
maxLength: 12
|
|
156
|
+
}),
|
|
157
|
+
label: "Down Payment",
|
|
158
|
+
sizes: "medium",
|
|
159
|
+
required: true,
|
|
160
|
+
error: !!errors.DownPayment,
|
|
161
|
+
helperText: errors.DownPayment?.message,
|
|
162
|
+
variant
|
|
163
|
+
}
|
|
164
|
+
) }),
|
|
165
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
166
|
+
InputPhone,
|
|
167
|
+
{
|
|
168
|
+
id: "CreditScore",
|
|
169
|
+
...register("CreditScore", {
|
|
170
|
+
required: true,
|
|
171
|
+
maxLength: 12
|
|
172
|
+
}),
|
|
173
|
+
label: "Credit Score",
|
|
174
|
+
sizes: "medium",
|
|
175
|
+
required: true,
|
|
176
|
+
error: !!errors.CreditScore,
|
|
177
|
+
helperText: errors.CreditScore?.message,
|
|
178
|
+
variant
|
|
179
|
+
}
|
|
180
|
+
) }),
|
|
181
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
182
|
+
InputPhone,
|
|
183
|
+
{
|
|
184
|
+
id: "ZipCode",
|
|
185
|
+
...register("ZipCode", { required: true, maxLength: 12 }),
|
|
186
|
+
label: "Zip Code",
|
|
187
|
+
sizes: "medium",
|
|
188
|
+
required: true,
|
|
189
|
+
error: !!errors.ZipCode,
|
|
190
|
+
helperText: errors.ZipCode?.message,
|
|
191
|
+
variant
|
|
192
|
+
}
|
|
193
|
+
) })
|
|
194
|
+
] }),
|
|
195
|
+
children,
|
|
196
|
+
/* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
|
|
197
|
+
/* @__PURE__ */ jsx("div", { className: actions, children: /* @__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
|
+
] })
|
|
208
|
+
] }) })
|
|
209
|
+
},
|
|
210
|
+
id
|
|
211
|
+
);
|
|
212
|
+
};
|
|
213
|
+
export {
|
|
214
|
+
BlendPurchase
|
|
215
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormProps } from './FormProps';
|
|
2
|
+
|
|
3
|
+
export type BlendPurchaseInputs = {
|
|
4
|
+
property_Type: string;
|
|
5
|
+
Occupancy: string;
|
|
6
|
+
SalesPrice: string;
|
|
7
|
+
DownPayment: string;
|
|
8
|
+
CreditScore: string;
|
|
9
|
+
ZipCode: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const BlendPurchase: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } 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 "react";
|
|
7
|
+
import "react-use";
|
|
8
|
+
import "../Input/Checkbox.js";
|
|
9
|
+
import "../Input/CurrencyInput.js";
|
|
10
|
+
import "../Input/Dropdown.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import { Input } from "../Input/Input.js";
|
|
14
|
+
import "../Input/Input.css.js";
|
|
15
|
+
import "../Input/InputAmount.js";
|
|
16
|
+
import { InputPhone } from "../Input/InputPhone.js";
|
|
17
|
+
import "../Input/InputTextArea.js";
|
|
18
|
+
import "../icons/ArrowIcon/ArrowIcon.css.js";
|
|
19
|
+
import SvgAxosX from "../icons/AxosX/index.js";
|
|
20
|
+
import SvgComponent from "../icons/AxosX/Blue.js";
|
|
21
|
+
import "../icons/CheckIcon/CheckIcon.css.js";
|
|
22
|
+
/* empty css */
|
|
23
|
+
/* empty css */
|
|
24
|
+
/* empty css */
|
|
25
|
+
/* empty css */
|
|
26
|
+
import { associatedEmail } from "../utils/EverestValidity.js";
|
|
27
|
+
import "../utils/allowedAxosDomains.js";
|
|
28
|
+
import { getVariant } from "../utils/getVariant.js";
|
|
29
|
+
import clsx from "clsx";
|
|
30
|
+
import { useForm, FormProvider } from "react-hook-form";
|
|
31
|
+
import * as z from "zod";
|
|
32
|
+
import { formContainer, iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions } from "./Forms.css.js";
|
|
33
|
+
import { SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
34
|
+
const BlendPurchase = ({
|
|
35
|
+
icon = false,
|
|
36
|
+
children,
|
|
37
|
+
onSubmit = (values) => {
|
|
38
|
+
console.log(values);
|
|
39
|
+
},
|
|
40
|
+
disclosure,
|
|
41
|
+
variant: fullVariant = "primary",
|
|
42
|
+
headline,
|
|
43
|
+
description,
|
|
44
|
+
callToAction,
|
|
45
|
+
validateEmail,
|
|
46
|
+
id
|
|
47
|
+
}) => {
|
|
48
|
+
const schema = z.object({
|
|
49
|
+
property_Type: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "First Name is required." }),
|
|
50
|
+
Occupancy: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Last Name is required." }),
|
|
51
|
+
SalesPrice: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
|
|
52
|
+
DownPayment: z.string().regex(/[\d-]{10}/).min(10, { message: "Phone is required." }).max(12, { message: "Phone is required." }).transform((val, ctx) => {
|
|
53
|
+
const removeDashes = val.replace(/-/gi, "");
|
|
54
|
+
if (removeDashes.length !== 10) {
|
|
55
|
+
ctx.addIssue({
|
|
56
|
+
code: z.ZodIssueCode.custom,
|
|
57
|
+
message: "Phone must have at least 10 and no more than 10 characters."
|
|
58
|
+
});
|
|
59
|
+
return z.NEVER;
|
|
60
|
+
}
|
|
61
|
+
return removeDashes;
|
|
62
|
+
}),
|
|
63
|
+
CreditScore: z.string(),
|
|
64
|
+
ZipCode: z.string()
|
|
65
|
+
});
|
|
66
|
+
const methods = useForm({
|
|
67
|
+
resolver: zodResolver(schema.merge(SalesforceSchema), {
|
|
68
|
+
async: true
|
|
69
|
+
}),
|
|
70
|
+
mode: "all",
|
|
71
|
+
defaultValues: {}
|
|
72
|
+
});
|
|
73
|
+
const {
|
|
74
|
+
handleSubmit,
|
|
75
|
+
register,
|
|
76
|
+
formState: { errors, isValid, isSubmitting }
|
|
77
|
+
} = methods;
|
|
78
|
+
const submitForm = async (data) => {
|
|
79
|
+
await onSubmit(data);
|
|
80
|
+
};
|
|
81
|
+
const variant = getVariant(fullVariant);
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
"section",
|
|
84
|
+
{
|
|
85
|
+
id: `id_${id}`,
|
|
86
|
+
className: clsx(formContainer({ variant })),
|
|
87
|
+
children: /* @__PURE__ */ jsx("div", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
|
|
88
|
+
icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
|
|
89
|
+
/* @__PURE__ */ jsxs("div", { className: `${headerContainer} text_center`, children: [
|
|
90
|
+
/* @__PURE__ */ jsx("h2", { className: clsx("header_2", headerForm({ variant })), children: headline }),
|
|
91
|
+
description && /* @__PURE__ */ jsx(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: clsx(
|
|
95
|
+
"text_center",
|
|
96
|
+
form,
|
|
97
|
+
descriptionField({ variant })
|
|
98
|
+
),
|
|
99
|
+
children: description
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] }),
|
|
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: "property_Type",
|
|
109
|
+
...register("property_Type", { required: true }),
|
|
110
|
+
label: "Property Type",
|
|
111
|
+
sizes: "medium",
|
|
112
|
+
required: true,
|
|
113
|
+
error: !!errors.property_Type,
|
|
114
|
+
helperText: errors.property_Type?.message,
|
|
115
|
+
variant
|
|
116
|
+
}
|
|
117
|
+
) }),
|
|
118
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
119
|
+
Input,
|
|
120
|
+
{
|
|
121
|
+
id: "Occupancy",
|
|
122
|
+
...register("Occupancy", { required: true }),
|
|
123
|
+
label: "Property Usage",
|
|
124
|
+
sizes: "medium",
|
|
125
|
+
required: true,
|
|
126
|
+
error: !!errors.Occupancy,
|
|
127
|
+
helperText: errors.Occupancy?.message,
|
|
128
|
+
variant
|
|
129
|
+
}
|
|
130
|
+
) }),
|
|
131
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
132
|
+
Input,
|
|
133
|
+
{
|
|
134
|
+
id: "SalesPrice",
|
|
135
|
+
...register("SalesPrice", {
|
|
136
|
+
required: true,
|
|
137
|
+
validate: {
|
|
138
|
+
isValid: associatedEmail
|
|
139
|
+
}
|
|
140
|
+
}),
|
|
141
|
+
label: "Purchase Price",
|
|
142
|
+
sizes: "medium",
|
|
143
|
+
required: true,
|
|
144
|
+
error: !!errors.SalesPrice,
|
|
145
|
+
helperText: errors.SalesPrice?.message,
|
|
146
|
+
variant
|
|
147
|
+
}
|
|
148
|
+
) }),
|
|
149
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
150
|
+
InputPhone,
|
|
151
|
+
{
|
|
152
|
+
id: "DownPayment",
|
|
153
|
+
...register("DownPayment", {
|
|
154
|
+
required: true,
|
|
155
|
+
maxLength: 12
|
|
156
|
+
}),
|
|
157
|
+
label: "Down Payment",
|
|
158
|
+
sizes: "medium",
|
|
159
|
+
required: true,
|
|
160
|
+
error: !!errors.DownPayment,
|
|
161
|
+
helperText: errors.DownPayment?.message,
|
|
162
|
+
variant
|
|
163
|
+
}
|
|
164
|
+
) }),
|
|
165
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
166
|
+
InputPhone,
|
|
167
|
+
{
|
|
168
|
+
id: "CreditScore",
|
|
169
|
+
...register("CreditScore", {
|
|
170
|
+
required: true,
|
|
171
|
+
maxLength: 12
|
|
172
|
+
}),
|
|
173
|
+
label: "Credit Score",
|
|
174
|
+
sizes: "medium",
|
|
175
|
+
required: true,
|
|
176
|
+
error: !!errors.CreditScore,
|
|
177
|
+
helperText: errors.CreditScore?.message,
|
|
178
|
+
variant
|
|
179
|
+
}
|
|
180
|
+
) }),
|
|
181
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
182
|
+
InputPhone,
|
|
183
|
+
{
|
|
184
|
+
id: "ZipCode",
|
|
185
|
+
...register("ZipCode", { required: true, maxLength: 12 }),
|
|
186
|
+
label: "Zip Code",
|
|
187
|
+
sizes: "medium",
|
|
188
|
+
required: true,
|
|
189
|
+
error: !!errors.ZipCode,
|
|
190
|
+
helperText: errors.ZipCode?.message,
|
|
191
|
+
variant
|
|
192
|
+
}
|
|
193
|
+
) })
|
|
194
|
+
] }),
|
|
195
|
+
children,
|
|
196
|
+
/* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
|
|
197
|
+
/* @__PURE__ */ jsx("div", { className: actions, children: /* @__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
|
+
] })
|
|
208
|
+
] }) })
|
|
209
|
+
},
|
|
210
|
+
id
|
|
211
|
+
);
|
|
212
|
+
};
|
|
213
|
+
export {
|
|
214
|
+
BlendPurchase
|
|
215
|
+
};
|
package/dist/Forms/FormEnums.js
CHANGED
|
@@ -51,7 +51,7 @@ const Purposes = [
|
|
|
51
51
|
"Refi Rate-Term/Limited C.O."
|
|
52
52
|
];
|
|
53
53
|
const RepresentativesFico = [
|
|
54
|
-
"780
|
|
54
|
+
"780",
|
|
55
55
|
"779 - 760",
|
|
56
56
|
"759 - 740",
|
|
57
57
|
"739 - 720",
|
|
@@ -73,7 +73,8 @@ const DocType = [
|
|
|
73
73
|
"Investor - DSCR No Ratio",
|
|
74
74
|
"Written VOE",
|
|
75
75
|
"2 Year Alt Doc",
|
|
76
|
-
"1yr Streamlined Full Doc"
|
|
76
|
+
"1yr Streamlined Full Doc",
|
|
77
|
+
"1yr Profit and Loss"
|
|
77
78
|
];
|
|
78
79
|
const Citizenship = [
|
|
79
80
|
"U.S. Citizen",
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { FormProps } from './FormProps';
|
|
2
2
|
|
|
3
3
|
export type QuickPricerInputs = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
Base_Loan_Amount__c: number;
|
|
5
|
+
Appraised_Value__c: number;
|
|
6
|
+
Loan_Purpose__c: string;
|
|
7
|
+
Cash_Out_Amount__c: number;
|
|
8
|
+
Interest_Only__c: boolean;
|
|
9
|
+
Self_Employed__c: boolean;
|
|
10
|
+
Pledged_Assets__c: boolean;
|
|
11
|
+
Cross_Collateralization__c: boolean;
|
|
12
|
+
Representative_FICO__c: string;
|
|
13
|
+
Months_Reserves__c: number;
|
|
14
|
+
Underwriting_Document_Type__c: string;
|
|
15
|
+
Debt_To_Income_Ratio__c: number;
|
|
16
|
+
Citizenship__c: string;
|
|
13
17
|
Mortgage_Lates_12: string;
|
|
14
18
|
Mortgage_Lates_24: string;
|
|
15
19
|
HousingEventType: string;
|
|
@@ -18,10 +22,10 @@ export type QuickPricerInputs = {
|
|
|
18
22
|
Number_of_Properties_Financed: number;
|
|
19
23
|
BankruptcySeasoning: string;
|
|
20
24
|
zip: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
Property_Type__c: string;
|
|
26
|
+
Occupance__c: string;
|
|
27
|
+
Units__c: string;
|
|
28
|
+
Prepayment_Penalty__c: string;
|
|
25
29
|
broker_Compensation: string;
|
|
26
30
|
NMLS_ID__c: string;
|
|
27
31
|
email: string;
|