@axos-web-dev/shared-components 2.0.0-dev.12 → 2.0.0-dev.13-stepForm

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.
@@ -0,0 +1,101 @@
1
+ export declare const mortgageTypeOptions: readonly [{
2
+ readonly label: "Purchase rates";
3
+ readonly value: "purchase-rates";
4
+ }, {
5
+ readonly label: "Refinance rates";
6
+ readonly value: "refinance-rates";
7
+ }];
8
+ export declare const propertyTypeOptions: readonly [{
9
+ readonly label: "Single family home";
10
+ readonly value: "single-family-home";
11
+ }, {
12
+ readonly label: "Condo";
13
+ readonly value: "condo";
14
+ }, {
15
+ readonly label: "Co-op";
16
+ readonly value: "co-op";
17
+ }, {
18
+ readonly label: "Manufactured Single Wide";
19
+ readonly value: "manufactured-single-wide";
20
+ }, {
21
+ readonly label: "Manufactured Double Wide";
22
+ readonly value: "manufactured-double-wide";
23
+ }];
24
+ export declare const propertyUseOptions: readonly [{
25
+ readonly label: "Primary residence";
26
+ readonly value: "primary-residence";
27
+ }, {
28
+ readonly label: "Vacation home";
29
+ readonly value: "vacation-home";
30
+ }, {
31
+ readonly label: "Investment";
32
+ readonly value: "investment";
33
+ }];
34
+ export declare const creditScoreOptions: readonly [{
35
+ readonly label: "740+";
36
+ readonly value: "740+";
37
+ }, {
38
+ readonly label: "739-720";
39
+ readonly value: "739-720";
40
+ }, {
41
+ readonly label: "719-700";
42
+ readonly value: "719-700";
43
+ }, {
44
+ readonly label: "699-680";
45
+ readonly value: "699-680";
46
+ }, {
47
+ readonly label: "679-660";
48
+ readonly value: "679-660";
49
+ }, {
50
+ readonly label: "659-640";
51
+ readonly value: "659-640";
52
+ }, {
53
+ readonly label: "639-620";
54
+ readonly value: "639-620";
55
+ }, {
56
+ readonly label: "Below 620";
57
+ readonly value: "below-620";
58
+ }];
59
+ export declare const amortizationTypeOptions: readonly [{
60
+ readonly label: "Fixed";
61
+ readonly value: "fixed";
62
+ }, {
63
+ readonly label: "ARM";
64
+ readonly value: "arm";
65
+ }];
66
+ export declare const fixedLoanTypeOptions: readonly [{
67
+ readonly label: "Conforming";
68
+ readonly value: "conforming";
69
+ }, {
70
+ readonly label: "Non-Conforming";
71
+ readonly value: "non-conforming";
72
+ }, {
73
+ readonly label: "FHA";
74
+ readonly value: "fha";
75
+ }, {
76
+ readonly label: "VA";
77
+ readonly value: "va";
78
+ }];
79
+ export declare const fixedLoanTermOptions: readonly [{
80
+ readonly label: "30 Year";
81
+ readonly value: "30-year";
82
+ }, {
83
+ readonly label: "20 Year";
84
+ readonly value: "20-year";
85
+ }, {
86
+ readonly label: "15 Year";
87
+ readonly value: "15-year";
88
+ }, {
89
+ readonly label: "10 Year";
90
+ readonly value: "10-year";
91
+ }];
92
+ export declare const armLoanTermOptions: readonly [{
93
+ readonly label: "5 Year";
94
+ readonly value: "5-year";
95
+ }, {
96
+ readonly label: "7 Year";
97
+ readonly value: "7-year";
98
+ }, {
99
+ readonly label: "10 Year";
100
+ readonly value: "10-year";
101
+ }];
@@ -0,0 +1,57 @@
1
+ const mortgageTypeOptions = [
2
+ { label: "Purchase rates", value: "purchase-rates" },
3
+ { label: "Refinance rates", value: "refinance-rates" }
4
+ ];
5
+ const propertyTypeOptions = [
6
+ { label: "Single family home", value: "single-family-home" },
7
+ { label: "Condo", value: "condo" },
8
+ { label: "Co-op", value: "co-op" },
9
+ { label: "Manufactured Single Wide", value: "manufactured-single-wide" },
10
+ { label: "Manufactured Double Wide", value: "manufactured-double-wide" }
11
+ ];
12
+ const propertyUseOptions = [
13
+ { label: "Primary residence", value: "primary-residence" },
14
+ { label: "Vacation home", value: "vacation-home" },
15
+ { label: "Investment", value: "investment" }
16
+ ];
17
+ const creditScoreOptions = [
18
+ { label: "740+", value: "740+" },
19
+ { label: "739-720", value: "739-720" },
20
+ { label: "719-700", value: "719-700" },
21
+ { label: "699-680", value: "699-680" },
22
+ { label: "679-660", value: "679-660" },
23
+ { label: "659-640", value: "659-640" },
24
+ { label: "639-620", value: "639-620" },
25
+ { label: "Below 620", value: "below-620" }
26
+ ];
27
+ const amortizationTypeOptions = [
28
+ { label: "Fixed", value: "fixed" },
29
+ { label: "ARM", value: "arm" }
30
+ ];
31
+ const fixedLoanTypeOptions = [
32
+ { label: "Conforming", value: "conforming" },
33
+ { label: "Non-Conforming", value: "non-conforming" },
34
+ { label: "FHA", value: "fha" },
35
+ { label: "VA", value: "va" }
36
+ ];
37
+ const fixedLoanTermOptions = [
38
+ { label: "30 Year", value: "30-year" },
39
+ { label: "20 Year", value: "20-year" },
40
+ { label: "15 Year", value: "15-year" },
41
+ { label: "10 Year", value: "10-year" }
42
+ ];
43
+ const armLoanTermOptions = [
44
+ { label: "5 Year", value: "5-year" },
45
+ { label: "7 Year", value: "7-year" },
46
+ { label: "10 Year", value: "10-year" }
47
+ ];
48
+ export {
49
+ amortizationTypeOptions,
50
+ armLoanTermOptions,
51
+ creditScoreOptions,
52
+ fixedLoanTermOptions,
53
+ fixedLoanTypeOptions,
54
+ mortgageTypeOptions,
55
+ propertyTypeOptions,
56
+ propertyUseOptions
57
+ };
@@ -0,0 +1,29 @@
1
+ export type MortgageIntent = "purchase-rates" | "refinance-rates";
2
+ export type PropertyType = "single-family-home" | "condo" | "co-op" | "manufactured-single-wide" | "manufactured-double-wide";
3
+ export type PropertyUse = "primary-residence" | "vacation-home" | "investment";
4
+ export type CreditScoreRange = "740+" | "739-720" | "719-700" | "699-680" | "679-660" | "659-640" | "639-620" | "below-620";
5
+ export type AmortizationType = "fixed" | "arm";
6
+ export type FixedLoanType = "conforming" | "non-conforming" | "fha" | "va";
7
+ export type LoanTerm = "30-year" | "20-year" | "15-year" | "10-year" | "7-year" | "5-year";
8
+ export interface MortgageLeadFormValues {
9
+ mortgageType: MortgageIntent | "";
10
+ propertyType: PropertyType | "";
11
+ propertyUse: PropertyUse | "";
12
+ creditScore: CreditScoreRange | "";
13
+ purchasePrice: string;
14
+ downPaymentPercent: number;
15
+ downPaymentAmount: string;
16
+ estimatedHomeValue: string;
17
+ currentLoanBalance: string;
18
+ cashOutAmount: string;
19
+ zipCode: string;
20
+ amortizationType: AmortizationType | "";
21
+ fixedLoanType: FixedLoanType | "";
22
+ loanTerm: LoanTerm | "";
23
+ desiredRate: string;
24
+ discountPoints: string;
25
+ firstName: string;
26
+ lastName: string;
27
+ email: string;
28
+ phoneNumber: string;
29
+ }
@@ -0,0 +1,11 @@
1
+ export declare function onlyDigits(value: string): string;
2
+ export declare function formatPhoneInput(value: string): string;
3
+ export declare function validatePhone(phone: string): boolean;
4
+ export declare function parseCurrencyInput(value: string): number;
5
+ export declare function formatCurrencyInput(value: string): string;
6
+ export declare function formatCurrency(value: number): string;
7
+ export declare function validateZipCode(zip: string): boolean;
8
+ export declare function validateEmail(email: string): boolean;
9
+ export declare function calculatePercentAmount(base: string, percent: number): string;
10
+ export declare function formatPercentInput(value: string): string;
11
+ export declare function normalizePercentDisplay(value: string): string;
@@ -0,0 +1,74 @@
1
+ function onlyDigits(value) {
2
+ return value.replace(/\D/g, "");
3
+ }
4
+ function formatPhoneInput(value) {
5
+ const digits = onlyDigits(value).slice(0, 10);
6
+ if (digits.length <= 3) return digits;
7
+ if (digits.length <= 6) return `(${digits.slice(0, 3)}) ${digits.slice(3)}`;
8
+ return `(${digits.slice(0, 3)}) ${digits.slice(3, 6)}-${digits.slice(6, 10)}`;
9
+ }
10
+ function validatePhone(phone) {
11
+ return onlyDigits(phone).length === 10;
12
+ }
13
+ function parseCurrencyInput(value) {
14
+ const cleaned = value.replace(/[^\d.]/g, "");
15
+ const parsed = parseFloat(cleaned);
16
+ return Number.isNaN(parsed) ? 0 : parsed;
17
+ }
18
+ function formatCurrencyInput(value) {
19
+ const numeric = parseCurrencyInput(value);
20
+ if (!numeric) return "";
21
+ return new Intl.NumberFormat("en-US", {
22
+ maximumFractionDigits: 0
23
+ }).format(numeric);
24
+ }
25
+ function formatCurrency(value) {
26
+ if (!Number.isFinite(value)) return "$0";
27
+ return new Intl.NumberFormat("en-US", {
28
+ style: "currency",
29
+ currency: "USD",
30
+ maximumFractionDigits: 0
31
+ }).format(value);
32
+ }
33
+ function validateZipCode(zip) {
34
+ return /^\d{5}$/.test(zip);
35
+ }
36
+ function validateEmail(email) {
37
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
38
+ }
39
+ function calculatePercentAmount(base, percent) {
40
+ const numericBase = parseCurrencyInput(base);
41
+ if (!numericBase) return "";
42
+ const amount = numericBase * (percent / 100);
43
+ return String(Math.round(amount));
44
+ }
45
+ function formatPercentInput(value) {
46
+ const cleaned = value.replace(/[^\d.]/g, "");
47
+ if (!cleaned) return "";
48
+ const parts = cleaned.split(".");
49
+ const whole = parts[0] ?? "";
50
+ const decimal = parts[1] ?? "";
51
+ const normalizedWhole = whole.replace(/^0+(?=\d)/, "") || "0";
52
+ const normalizedDecimal = decimal.slice(0, 3);
53
+ if (cleaned.includes(".")) {
54
+ return `${normalizedWhole}.${normalizedDecimal}`;
55
+ }
56
+ return normalizedWhole;
57
+ }
58
+ function normalizePercentDisplay(value) {
59
+ const cleaned = formatPercentInput(value);
60
+ return cleaned ? `${cleaned}%` : "";
61
+ }
62
+ export {
63
+ calculatePercentAmount,
64
+ formatCurrency,
65
+ formatCurrencyInput,
66
+ formatPercentInput,
67
+ formatPhoneInput,
68
+ normalizePercentDisplay,
69
+ onlyDigits,
70
+ parseCurrencyInput,
71
+ validateEmail,
72
+ validatePhone,
73
+ validateZipCode
74
+ };
@@ -0,0 +1,339 @@
1
+ @keyframes _13s19j312 {
2
+ 0% {
3
+ transform: translateX(-100%);
4
+ }
5
+ 100% {
6
+ transform: translateX(220%);
7
+ }
8
+ }
9
+ ._13s19j30 {
10
+ background: #e9f8ff;
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: 24px;
14
+ isolation: isolate;
15
+ justify-content: center;
16
+ min-height: 100dvh;
17
+ padding: 56px 24px;
18
+ position: relative;
19
+ }
20
+ ._13s19j31 {
21
+ background: #fff;
22
+ border: 1px solid #c9e6f7;
23
+ border-radius: 24px;
24
+ box-shadow: 0 16px 40px rgba(20, 38, 61, 0.08);
25
+ margin-inline: auto;
26
+ max-width: 760px;
27
+ padding: 32px;
28
+ width: 100%;
29
+ }
30
+ ._13s19j32 {
31
+ margin-bottom: 28px;
32
+ }
33
+ ._13s19j33 {
34
+ display: flex;
35
+ justify-content: space-between;
36
+ align-items: center;
37
+ margin-bottom: 10px;
38
+ gap: 12px;
39
+ }
40
+ ._13s19j34 {
41
+ color: #1e3860;
42
+ font-size: 14px;
43
+ font-weight: 700;
44
+ }
45
+ ._13s19j35 {
46
+ background: #dff1fb;
47
+ border-radius: 999px;
48
+ height: 10px;
49
+ overflow: hidden;
50
+ }
51
+ ._13s19j36 {
52
+ background: linear-gradient(90deg, #1e629a 0%, #1e3860 100%);
53
+ border-radius: 999px;
54
+ height: 100%;
55
+ transition: width 220ms ease;
56
+ }
57
+ ._13s19j37 {
58
+ display: flex;
59
+ flex-direction: column;
60
+ min-height: 430px;
61
+ }
62
+ ._13s19j38 {
63
+ color: #1e3860;
64
+ font-size: clamp(22px, 4vw, 32px);
65
+ font-weight: 700;
66
+ line-height: 1.15;
67
+ margin: 0;
68
+ }
69
+ ._13s19j39 {
70
+ margin: 10px 0 24px;
71
+ color: #58677a;
72
+ font-size: 14px;
73
+ line-height: 1.5;
74
+ }
75
+ ._13s19j3a {
76
+ display: grid;
77
+ gap: 10px;
78
+ }
79
+ ._13s19j3b {
80
+ color: #b42318;
81
+ font-size: 13px;
82
+ font-weight: 600;
83
+ }
84
+ ._13s19j3c {
85
+ color: #1e3860;
86
+ font-weight: 700;
87
+ font-size: 14px;
88
+ }
89
+ ._13s19j3a:has(._13s19j3b) ._13s19j3c {
90
+ color: #b42318;
91
+ }
92
+ ._13s19j3d {
93
+ display: grid;
94
+ gap: 12px;
95
+ grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
96
+ }
97
+ ._13s19j3e {
98
+ display: block;
99
+ border-radius: 12px;
100
+ border: 1px solid #c9e6f7;
101
+ background: #fff;
102
+ padding: 16px 18px;
103
+ cursor: pointer;
104
+ transition: all 180ms ease;
105
+ }
106
+ ._13s19j3e:hover {
107
+ border-color: #1e629a;
108
+ background: #e9f8ff;
109
+ }
110
+ ._13s19j3f {
111
+ border-color: #1e3860;
112
+ background: #f2fbff;
113
+ box-shadow: 0 0 0 1px #1e3860;
114
+ position: relative;
115
+ }
116
+ ._13s19j3f::after {
117
+ content: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTguNSIgaGVpZ2h0PSIxOC41IiB2aWV3Qm94PSIwIDAgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggY2xhc3M9Il8xeGFqbnF1MCBfMXhham5xdTEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzUgOUMxNy43NSA0LjE2NzUxIDEzLjgzMjUgMC4yNSA5IDAuMjVDNC4xNjc1MSAwLjI1IDAuMjUgNC4xNjc1MSAwLjI1IDlDMC4yNSAxMy44MzI1IDQuMTY3NTEgMTcuNzUgOSAxNy43NUMxMy44MzI1IDE3Ljc1IDE3Ljc1IDEzLjgzMjUgMTcuNzUgOVpNMTIuOTMzIDYuMDU4MDdMMTMuODE2OSA2Ljk0MTk1TDcuNzQ5OTcgMTMuMDA4OUw0LjE4MzAzIDkuNDQxOTVMNS4wNjY5MSA4LjU1ODA3TDcuNzQ5OTcgMTEuMjQwNkwxMi45MzMgNi4wNTgwN1oiIGZpbGw9IiMxRTM4NjAiPjwvcGF0aD48L3N2Zz4=);
118
+ position: absolute;
119
+ right: 18px;
120
+ top: 18px;
121
+ }
122
+ ._13s19j3g {
123
+ color: #1e3860;
124
+ font-weight: 700;
125
+ font-family: var(--header-font-family);
126
+ }
127
+ ._13s19j3h {
128
+ display: grid;
129
+ gap: 16px;
130
+ align-items: start;
131
+ }
132
+ ._13s19j3i {
133
+ display: grid;
134
+ grid-template-columns: 1fr 1fr;
135
+ gap: 16px;
136
+ }
137
+ ._13s19j3j {
138
+ background: #fff;
139
+ border: 1px solid #c9e6f7;
140
+ border-radius: 12px;
141
+ color: #14263d;
142
+ outline: none;
143
+ padding: 14px 16px;
144
+ font-family: var(--header-font-family);
145
+ }
146
+ ._13s19j3j:focus {
147
+ border-color: #1e629a;
148
+ box-shadow: 0 0 0 3px #e9f8ff;
149
+ }
150
+ ._13s19j3a:has(._13s19j3b) ._13s19j3j {
151
+ border-color: #b42318;
152
+ }
153
+ ._13s19j3k {
154
+ color: #58677a;
155
+ font-size: 13px;
156
+ line-height: 1.5;
157
+ }
158
+ ._13s19j3l {
159
+ background: #e9f8ff;
160
+ border: 1px solid #c9e6f7;
161
+ border-radius: 16px;
162
+ margin-block: 8px;
163
+ padding: 14px 16px;
164
+ }
165
+ ._13s19j3m {
166
+ display: block;
167
+ color: #1e3860;
168
+ font-size: 12px;
169
+ font-weight: 700;
170
+ margin-bottom: 4px;
171
+ text-transform: uppercase;
172
+ letter-spacing: 0.04em;
173
+ }
174
+ ._13s19j3n {
175
+ color: #14263d;
176
+ font-size: 24px;
177
+ font-weight: 700;
178
+ }
179
+ ._13s19j3o {
180
+ display: grid;
181
+ gap: 8px;
182
+ }
183
+ ._13s19j3p {
184
+ display: flex;
185
+ justify-content: space-between;
186
+ align-items: center;
187
+ gap: 12px;
188
+ }
189
+ ._13s19j3q {
190
+ color: #1e3860;
191
+ font-size: 15px;
192
+ font-weight: 700;
193
+ }
194
+ ._13s19j3r {
195
+ accent-color: #1e3860;
196
+ cursor: pointer;
197
+ }
198
+ ._13s19j3s {
199
+ display: flex;
200
+ justify-content: space-between;
201
+ gap: 12px;
202
+ margin-top: 28px;
203
+ flex: 1 1 0%;
204
+ align-items: flex-end;
205
+ }
206
+ ._13s19j3t {
207
+ border-radius: 8px;
208
+ padding: 12px 20px;
209
+ font-size: 15px;
210
+ font-weight: 700;
211
+ cursor: pointer;
212
+ transition: all 180ms ease;
213
+ border: none;
214
+ font-family: var(--header-font-family);
215
+ }
216
+ ._13s19j3u {
217
+ background: #fff;
218
+ color: #1e3860;
219
+ border: 1px solid #c9e6f7;
220
+ }
221
+ ._13s19j3u:disabled {
222
+ opacity: 0.45;
223
+ cursor: not-allowed;
224
+ }
225
+ ._13s19j3v {
226
+ background: #1e3860;
227
+ color: #fff;
228
+ }
229
+ ._13s19j3v:hover {
230
+ background: #14263d;
231
+ }
232
+ ._13s19j3w {
233
+ padding: 12px 0;
234
+ }
235
+ ._13s19j3x {
236
+ margin: 0 0 12px;
237
+ color: #1e3860;
238
+ font-size: 30px;
239
+ line-height: 1.15;
240
+ font-weight: 700;
241
+ }
242
+ ._13s19j3y {
243
+ color: #58677a;
244
+ font-size: 16px;
245
+ line-height: 1.6;
246
+ margin: 0;
247
+ }
248
+ ._13s19j3z {
249
+ border-top: 1px solid #c9e6f7;
250
+ margin-top: 24px;
251
+ padding-top: 20px;
252
+ }
253
+ ._13s19j310 {
254
+ color: #1e3860;
255
+ font-size: 13px;
256
+ font-weight: 700;
257
+ letter-spacing: 0.04em;
258
+ margin: 0 0 8px;
259
+ text-transform: uppercase;
260
+ }
261
+ ._13s19j311 {
262
+ color: #58677a;
263
+ font-size: 12px;
264
+ line-height: 1.6;
265
+ margin: 0;
266
+ }
267
+ ._13s19j313 {
268
+ margin-top: 8px;
269
+ color: #58677a;
270
+ font-size: 12px;
271
+ line-height: 1.5;
272
+ }
273
+ ._13s19j314 {
274
+ color: #58677a;
275
+ font-weight: 500;
276
+ font-size: 12px;
277
+ }
278
+ ._13s19j315 {
279
+ margin-top: 10px;
280
+ display: grid;
281
+ gap: 6px;
282
+ }
283
+ ._13s19j316 {
284
+ color: #1e3860;
285
+ font-size: 12px;
286
+ font-weight: 700;
287
+ }
288
+ ._13s19j317 {
289
+ position: relative;
290
+ width: 100%;
291
+ height: 6px;
292
+ border-radius: 999px;
293
+ background: #dff1fb;
294
+ overflow: hidden;
295
+ }
296
+ ._13s19j318 {
297
+ position: absolute;
298
+ top: 0;
299
+ left: 0;
300
+ height: 100%;
301
+ width: 35%;
302
+ border-radius: 999px;
303
+ background: linear-gradient(90deg, #98ddff 0%, #1e629a 100%);
304
+ animation: _13s19j312 1.2s linear infinite;
305
+ }
306
+ ._13s19j319 {
307
+ font-size: 56px;
308
+ color: #1e3860;
309
+ line-height: 1.15;
310
+ font-weight: 700;
311
+ }
312
+ ._13s19j31a {
313
+ color: inherit;
314
+ line-height: 1.5;
315
+ margin-top: 8px;
316
+ }
317
+ @media screen and (max-width: 768px) {
318
+ ._13s19j30 {
319
+ padding-block: 32px;
320
+ }
321
+ ._13s19j319 {
322
+ font-size: 38px;
323
+ }
324
+ }
325
+ @media screen and (max-width: 640px) {
326
+ ._13s19j3i {
327
+ grid-template-columns: 1fr;
328
+ }
329
+ }
330
+ @media screen and (max-width: 500px) {
331
+ ._13s19j319 {
332
+ font-size: 32px;
333
+ }
334
+ }
335
+ @media screen and (min-width: 851px) {
336
+ ._13s19j31b {
337
+ opacity: 0.8 !important;
338
+ }
339
+ }
@@ -43,9 +43,6 @@ span#personalized-refi-table:has(*) {
43
43
  .page_body_contents > div:first-child > .billboard {
44
44
  margin-top: 3.5rem;
45
45
  }
46
- .flex, [class*='flex_'] {
47
- display: flex;
48
- }
49
46
  .flex_row {
50
47
  flex-direction: row;
51
48
  }
@@ -249,6 +246,9 @@ p:empty, ul:empty {
249
246
  .containment {
250
247
  width: min(1200px, calc(100% - 4rem));
251
248
  }
249
+ .flex, [class*='flex_'] {
250
+ display: flex;
251
+ }
252
252
  .rounded {
253
253
  border-radius: 1rem;
254
254
  overflow: hidden;