@axos-web-dev/shared-components 0.0.4 → 0.0.5

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 (83) hide show
  1. package/dist/Button/index.d.ts +10 -4
  2. package/dist/FaqAccordion/index.js +13 -3
  3. package/dist/Forms/Forms.css.d.ts +90 -0
  4. package/dist/Forms/Forms.css.js +19 -0
  5. package/dist/Forms/RenderForm.d.ts +7 -0
  6. package/dist/Forms/RenderForm.js +19 -0
  7. package/dist/Forms/SalesforceFieldsForm.d.ts +71 -0
  8. package/dist/Forms/SalesforceFieldsForm.js +137 -0
  9. package/dist/Forms/ScheduleCall.d.ts +14 -0
  10. package/dist/Forms/ScheduleCall.js +140 -0
  11. package/dist/Forms/index.d.ts +4 -0
  12. package/dist/Forms/index.js +17 -0
  13. package/dist/HeroBanner/index.js +4 -2
  14. package/dist/IconBillboard/IconBillboard.css.d.ts +3 -3
  15. package/dist/IconBillboard/IconBillboard.css.js +1 -0
  16. package/dist/Input/index.d.ts +1 -1
  17. package/dist/Input/index.js +4 -2
  18. package/dist/MainHTML/index.d.ts +5 -0
  19. package/dist/MainHTML/index.js +9 -0
  20. package/dist/Modal/index.js +10 -1
  21. package/dist/NavigationMenu/AxosAdvisor/index.js +4 -3
  22. package/dist/Table/Table.css.d.ts +21 -7
  23. package/dist/Table/Table.css.js +16 -8
  24. package/dist/Table/Table.d.ts +7 -13
  25. package/dist/Table/Table.interface.d.ts +18 -0
  26. package/dist/Table/Table.interface.js +1 -0
  27. package/dist/Table/Table.js +43 -11
  28. package/dist/Table/index.js +10 -3
  29. package/dist/TextBlock/TextBlock.css.d.ts +3 -0
  30. package/dist/TextBlock/TextBlock.css.js +11 -0
  31. package/dist/TextBlock/TextBlock.d.ts +6 -0
  32. package/dist/TextBlock/TextBlock.js +11 -0
  33. package/dist/TextBlock/index.d.ts +2 -0
  34. package/dist/TextBlock/index.js +8 -0
  35. package/dist/VideoTile/VideoInit.d.ts +1 -0
  36. package/dist/VideoTile/VideoInit.js +8 -0
  37. package/dist/VideoTile/VideoTile.css.d.ts +13 -0
  38. package/dist/VideoTile/VideoTile.css.js +32 -0
  39. package/dist/VideoTile/VideoTile.d.ts +3 -0
  40. package/dist/VideoTile/VideoTile.interface.d.ts +10 -0
  41. package/dist/VideoTile/VideoTile.interface.js +1 -0
  42. package/dist/VideoTile/VideoTile.js +88 -0
  43. package/dist/VideoTile/index.d.ts +4 -0
  44. package/dist/VideoTile/index.js +20 -0
  45. package/dist/VideoWrapper/VideoWrapper.css.d.ts +2 -0
  46. package/dist/VideoWrapper/VideoWrapper.css.js +7 -0
  47. package/dist/VideoWrapper/index.d.ts +8 -0
  48. package/dist/VideoWrapper/index.js +34 -0
  49. package/dist/assets/Button/Button.css +6 -6
  50. package/dist/assets/CallToActionBar/CallToActionBar.css +2 -2
  51. package/dist/assets/Carousel/Carousel.css +9 -9
  52. package/dist/assets/Chevron/Chevron.css +2 -2
  53. package/dist/assets/CollectInformationAlert/CollectInformationAlert.css +1 -1
  54. package/dist/assets/ContentBanner/ContentBanner.css +9 -9
  55. package/dist/assets/Forms/Forms.css +92 -0
  56. package/dist/assets/HeroBanner/HeroBanner.css +12 -15
  57. package/dist/assets/IconBillboard/IconBillboard.css +15 -12
  58. package/dist/assets/ImageBillboard/ImageBillboard.css +14 -14
  59. package/dist/assets/Input/Input.css +14 -14
  60. package/dist/assets/Inputs/Input.css +14 -14
  61. package/dist/assets/Table/Table.css +116 -68
  62. package/dist/assets/TextBlock/TextBlock.css +14 -0
  63. package/dist/assets/VideoTile/VideoTile.css +74 -0
  64. package/dist/assets/VideoWrapper/VideoWrapper.css +16 -0
  65. package/dist/assets/icons/ArrowIcon/ArrowIcon.css +2 -2
  66. package/dist/assets/icons/CheckIcon/CheckIcon.css +2 -2
  67. package/dist/assets/themes/axos.css +25 -21
  68. package/dist/assets/themes/premier.css +22 -18
  69. package/dist/icons/AxosX/index.d.ts +3 -0
  70. package/dist/icons/AxosX/index.js +30 -0
  71. package/dist/icons/index.d.ts +1 -0
  72. package/dist/icons/index.js +28 -26
  73. package/dist/main.d.ts +7 -1
  74. package/dist/main.js +60 -4
  75. package/dist/themes/axos.css.d.ts +4 -0
  76. package/dist/themes/axos.css.js +1 -1
  77. package/dist/utils/EverestValidity.d.ts +1 -0
  78. package/dist/utils/EverestValidity.js +6 -0
  79. package/dist/utils/getVariant.d.ts +1 -1
  80. package/dist/utils/getVariant.js +6 -6
  81. package/dist/utils/index.d.ts +3 -0
  82. package/dist/utils/index.js +7 -0
  83. package/package.json +9 -1
