@axos-web-dev/shared-components 0.0.67 → 0.0.69

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 (112) hide show
  1. package/dist/AwardsItem/AwardsItem.js +13 -5
  2. package/dist/BulletItem/BulletItem.js +1 -1
  3. package/dist/Calculators/Calculator.js +7 -2
  4. package/dist/CallToActionBar/CallToActionBar.css.d.ts +1 -0
  5. package/dist/CallToActionBar/CallToActionBar.css.js +18 -16
  6. package/dist/CallToActionBar/index.js +24 -17
  7. package/dist/Carousel/index.js +7 -2
  8. package/dist/Chevron/index.js +7 -2
  9. package/dist/Comparison/Comparison.css.d.ts +42 -0
  10. package/dist/Comparison/Comparison.css.js +27 -0
  11. package/dist/Comparison/Comparison.d.ts +3 -0
  12. package/dist/Comparison/Comparison.interface.d.ts +24 -0
  13. package/dist/Comparison/Comparison.interface.js +1 -0
  14. package/dist/Comparison/Comparison.js +143 -0
  15. package/dist/Comparison/ComparisonSet.d.ts +3 -0
  16. package/dist/{Forms/RenderForm.js → Comparison/ComparisonSet.js} +112 -36
  17. package/dist/Comparison/index.d.ts +3 -0
  18. package/dist/Comparison/index.js +15 -0
  19. package/dist/DownloadTile/index.js +9 -7
  20. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +7 -2
  21. package/dist/Forms/ApplicationStart.d.ts +1 -1
  22. package/dist/Forms/ApplicationStart.js +11 -1
  23. package/dist/Forms/CommercialLending.d.ts +15 -0
  24. package/dist/Forms/CommercialLending.js +288 -0
  25. package/dist/Forms/ContactCompany.d.ts +2 -17
  26. package/dist/Forms/ContactCompany.js +11 -1
  27. package/dist/Forms/ContactUs.d.ts +9 -0
  28. package/dist/Forms/ContactUs.js +181 -0
  29. package/dist/Forms/ContactUsAAS.d.ts +13 -0
  30. package/dist/Forms/ContactUsAAS.js +330 -0
  31. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  32. package/dist/Forms/ContactUsBusiness.js +18 -3
  33. package/dist/Forms/DealerServices.d.ts +2 -17
  34. package/dist/Forms/DealerServices.js +11 -1
  35. package/dist/Forms/EmailOnly.d.ts +1 -1
  36. package/dist/Forms/EmailOnly.js +12 -3
  37. package/dist/Forms/EmailUs.d.ts +7 -0
  38. package/dist/Forms/EmailUs.js +125 -0
  39. package/dist/Forms/FormEnums.d.ts +2 -0
  40. package/dist/Forms/FormEnums.js +18 -0
  41. package/dist/Forms/FormProps.d.ts +17 -0
  42. package/dist/Forms/FormProps.js +1 -0
  43. package/dist/Forms/Forms.css.d.ts +8 -0
  44. package/dist/Forms/Forms.css.js +12 -10
  45. package/dist/Forms/SalesforceFieldsForm.d.ts +12 -0
  46. package/dist/Forms/SalesforceFieldsForm.js +4 -1
  47. package/dist/Forms/ScheduleCall.d.ts +5 -18
  48. package/dist/Forms/ScheduleCall.js +70 -7
  49. package/dist/Forms/ScheduleCallPremier.d.ts +1 -1
  50. package/dist/Forms/ScheduleCallPremier.js +19 -2
  51. package/dist/Forms/SuccesForm.js +7 -2
  52. package/dist/Forms/WcplSurvey.d.ts +8 -0
  53. package/dist/Forms/WcplSurvey.js +194 -0
  54. package/dist/Forms/index.d.ts +9 -4
  55. package/dist/Forms/index.js +15 -7
  56. package/dist/Hyperlink/index.js +7 -2
  57. package/dist/ImageBillboard/ImageBillboardSet.js +1 -1
  58. package/dist/ImageLink/ImageLink.js +14 -9
  59. package/dist/ImageLink/ImageLinkSet.js +5 -0
  60. package/dist/ImageLink/index.js +7 -2
  61. package/dist/Input/Checkbox.d.ts +1 -1
  62. package/dist/Input/Input.d.ts +1 -12
  63. package/dist/Input/Input.js +3 -1
  64. package/dist/Input/InputProps.d.ts +9 -0
  65. package/dist/Input/RadioButton.css.d.ts +15 -0
  66. package/dist/Input/RadioButton.css.js +10 -0
  67. package/dist/Input/RadioButton.d.ts +5 -0
  68. package/dist/Input/RadioButton.js +50 -0
  69. package/dist/Input/index.d.ts +1 -0
  70. package/dist/LoadingIndicator/LoadingIndicator.css.d.ts +16 -0
  71. package/dist/LoadingIndicator/LoadingIndicator.css.js +6 -0
  72. package/dist/LoadingIndicator/index.d.ts +10 -0
  73. package/dist/LoadingIndicator/index.js +20 -0
  74. package/dist/Modal/Modal.js +7 -2
  75. package/dist/SetContainer/SetContainer.css.d.ts +35 -0
  76. package/dist/SetContainer/SetContainer.css.js +10 -2
  77. package/dist/SetContainer/SetContainer.d.ts +6 -2
  78. package/dist/SetContainer/SetContainer.js +42 -19
  79. package/dist/SetContainer/index.js +6 -2
  80. package/dist/Tab/Tab.css.d.ts +37 -0
  81. package/dist/Tab/Tab.css.js +13 -0
  82. package/dist/Tab/Tab.d.ts +10 -0
  83. package/dist/Tab/Tab.js +25 -0
  84. package/dist/Tab/TabContainer.d.ts +5 -0
  85. package/dist/Tab/TabContainer.js +10 -0
  86. package/dist/Tab/index.d.ts +2 -0
  87. package/dist/Tab/index.js +6 -0
  88. package/dist/TopicalNavItem/TopicalNavItem.d.ts +1 -1
  89. package/dist/TopicalNavItem/TopicalNavItem.js +40 -31
  90. package/dist/TopicalNavSet/TopicalNavSet.js +5 -5
  91. package/dist/VideoTile/VideoTile.interface.d.ts +3 -0
  92. package/dist/VideoTile/VideoTile.js +3 -1
  93. package/dist/assets/CallToActionBar/CallToActionBar.css +35 -27
  94. package/dist/assets/Carousel/Carousel.css +2 -0
  95. package/dist/assets/Comparison/Comparison.css +141 -0
  96. package/dist/assets/Forms/Forms.css +46 -35
  97. package/dist/assets/Input/Input.css +1 -0
  98. package/dist/assets/Input/RadioButton.css +31 -0
  99. package/dist/assets/LoadingIndicator/LoadingIndicator.css +27 -0
  100. package/dist/assets/SetContainer/SetContainer.css +63 -5
  101. package/dist/assets/Tab/Tab.css +49 -0
  102. package/dist/assets/globals.css +6 -0
  103. package/dist/assets/icons/Star/Star.css +6 -0
  104. package/dist/icons/Star/Star.css.d.ts +13 -0
  105. package/dist/icons/Star/Star.css.js +6 -0
  106. package/dist/icons/Star/index.d.ts +9 -0
  107. package/dist/icons/Star/index.js +26 -0
  108. package/dist/main.d.ts +5 -2
  109. package/dist/main.js +94 -63
  110. package/dist/utils/variant.types.d.ts +1 -0
  111. package/package.json +8 -7
  112. package/dist/Forms/RenderForm.d.ts +0 -8
