@axos-web-dev/shared-components 0.0.21 → 0.0.22

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.
@@ -1,4 +1,4 @@
1
- import { ContentBannerInterface } from './ContentBanner.interface';
1
+ import { HeroBannerInterface as ContentBannerInterface } from './ContentBanner.interface';
2
2
  import { FC } from 'react';
3
3
 
4
4
  export declare const ContentBanner: FC<ContentBannerInterface>;
@@ -1,4 +1,3 @@
1
- import { header } from './FaqAccordion.css';
2
1
  import { PropsWithChildren } from 'react';
3
2
 
4
3
  export interface AccordionItemProps extends PropsWithChildren {
@@ -89,3 +89,41 @@ export declare const disclosureForm: import('@vanilla-extract/recipes').RuntimeF
89
89
  };
90
90
  }>;
91
91
  export declare const form: string;
92
+ export declare const success_wrap: import('@vanilla-extract/recipes').RuntimeFn<{
93
+ variant: {
94
+ primary: {
95
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
96
+ background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
97
+ };
98
+ secondary: {
99
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
100
+ background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
101
+ };
102
+ tertiary: {
103
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
104
+ background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
105
+ };
106
+ quaternary: {
107
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
108
+ background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
109
+ };
110
+ };
111
+ }>;
112
+ export declare const success_icon: string;
113
+ export declare const succes_check_mark: string;
114
+ export declare const success_circle: import('@vanilla-extract/recipes').RuntimeFn<{
115
+ variant: {
116
+ primary: {
117
+ stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
118
+ };
119
+ secondary: {
120
+ stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
121
+ };
122
+ tertiary: {
123
+ stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
124
+ };
125
+ quaternary: {
126
+ stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
127
+ };
128
+ };
129
+ }>;
@@ -10,6 +10,10 @@ var formWrapper = createRuntimeFn({ defaultClassName: "tfms6ab", variantClassNam
10
10
  var actions = "tfms6ag";
11
11
  var disclosureForm = createRuntimeFn({ defaultClassName: "tfms6ah", variantClassNames: { variant: { primary: "tfms6ai", secondary: "tfms6aj", tertiary: "tfms6ak", quaternary: "tfms6al" } }, defaultVariants: {}, compoundVariants: [] });
12
12
  var form = "tfms6am";
13
+ var success_wrap = createRuntimeFn({ defaultClassName: "tfms6ap", variantClassNames: { variant: { primary: "tfms6aq", secondary: "tfms6ar", tertiary: "tfms6as", quaternary: "tfms6at" } }, defaultVariants: {}, compoundVariants: [] });
14
+ var success_icon = "tfms6au";
15
+ var succes_check_mark = "tfms6av";
16
+ var success_circle = createRuntimeFn({ defaultClassName: "tfms6aw", variantClassNames: { variant: { primary: "tfms6ax", secondary: "tfms6ay", tertiary: "tfms6az", quaternary: "tfms6a10" } }, defaultVariants: {}, compoundVariants: [] });
13
17
  export {
14
18
  actions,
15
19
  disclosureForm,
@@ -17,5 +21,9 @@ export {
17
21
  formContainer,
18
22
  formWrapper,
19
23
  headerForm,
20
- iconForm
24
+ iconForm,
25
+ succes_check_mark,
26
+ success_circle,
27
+ success_icon,
28
+ success_wrap
21
29
  };
@@ -2,6 +2,7 @@ import { jsx, Fragment } from "react/jsx-runtime";
2
2
  import "./Forms.css.js";
3
3
  import "./SalesforceFieldsForm.js";
4
4
  import { ScheduleCall } from "./ScheduleCall.js";
5
+ import "clsx";
5
6
  const renderSwitch = (form = "Contact Form", props) => {
6
7
  switch (form) {
7
8
  case "Contact Form":
@@ -2,6 +2,12 @@ import { PropsWithChildren, ReactNode } from 'react';
2
2
  import { QuaternaryTypes } from '../utils/variant.types';
3
3
  import { ChevronProps } from '../Chevron/Chevron.interface';
4
4
 
5
+ export type Inputs = {
6
+ first_name: string;
7
+ last_name: string;
8
+ email: string;
9
+ phone: string;
10
+ };
5
11
  export interface FormProps extends PropsWithChildren {
6
12
  id?: string;
7
13
  onSubmit?: (values: {
@@ -37,8 +37,8 @@ const ScheduleCall = ({
37
37
  }) => {
38
38
  var _a, _b, _c, _d;
39
39
  const schema = z.object({
40
- firstName: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "First Name is required." }),
41
- lastName: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Last Name is required." }),
40
+ first_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "First Name is required." }),
41
+ last_name: z.string().regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g).trim().min(1, { message: "Last Name is required." }),
42
42
  email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
43
43
  phone: z.string().regex(/[\d-]{10}/).min(10, { message: "Phone is required." }).max(12, { message: "Phone is required." }).transform((val, ctx) => {
44
44
  const removeDashes = val.replace(/-/gi, "");
@@ -83,28 +83,28 @@ const ScheduleCall = ({
83
83
  /* @__PURE__ */ jsx("div", { className: "", children: /* @__PURE__ */ jsx(
84
84
  Input,
85
85
  {
86
- id: "firstName",
87
- ...register("firstName", { required: true }),
86
+ id: "first_name",
87
+ ...register("first_name", { required: true }),
88
88
  label: "First Name",
89
89
  sizes: "medium",
90
90
  placeholder: "First Name",
91
91
  required: true,
92
- error: !!errors.firstName,
93
- helperText: (_a = errors.firstName) == null ? void 0 : _a.message,
92
+ error: !!errors.first_name,
93
+ helperText: (_a = errors.first_name) == null ? void 0 : _a.message,
94
94
  variant
95
95
  }
96
96
  ) }),
97
97
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
98
98
  Input,
99
99
  {
100
- id: "lastName",
101
- ...register("lastName", { required: true }),
100
+ id: "last_name",
101
+ ...register("last_name", { required: true }),
102
102
  label: "Last Name",
103
103
  sizes: "medium",
104
104
  placeholder: "Last Name",
105
105
  required: true,
106
- error: !!errors.lastName,
107
- helperText: (_b = errors.lastName) == null ? void 0 : _b.message,
106
+ error: !!errors.last_name,
107
+ helperText: (_b = errors.last_name) == null ? void 0 : _b.message,
108
108
  variant
109
109
  }
110
110
  ) }),
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { QuaternaryTypes } from '../utils';
3
+
4
+ export default function SuccesFormWrapper({ children, isSubmitted, variant, }: {
5
+ isSubmitted: boolean;
6
+ variant: QuaternaryTypes;
7
+ } & PropsWithChildren): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,88 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { getVariant } from "../utils/getVariant.js";
3
+ import clsx from "clsx";
4
+ import { success_wrap, success_icon, success_circle, succes_check_mark } from "./Forms.css.js";
5
+ import "./SalesforceFieldsForm.js";
6
+ import "@hookform/resolvers/zod";
7
+ import "../Modal/contextApi/store.js";
8
+ import "react";
9
+ import "../Button/Button.css.js";
10
+ import "react-use";
11
+ import "../Input/Input.js";
12
+ import "../Input/Input.css.js";
13
+ import "../Input/InputPhone.js";
14
+ import "../icons/ArrowIcon/ArrowIcon.css.js";
15
+ import "../icons/CheckIcon/CheckIcon.css.js";
16
+ /* empty css */
17
+ /* empty css */
18
+ /* empty css */
19
+ import "react-hook-form";
20
+ function SuccesFormWrapper({
21
+ children,
22
+ isSubmitted,
23
+ variant
24
+ }) {
25
+ variant = getVariant(variant);
26
+ return !isSubmitted ? /* @__PURE__ */ jsx("div", { children }) : /* @__PURE__ */ jsxs("div", { className: clsx(success_wrap({ variant }), "text_center"), children: [
27
+ /* @__PURE__ */ jsxs(
28
+ "svg",
29
+ {
30
+ className: success_icon,
31
+ width: "90px",
32
+ height: "97px",
33
+ viewBox: "0 0 90 90",
34
+ version: "1.1",
35
+ xmlns: "http://www.w3.org/2000/svg",
36
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
37
+ xmlSpace: "preserve",
38
+ style: {
39
+ fillRule: "evenodd",
40
+ clipRule: "evenodd",
41
+ strokeLinecap: "round",
42
+ strokeLinejoin: "round",
43
+ strokeMiterlimit: "1.5"
44
+ },
45
+ children: [
46
+ /* @__PURE__ */ jsx(
47
+ "rect",
48
+ {
49
+ x: "0",
50
+ y: "0",
51
+ width: "90",
52
+ height: "99",
53
+ style: { fill: "none" }
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx("clipPath", { id: "_clip1", children: /* @__PURE__ */ jsx("rect", { x: "0", y: "0", width: "90", height: "99" }) }),
57
+ /* @__PURE__ */ jsxs("g", { clipPath: "url(#_clip1)", children: [
58
+ /* @__PURE__ */ jsx(
59
+ "circle",
60
+ {
61
+ className: success_circle({ variant }),
62
+ cx: "44.662",
63
+ cy: "44.662",
64
+ r: "42.662"
65
+ }
66
+ ),
67
+ /* @__PURE__ */ jsx(
68
+ "path",
69
+ {
70
+ className: succes_check_mark,
71
+ d: "M28.985,44.662l12.015,12.015l46.324,-54.677"
72
+ }
73
+ )
74
+ ] })
75
+ ]
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx("h1", { id: "submittedText", children: "Submitted!" }),
79
+ /* @__PURE__ */ jsxs("p", { id: "thankYouText", children: [
80
+ "Thank you!",
81
+ /* @__PURE__ */ jsx("br", {}),
82
+ "A Banking expert will be in contact with you shortly"
83
+ ] })
84
+ ] });
85
+ }
86
+ export {
87
+ SuccesFormWrapper as default
88
+ };
@@ -2,3 +2,4 @@ export * from './Forms.css';
2
2
  export * from './RenderForm';
3
3
  export * from './SalesforceFieldsForm';
4
4
  export * from './ScheduleCall';
5
+ export * from './SuccesForm';
@@ -1,7 +1,9 @@
1
- import { actions, disclosureForm, form, formContainer, formWrapper, headerForm, iconForm } from "./Forms.css.js";
1
+ import { actions, disclosureForm, form, formContainer, formWrapper, headerForm, iconForm, succes_check_mark, success_circle, success_icon, success_wrap } from "./Forms.css.js";
2
2
  import { RenderWebForm, renderSwitch } from "./RenderForm.js";
3
3
  import { SalesforceFieldsForm, SalesforceSchema } from "./SalesforceFieldsForm.js";
4
4
  import { ScheduleCall } from "./ScheduleCall.js";
5
+ import "react/jsx-runtime";
6
+ import "clsx";
5
7
  export {
6
8
  RenderWebForm,
7
9
  SalesforceFieldsForm,
@@ -14,5 +16,9 @@ export {
14
16
  formWrapper,
15
17
  headerForm,
16
18
  iconForm,
17
- renderSwitch
19
+ renderSwitch,
20
+ succes_check_mark,
21
+ success_circle,
22
+ success_icon,
23
+ success_wrap
18
24
  };
@@ -1,3 +1,3 @@
1
- import { Props } from './IconBillboard.interface';
1
+ import { IconBillboardSet as Props } from './IconBillboard.interface';
2
2
 
3
3
  export declare const IconBillboardSet: ({ variant, side, iconBillboards, headline, bodyCopy, additionalDetails, }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
- import { Props } from './ImageBillboard.interface';
1
+ import { ImageBillboardSetProps as Props } from './ImageBillboard.interface';
2
2
 
3
3
  export declare const ImageBillboardSet: ({ id, variant, headline, bodyCopy, additionalDetails, imageBillboards, }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,19 @@
1
+ @keyframes tfms6an {
2
+ from {
3
+ stroke-dashoffset: 1;
4
+ }
5
+ to {
6
+ opacity: 100;
7
+ }
8
+ }
9
+ @keyframes tfms6ao {
10
+ 0% {
11
+ stroke-dashoffset: -1000;
12
+ }
13
+ 100% {
14
+ stroke-dashoffset: 1;
15
+ }
16
+ }
1
17
  .tfms6a0 {
2
18
  padding-inline: 120px;
3
19
  padding-top: 48px;
@@ -88,6 +104,75 @@
88
104
  max-width: 860px;
89
105
  margin-inline: auto;
90
106
  }
107
+ .tfms6ap {
108
+ padding: 2.5rem 0;
109
+ }
110
+ .tfms6aq {
111
+ color: var(--_1073cm83);
112
+ background: var(--_1073cm81);
113
+ }
114
+ .tfms6ar {
115
+ color: var(--_1073cm8a);
116
+ background: var(--_1073cm88);
117
+ }
118
+ .tfms6as {
119
+ color: var(--_1073cm8g);
120
+ background: var(--_1073cm8f);
121
+ }
122
+ .tfms6at {
123
+ color: var(--_1073cm8n);
124
+ background: var(--_1073cm8m);
125
+ }
126
+ .tfms6ap h1 {
127
+ font-size: 43px;
128
+ font-weight: 600;
129
+ letter-spacing: 1px;
130
+ margin-top: 1.1rem;
131
+ margin-bottom: 0.7rem;
132
+ font-family: var(--header-font-family);
133
+ }
134
+ .tfms6ap p {
135
+ margin-bottom: 0;
136
+ }
137
+ .tfms6au {
138
+ margin: 0 auto;
139
+ display: block;
140
+ }
141
+ .tfms6av {
142
+ fill: none;
143
+ stroke: #faa74a;
144
+ stroke-width: 4;
145
+ stroke-dasharray: 100px;
146
+ stroke-dashoffset: 100;
147
+ animation: tfms6an 0.5s ease-in-out forwards reverse;
148
+ -webkit-animation-delay: 0.7s;
149
+ }
150
+ .tfms6aw {
151
+ fill: none;
152
+ stroke-width: 4;
153
+ stroke-dasharray: 1000px;
154
+ stroke-dashoffset: 1000;
155
+ -webkit-animation: tfms6ao 0.8s ease-in-out forwards;
156
+ animation: tfms6ao 0.8s ease-in-out forwards;
157
+ -webkit-transform-origin: center;
158
+ -ms-transform-origin: center;
159
+ transform-origin: center;
160
+ -webkit-transform: rotate(-40deg);
161
+ -ms-transform: rotate(-40deg);
162
+ transform: rotate(-40deg);
163
+ }
164
+ .tfms6ax {
165
+ stroke: var(--_1073cm83);
166
+ }
167
+ .tfms6ay {
168
+ stroke: var(--_1073cm8a);
169
+ }
170
+ .tfms6az {
171
+ stroke: var(--_1073cm8g);
172
+ }
173
+ .tfms6a10 {
174
+ stroke: var(--_1073cm8n);
175
+ }
91
176
  @media screen and (max-width:1023px) {
92
177
  .tfms6a0 {
93
178
  padding-inline: 0;
@@ -97,4 +182,22 @@
97
182
  .tfms6ab {
98
183
  grid-template-columns: 1fr;
99
184
  }
185
+ }
186
+ @media screen and (max-width: 992px) {
187
+ .tfms6ap h1 {
188
+ font-size: 37px;
189
+ line-height: 1.29;
190
+ margin-bottom: 0.4rem;
191
+ }
192
+ }
193
+ @media screen and (maxwidth: 767px) {
194
+ .tfms6ap h1 {
195
+ font-size: 32px;
196
+ font-weight: 600;
197
+ margin-top: 0;
198
+ margin-bottom: 0.4rem;
199
+ }
200
+ .tfms6au {
201
+ max-width: 69px;
202
+ }
100
203
  }
package/dist/main.js CHANGED
@@ -16,10 +16,16 @@ import { DownloadTile } from "./DownloadTile/index.js";
16
16
  import { AccordionItem, AccordionItemContent, AccordionItemSummary, FaqAccordion } from "./FaqAccordion/index.js";
17
17
  import { footerDisclosure, footerLink, footerParagraph, iconsContent } from "./FooterDisclosure/FooterDisclosure.css.js";
18
18
  import { FooterContent, FooterDisclosure, FooterIcons, FooterParagraph } from "./FooterDisclosure/FooterDisclosure.js";
19
- import { actions, disclosureForm, form, formContainer, formWrapper, headerForm, iconForm } from "./Forms/Forms.css.js";
19
+ import { actions, disclosureForm, form, formContainer, formWrapper, headerForm, iconForm, succes_check_mark, success_circle, success_icon, success_wrap } from "./Forms/Forms.css.js";
20
20
  import { RenderWebForm, renderSwitch } from "./Forms/RenderForm.js";
21
21
  import { SalesforceFieldsForm, SalesforceSchema } from "./Forms/SalesforceFieldsForm.js";
22
22
  import { ScheduleCall } from "./Forms/ScheduleCall.js";
23
+ import "react/jsx-runtime";
24
+ import { associatedEmail } from "./utils/EverestValidity.js";
25
+ import { findMoreAxosDomains, isAllowedUrl } from "./utils/allowedAxosDomains.js";
26
+ import { getVariant, getVariantWithRegex } from "./utils/getVariant.js";
27
+ import { isAbsoluteUrl, isEmailLink, isPhoneLink, shortUrl, validateLink } from "./utils/validateExternalLinks.js";
28
+ import "clsx";
23
29
  import { HeroBanner } from "./HeroBanner/index.js";
24
30
  import { Hyperlink } from "./Hyperlink/index.js";
25
31
  import { IconBillboard } from "./IconBillboard/IconBillboard.js";
@@ -66,10 +72,6 @@ import { default as default19 } from "./icons/QuoteIconYellow.js";
66
72
  import { SvgWarningIcon } from "./icons/WarningIcon/index.js";
67
73
  import { axosTheme, vars } from "./themes/axos.css.js";
68
74
  import { premierTheme } from "./themes/premier.css.js";
69
- import { associatedEmail } from "./utils/EverestValidity.js";
70
- import { findMoreAxosDomains, isAllowedUrl } from "./utils/allowedAxosDomains.js";
71
- import { getVariant, getVariantWithRegex } from "./utils/getVariant.js";
72
- import { isAbsoluteUrl, isEmailLink, isPhoneLink, shortUrl, validateLink } from "./utils/validateExternalLinks.js";
73
75
  export {
74
76
  Accordion,
75
77
  AccordionCtx,
@@ -223,6 +225,10 @@ export {
223
225
  shortUrl,
224
226
  show,
225
227
  single_container,
228
+ succes_check_mark,
229
+ success_circle,
230
+ success_icon,
231
+ success_wrap,
226
232
  supertag,
227
233
  table,
228
234
  tableWrapper,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "0.0.21",
4
+ "version": "0.0.22",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",