@@ -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 interface ButtonProps {
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 = (ev) => {
19
- ev.preventDefault();
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("details", { onClick: toggle, open: isOpen === props.id, children: props.children });
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,14 @@
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
+ callToAction: Omit<ChevronProps, "targetUrl">;
13
+ }
14
+ export declare const ScheduleCall: ({ icon, children, onSubmit, disclosure, variant: fullVariant, headline, callToAction, }: FormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,140 @@
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
+ }) => {
29
+ var _a, _b, _c, _d;
30
+ const schema = z.object({
31
+ firstName: z.string().trim().min(1, { message: "First Name is required." }),
32
+ lastName: z.string().trim().min(1, { message: "Last Name is required." }),
33
+ email: z.string().email({ message: "Email is required." }).refine(async (val) => await associatedEmail(val)),
34
+ phone: z.string().regex(/[0-9]/).min(1, { message: "Phone is required." })
35
+ });
36
+ const methods = useForm({
37
+ resolver: zodResolver(schema.merge(SalesforceSchema), {
38
+ async: true
39
+ }),
40
+ mode: "onBlur",
41
+ defaultValues: {
42
+ email: ""
43
+ }
44
+ });
45
+ const {
46
+ handleSubmit,
47
+ register,
48
+ formState: { errors, isValid }
49
+ } = methods;
50
+ const submitForm = async (data) => {
51
+ await onSubmit(data);
52
+ };
53
+ const variant = getVariant(fullVariant);
54
+ return /* @__PURE__ */ jsx("section", { className: clsx(formContainer({ variant })), children: /* @__PURE__ */ jsx("section", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
55
+ icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: /* @__PURE__ */ jsx(SvgAxosX, {}) }),
56
+ /* @__PURE__ */ jsx(
57
+ "div",
58
+ {
59
+ className: clsx("header_2 text_center", headerForm({ variant })),
60
+ children: headline
61
+ }
62
+ ),
63
+ /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit(submitForm), children: [
64
+ /* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
65
+ /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
66
+ Input,
67
+ {
68
+ id: "firstName",
69
+ ...register("firstName", { required: true }),
70
+ label: "First Name",
71
+ sizes: "medium",
72
+ placeholder: "First Name",
73
+ required: true,
74
+ error: !!errors.firstName,
75
+ helperText: (_a = errors.firstName) == null ? void 0 : _a.message
76
+ }
77
+ ) }),
78
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
79
+ Input,
80
+ {
81
+ id: "lastName",
82
+ ...register("lastName", { required: true }),
83
+ label: "Last Name",
84
+ sizes: "medium",
85
+ placeholder: "Last Name",
86
+ required: true,
87
+ error: !!errors.lastName,
88
+ helperText: (_b = errors.lastName) == null ? void 0 : _b.message
89
+ }
90
+ ) }),
91
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
92
+ Input,
93
+ {
94
+ id: "email",
95
+ ...register("email", {
96
+ required: true,
97
+ validate: {
98
+ isValid: associatedEmail
99
+ }
100
+ }),
101
+ label: "Email",
102
+ sizes: "medium",
103
+ placeholder: "Email",
104
+ required: true,
105
+ error: !!errors.email,
106
+ helperText: (_c = errors.email) == null ? void 0 : _c.message
107
+ }
108
+ ) }),
109
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
110
+ Input,
111
+ {
112
+ id: "phone",
113
+ ...register("phone", { required: true }),
114
+ label: "Phone",
115
+ sizes: "medium",
116
+ placeholder: "Phone",
117
+ required: true,
118
+ error: !!errors.phone,
119
+ helperText: (_d = errors.phone) == null ? void 0 : _d.message
120
+ }
121
+ ) })
122
+ ] }),
123
+ children,
124
+ /* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
125
+ /* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
126
+ Button,
127
+ {
128
+ color: getVariant(callToAction == null ? void 0 : callToAction.variant),
129
+ as: "button",
130
+ type: "submit",
131
+ disabled: !isValid,
132
+ children: callToAction == null ? void 0 : callToAction.displayText
133
+ }
134
+ ) })
135
+ ] })
136
+ ] }) }) });
137
+ };
138
+ export {
139
+ ScheduleCall
140
+ };
@@ -0,0 +1,4 @@
1
+ export * from "./Forms.css";
2
+ export * from "./RenderForm";
3
+ export * from "./SalesforceFieldsForm";
4
+ export * from "./ScheduleCall";
@@ -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
+ };
@@ -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
- readonly selectors: {
32
+ selectors: {
33
33
  [x: string]: {
34
- WebkitBackgroundClip: string;
34
+ WebkitBackgroundClip: "text";
35
35
  backgroundImage: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
36
- WebkitTextFillColor: string;
36
+ WebkitTextFillColor: "transparent";
37
37
  color?: undefined;
38
38
  } | {
39
39
  color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
@@ -1,3 +1,4 @@
1
+ /* empty css */
1
2
  /* empty css */
2
3
  /* empty css */
3
4
  /* empty css */
@@ -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: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -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,5 @@
1
+ import { PropsWithChildren } from "react";
2
+ export interface BodyProps extends PropsWithChildren {
3
+ theme: string;
4
+ }
5
+ export declare const MainHTML: ({ theme, children }: BodyProps) => import("react/jsx-runtime").JSX.Element;
@@ -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
+ };