@@ -1,44 +1,49 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
2
- import "@hookform/resolvers/zod";
3
- import "../Modal/contextApi/store.js";
4
- import "clsx";
5
- import "react";
6
- import "../Button/Button.css.js";
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/Input.js";
14
- import "../Input/Input.css.js";
15
- import "../Input/InputPhone.js";
16
- import "../Input/InputTextArea.js";
1
+ "use client";
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
+ import { useState, createElement } from "react";
4
+ import "../Accordion/Accordion.js";
5
+ import "../Accordion/Accordion.css.js";
6
+ import { Chevron } from "../Chevron/index.js";
17
7
  import "../icons/ArrowIcon/ArrowIcon.css.js";
18
8
  import "../icons/CheckIcon/CheckIcon.css.js";
19
9
  /* empty css */
20
10
  /* empty css */
21
11
  /* empty css */
22
12
  /* empty css */
23
- import "react-hook-form";
24
- import "./Forms.css.js";
25
- import "./SalesforceFieldsForm.js";
26
- import "../Accordion/Accordion.js";
27
- import "../Accordion/Accordion.css.js";
28
- import "../Chevron/Chevron.css.js";
29
13
  import "../AlertBanner/AlertBanner.css.js";
14
+ import { Button } from "../Button/Button.js";
15
+ import "../Button/Button.css.js";
16
+ import "react-use";
30
17
  /* empty css */
