@axos-web-dev/shared-components 0.0.4 → 0.0.6
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/Button/index.d.ts +10 -4
- package/dist/FaqAccordion/index.js +13 -3
- package/dist/Forms/Forms.css.d.ts +90 -0
- package/dist/Forms/Forms.css.js +19 -0
- package/dist/Forms/RenderForm.d.ts +7 -0
- package/dist/Forms/RenderForm.js +19 -0
- package/dist/Forms/SalesforceFieldsForm.d.ts +71 -0
- package/dist/Forms/SalesforceFieldsForm.js +137 -0
- package/dist/Forms/ScheduleCall.d.ts +15 -0
- package/dist/Forms/ScheduleCall.js +141 -0
- package/dist/Forms/index.d.ts +4 -0
- package/dist/Forms/index.js +17 -0
- package/dist/HeroBanner/index.js +4 -2
- package/dist/IconBillboard/IconBillboard.css.d.ts +3 -3
- package/dist/IconBillboard/IconBillboard.css.js +1 -0
- package/dist/Input/index.d.ts +1 -1
- package/dist/Input/index.js +4 -2
- package/dist/MainHTML/index.d.ts +5 -0
- package/dist/MainHTML/index.js +9 -0
- package/dist/Modal/index.js +10 -1
- package/dist/NavigationMenu/AxosAdvisor/index.js +4 -3
- package/dist/Table/Table.css.d.ts +21 -7
- package/dist/Table/Table.css.js +16 -8
- package/dist/Table/Table.d.ts +7 -13
- package/dist/Table/Table.interface.d.ts +18 -0
- package/dist/Table/Table.interface.js +1 -0
- package/dist/Table/Table.js +43 -11
- package/dist/Table/index.js +10 -3
- package/dist/TextBlock/TextBlock.css.d.ts +3 -0
- package/dist/TextBlock/TextBlock.css.js +11 -0
- package/dist/TextBlock/TextBlock.d.ts +6 -0
- package/dist/TextBlock/TextBlock.js +11 -0
- package/dist/TextBlock/index.d.ts +2 -0
- package/dist/TextBlock/index.js +8 -0
- package/dist/VideoTile/VideoInit.d.ts +1 -0
- package/dist/VideoTile/VideoInit.js +8 -0
- package/dist/VideoTile/VideoTile.css.d.ts +13 -0
- package/dist/VideoTile/VideoTile.css.js +32 -0
- package/dist/VideoTile/VideoTile.d.ts +3 -0
- package/dist/VideoTile/VideoTile.interface.d.ts +10 -0
- package/dist/VideoTile/VideoTile.interface.js +1 -0
- package/dist/VideoTile/VideoTile.js +88 -0
- package/dist/VideoTile/index.d.ts +4 -0
- package/dist/VideoTile/index.js +20 -0
- package/dist/VideoWrapper/VideoWrapper.css.d.ts +2 -0
- package/dist/VideoWrapper/VideoWrapper.css.js +7 -0
- package/dist/VideoWrapper/index.d.ts +8 -0
- package/dist/VideoWrapper/index.js +34 -0
- package/dist/assets/Button/Button.css +6 -6
- package/dist/assets/CallToActionBar/CallToActionBar.css +2 -2
- package/dist/assets/Carousel/Carousel.css +9 -9
- package/dist/assets/Chevron/Chevron.css +2 -2
- package/dist/assets/CollectInformationAlert/CollectInformationAlert.css +1 -1
- package/dist/assets/ContentBanner/ContentBanner.css +9 -9
- package/dist/assets/Forms/Forms.css +92 -0
- package/dist/assets/HeroBanner/HeroBanner.css +12 -15
- package/dist/assets/IconBillboard/IconBillboard.css +15 -12
- package/dist/assets/ImageBillboard/ImageBillboard.css +14 -14
- package/dist/assets/Input/Input.css +14 -14
- package/dist/assets/Inputs/Input.css +14 -14
- package/dist/assets/Table/Table.css +116 -68
- package/dist/assets/TextBlock/TextBlock.css +14 -0
- package/dist/assets/VideoTile/VideoTile.css +74 -0
- package/dist/assets/VideoWrapper/VideoWrapper.css +16 -0
- package/dist/assets/icons/ArrowIcon/ArrowIcon.css +2 -2
- package/dist/assets/icons/CheckIcon/CheckIcon.css +2 -2
- package/dist/assets/themes/axos.css +25 -21
- package/dist/assets/themes/premier.css +22 -18
- package/dist/icons/AxosX/index.d.ts +3 -0
- package/dist/icons/AxosX/index.js +30 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +28 -26
- package/dist/main.d.ts +7 -1
- package/dist/main.js +60 -4
- package/dist/themes/axos.css.d.ts +4 -0
- package/dist/themes/axos.css.js +1 -1
- package/dist/utils/EverestValidity.d.ts +1 -0
- package/dist/utils/EverestValidity.js +6 -0
- package/dist/utils/getVariant.d.ts +1 -1
- package/dist/utils/getVariant.js +6 -6
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +7 -0
- package/package.json +9 -1
package/dist/Button/index.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
2
|
import { ButtonVariants } from "./Button.css";
|
|
3
|
-
export
|
|
4
|
-
as?: "button" | "a";
|
|
3
|
+
export type ButtonBase = {
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
targetUrl?: string;
|
|
7
6
|
id?: string;
|
|
8
7
|
action?: () => void;
|
|
9
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export type ButtonAsButton = ButtonBase & Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonBase> & {
|
|
10
|
+
as?: "button";
|
|
11
|
+
};
|
|
12
|
+
export type ButtonAsLink = ButtonBase & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof ButtonBase> & {
|
|
13
|
+
as?: "a";
|
|
14
|
+
};
|
|
15
|
+
export type ButtonProps = ButtonAsButton | ButtonAsLink;
|
|
10
16
|
export declare const Button: ({ as, children, color, size, disabled, rounded, targetUrl, id, action, }: ButtonProps & ButtonVariants) => import("react").DetailedReactHTMLElement<{
|
|
11
17
|
className: string;
|
|
12
18
|
href: string | undefined;
|
|
@@ -15,15 +15,25 @@ const useAccordion = create()((set) => ({
|
|
|
15
15
|
const AccordionItem = (props) => {
|
|
16
16
|
const selectItem = useAccordion((state) => state.toggle);
|
|
17
17
|
const isOpen = useAccordion((state) => state.itemOpened);
|
|
18
|
-
const toggle = (
|
|
19
|
-
|
|
18
|
+
const toggle = (event) => {
|
|
19
|
+
event.preventDefault();
|
|
20
20
|
if (isOpen !== props.id) {
|
|
21
21
|
selectItem(props.id);
|
|
22
22
|
} else {
|
|
23
23
|
selectItem("");
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"details",
|
|
28
|
+
{
|
|
29
|
+
onClick: (e) => {
|
|
30
|
+
toggle(e);
|
|
31
|
+
return;
|
|
32
|
+
},
|
|
33
|
+
open: isOpen === props.id,
|
|
34
|
+
children: props.children
|
|
35
|
+
}
|
|
36
|
+
);
|
|
27
37
|
};
|
|
28
38
|
const AccordionItemSummary = (props) => {
|
|
29
39
|
const isOpen = useAccordion((state) => state.itemOpened);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export declare const formContainer: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
variant: {
|
|
3
|
+
primary: {
|
|
4
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
5
|
+
};
|
|
6
|
+
secondary: {
|
|
7
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
8
|
+
};
|
|
9
|
+
tertiary: {
|
|
10
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
+
};
|
|
12
|
+
quaternary: {
|
|
13
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
export declare const iconForm: string;
|
|
18
|
+
export declare const headerForm: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
19
|
+
variant: {
|
|
20
|
+
primary: {
|
|
21
|
+
readonly selectors: {
|
|
22
|
+
[x: string]: {
|
|
23
|
+
WebkitBackgroundClip: string;
|
|
24
|
+
backgroundImage: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
+
WebkitTextFillColor: string;
|
|
26
|
+
color?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
+
WebkitBackgroundClip?: undefined;
|
|
30
|
+
backgroundImage?: undefined;
|
|
31
|
+
WebkitTextFillColor?: undefined;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
secondary: {
|
|
36
|
+
selectors: {
|
|
37
|
+
[x: string]: {
|
|
38
|
+
WebkitBackgroundClip: "text";
|
|
39
|
+
backgroundImage: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
40
|
+
WebkitTextFillColor: "transparent";
|
|
41
|
+
color?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
44
|
+
WebkitBackgroundClip?: undefined;
|
|
45
|
+
backgroundImage?: undefined;
|
|
46
|
+
WebkitTextFillColor?: undefined;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
tertiary: {
|
|
51
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
52
|
+
};
|
|
53
|
+
quaternary: {
|
|
54
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
export declare const formWrapper: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
59
|
+
variant: {
|
|
60
|
+
primary: {
|
|
61
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
62
|
+
};
|
|
63
|
+
secondary: {
|
|
64
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
65
|
+
};
|
|
66
|
+
tertiary: {
|
|
67
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
68
|
+
};
|
|
69
|
+
quaternary: {
|
|
70
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
export declare const actions: string;
|
|
75
|
+
export declare const disclosureForm: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
76
|
+
variant: {
|
|
77
|
+
primary: {
|
|
78
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
79
|
+
};
|
|
80
|
+
secondary: {
|
|
81
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
82
|
+
};
|
|
83
|
+
tertiary: {
|
|
84
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
85
|
+
};
|
|
86
|
+
quaternary: {
|
|
87
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
+
var formContainer = createRuntimeFn({ defaultClassName: "tfms6a0", variantClassNames: { variant: { primary: "tfms6a1", secondary: "tfms6a2", tertiary: "tfms6a3", quaternary: "tfms6a4" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7
|
+
var iconForm = "tfms6a5";
|
|
8
|
+
var headerForm = createRuntimeFn({ defaultClassName: "tfms6a6", variantClassNames: { variant: { primary: "tfms6a7", secondary: "tfms6a8", tertiary: "tfms6a9", quaternary: "tfms6aa" } }, defaultVariants: {}, compoundVariants: [] });
|
|
9
|
+
var formWrapper = createRuntimeFn({ defaultClassName: "tfms6ab", variantClassNames: { variant: { primary: "tfms6ac", secondary: "tfms6ad", tertiary: "tfms6ae", quaternary: "tfms6af" } }, defaultVariants: {}, compoundVariants: [] });
|
|
10
|
+
var actions = "tfms6ag";
|
|
11
|
+
var disclosureForm = createRuntimeFn({ defaultClassName: "tfms6ah", variantClassNames: { variant: { primary: "tfms6ai", secondary: "tfms6aj", tertiary: "tfms6ak", quaternary: "tfms6al" } }, defaultVariants: {}, compoundVariants: [] });
|
|
12
|
+
export {
|
|
13
|
+
actions,
|
|
14
|
+
disclosureForm,
|
|
15
|
+
formContainer,
|
|
16
|
+
formWrapper,
|
|
17
|
+
headerForm,
|
|
18
|
+
iconForm
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { FormProps } from ".";
|
|
3
|
+
export interface renderFormProps extends FormProps, PropsWithChildren {
|
|
4
|
+
formName?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const renderSwitch: (form: string | undefined, props: FormProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const RenderWebForm: (props: renderFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import "./Forms.css.js";
|
|
3
|
+
import "./SalesforceFieldsForm.js";
|
|
4
|
+
import { ScheduleCall } from "./ScheduleCall.js";
|
|
5
|
+
const renderSwitch = (form = "Contact Form", props) => {
|
|
6
|
+
switch (form) {
|
|
7
|
+
case "Contact Form":
|
|
8
|
+
return /* @__PURE__ */ jsx(ScheduleCall, { ...props });
|
|
9
|
+
default:
|
|
10
|
+
return /* @__PURE__ */ jsx(ScheduleCall, { ...props });
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const RenderWebForm = (props) => {
|
|
14
|
+
return /* @__PURE__ */ jsx(Fragment, { children: renderSwitch(props.formName, props) });
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
RenderWebForm,
|
|
18
|
+
renderSwitch
|
|
19
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
export interface SalesforceFields {
|
|
4
|
+
brand: string;
|
|
5
|
+
branch: string;
|
|
6
|
+
subBranch: string;
|
|
7
|
+
leadSourceDetail: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SalesforceInputs {
|
|
10
|
+
Brand_SFDC2__c: string;
|
|
11
|
+
Branch_SFDC2__c: string;
|
|
12
|
+
Sub_Branch_SFDC2__c: string;
|
|
13
|
+
Lead_Source_Detail_SFDC2__c: string;
|
|
14
|
+
lead_source: string;
|
|
15
|
+
Web_Source__c: string;
|
|
16
|
+
Marketing_Source__c: string;
|
|
17
|
+
First_UTMCampaign__c: string;
|
|
18
|
+
First_UTMContent__c: string;
|
|
19
|
+
First_UTMMedium__c: string;
|
|
20
|
+
First_UTMSource__c: string;
|
|
21
|
+
First_UTMTerm__c: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const SalesforceSchema: z.ZodObject<{
|
|
24
|
+
Brand_SFDC2__c: z.ZodOptional<z.ZodString>;
|
|
25
|
+
Branch_SFDC2__c: z.ZodOptional<z.ZodString>;
|
|
26
|
+
Sub_Branch_SFDC2__c: z.ZodOptional<z.ZodString>;
|
|
27
|
+
Lead_Source_Detail_SFDC2__c: z.ZodOptional<z.ZodString>;
|
|
28
|
+
lead_source: z.ZodOptional<z.ZodString>;
|
|
29
|
+
Web_Source__c: z.ZodOptional<z.ZodString>;
|
|
30
|
+
Marketing_Source__c: z.ZodOptional<z.ZodString>;
|
|
31
|
+
First_UTMCampaign__c: z.ZodOptional<z.ZodString>;
|
|
32
|
+
First_UTMContent__c: z.ZodOptional<z.ZodString>;
|
|
33
|
+
First_UTMMedium__c: z.ZodOptional<z.ZodString>;
|
|
34
|
+
First_UTMSource__c: z.ZodOptional<z.ZodString>;
|
|
35
|
+
First_UTMTerm__c: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
Brand_SFDC2__c?: string | undefined;
|
|
38
|
+
Branch_SFDC2__c?: string | undefined;
|
|
39
|
+
Sub_Branch_SFDC2__c?: string | undefined;
|
|
40
|
+
Lead_Source_Detail_SFDC2__c?: string | undefined;
|
|
41
|
+
lead_source?: string | undefined;
|
|
42
|
+
Web_Source__c?: string | undefined;
|
|
43
|
+
Marketing_Source__c?: string | undefined;
|
|
44
|
+
First_UTMCampaign__c?: string | undefined;
|
|
45
|
+
First_UTMContent__c?: string | undefined;
|
|
46
|
+
First_UTMMedium__c?: string | undefined;
|
|
47
|
+
First_UTMSource__c?: string | undefined;
|
|
48
|
+
First_UTMTerm__c?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
Brand_SFDC2__c?: string | undefined;
|
|
51
|
+
Branch_SFDC2__c?: string | undefined;
|
|
52
|
+
Sub_Branch_SFDC2__c?: string | undefined;
|
|
53
|
+
Lead_Source_Detail_SFDC2__c?: string | undefined;
|
|
54
|
+
lead_source?: string | undefined;
|
|
55
|
+
Web_Source__c?: string | undefined;
|
|
56
|
+
Marketing_Source__c?: string | undefined;
|
|
57
|
+
First_UTMCampaign__c?: string | undefined;
|
|
58
|
+
First_UTMContent__c?: string | undefined;
|
|
59
|
+
First_UTMMedium__c?: string | undefined;
|
|
60
|
+
First_UTMSource__c?: string | undefined;
|
|
61
|
+
First_UTMTerm__c?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
export interface QueryParams {
|
|
64
|
+
[str: string]: string;
|
|
65
|
+
}
|
|
66
|
+
export type Props = {
|
|
67
|
+
salesforceFields?: Partial<SalesforceFields>;
|
|
68
|
+
queryParams?: Partial<QueryParams>;
|
|
69
|
+
location?: Record<string, unknown>;
|
|
70
|
+
};
|
|
71
|
+
export declare const SalesforceFieldsForm: import("react").NamedExoticComponent<Props>;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { useFormContext } from "react-hook-form";
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
const SalesforceSchema = z.object({
|
|
7
|
+
Brand_SFDC2__c: z.string().optional(),
|
|
8
|
+
// David should provide this values more later
|
|
9
|
+
Branch_SFDC2__c: z.string().optional(),
|
|
10
|
+
// Branch
|
|
11
|
+
Sub_Branch_SFDC2__c: z.string().optional(),
|
|
12
|
+
// this configurable
|
|
13
|
+
Lead_Source_Detail_SFDC2__c: z.string().optional(),
|
|
14
|
+
//this
|
|
15
|
+
lead_source: z.string().optional(),
|
|
16
|
+
// web RMI
|
|
17
|
+
Web_Source__c: z.string().optional(),
|
|
18
|
+
// Page url
|
|
19
|
+
Marketing_Source__c: z.string().optional(),
|
|
20
|
+
// Page url + Query params
|
|
21
|
+
First_UTMCampaign__c: z.string().optional(),
|
|
22
|
+
First_UTMContent__c: z.string().optional(),
|
|
23
|
+
First_UTMMedium__c: z.string().optional(),
|
|
24
|
+
First_UTMSource__c: z.string().optional(),
|
|
25
|
+
First_UTMTerm__c: z.string().optional()
|
|
26
|
+
});
|
|
27
|
+
const SalesforceFieldsForm = memo(function SaleforceFieldForm({
|
|
28
|
+
salesforceFields,
|
|
29
|
+
queryParams,
|
|
30
|
+
location
|
|
31
|
+
}) {
|
|
32
|
+
const { register } = useFormContext();
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"input",
|
|
36
|
+
{
|
|
37
|
+
type: "hidden",
|
|
38
|
+
...register("Brand_SFDC2__c", {
|
|
39
|
+
value: salesforceFields == null ? void 0 : salesforceFields.brand
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
"input",
|
|
45
|
+
{
|
|
46
|
+
type: "hidden",
|
|
47
|
+
...register("Branch_SFDC2__c", {
|
|
48
|
+
value: salesforceFields == null ? void 0 : salesforceFields.branch
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
"input",
|
|
54
|
+
{
|
|
55
|
+
type: "hidden",
|
|
56
|
+
...register("Sub_Branch_SFDC2__c", {
|
|
57
|
+
value: salesforceFields == null ? void 0 : salesforceFields.subBranch
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
"input",
|
|
63
|
+
{
|
|
64
|
+
type: "hidden",
|
|
65
|
+
...register("Lead_Source_Detail_SFDC2__c", {
|
|
66
|
+
value: salesforceFields == null ? void 0 : salesforceFields.leadSourceDetail
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ jsx("input", { type: "hidden", ...register("lead_source", { value: "Web RMI" }) }),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
"input",
|
|
73
|
+
{
|
|
74
|
+
type: "hidden",
|
|
75
|
+
...register("Web_Source__c", { value: location == null ? void 0 : location.pathname })
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ jsx(
|
|
79
|
+
"input",
|
|
80
|
+
{
|
|
81
|
+
type: "hidden",
|
|
82
|
+
...register("Marketing_Source__c", {
|
|
83
|
+
value: `${(queryParams == null ? void 0 : queryParams.utm_campaign) ? queryParams.utm_campaign : "no campaign_no source"}`
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ jsx(
|
|
88
|
+
"input",
|
|
89
|
+
{
|
|
90
|
+
type: "hidden",
|
|
91
|
+
...register("First_UTMCampaign__c", {
|
|
92
|
+
value: queryParams == null ? void 0 : queryParams.utm_campaign
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
"input",
|
|
98
|
+
{
|
|
99
|
+
type: "hidden",
|
|
100
|
+
...register("First_UTMContent__c", {
|
|
101
|
+
value: queryParams == null ? void 0 : queryParams.utm_content
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
"input",
|
|
107
|
+
{
|
|
108
|
+
type: "hidden",
|
|
109
|
+
...register("First_UTMMedium__c", {
|
|
110
|
+
value: queryParams == null ? void 0 : queryParams.utm_medium
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ jsx(
|
|
115
|
+
"input",
|
|
116
|
+
{
|
|
117
|
+
type: "hidden",
|
|
118
|
+
...register("First_UTMSource__c", {
|
|
119
|
+
value: queryParams == null ? void 0 : queryParams.utm_source
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
/* @__PURE__ */ jsx(
|
|
124
|
+
"input",
|
|
125
|
+
{
|
|
126
|
+
type: "hidden",
|
|
127
|
+
...register("First_UTMTerm__c", {
|
|
128
|
+
value: queryParams == null ? void 0 : queryParams.utm_term
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] });
|
|
133
|
+
});
|
|
134
|
+
export {
|
|
135
|
+
SalesforceFieldsForm,
|
|
136
|
+
SalesforceSchema
|
|
137
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChevronProps } from '../Chevron/Chevron.interface';
|
|
2
|
+
import { QuaternaryTypes } from '../utils/variant.types';
|
|
3
|
+
import { PropsWithChildren, ReactNode } from "react";
|
|
4
|
+
export interface FormProps extends PropsWithChildren {
|
|
5
|
+
onSubmit?: (values: {
|
|
6
|
+
[index: string]: string;
|
|
7
|
+
}) => void;
|
|
8
|
+
icon?: boolean;
|
|
9
|
+
headline?: ReactNode;
|
|
10
|
+
disclosure?: ReactNode;
|
|
11
|
+
variant?: QuaternaryTypes;
|
|
12
|
+
validateEmail: (email: string) => Promise<boolean>;
|
|
13
|
+
callToAction: Omit<ChevronProps, "targetUrl">;
|
|
14
|
+
}
|
|
15
|
+
export declare const ScheduleCall: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, callToAction, validateEmail, }: FormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
4
|
+
import { Button } from "../Button/index.js";
|
|
5
|
+
import { Input } from "../Input/index.js";
|
|
6
|
+
import SvgAxosX from "../icons/AxosX/index.js";
|
|
7
|
+
import "../icons/CheckIcon/CheckIcon.css.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import { associatedEmail } from "../utils/EverestValidity.js";
|
|
12
|
+
import { getVariant } from "../utils/getVariant.js";
|
|
13
|
+
import clsx from "clsx";
|
|
14
|
+
import { useForm, FormProvider } from "react-hook-form";
|
|
15
|
+
import * as z from "zod";
|
|
16
|
+
import { formContainer, iconForm, headerForm, formWrapper, disclosureForm, actions } from "./Forms.css.js";
|
|
17
|
+
import { SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
18
|
+
const ScheduleCall = ({
|
|
19
|
+
icon = false,
|
|
20
|
+
children,
|
|
21
|
+
onSubmit = (values) => {
|
|
22
|
+
console.log(values);
|
|
23
|
+
},
|
|
24
|
+
disclosure,
|
|
25
|
+
variant: fullVariant = "primary",
|
|
26
|
+
headline,
|
|
27
|
+
callToAction,
|
|
28
|
+
validateEmail
|
|
29
|
+
}) => {
|
|
30
|
+
var _a, _b, _c, _d;
|
|
31
|
+
const schema = z.object({
|
|
32
|
+
firstName: z.string().trim().min(1, { message: "First Name is required." }),
|
|
33
|
+
lastName: z.string().trim().min(1, { message: "Last Name is required." }),
|
|
34
|
+
email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
|
|
35
|
+
phone: z.string().regex(/[0-9]/).min(1, { message: "Phone is required." })
|
|
36
|
+
});
|
|
37
|
+
const methods = useForm({
|
|
38
|
+
resolver: zodResolver(schema.merge(SalesforceSchema), {
|
|
39
|
+
async: true
|
|
40
|
+
}),
|
|
41
|
+
mode: "onBlur",
|
|
42
|
+
defaultValues: {
|
|
43
|
+
email: ""
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const {
|
|
47
|
+
handleSubmit,
|
|
48
|
+
register,
|
|
49
|
+
formState: { errors, isValid }
|
|
50
|
+
} = methods;
|
|
51
|
+
const submitForm = async (data) => {
|
|
52
|
+
await onSubmit(data);
|
|
53
|
+
};
|
|
54
|
+
const variant = getVariant(fullVariant);
|
|
55
|
+
return /* @__PURE__ */ jsx("section", { className: clsx(formContainer({ variant })), children: /* @__PURE__ */ jsx("section", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
|
|
56
|
+
icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: /* @__PURE__ */ jsx(SvgAxosX, {}) }),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: clsx("header_2 text_center", headerForm({ variant })),
|
|
61
|
+
children: headline
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit(submitForm), children: [
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
|
|
66
|
+
/* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
|
|
67
|
+
Input,
|
|
68
|
+
{
|
|
69
|
+
id: "firstName",
|
|
70
|
+
...register("firstName", { required: true }),
|
|
71
|
+
label: "First Name",
|
|
72
|
+
sizes: "medium",
|
|
73
|
+
placeholder: "First Name",
|
|
74
|
+
required: true,
|
|
75
|
+
error: !!errors.firstName,
|
|
76
|
+
helperText: (_a = errors.firstName) == null ? void 0 : _a.message
|
|
77
|
+
}
|
|
78
|
+
) }),
|
|
79
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
80
|
+
Input,
|
|
81
|
+
{
|
|
82
|
+
id: "lastName",
|
|
83
|
+
...register("lastName", { required: true }),
|
|
84
|
+
label: "Last Name",
|
|
85
|
+
sizes: "medium",
|
|
86
|
+
placeholder: "Last Name",
|
|
87
|
+
required: true,
|
|
88
|
+
error: !!errors.lastName,
|
|
89
|
+
helperText: (_b = errors.lastName) == null ? void 0 : _b.message
|
|
90
|
+
}
|
|
91
|
+
) }),
|
|
92
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
93
|
+
Input,
|
|
94
|
+
{
|
|
95
|
+
id: "email",
|
|
96
|
+
...register("email", {
|
|
97
|
+
required: true,
|
|
98
|
+
validate: {
|
|
99
|
+
isValid: associatedEmail
|
|
100
|
+
}
|
|
101
|
+
}),
|
|
102
|
+
label: "Email",
|
|
103
|
+
sizes: "medium",
|
|
104
|
+
placeholder: "Email",
|
|
105
|
+
required: true,
|
|
106
|
+
error: !!errors.email,
|
|
107
|
+
helperText: (_c = errors.email) == null ? void 0 : _c.message
|
|
108
|
+
}
|
|
109
|
+
) }),
|
|
110
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
111
|
+
Input,
|
|
112
|
+
{
|
|
113
|
+
id: "phone",
|
|
114
|
+
...register("phone", { required: true }),
|
|
115
|
+
label: "Phone",
|
|
116
|
+
sizes: "medium",
|
|
117
|
+
placeholder: "Phone",
|
|
118
|
+
required: true,
|
|
119
|
+
error: !!errors.phone,
|
|
120
|
+
helperText: (_d = errors.phone) == null ? void 0 : _d.message
|
|
121
|
+
}
|
|
122
|
+
) })
|
|
123
|
+
] }),
|
|
124
|
+
children,
|
|
125
|
+
/* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
|
|
126
|
+
/* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
|
|
127
|
+
Button,
|
|
128
|
+
{
|
|
129
|
+
color: getVariant(callToAction == null ? void 0 : callToAction.variant),
|
|
130
|
+
as: "button",
|
|
131
|
+
type: "submit",
|
|
132
|
+
disabled: !isValid,
|
|
133
|
+
children: callToAction == null ? void 0 : callToAction.displayText
|
|
134
|
+
}
|
|
135
|
+
) })
|
|
136
|
+
] })
|
|
137
|
+
] }) }) });
|
|
138
|
+
};
|
|
139
|
+
export {
|
|
140
|
+
ScheduleCall
|
|
141
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { actions, disclosureForm, formContainer, formWrapper, headerForm, iconForm } from "./Forms.css.js";
|
|
2
|
+
import { RenderWebForm, renderSwitch } from "./RenderForm.js";
|
|
3
|
+
import { SalesforceFieldsForm, SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
4
|
+
import { ScheduleCall } from "./ScheduleCall.js";
|
|
5
|
+
export {
|
|
6
|
+
RenderWebForm,
|
|
7
|
+
SalesforceFieldsForm,
|
|
8
|
+
SalesforceSchema,
|
|
9
|
+
ScheduleCall,
|
|
10
|
+
actions,
|
|
11
|
+
disclosureForm,
|
|
12
|
+
formContainer,
|
|
13
|
+
formWrapper,
|
|
14
|
+
headerForm,
|
|
15
|
+
iconForm,
|
|
16
|
+
renderSwitch
|
|
17
|
+
};
|
package/dist/HeroBanner/index.js
CHANGED
|
@@ -63,8 +63,10 @@ const HeroBanner = ({
|
|
|
63
63
|
"data-nimg": 1,
|
|
64
64
|
className: "img_fluid",
|
|
65
65
|
style: { color: "transparent" },
|
|
66
|
-
src: image.src
|
|
67
|
-
alt: image.alt
|
|
66
|
+
src: `${image.src}?fm=png&w=500&h=400&fit=fill&r=20`,
|
|
67
|
+
alt: image.alt,
|
|
68
|
+
width: 500,
|
|
69
|
+
height: 400
|
|
68
70
|
}
|
|
69
71
|
) })
|
|
70
72
|
]
|
|
@@ -29,11 +29,11 @@ export declare const headerIconBillboard: string;
|
|
|
29
29
|
export declare const title: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
30
30
|
variant: {
|
|
31
31
|
primary: {
|
|
32
|
-
|
|
32
|
+
selectors: {
|
|
33
33
|
[x: string]: {
|
|
34
|
-
WebkitBackgroundClip:
|
|
34
|
+
WebkitBackgroundClip: "text";
|
|
35
35
|
backgroundImage: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
36
|
-
WebkitTextFillColor:
|
|
36
|
+
WebkitTextFillColor: "transparent";
|
|
37
37
|
color?: undefined;
|
|
38
38
|
} | {
|
|
39
39
|
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
package/dist/Input/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
8
8
|
skeleton?: boolean | undefined;
|
|
9
9
|
helperText?: ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare const Input: (
|
|
11
|
+
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
package/dist/Input/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { wrapper, labelClassName, container, iconContainer, icon, input, helperText } from "./Input.css.js";
|
|
4
|
-
const Input = (props) => {
|
|
5
|
+
const Input = forwardRef((props, ref) => {
|
|
5
6
|
const {
|
|
6
7
|
disabled,
|
|
7
8
|
label,
|
|
@@ -22,6 +23,7 @@ const Input = (props) => {
|
|
|
22
23
|
"input",
|
|
23
24
|
{
|
|
24
25
|
...rest,
|
|
26
|
+
ref,
|
|
25
27
|
className: clsx(props.className, input({ size: sizes }))
|
|
26
28
|
}
|
|
27
29
|
),
|
|
@@ -29,7 +31,7 @@ const Input = (props) => {
|
|
|
29
31
|
] }),
|
|
30
32
|
/* @__PURE__ */ jsx("span", { className: helperText({ disabled, error }), children: helper })
|
|
31
33
|
] });
|
|
32
|
-
};
|
|
34
|
+
});
|
|
33
35
|
export {
|
|
34
36
|
Input
|
|
35
37
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { axosTheme } from "../themes/axos.css.js";
|
|
3
|
+
import { premierTheme } from "../themes/premier.css.js";
|
|
4
|
+
const MainHTML = ({ theme = "Axos", children }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx("main", { className: theme === "Premier" ? premierTheme : axosTheme, children });
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
MainHTML
|
|
9
|
+
};
|