@axos-web-dev/shared-components 1.0.99-dev.2 → 1.0.99-dev.4
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/ATMLocator/ATMLocator.js +2 -1
- package/dist/Accordion/Accordion.css.d.ts +1 -1
- package/dist/Accordion/Accordion.css.js +1 -1
- package/dist/Accordion/Accordion.js +2 -2
- package/dist/AlertBanner/AlertBanner.css.js +1 -1
- package/dist/AlertBanner/index.js +1 -1
- package/dist/Article/Article.css.d.ts +41 -41
- package/dist/Article/Article.css.js +1 -1
- package/dist/ArticlesSet/ArticlesSet.css.d.ts +16 -16
- package/dist/ArticlesSet/ArticlesSet.css.js +1 -1
- package/dist/Auth/ErrorAlert.css.js +1 -1
- package/dist/Auth/ErrorAlert.js +3 -2
- package/dist/Auth/Logout.js +1 -1
- package/dist/Auth/SignIn.css.js +1 -1
- package/dist/Auth/SignInPassword.js +1 -1
- package/dist/Avatar/Avatar.module.js +1 -1
- package/dist/AwardsBanner/AwardsBanner.css.js +1 -1
- package/dist/AwardsItem/AwardsItem.css.js +1 -1
- package/dist/Blockquote/Blockquote.module.js +1 -1
- package/dist/BulletItem/BulletItem.css.js +1 -1
- package/dist/BulletItem/BulletItem.js +1 -1
- package/dist/Button/Button.css.d.ts +18 -18
- package/dist/Button/Button.css.js +1 -1
- package/dist/Button/Button.js +2 -1
- package/dist/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.d.ts +12 -12
- package/dist/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.js +1 -1
- package/dist/Calculators/ApyCalculator/ApyCalculator.css.d.ts +14 -14
- package/dist/Calculators/ApyCalculator/ApyCalculator.css.js +1 -1
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.d.ts +8 -8
- package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.js +1 -1
- package/dist/Calculators/AxosOneCalculator/index.js +2 -2
- package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.d.ts +22 -22
- package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.js +1 -1
- package/dist/Calculators/BalanceAPYCalculator/index.js +2 -2
- package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.d.ts +18 -18
- package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.js +1 -1
- package/dist/Calculators/BuyDownCalculator/index.js +3 -3
- package/dist/Calculators/Calculator.js +2 -1
- package/dist/Calculators/MarginTradingCalculator/MarginTradingCalculator.css.js +1 -1
- package/dist/Calculators/MarginTradingCalculator/index.js +2 -2
- package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.d.ts +12 -12
- package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.js +1 -1
- package/dist/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.d.ts +12 -12
- package/dist/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.js +1 -1
- package/dist/Calculators/SummitApyCalculator/BalanceAPYCalculator.css.d.ts +8 -8
- package/dist/Calculators/SummitApyCalculator/BalanceAPYCalculator.css.js +1 -1
- package/dist/Calculators/SummitApyCalculator/index.js +2 -2
- package/dist/Calculators/calculator.css.d.ts +12 -12
- package/dist/Calculators/calculator.css.js +1 -1
- package/dist/CallToActionBar/CallToActionBar.css.js +1 -1
- package/dist/CallToActionBar/index.js +1 -1
- package/dist/Carousel/Carousel.css.d.ts +20 -20
- package/dist/Carousel/Carousel.css.js +1 -1
- package/dist/Carousel/index.js +3 -2
- package/dist/Chevron/Chevron.css.d.ts +6 -6
- package/dist/Chevron/Chevron.css.js +1 -1
- package/dist/Chevron/index.js +3 -2
- package/dist/CollectInformationAlert/CollectInformationAlert.css.js +1 -1
- package/dist/CollectInformationAlert/index.js +1 -1
- package/dist/Comparison/Comparison.css.d.ts +10 -10
- package/dist/Comparison/Comparison.css.js +1 -1
- package/dist/Comparison/Comparison.js +3 -2
- package/dist/Comparison/ComparisonSet.js +1 -1
- package/dist/ContentBanner/ContentBanner.css.d.ts +12 -12
- package/dist/ContentBanner/ContentBanner.css.js +1 -1
- package/dist/DownloadTile/DownloadTile.css.js +1 -1
- package/dist/ExecutiveBio/ExecutiveBio.css.d.ts +31 -31
- package/dist/ExecutiveBio/ExecutiveBio.css.js +1 -1
- package/dist/ExecutiveBio/ExecutiveBio.js +2 -1
- package/dist/FaqAccordion/FaqAccordion.css.js +1 -1
- package/dist/FaqAccordion/index.js +3 -2
- package/dist/FdicCallout/FdicCallout.module.js +1 -1
- package/dist/FooterDisclosure/FooterDisclosure.css.js +1 -1
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.css.js +1 -1
- package/dist/FooterDisclosure/LVF/LaVictorieFooter.js +2 -2
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.css.js +1 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +2 -1
- package/dist/Forms/ApplicationStart.d.ts +1 -1
- package/dist/Forms/ApplicationStart.js +113 -91
- package/dist/Forms/ApplyNow.js +3 -2
- package/dist/Forms/ClearingForm.d.ts +1 -1
- package/dist/Forms/ClearingForm.js +186 -164
- package/dist/Forms/CommercialDeposits.d.ts +1 -1
- package/dist/Forms/CommercialDeposits.js +203 -181
- package/dist/Forms/CommercialLending.d.ts +1 -1
- package/dist/Forms/CommercialLending.js +280 -258
- package/dist/Forms/CommercialPremiumFinance.d.ts +1 -1
- package/dist/Forms/CommercialPremiumFinance.js +129 -107
- package/dist/Forms/ContactCompany.d.ts +1 -1
- package/dist/Forms/ContactCompany.js +115 -93
- package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
- package/dist/Forms/ContactCompanyTitle.js +129 -107
- package/dist/Forms/ContactUs.d.ts +1 -1
- package/dist/Forms/ContactUs.js +101 -79
- package/dist/Forms/ContactUsAAS.d.ts +1 -1
- package/dist/Forms/ContactUsAAS.js +182 -160
- package/dist/Forms/ContactUsBusiness.d.ts +1 -1
- package/dist/Forms/ContactUsBusiness.js +136 -114
- package/dist/Forms/ContactUsBusinessNameEmail.d.ts +1 -1
- package/dist/Forms/ContactUsBusinessNameEmail.js +105 -83
- package/dist/Forms/ContactUsLVF.d.ts +1 -1
- package/dist/Forms/ContactUsLVF.js +122 -100
- package/dist/Forms/ContactUsNMLSId.d.ts +1 -1
- package/dist/Forms/ContactUsNMLSId.js +119 -97
- package/dist/Forms/CpraRequest.d.ts +1 -1
- package/dist/Forms/CpraRequest.js +643 -621
- package/dist/Forms/CraPublicFile.d.ts +1 -1
- package/dist/Forms/CraPublicFile.js +111 -89
- package/dist/Forms/DealerServices.d.ts +1 -1
- package/dist/Forms/DealerServices.js +227 -206
- package/dist/Forms/EmailOnly.d.ts +1 -1
- package/dist/Forms/EmailOnly.js +58 -38
- package/dist/Forms/EmailUs.d.ts +1 -1
- package/dist/Forms/EmailUs.js +77 -55
- package/dist/Forms/FormProps.d.ts +3 -0
- package/dist/Forms/Forms.css.d.ts +42 -42
- package/dist/Forms/Forms.css.js +1 -1
- package/dist/Forms/HoneyPot/HoneyPot.css.d.ts +1 -0
- package/dist/Forms/HoneyPot/HoneyPot.css.js +5 -0
- package/dist/Forms/HoneyPot/index.d.ts +24 -0
- package/dist/Forms/HoneyPot/index.js +71 -0
- package/dist/Forms/MortgageRate/MortgageRateForm.d.ts +1 -1
- package/dist/Forms/MortgageRate/MortgageRateForm.js +365 -344
- package/dist/Forms/MortgageRate/MortgageRateQuoteFilters.js +1 -1
- package/dist/Forms/MortgageRate/MortgageRateWatch.js +2 -1
- package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
- package/dist/Forms/QuickPricer/QuickPricerForm.js +627 -612
- package/dist/Forms/QuickPricer/QuickPricerResults.css.js +1 -1
- package/dist/Forms/QuickPricer/UserInformation.css.js +1 -1
- package/dist/Forms/ScheduleCall.d.ts +1 -1
- package/dist/Forms/ScheduleCall.js +158 -136
- package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
- package/dist/Forms/ScheduleCallPremier.js +180 -158
- package/dist/Forms/SuccesForm.js +3 -2
- package/dist/Forms/VendorQuestionnaire.d.ts +1 -1
- package/dist/Forms/VendorQuestionnaire.js +818 -796
- package/dist/Forms/WcplSurvey.d.ts +1 -1
- package/dist/Forms/WcplSurvey.js +114 -92
- package/dist/Forms/index.d.ts +1 -0
- package/dist/Forms/index.js +4 -0
- package/dist/HelpArticle/HelpArticle.css.js +1 -1
- package/dist/HeroBanner/HeroBanner.css.d.ts +16 -16
- package/dist/HeroBanner/HeroBanner.css.js +1 -1
- package/dist/HeroBanner/HeroBanner.js +2 -2
- package/dist/HeroBanner/LargeBanner.css.d.ts +20 -20
- package/dist/HeroBanner/LargeBanner.css.js +1 -1
- package/dist/HeroBanner/SelectionBanner.css.d.ts +8 -8
- package/dist/HeroBanner/SelectionBanner.css.js +1 -1
- package/dist/Hyperlink/Hyperlink.css.js +1 -1
- package/dist/Hyperlink/index.js +2 -1
- package/dist/IconBillboard/IconBillboard.css.d.ts +24 -24
- package/dist/IconBillboard/IconBillboard.css.js +1 -1
- package/dist/IconBillboard/IconBillboard.js +1 -1
- package/dist/ImageBillboard/ImageBillboard.css.d.ts +20 -20
- package/dist/ImageBillboard/ImageBillboard.css.js +1 -1
- package/dist/ImageBillboard/ImageBillboard.js +1 -1
- package/dist/ImageBillboard/ImageBillboardSet.js +2 -2
- package/dist/ImageLink/ImageLink.css.js +1 -1
- package/dist/ImageLink/ImageLink.js +2 -1
- package/dist/ImageLink/ImageLinkSet.js +2 -1
- package/dist/ImageLink/index.js +2 -1
- package/dist/Input/Checkbox.css.js +1 -1
- package/dist/Input/Dropdown.css.js +1 -1
- package/dist/Input/Input.css.d.ts +16 -16
- package/dist/Input/Input.css.js +1 -1
- package/dist/Input/Input.js +3 -1
- package/dist/Input/RadioButton.css.js +1 -1
- package/dist/Inputs/Input.css.d.ts +14 -14
- package/dist/Inputs/Input.css.js +1 -1
- package/dist/Insight/Featured/CategorySelector.css.js +1 -1
- package/dist/Insight/Featured/CategorySelector.js +4 -3
- package/dist/Insight/Featured/Featured.css.js +1 -1
- package/dist/Insight/Featured/Featured.js +3 -2
- package/dist/Insight/Featured/Header.css.js +1 -1
- package/dist/Insight/Featured/Header.js +3 -2
- package/dist/Insight/Insight.css.js +1 -1
- package/dist/Interstitial/Interstitial-variants.css.d.ts +2 -2
- package/dist/Interstitial/Interstitial-variants.css.js +1 -1
- package/dist/Interstitial/Interstitial.module.js +1 -1
- package/dist/LandingPageHeader/LandingPageHeader.css.d.ts +3 -3
- package/dist/LandingPageHeader/LandingPageHeader.css.js +1 -1
- package/dist/LandingPageHeader/LandingPageHeader.js +1 -1
- package/dist/LoadingIndicator/LoadingIndicator.css.js +1 -1
- package/dist/Modal/Modal.css.js +1 -1
- package/dist/Modal/Modal.js +2 -1
- package/dist/Modal/contextApi/store.js +1 -1
- package/dist/NavigationMenu/AxosALTS/NavBar.css.js +1 -1
- package/dist/NavigationMenu/AxosALTS/NavBar.module.js +1 -1
- package/dist/NavigationMenu/AxosALTS/NavData.js +2 -1
- package/dist/NavigationMenu/AxosALTS/index.js +2 -1
- package/dist/NavigationMenu/AxosAdvisor/NavBar.css.js +1 -1
- package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +1 -1
- package/dist/NavigationMenu/AxosAdvisor/SubNavbar.css.js +1 -1
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.css.js +1 -1
- package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +1 -1
- package/dist/NavigationMenu/AxosAdvisorServices/SubNavbar.css.js +1 -1
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +1 -1
- package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +2 -1
- package/dist/NavigationMenu/AxosBank/NavBar.css.js +1 -1
- package/dist/NavigationMenu/AxosBank/NavBar.module.js +1 -1
- package/dist/NavigationMenu/AxosBank/NavData.js +2 -1
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +2 -1
- package/dist/NavigationMenu/AxosBank/SubNavbar.css.js +1 -1
- package/dist/NavigationMenu/AxosBank/index.js +2 -1
- package/dist/NavigationMenu/AxosClearing/NavBar.css.js +1 -1
- package/dist/NavigationMenu/AxosClearing/NavBar.module.js +1 -1
- package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +1 -1
- package/dist/NavigationMenu/LaVictoire/NavBar.css.js +1 -1
- package/dist/NavigationMenu/LaVictoire/NavBar.module.js +1 -1
- package/dist/NavigationMenu/LaVictoire/NavData.js +2 -1
- package/dist/NavigationMenu/LaVictoire/index.js +2 -1
- package/dist/NavigationMenu/NavDataJson.d.ts +2 -0
- package/dist/NavigationMenu/NavDataJson.js +309 -0
- package/dist/NavigationMenu/Navbar.d.ts +5 -0
- package/dist/NavigationMenu/Navbar.js +195 -0
- package/dist/NavigationMenu/SignInNavButton.d.ts +1 -0
- package/dist/NavigationMenu/SignInNavButton.js +363 -0
- package/dist/PageNavItem/PageNavItem.css.d.ts +2 -2
- package/dist/PageNavItem/PageNavItem.css.js +1 -1
- package/dist/PageNavSet/PageNavSet.js +1 -1
- package/dist/PageNavSet/PageNavigationSet.css.js +1 -1
- package/dist/Pagination/Pagination.css.js +1 -1
- package/dist/Pagination/Pagination.js +2 -2
- package/dist/SecondaryFooter/SecondaryFooter.css.js +1 -1
- package/dist/SecondaryFooter/index.js +1 -1
- package/dist/SetContainer/SetContainer.css.d.ts +16 -16
- package/dist/SetContainer/SetContainer.css.js +1 -1
- package/dist/SetContainer/SetContainer.js +3 -2
- package/dist/SocialMediaBar/SocialMediaBar.css.js +1 -1
- package/dist/SocialMediaBar/iconsRepository.js +2 -1
- package/dist/StepItem/StepItem.css.d.ts +18 -18
- package/dist/StepItem/StepItem.css.js +1 -1
- package/dist/StepItemSet/StepItemSet.css.d.ts +14 -14
- package/dist/StepItemSet/StepItemSet.css.js +1 -1
- package/dist/Tab/Tab.css.d.ts +12 -12
- package/dist/Tab/Tab.css.js +1 -1
- package/dist/Table/Table.css.d.ts +25 -25
- package/dist/Table/Table.css.js +1 -1
- package/dist/Table/Table.js +2 -2
- package/dist/TextBlock/TextBlock.css.js +1 -1
- package/dist/TextBlock/TextBlock.js +1 -1
- package/dist/Topic/Topic.css.js +1 -1
- package/dist/TopicalNavItem/TopicalNavItem.css.js +1 -1
- package/dist/TopicalNavSet/TopicalNavSet.css.js +1 -1
- package/dist/Typography/Typography.css.js +1 -1
- package/dist/VideoTile/VideoTile.css.js +1 -1
- package/dist/VideoTile/VideoTile.js +2 -1
- package/dist/VideoWrapper/VideoWrapper.css.js +1 -1
- package/dist/VideoWrapper/index.js +2 -1
- package/dist/WalnutIframe/wrapper.module.js +1 -1
- package/dist/assets/Forms/HoneyPot/HoneyPot.css +4 -0
- package/dist/globals.css.js +1 -1
- package/dist/icons/ArrowIcon/ArrowIcon.css.d.ts +3 -3
- package/dist/icons/ArrowIcon/ArrowIcon.css.js +1 -1
- package/dist/icons/CheckIcon/CheckIcon.css.d.ts +2 -2
- package/dist/icons/CheckIcon/CheckIcon.css.js +1 -1
- package/dist/icons/DownloadIcon/DownloadIcon.css.js +1 -1
- package/dist/icons/FollowIcon/FollowIcon.css.js +1 -1
- package/dist/icons/Logos/AXB.d.ts +8 -0
- package/dist/icons/Logos/AXB.js +74 -0
- package/dist/icons/Star/Star.css.js +1 -1
- package/dist/index.css.js +1 -1
- package/dist/main.js +4 -0
- package/dist/themes/axos.css.d.ts +38 -38
- package/dist/themes/axos.css.js +1 -1
- package/dist/themes/premier.css.js +1 -1
- package/dist/themes/victorie.css.js +1 -1
- package/dist/utils/allowedAxosDomains.js +1 -2
- package/dist/utils/optimizeImage/optimizeImage.module.js +1 -1
- package/package.json +133 -133
package/dist/Forms/EmailUs.js
CHANGED
|
@@ -12,7 +12,7 @@ import "../icons/ArrowIcon/ArrowIcon.css.js";
|
|
|
12
12
|
import SvgAxosX from "../icons/AxosX/index.js";
|
|
13
13
|
import SvgComponent from "../icons/AxosX/Blue.js";
|
|
14
14
|
import "../icons/CheckIcon/CheckIcon.css.js";
|
|
15
|
-
|
|
15
|
+
import '../assets/icons/FollowIcon/FollowIcon.css';import '../assets/icons/DownloadIcon/DownloadIcon.css';import '../assets/themes/victorie.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';/* empty css */
|
|
16
16
|
/* empty css */
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
@@ -23,7 +23,8 @@ import { getVariant } from "../utils/getVariant.js";
|
|
|
23
23
|
import clsx from "clsx";
|
|
24
24
|
import { useForm, FormProvider } from "react-hook-form";
|
|
25
25
|
import * as z from "zod";
|
|
26
|
-
import {
|
|
26
|
+
import { iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, disclosureForm, actions, formContainer } from "./Forms.css.js";
|
|
27
|
+
import { honeyPotSchema, isValidHoneyPot, HoneyPot } from "./HoneyPot/index.js";
|
|
27
28
|
const EmailUs = ({
|
|
28
29
|
icon = false,
|
|
29
30
|
children,
|
|
@@ -35,6 +36,7 @@ const EmailUs = ({
|
|
|
35
36
|
headline,
|
|
36
37
|
callToAction,
|
|
37
38
|
validateEmail,
|
|
39
|
+
onValidate,
|
|
38
40
|
description,
|
|
39
41
|
id
|
|
40
42
|
}) => {
|
|
@@ -42,8 +44,16 @@ const EmailUs = ({
|
|
|
42
44
|
email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
|
|
43
45
|
message: z.string().min(2, "Message is required")
|
|
44
46
|
});
|
|
47
|
+
const gen_schema = schema.merge(honeyPotSchema).superRefine((data, ctx) => {
|
|
48
|
+
if (!isValidHoneyPot(data)) {
|
|
49
|
+
ctx.addIssue({
|
|
50
|
+
code: z.ZodIssueCode.custom,
|
|
51
|
+
message: "fields are not valid."
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
45
55
|
const methods = useForm({
|
|
46
|
-
resolver: zodResolver(
|
|
56
|
+
resolver: zodResolver(gen_schema, {
|
|
47
57
|
async: true
|
|
48
58
|
}),
|
|
49
59
|
mode: "all",
|
|
@@ -77,59 +87,71 @@ const EmailUs = ({
|
|
|
77
87
|
}
|
|
78
88
|
)
|
|
79
89
|
] }),
|
|
80
|
-
/* @__PURE__ */ jsxs(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
/* @__PURE__ */ jsxs(
|
|
91
|
+
"form",
|
|
92
|
+
{
|
|
93
|
+
className: form,
|
|
94
|
+
onSubmit: async (e) => {
|
|
95
|
+
onValidate && onValidate(e);
|
|
96
|
+
await handleSubmit(submitForm)(e);
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
},
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant, formType: "email" })), children: [
|
|
101
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
102
|
+
Input,
|
|
103
|
+
{
|
|
104
|
+
id: "email",
|
|
105
|
+
...register("email", {
|
|
106
|
+
required: true,
|
|
107
|
+
validate: {
|
|
108
|
+
isValid: associatedEmail
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
label: "Email",
|
|
112
|
+
sizes: "medium",
|
|
113
|
+
required: true,
|
|
114
|
+
error: !!errors.email,
|
|
115
|
+
helperText: errors.email?.message,
|
|
116
|
+
variant
|
|
90
117
|
}
|
|
91
|
-
}),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
disabled: !isValid || isSubmitting,
|
|
129
|
-
children: callToAction?.displayText
|
|
130
|
-
}
|
|
131
|
-
) })
|
|
132
|
-
] })
|
|
118
|
+
) }),
|
|
119
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
120
|
+
InputTextArea,
|
|
121
|
+
{
|
|
122
|
+
id: "message",
|
|
123
|
+
...register("message", { required: true }),
|
|
124
|
+
label: "Write Your Message",
|
|
125
|
+
sizes: "medium",
|
|
126
|
+
required: true,
|
|
127
|
+
error: !!errors.message,
|
|
128
|
+
helperText: errors.message?.message,
|
|
129
|
+
variant
|
|
130
|
+
}
|
|
131
|
+
) }),
|
|
132
|
+
/* @__PURE__ */ jsx(HoneyPot, { register, errors, variant })
|
|
133
|
+
] }),
|
|
134
|
+
children,
|
|
135
|
+
/* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
|
|
136
|
+
/* @__PURE__ */ jsx("div", { className: actions, children: isSubmitting ? /* @__PURE__ */ jsx(
|
|
137
|
+
LoadingIndicator,
|
|
138
|
+
{
|
|
139
|
+
style: { marginInline: "auto" },
|
|
140
|
+
variant
|
|
141
|
+
}
|
|
142
|
+
) : /* @__PURE__ */ jsx(
|
|
143
|
+
Button,
|
|
144
|
+
{
|
|
145
|
+
color: getVariant(callToAction?.variant),
|
|
146
|
+
as: "button",
|
|
147
|
+
type: "submit",
|
|
148
|
+
disabled: !isValid || isSubmitting,
|
|
149
|
+
children: callToAction?.displayText
|
|
150
|
+
}
|
|
151
|
+
) })
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
)
|
|
133
155
|
] }) }) }, id);
|
|
134
156
|
};
|
|
135
157
|
export {
|
|
@@ -7,6 +7,9 @@ export interface FormProps extends PropsWithChildren {
|
|
|
7
7
|
onSubmit?: (values: {
|
|
8
8
|
[index: string]: string | boolean | number | Date | any;
|
|
9
9
|
}) => void;
|
|
10
|
+
onValidate?: (values: {
|
|
11
|
+
[index: string]: string | boolean | number | Date | any;
|
|
12
|
+
}) => void;
|
|
10
13
|
icon?: boolean;
|
|
11
14
|
headline?: ReactNode | string;
|
|
12
15
|
description?: ReactNode | string;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export declare const formContainer: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
2
2
|
variant: {
|
|
3
3
|
primary: {
|
|
4
|
-
background: `var(--${string})
|
|
5
|
-
color: `var(--${string})
|
|
4
|
+
background: `var(--${string})`;
|
|
5
|
+
color: `var(--${string})`;
|
|
6
6
|
};
|
|
7
7
|
secondary: {
|
|
8
|
-
background: `var(--${string})
|
|
9
|
-
color: `var(--${string})
|
|
8
|
+
background: `var(--${string})`;
|
|
9
|
+
color: `var(--${string})`;
|
|
10
10
|
};
|
|
11
11
|
tertiary: {
|
|
12
|
-
background: `var(--${string})
|
|
13
|
-
color: `var(--${string})
|
|
12
|
+
background: `var(--${string})`;
|
|
13
|
+
color: `var(--${string})`;
|
|
14
14
|
};
|
|
15
15
|
quaternary: {
|
|
16
|
-
background: `var(--${string})
|
|
17
|
-
color: `var(--${string})
|
|
16
|
+
background: `var(--${string})`;
|
|
17
|
+
color: `var(--${string})`;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
}>;
|
|
@@ -26,12 +26,12 @@ export declare const headerForm: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
|
26
26
|
readonly selectors: {
|
|
27
27
|
[x: string]: {
|
|
28
28
|
WebkitBackgroundClip: string;
|
|
29
|
-
backgroundImage: `var(--${string})
|
|
29
|
+
backgroundImage: `var(--${string})`;
|
|
30
30
|
WebkitTextFillColor: string;
|
|
31
31
|
textShadow: string;
|
|
32
32
|
color?: undefined;
|
|
33
33
|
} | {
|
|
34
|
-
color: `var(--${string})
|
|
34
|
+
color: `var(--${string})`;
|
|
35
35
|
WebkitBackgroundClip?: undefined;
|
|
36
36
|
backgroundImage?: undefined;
|
|
37
37
|
WebkitTextFillColor?: undefined;
|
|
@@ -43,12 +43,12 @@ export declare const headerForm: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
|
43
43
|
selectors: {
|
|
44
44
|
[x: string]: {
|
|
45
45
|
WebkitBackgroundClip: "text";
|
|
46
|
-
backgroundImage: `var(--${string})
|
|
46
|
+
backgroundImage: `var(--${string})`;
|
|
47
47
|
WebkitTextFillColor: "transparent";
|
|
48
48
|
textShadow: "0px 0px #00000000";
|
|
49
49
|
color?: undefined;
|
|
50
50
|
} | {
|
|
51
|
-
color: `var(--${string})
|
|
51
|
+
color: `var(--${string})`;
|
|
52
52
|
WebkitBackgroundClip?: undefined;
|
|
53
53
|
backgroundImage?: undefined;
|
|
54
54
|
WebkitTextFillColor?: undefined;
|
|
@@ -57,26 +57,26 @@ export declare const headerForm: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
tertiary: {
|
|
60
|
-
color: `var(--${string})
|
|
60
|
+
color: `var(--${string})`;
|
|
61
61
|
};
|
|
62
62
|
quaternary: {
|
|
63
|
-
color: `var(--${string})
|
|
63
|
+
color: `var(--${string})`;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
67
|
export declare const formWrapper: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
68
68
|
variant: {
|
|
69
69
|
primary: {
|
|
70
|
-
color: `var(--${string})
|
|
70
|
+
color: `var(--${string})`;
|
|
71
71
|
};
|
|
72
72
|
secondary: {
|
|
73
|
-
color: `var(--${string})
|
|
73
|
+
color: `var(--${string})`;
|
|
74
74
|
};
|
|
75
75
|
tertiary: {
|
|
76
|
-
color: `var(--${string})
|
|
76
|
+
color: `var(--${string})`;
|
|
77
77
|
};
|
|
78
78
|
quaternary: {
|
|
79
|
-
color: `var(--${string})
|
|
79
|
+
color: `var(--${string})`;
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
82
|
formType: {
|
|
@@ -97,16 +97,16 @@ export declare const actions: string;
|
|
|
97
97
|
export declare const disclosureForm: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
98
98
|
variant: {
|
|
99
99
|
primary: {
|
|
100
|
-
color: `var(--${string})
|
|
100
|
+
color: `var(--${string})`;
|
|
101
101
|
};
|
|
102
102
|
secondary: {
|
|
103
|
-
color: `var(--${string})
|
|
103
|
+
color: `var(--${string})`;
|
|
104
104
|
};
|
|
105
105
|
tertiary: {
|
|
106
|
-
color: `var(--${string})
|
|
106
|
+
color: `var(--${string})`;
|
|
107
107
|
};
|
|
108
108
|
quaternary: {
|
|
109
|
-
color: `var(--${string})
|
|
109
|
+
color: `var(--${string})`;
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
}>;
|
|
@@ -114,20 +114,20 @@ export declare const form: string;
|
|
|
114
114
|
export declare const success_wrap: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
115
115
|
variant: {
|
|
116
116
|
primary: {
|
|
117
|
-
color: `var(--${string})
|
|
118
|
-
background: `var(--${string})
|
|
117
|
+
color: `var(--${string})`;
|
|
118
|
+
background: `var(--${string})`;
|
|
119
119
|
};
|
|
120
120
|
secondary: {
|
|
121
|
-
color: `var(--${string})
|
|
122
|
-
background: `var(--${string})
|
|
121
|
+
color: `var(--${string})`;
|
|
122
|
+
background: `var(--${string})`;
|
|
123
123
|
};
|
|
124
124
|
tertiary: {
|
|
125
|
-
color: `var(--${string})
|
|
126
|
-
background: `var(--${string})
|
|
125
|
+
color: `var(--${string})`;
|
|
126
|
+
background: `var(--${string})`;
|
|
127
127
|
};
|
|
128
128
|
quaternary: {
|
|
129
|
-
color: `var(--${string})
|
|
130
|
-
background: `var(--${string})
|
|
129
|
+
color: `var(--${string})`;
|
|
130
|
+
background: `var(--${string})`;
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
133
|
}>;
|
|
@@ -136,32 +136,32 @@ export declare const succes_check_mark: string;
|
|
|
136
136
|
export declare const success_circle: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
137
137
|
variant: {
|
|
138
138
|
primary: {
|
|
139
|
-
stroke: `var(--${string})
|
|
139
|
+
stroke: `var(--${string})`;
|
|
140
140
|
};
|
|
141
141
|
secondary: {
|
|
142
|
-
stroke: `var(--${string})
|
|
142
|
+
stroke: `var(--${string})`;
|
|
143
143
|
};
|
|
144
144
|
tertiary: {
|
|
145
|
-
stroke: `var(--${string})
|
|
145
|
+
stroke: `var(--${string})`;
|
|
146
146
|
};
|
|
147
147
|
quaternary: {
|
|
148
|
-
stroke: `var(--${string})
|
|
148
|
+
stroke: `var(--${string})`;
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
151
|
}>;
|
|
152
152
|
export declare const descriptionField: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
153
153
|
variant: {
|
|
154
154
|
primary: {
|
|
155
|
-
color: `var(--${string})
|
|
155
|
+
color: `var(--${string})`;
|
|
156
156
|
};
|
|
157
157
|
secondary: {
|
|
158
|
-
color: `var(--${string})
|
|
158
|
+
color: `var(--${string})`;
|
|
159
159
|
};
|
|
160
160
|
tertiary: {
|
|
161
|
-
color: `var(--${string})
|
|
161
|
+
color: `var(--${string})`;
|
|
162
162
|
};
|
|
163
163
|
quaternary: {
|
|
164
|
-
color: `var(--${string})
|
|
164
|
+
color: `var(--${string})`;
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
167
|
formType: {
|
|
@@ -175,16 +175,16 @@ export declare const one_row: string;
|
|
|
175
175
|
export declare const section_title: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
176
176
|
variant: {
|
|
177
177
|
primary: {
|
|
178
|
-
borderBottom: `1px solid var(--${string})
|
|
178
|
+
borderBottom: `1px solid var(--${string})`;
|
|
179
179
|
};
|
|
180
180
|
secondary: {
|
|
181
|
-
borderBottom: `1px solid var(--${string})
|
|
181
|
+
borderBottom: `1px solid var(--${string})`;
|
|
182
182
|
};
|
|
183
183
|
tertiary: {
|
|
184
|
-
borderBottom: `1px solid var(--${string})
|
|
184
|
+
borderBottom: `1px solid var(--${string})`;
|
|
185
185
|
};
|
|
186
186
|
quaternary: {
|
|
187
|
-
borderBottom: `1px solid var(--${string})
|
|
187
|
+
borderBottom: `1px solid var(--${string})`;
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
}>;
|
package/dist/Forms/Forms.css.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import '../assets/Forms/Forms.css';import '../assets/Input/RadioButton.css';import '../assets/Input/Dropdown.css';import '../assets/Typography/Typography.css';import '../assets/Input/Input.css';import '../assets/themes/victorie.css';import '../assets/themes/premier.css';import '../assets/themes/axos.css';import '../assets/Input/Checkbox.css';/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const h_container_position: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FieldErrors, UseFormRegister } from 'react-hook-form';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { FormProps } from '../FormProps';
|
|
4
|
+
|
|
5
|
+
export type HoneyPotInterface = {
|
|
6
|
+
Alternative_Phone?: string;
|
|
7
|
+
Alternative_Email?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const honeyPotSchema: z.ZodObject<{
|
|
10
|
+
Alternative_Email: z.ZodOptional<z.ZodString>;
|
|
11
|
+
Alternative_Phone: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
Alternative_Email?: string | undefined;
|
|
14
|
+
Alternative_Phone?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
Alternative_Email?: string | undefined;
|
|
17
|
+
Alternative_Phone?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const isValidHoneyPot: (data: HoneyPotInterface) => boolean;
|
|
20
|
+
export declare const HoneyPot: ({ variant: fullVariant, register, errors, }: {
|
|
21
|
+
variant?: FormProps["variant"];
|
|
22
|
+
register: UseFormRegister<any>;
|
|
23
|
+
errors: FieldErrors<HoneyPotInterface>;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import "../../Input/Checkbox.js";
|
|
3
|
+
import "../../Input/CurrencyInput.js";
|
|
4
|
+
import "../../Input/Dropdown.js";
|
|
5
|
+
import "../../Input/Dropdown.css.js";
|
|
6
|
+
import { Input } from "../../Input/Input.js";
|
|
7
|
+
import "../../Input/Input.css.js";
|
|
8
|
+
import "../../Input/InputAmount.js";
|
|
9
|
+
import { InputPhone } from "../../Input/InputPhone.js";
|
|
10
|
+
import "../../Input/InputTextArea.js";
|
|
11
|
+
import "../../Input/DownPaymentInput.js";
|
|
12
|
+
import "../../Input/RadioButton.js";
|
|
13
|
+
import "../../utils/allowedAxosDomains.js";
|
|
14
|
+
import { getVariant } from "../../utils/getVariant.js";
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
import { h_container_position } from "./HoneyPot.css.js";
|
|
17
|
+
const honeyPotSchema = z.object({
|
|
18
|
+
Alternative_Email: z.string().optional(),
|
|
19
|
+
Alternative_Phone: z.string().optional()
|
|
20
|
+
});
|
|
21
|
+
const isValidHoneyPot = (data) => {
|
|
22
|
+
if (data.Alternative_Email !== "bestbank@axos.com" || data.Alternative_Phone !== "") {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
};
|
|
27
|
+
const HoneyPot = ({
|
|
28
|
+
variant: fullVariant = "primary",
|
|
29
|
+
register,
|
|
30
|
+
errors
|
|
31
|
+
}) => {
|
|
32
|
+
const variant = getVariant(fullVariant);
|
|
33
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34
|
+
/* @__PURE__ */ jsx("div", { className: h_container_position, children: /* @__PURE__ */ jsx(
|
|
35
|
+
Input,
|
|
36
|
+
{
|
|
37
|
+
id: "Alternative_Email",
|
|
38
|
+
...register("Alternative_Email"),
|
|
39
|
+
label: "Alternative Email",
|
|
40
|
+
sizes: "medium",
|
|
41
|
+
error: !!errors.Alternative_Email,
|
|
42
|
+
helperText: errors.Alternative_Email?.message,
|
|
43
|
+
variant,
|
|
44
|
+
tabIndex: -1,
|
|
45
|
+
defaultValue: "bestbank@axos.com",
|
|
46
|
+
autoComplete: "false"
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: h_container_position, children: /* @__PURE__ */ jsx(
|
|
50
|
+
InputPhone,
|
|
51
|
+
{
|
|
52
|
+
id: "Alternative_Phone",
|
|
53
|
+
...register("Alternative_Phone", {
|
|
54
|
+
maxLength: 12
|
|
55
|
+
}),
|
|
56
|
+
label: "Alternative Phone",
|
|
57
|
+
sizes: "medium",
|
|
58
|
+
error: !!errors.Alternative_Phone,
|
|
59
|
+
helperText: errors.Alternative_Phone?.message,
|
|
60
|
+
variant,
|
|
61
|
+
tabIndex: -1,
|
|
62
|
+
autoComplete: "autocomplete_off_randString"
|
|
63
|
+
}
|
|
64
|
+
) })
|
|
65
|
+
] });
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
HoneyPot,
|
|
69
|
+
honeyPotSchema,
|
|
70
|
+
isValidHoneyPot
|
|
71
|
+
};
|
|
@@ -19,7 +19,7 @@ export type MortgageRateInputs = {
|
|
|
19
19
|
loanPurpose: number;
|
|
20
20
|
[key: string]: string | number;
|
|
21
21
|
};
|
|
22
|
-
export declare const MortgageRate: ({ icon, children, onSubmit, disclosure, variant: fullVariant, validateEmail, id, rateWatchOnSubmit, setRateWatchSubmitted, hideModalValue, showingTables, }: FormProps & {
|
|
22
|
+
export declare const MortgageRate: ({ icon, children, onSubmit, disclosure, variant: fullVariant, validateEmail, id, rateWatchOnSubmit, setRateWatchSubmitted, hideModalValue, showingTables, onValidate, }: FormProps & {
|
|
23
23
|
rateWatchOnSubmit: (values: RateWatchInputs & {
|
|
24
24
|
email: string;
|
|
25
25
|
}) => Promise<void>;
|