18
+ import { getVariant } from "../utils/getVariant.js";
31
19
  import "../Article/Article.css.js";
32
20
  import "../ArticlesSet/ArticlesSet.css.js";
33
21
  /* empty css */
34
22
  /* empty css */
35
- import "../IconBillboard/IconBillboard.css.js";
36
23
  /* empty css */
24
+ import { buttons } from "../IconBillboard/IconBillboard.css.js";
25
+ /* empty css */
26
+ import "@hookform/resolvers/zod";
27
+ import "../Input/Checkbox.js";
28
+ import "../Input/CurrencyInput.js";
29
+ import "../Input/Dropdown.js";
30
+ /* empty css */
31
+ import "../Input/Input.js";
32
+ import "../Input/Input.css.js";
33
+ import "../Input/InputPhone.js";
34
+ import "../Input/InputTextArea.js";
35
+ import clsx from "clsx";
36
+ import "react-hook-form";
37
+ import "../Forms/Forms.css.js";
38
+ import "../Forms/SalesforceFieldsForm.js";
39
+ import "../LoadingIndicator/LoadingIndicator.css.js";
40
+ import "../Input/RadioButton.js";
37
41
  import "iframe-resizer";
38
42
  import "../Calculators/calculator.css.js";
39
43
  /* empty css */
40
44
  import "../Carousel/index.js";
41
45
  /* empty css */
46
+ import { comparison_container, comparison_tab_container } from "./Comparison.css.js";
42
47
  import "../HeroBanner/HeroBanner.css.js";
43
48
  import "../ContentBanner/ContentBanner.css.js";
44
49
  /* empty css */
@@ -49,8 +54,11 @@ import "../FooterDisclosure/FooterDisclosure.css.js";
49
54
  import "../HeroBanner/SelectionBanner.css.js";
50
55
  import "../SetContainer/SetContainer.css.js";
51
56
  import "../ImageBillboard/ImageBillboard.css.js";
57
+ import { SetContainer } from "../SetContainer/SetContainer.js";
52
58
  import "../LandingPageHeader/LandingPageHeader.css.js";
59
+ import "../Chevron/Chevron.css.js";
53
60
  /* empty css */
61
+ import "../Modal/contextApi/store.js";
54
62
  /* empty css */
55
63
  /* empty css */
56
64
  /* empty css */
@@ -66,19 +74,87 @@ import "../Table/Table.css.js";
66
74
  import "next/script.js";
67
75
  /* empty css */
68
76
  /* empty css */
69
- import { ScheduleCall } from "./ScheduleCall.js";
70
- const renderSwitch = (form = "Contact Form", props) => {
71
- switch (form) {
72
- case "Contact Form":
73
- return /* @__PURE__ */ jsx(ScheduleCall, { ...props });
74
- default:
75
- return /* @__PURE__ */ jsx(ScheduleCall, { ...props });
76
- }
77
- };
78
- const RenderWebForm = (props) => {
79
- return /* @__PURE__ */ jsx(Fragment, { children: renderSwitch(props.form, props) });
77
+ import { Tab } from "../Tab/Tab.js";
78
+ import { TabContainer } from "../Tab/TabContainer.js";
79
+ import { active_tab } from "../Tab/Tab.css.js";
80
+ import { Comparison } from "./Comparison.js";
81
+ const ComparisonSet = ({
82
+ headline,
83
+ variant,
84
+ id,
85
+ additionalDetails,
86
+ icon,
87
+ eyebrow,
88
+ bodyCopy,
89
+ comparisonElements,
90
+ callToActionRow
91
+ }) => {
92
+ const [toggleState, setToggleState] = useState(0);
93
+ const toggleTab = (index) => {
94
+ setToggleState(index);
95
+ };
96
+ const formatAdditionalDetails = /* @__PURE__ */ jsxs(Fragment, { children: [
97
+ additionalDetails,
98
+ callToActionRow && callToActionRow?.length > 0 && /* @__PURE__ */ jsx("div", { className: buttons, children: callToActionRow?.map(
99
+ ({ id: id2, variant: variant2, displayText, targetUrl, type }) => type === "Button" ? /* @__PURE__ */ jsx(
100
+ Button,
101
+ {
102
+ targetUrl,
103
+ color: getVariant(variant2),
104
+ size: "medium",
105
+ rounded: "medium",
106
+ children: displayText
107
+ },
108
+ id2
109
+ ) : /* @__PURE__ */ jsx(
110
+ Chevron,
111
+ {
112
+ targetUrl,
113
+ variant: getVariant(variant2),
114
+ children: displayText
115
+ },
116
+ id2
117
+ )
118
+ ) })
119
+ ] });
120
+ return /* @__PURE__ */ jsx(
121
+ SetContainer,
122
+ {
123
+ id,
124
+ variant,
125
+ headline,
126
+ icon,
127
+ eyebrow,
128
+ bodyCopy,
129
+ additionalDetails: formatAdditionalDetails,
130
+ isolate: true,
131
+ children: /* @__PURE__ */ jsxs("div", { className: clsx(comparison_container), children: [
132
+ /* @__PURE__ */ jsx(TabContainer, { className: comparison_tab_container, children: comparisonElements.map(({ headerTab, id: id2 }, index) => /* @__PURE__ */ jsx(
133
+ Tab,
134
+ {
135
+ id: `tab_${id2}_${index}`,
136
+ headline: `${headerTab}`,
137
+ onClick: () => {
138
+ toggleTab(index);
139
+ },
140
+ className: toggleState === index ? active_tab({ variant: getVariant(variant) }) : "",
141
+ variant
142
+ },
143
+ `tab_${id2}_${index}`
144
+ )) }),
145
+ comparisonElements.map((item, index) => /* @__PURE__ */ createElement(
146
+ Comparison,
147
+ {
148
+ ...item,
149
+ key: item.id,
150
+ index,
151
+ toggleState
152
+ }
153
+ ))
154
+ ] })
155
+ }
156
+ );
80
157
  };
81
158
  export {
82
- RenderWebForm,
83
- renderSwitch
159
+ ComparisonSet
84
160
  };
@@ -0,0 +1,3 @@
1
+ export * from './Comparison.css';
2
+ export type { ComparisonSetProps } from './Comparison.interface';
3
+ export * from './ComparisonSet';
@@ -0,0 +1,15 @@
1
+ import { comparison, comparison_buttons, comparison_container, comparison_feature, comparison_layout, comparison_list, comparison_tab_container, feature_header, feature_title, headerComparison } from "./Comparison.css.js";
2
+ import { ComparisonSet } from "./ComparisonSet.js";
3
+ export {
4
+ ComparisonSet,
5
+ comparison,
6
+ comparison_buttons,
7
+ comparison_container,
8
+ comparison_feature,
9
+ comparison_layout,
10
+ comparison_list,
11
+ comparison_tab_container,
12
+ feature_header,
13
+ feature_title,
14
+ headerComparison
15
+ };
@@ -22,13 +22,15 @@ const DownloadTile = ({
22
22
  /* @__PURE__ */ jsx("th", { scope: "colgroup", children: "NAME" }),
23
23
  /* @__PURE__ */ jsx("th", { scope: "colgroup", children: "ACTION" })
24
24
  ] }) }),
25
- /* @__PURE__ */ jsx("tbody", { id: "body-table", children: downloadTiles.map(({ id: id2, url, displayName, action }) => /* @__PURE__ */ jsxs("tr", { children: [
26
- /* @__PURE__ */ jsx("td", { "data-label": "", children: displayName }),
27
- /* @__PURE__ */ jsx("td", { "data-label": "", children: /* @__PURE__ */ jsxs("a", { href: url, target: "_blank", className: download, children: [
28
- action.toLowerCase() === "download" ? /* @__PURE__ */ jsx(SvgDownloadIcon, { className: ico }) : /* @__PURE__ */ jsx(SvgFollowIcon, { className: ico }),
29
- /* @__PURE__ */ jsx("span", { children: action })
30
- ] }) })
31
- ] }, id2)) })
25
+ /* @__PURE__ */ jsx("tbody", { id: "body-table", children: downloadTiles.map(
26
+ ({ id: id2, url, displayName, action = "Download" }) => /* @__PURE__ */ jsxs("tr", { children: [
27
+ /* @__PURE__ */ jsx("td", { "data-label": "", children: displayName }),
28
+ /* @__PURE__ */ jsx("td", { "data-label": "", children: /* @__PURE__ */ jsxs("a", { href: url, target: "_blank", className: download, children: [
29
+ action.toLowerCase() === "download" ? /* @__PURE__ */ jsx(SvgDownloadIcon, { className: ico }) : /* @__PURE__ */ jsx(SvgFollowIcon, { className: ico }),
30
+ /* @__PURE__ */ jsx("span", { children: action })
31
+ ] }) })
32
+ ] }, id2)
33
+ ) })
32
34
  ] }),
33
35
  /* @__PURE__ */ jsx("div", { className: `${table_footer} push_up_32`, children: additionalDetails && /* @__PURE__ */ jsx(Fragment, { children: additionalDetails }) })
34
36
  ] })
@@ -35,20 +35,25 @@ import "../../Input/InputTextArea.js";
35
35
  import "react-hook-form";
36
36
  import "../../Forms/Forms.css.js";
37
37
  import "../../Forms/SalesforceFieldsForm.js";
38
+ import "../../LoadingIndicator/LoadingIndicator.css.js";
39
+ import "../../Input/RadioButton.js";
38
40
  import "iframe-resizer";
39
41
  import "../../Calculators/calculator.css.js";
40
42
  /* empty css */
41
43
  import "../../Carousel/index.js";
42
44
  /* empty css */
45
+ import "../../Comparison/Comparison.css.js";
43
46
  import "../../HeroBanner/HeroBanner.css.js";
47
+ import "../../HeroBanner/SelectionBanner.css.js";
48
+ import "../../SetContainer/SetContainer.css.js";
49
+ import "../../Tab/Tab.css.js";
50
+ import "../../icons/Star/Star.css.js";
44
51
  import "../../ContentBanner/ContentBanner.css.js";
45
52
  /* empty css */
46
53
  import "../../ExecutiveBio/ExecutiveBio.css.js";
47
54
  import "../../FaqAccordion/index.js";
48
55
  import "../../FooterDisclosure/FooterDisclosure.css.js";
49
56
  import { footer_section, footer_wrapper, ft_col, ft_col_header, ft_col_subheader, nested_grid, app_col, footer_mobile, ft_panel_group, ft_panel } from "./FooterSiteMap.css.js";
50
- import "../../HeroBanner/SelectionBanner.css.js";
51
- import "../../SetContainer/SetContainer.css.js";
52
57
  import "../../ImageBillboard/ImageBillboard.css.js";
53
58
  import "../../LandingPageHeader/LandingPageHeader.css.js";
54
59
  /* empty css */
@@ -1,4 +1,4 @@
1
- import { FormProps } from './ScheduleCall';
1
+ import { FormProps } from './FormProps';
2
2
 
3
3
  export type ApplicationStartInputs = {
4
4
  first_name: string;
@@ -92,7 +92,17 @@ const ApplicationStart = ({
92
92
  icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
93
93
  /* @__PURE__ */ jsxs("div", { className: `${headerContainer} text_center`, children: [
94
94
  /* @__PURE__ */ jsx("h2", { className: clsx("header_2", headerForm({ variant })), children: headline }),
95
- description && /* @__PURE__ */ jsx("div", { className: `${form} ${descriptionField} text_center`, children: description })
95
+ description && /* @__PURE__ */ jsx(
96
+ "div",
97
+ {
98
+ className: clsx(
99
+ "text_center",
100
+ form,
101
+ descriptionField({ variant })
102
+ ),
103
+ children: description
104
+ }
105
+ )
96
106
  ] }),
97
107
  /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
98
108
  /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
@@ -0,0 +1,15 @@
1
+ import { FormProps } from './FormProps';
2
+
3
+ export type CommercialLendingInputs = {
4
+ first_name: string;
5
+ last_name: string;
6
+ business_email: string;
7
+ business_phone: string;
8
+ company_nmls_id: string;
9
+ business_name: string;
10
+ zip: string;
11
+ annual_gross_revenue: string;
12
+ time_in_business: string;
13
+ type: string;
14
+ };
15
+ export declare const CommercialLending: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,288 @@
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 { Dropdown } from "../Input/Dropdown.js";
11
+ /* empty css */
12
+ /* empty css */
13
+ import { Input } from "../Input/Input.js";
14
+ import "../Input/Input.css.js";
15
+ import { InputPhone } from "../Input/InputPhone.js";
16
+ import "../Input/InputTextArea.js";
17
+ import "../icons/ArrowIcon/ArrowIcon.css.js";
18
+ import SvgAxosX from "../icons/AxosX/index.js";
19
+ import SvgComponent from "../icons/AxosX/Blue.js";
20
+ import "../icons/CheckIcon/CheckIcon.css.js";
21
+ /* empty css */
22
+ /* empty css */
23
+ /* empty css */
24
+ /* empty css */
25
+ import { associatedEmail } from "../utils/EverestValidity.js";
26
+ import { getVariant } from "../utils/getVariant.js";
27
+ import clsx from "clsx";
28
+ import { useForm, FormProvider } from "react-hook-form";
29
+ import * as z from "zod";
30
+ import { formContainer, iconForm, headerForm, form, formWrapper, disclosureForm, actions } from "./Forms.css.js";
31
+ import { SalesforceSchema } from "./SalesforceFieldsForm.js";
32
+ const CommercialLending = ({
33
+ icon = false,
34
+ children,
35
+ onSubmit = (values) => {
36
+ console.log(values);
37
+ },
38
+ disclosure,
39
+ variant: fullVariant = "primary",
40
+ headline,
41
+ callToAction,
42
+ validateEmail,
43
+ id
44
+ }) => {
45
+ const schema = z.object({
46
+ first_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "First Name is required." }),
47
+ last_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Last Name is required." }),
48
+ business_email: z.string().email({ message: "Business Email is required." }).refine(async (val) => await validateEmail(val)),
49
+ business_phone: z.string().regex(/[\d-]{10}/).min(10, { message: "Business Phone is required." }).max(12, { message: "Business Phone is required." }).transform((val, ctx) => {
50
+ const removeDashes = val.replace(/-/gi, "");
51
+ if (removeDashes.length !== 10) {
52
+ ctx.addIssue({
53
+ code: z.ZodIssueCode.custom,
54
+ message: "Phone must have at least 10 and no more than 10 characters."
55
+ });
56
+ return z.NEVER;
57
+ }
58
+ return removeDashes;
59
+ }),
60
+ zip: z.string(),
61
+ annual_gross_revenue: z.string(),
62
+ time_in_business: z.string(),
63
+ type: z.string()
64
+ });
65
+ const methods = useForm({
66
+ resolver: zodResolver(schema.merge(SalesforceSchema), {
67
+ async: true
68
+ }),
69
+ mode: "all",
70
+ defaultValues: {
71
+ business_email: ""
72
+ }
73
+ });
74
+ const {
75
+ handleSubmit,
76
+ register,
77
+ formState: { errors, isValid }
78
+ } = methods;
79
+ const submitForm = async (data) => {
80
+ await onSubmit(data);
81
+ };
82
+ const variant = getVariant(fullVariant);
83
+ return /* @__PURE__ */ jsx(
84
+ "section",
85
+ {
86
+ id: `id_${id}`,
87
+ className: clsx(formContainer({ variant })),
88
+ children: /* @__PURE__ */ jsx("div", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
89
+ icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
90
+ /* @__PURE__ */ jsx("h2", { className: clsx("header_2 text_center", headerForm({ variant })), children: headline }),
91
+ /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
92
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
93
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
94
+ Input,
95
+ {
96
+ id: "first_name",
97
+ ...register("first_name", { required: true }),
98
+ label: "First Name",
99
+ sizes: "medium",
100
+ placeholder: "First Name",
101
+ required: true,
102
+ error: !!errors.first_name,
103
+ helperText: errors.first_name?.message,
104
+ variant
105
+ }
106
+ ) }),
107
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
108
+ Input,
109
+ {
110
+ id: "last_name",
111
+ ...register("last_name", { required: true }),
112
+ label: "Last Name",
113
+ sizes: "medium",
114
+ placeholder: "Last Name",
115
+ required: true,
116
+ error: !!errors.last_name,
117
+ helperText: errors.last_name?.message,
118
+ variant
119
+ }
120
+ ) }),
121
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
122
+ Input,
123
+ {
124
+ id: "business_email",
125
+ ...register("business_email", {
126
+ required: true,
127
+ validate: {
128
+ isValid: associatedEmail
129
+ }
130
+ }),
131
+ label: "Business Email",
132
+ sizes: "medium",
133
+ placeholder: "Business Email",
134
+ required: true,
135
+ error: !!errors.business_email,
136
+ helperText: errors.business_email?.message,
137
+ variant
138
+ }
139
+ ) }),
140
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
141
+ InputPhone,
142
+ {
143
+ id: "business_phone",
144
+ ...register("business_phone", {
145
+ required: true,
146
+ maxLength: 12
147
+ }),
148
+ label: "Business Phone",
149
+ sizes: "medium",
150
+ placeholder: "Business Phone",
151
+ required: true,
152
+ error: !!errors.business_phone,
153
+ helperText: errors.business_phone?.message,
154
+ variant
155
+ }
156
+ ) }),
157
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
158
+ Input,
159
+ {
160
+ id: "company_nmls_id",
161
+ ...register("company_nmls_id", {
162
+ required: true,
163
+ maxLength: 12
164
+ }),
165
+ label: "Company NMLS ID",
166
+ sizes: "medium",
167
+ placeholder: "Company NMLS ID",
168
+ required: true,
169
+ error: !!errors.company_nmls_id,
170
+ helperText: errors.company_nmls_id?.message,
171
+ variant
172
+ }
173
+ ) }),
174
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
175
+ Input,
176
+ {
177
+ id: "business_name",
178
+ ...register("business_name", {
179
+ required: true,
180
+ maxLength: 12
181
+ }),
182
+ label: "Business Name",
183
+ sizes: "medium",
184
+ placeholder: "Buesiness Name",
185
+ required: true,
186
+ error: !!errors.business_name,
187
+ helperText: errors.business_name?.message,
188
+ variant
189
+ }
190
+ ) }),
191
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
192
+ Input,
193
+ {
194
+ id: "zip",
195
+ ...register("zip", {
196
+ required: true
197
+ }),
198
+ label: "Property Location or ZIP Code",
199
+ sizes: "medium",
200
+ placeholder: "Property Location or ZIP Code",
201
+ required: true,
202
+ error: !!errors.business_name,
203
+ helperText: errors.business_name?.message,
204
+ variant
205
+ }
206
+ ) }),
207
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
208
+ Dropdown,
209
+ {
210
+ id: "annual_gross_revenue",
211
+ ...register("annual_gross_revenue", {
212
+ required: true
213
+ }),
214
+ label: "Annual Gross Revenue",
215
+ sizes: "medium",
216
+ required: true,
217
+ error: !!errors.annual_gross_revenue,
218
+ helperText: errors.annual_gross_revenue?.message,
219
+ variant,
220
+ options: [
221
+ { value: 1, text: "<$5MM" },
222
+ { value: 2, text: "$5-10MM" },
223
+ { value: 3, text: "$10MM-$20MM" },
224
+ { value: 4, text: "$20MM+" }
225
+ ]
226
+ }
227
+ ) }),
228
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
229
+ Dropdown,
230
+ {
231
+ id: "time_in_business",
232
+ ...register("time_in_business", {
233
+ required: true
234
+ }),
235
+ label: "Time in Business",
236
+ sizes: "medium",
237
+ required: true,
238
+ error: !!errors.time_in_business,
239
+ helperText: errors.time_in_business?.message,
240
+ variant,
241
+ options: [
242
+ { value: 1, text: "< 2 Years in Business" },
243
+ { value: 2, text: "2-5 Years in Business" },
244
+ { value: 3, text: "5+ Years in Business" }
245
+ ]
246
+ }
247
+ ) }),
248
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
249
+ Dropdown,
250
+ {
251
+ id: "type",
252
+ ...register("type", {
253
+ required: true
254
+ }),
255
+ label: "Type",
256
+ sizes: "medium",
257
+ required: true,
258
+ error: !!errors.type,
259
+ helperText: errors.type?.message,
260
+ variant,
261
+ options: [
262
+ { value: 1, text: "Broker" },
263
+ { value: 2, text: "Borrower" }
264
+ ]
265
+ }
266
+ ) })
267
+ ] }),
268
+ children,
269
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
270
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
271
+ Button,
272
+ {
273
+ color: getVariant(callToAction?.variant),
274
+ as: "button",
275
+ type: "submit",
276
+ disabled: !isValid,
277
+ children: callToAction?.displayText
278
+ }
279
+ ) })
280
+ ] })
281
+ ] }) })
282
+ },
283
+ id
284
+ );
285
+ };
286
+ export {
287
+ CommercialLending
288
+ };
@@ -1,6 +1,4 @@
1
- import { ChevronProps } from '../Chevron/Chevron.interface';
2
- import { QuaternaryTypes } from '../utils/variant.types';
3
- import { PropsWithChildren, ReactNode } from 'react';
1
+ import { FormProps } from '../main';
4
2
 
5
3
  export type ContactCompanyInputs = {
6
4
  first_name: string;
@@ -9,17 +7,4 @@ export type ContactCompanyInputs = {
9
7
  phone: string;
10
8
  company: string;
11
9
  };
12
- export interface ContactCompanyFormProps extends PropsWithChildren {
13
- id?: string;
14
- onSubmit?: (values: {
15
- [index: string]: string;
16
- }) => void;
17
- icon?: boolean;
18
- headline?: ReactNode | string;
19
- description?: ReactNode | string;
20
- disclosure?: ReactNode | string;
21
- variant?: QuaternaryTypes;
22
- validateEmail: (email: string) => Promise<boolean>;
23
- callToAction: Omit<ChevronProps, "targetUrl">;
24
- }
25
- export declare const ContactCompany: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: ContactCompanyFormProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const ContactCompany: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -87,7 +87,17 @@ const ContactCompany = ({
87
87
  icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
88
88
  /* @__PURE__ */ jsxs("div", { className: `${headerContainer} text_center`, children: [
89
89
  /* @__PURE__ */ jsx("h2", { className: clsx("header_2", headerForm({ variant })), children: headline }),
90
- description && /* @__PURE__ */ jsx("div", { className: `${form} ${descriptionField} text_center`, children: description })
90
+ description && /* @__PURE__ */ jsx(
91
+ "div",
92
+ {
93
+ className: clsx(
94
+ "text_center",
95
+ form,
96
+ descriptionField({ variant })
97
+ ),
98
+ children: description
99
+ }
100
+ )
91
101
  ] }),
92
102
  /* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
93
103
  /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
@@ -0,0 +1,9 @@
1
+ import { FormProps } from './FormProps';
2
+
3
+ export type Inputs = {
4
+ first_name: string;
5
+ last_name: string;
6
+ email: string;
7
+ phone: string;
8
+ };
9
+ export declare const ContactUs: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, description, callToAction, validateEmail, id, }: FormProps) => import("react/jsx-runtime").JSX.Element;