@axos-web-dev/shared-components 0.0.25 → 0.0.27

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.
@@ -11,7 +11,8 @@ import { vars } from "../themes/axos.css.js";
11
11
  import { apy_calculator, calculator_section, section_header, apy_calculator_form, errorTag, fieldset, field_row, relative, label_symbol, cash, prefix_pad, percent, submit_section, span_12, form_disclosure, marketing, marketing_tile, cta_section, marketing_table } from "./ApyCalculator.css.js";
12
12
  const ApyCalculator = () => {
13
13
  const [initialDeposit, setInititalDeposit] = useState(1e3);
14
- const [APY, setAPY] = useState(2.25);
14
+ const [APR, setAPR] = useState(2.32);
15
+ const [APY, setAPY] = useState(2.35);
15
16
  const [months, setMonths] = useState(12);
16
17
  const [compounding, setCompounding] = useState(360);
17
18
  const [monthlyDeposits, setMonthlyDeposits] = useState(100);
@@ -35,20 +36,16 @@ const ApyCalculator = () => {
35
36
  return true;
36
37
  };
37
38
  const convertInterest = useCallback(() => {
38
- const newInterestRate = 0.01 * APY;
39
+ const newInterestRate = 0.01 * APR;
39
40
  setInterestRate(newInterestRate);
40
- }, [APY]);
41
+ }, [APR]);
41
42
  useEffect(() => {
42
43
  convertInterest();
43
44
  }, [convertInterest, interestRate, setInterestRate]);
44
45
  const handleCalculate = () => {
45
46
  convertInterest();
46
- if (!isValidNumber(initialDeposit) || !isValidNumber(months) || !isValidNumber(monthlyDeposits) || !isValidAPY(APY)) {
47
- if (!isValidAPY(APY)) {
48
- setError("*APY has to be a positive number.");
49
- } else {
50
- setError("Invalid input. Please enter positive numeric values.");
51
- }
47
+ if (!isValidNumber(initialDeposit) || !isValidNumber(months) || !isValidNumber(monthlyDeposits) || !isValidAPY(APY) || !isValidAPY(APR)) {
48
+ setError("Invalid input. Please enter positive numeric values.");
52
49
  } else {
53
50
  let total;
54
51
  if (compounding === 360) {
@@ -73,8 +70,20 @@ const ApyCalculator = () => {
73
70
  );
74
71
  }
75
72
  };
73
+ const updateAPR = (value) => {
74
+ setAPR(value);
75
+ const new_apy = Number.parseFloat(
76
+ (100 * ((1 + value / 100 / compounding) ** compounding - 1)).toFixed(2)
77
+ );
78
+ setAPY(new_apy);
79
+ convertInterest();
80
+ };
76
81
  const updateAPY = (value) => {
77
82
  setAPY(value);
83
+ const new_apr = Number.parseFloat(
84
+ (((1 + value / 100) ** (1 / compounding) - 1) * compounding * 100).toFixed(2)
85
+ );
86
+ setAPR(new_apr);
78
87
  convertInterest();
79
88
  };
80
89
  return /* @__PURE__ */ jsx(
@@ -89,7 +98,10 @@ const ApyCalculator = () => {
89
98
  children: /* @__PURE__ */ jsxs("div", { className: `${apy_calculator} containment flex between`, children: [
90
99
  /* @__PURE__ */ jsxs("div", { className: `${calculator_section}`, children: [
91
100
  /* @__PURE__ */ jsxs("div", { className: `${section_header}`, children: [
92
- /* @__PURE__ */ jsx("h1", { className: "header_1", children: "APY Interest Calculator" }),
101
+ /* @__PURE__ */ jsxs("h1", { className: "header_1", children: [
102
+ "APY Interest Calculator",
103
+ /* @__PURE__ */ jsx("sup", { children: "3" })
104
+ ] }),
93
105
  /* @__PURE__ */ jsxs("p", { className: "push_up", children: [
94
106
  "Calculate how much interest you can earn on your money with our APY Interest Calculator.",
95
107
  /* @__PURE__ */ jsx("sup", { children: "1" })
@@ -114,6 +126,22 @@ const ApyCalculator = () => {
114
126
  }
115
127
  )
116
128
  ] }),
129
+ /* @__PURE__ */ jsxs("div", { className: `${field_row} ${relative} flex flex_col`, children: [
130
+ /* @__PURE__ */ jsx("label", { className: "input_label", htmlFor: "apr", children: "APR (Annual Percentage Rate)" }),
131
+ /* @__PURE__ */ jsx("label", { className: `${label_symbol} ${percent}`, children: "%" }),
132
+ /* @__PURE__ */ jsx(
133
+ "input",
134
+ {
135
+ className: `${prefix_pad}`,
136
+ id: "apr",
137
+ type: "number",
138
+ step: 0.01,
139
+ name: "apr",
140
+ value: APR,
141
+ onChange: (e) => updateAPR(Number(e.target.value))
142
+ }
143
+ )
144
+ ] }),
117
145
  /* @__PURE__ */ jsxs("div", { className: `${field_row} ${relative} flex flex_col`, children: [
118
146
  /* @__PURE__ */ jsx("label", { className: "input_label", htmlFor: "apy", children: "APY (Annual Percentage Yield)" }),
119
147
  /* @__PURE__ */ jsx("label", { className: `${label_symbol} ${percent}`, children: "%" }),
@@ -240,7 +268,7 @@ const ApyCalculator = () => {
240
268
  children: "Learn More"
241
269
  }
242
270
  ),
243
- /* @__PURE__ */ jsx(Chevron, { targetUrl: "#", variant: "primary", children: "Open an Account" })
271
+ /* @__PURE__ */ jsx(Chevron, { targetUrl: "/recommended-for-you", variant: "primary", children: "Open an Account" })
244
272
  ] })
245
273
  ]
246
274
  }
@@ -35,7 +35,7 @@ import "../Input/Input.js";
35
35
  import "../Input/Input.css.js";
36
36
  import "../Input/InputPhone.js";
37
37
  import "react-hook-form";
38
- /* empty css */
38
+ import "../SetContainer/SetContainer.css.js";
39
39
  import "../ImageBillboard/ImageBillboard.css.js";
40
40
  import { chevron_wrapper, chevron } from "./Chevron.css.js";
41
41
  /* empty css */
@@ -1,5 +1,6 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
+ /* empty css */
3
4
  /* empty css */
4
5
  var faqAccordion = "ph6wj60";
5
6
  var header = "ph6wj61";
@@ -35,7 +35,7 @@ import "../Input/Input.js";
35
35
  import "../Input/Input.css.js";
36
36
  import "../Input/InputPhone.js";
37
37
  import "react-hook-form";
38
- /* empty css */
38
+ import "../SetContainer/SetContainer.css.js";
39
39
  import "../ImageBillboard/ImageBillboard.css.js";
40
40
  /* empty css */
41
41
  /* empty css */
@@ -32,7 +32,7 @@ import "../Input/Input.js";
32
32
  import "../Input/Input.css.js";
33
33
  import "../Input/InputPhone.js";
34
34
  import "react-hook-form";
35
- /* empty css */
35
+ import "../SetContainer/SetContainer.css.js";
36
36
  import "../ImageBillboard/ImageBillboard.css.js";
37
37
  import "./contextApi/store.js";
38
38
  /* empty css */
@@ -1 +1,17 @@
1
+ export declare const set_container: 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
+ }>;
1
17
  export declare const inline_container: string;
@@ -1,5 +1,10 @@
1
1
  /* empty css */
2
- var inline_container = "_18ygy9m0";
2
+ /* empty css */
3
+ /* empty css */
4
+ import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
5
+ var set_container = createRuntimeFn({ defaultClassName: "_18ygy9m0", variantClassNames: { variant: { primary: "_18ygy9m1", secondary: "_18ygy9m2", tertiary: "_18ygy9m3", quaternary: "_18ygy9m4" } }, defaultVariants: {}, compoundVariants: [] });
6
+ var inline_container = "_18ygy9m5";
3
7
  export {
4
- inline_container
8
+ inline_container,
9
+ set_container
5
10
  };
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { section_text, header_section } from "../IconBillboard/IconBillboard.css.js";
3
3
  import "../icons/ArrowIcon/ArrowIcon.css.js";
4
4
  import "../icons/CheckIcon/CheckIcon.css.js";
@@ -32,7 +32,7 @@ import "../Input/Input.js";
32
32
  import "../Input/Input.css.js";
33
33
  import "../Input/InputPhone.js";
34
34
  import "react-hook-form";
35
- import { inline_container } from "./SetContainer.css.js";
35
+ import { set_container, inline_container } from "./SetContainer.css.js";
36
36
  import "../ImageBillboard/ImageBillboard.css.js";
37
37
  import "../Chevron/Chevron.css.js";
38
38
  /* empty css */
@@ -53,20 +53,27 @@ const SetContainer = ({
53
53
  children
54
54
  }) => {
55
55
  const billboard_variant = getVariant(variant);
56
- return /* @__PURE__ */ jsxs("section", { className: `containment section_spacer`, children: [
57
- (headline || bodyCopy) && /* @__PURE__ */ jsxs("div", { className: section_text, children: [
58
- headline && /* @__PURE__ */ jsx(
59
- "h2",
60
- {
61
- className: `header_2 ${header_section({ variant: billboard_variant })}`,
62
- children: headline
63
- }
64
- ),
65
- bodyCopy && /* @__PURE__ */ jsx(Fragment, { children: bodyCopy })
66
- ] }),
67
- /* @__PURE__ */ jsx("div", { className: `${inline_container}`, children }),
68
- additionalDetails && /* @__PURE__ */ jsx("div", { className: clsx(section_text, "push_up_32"), children: /* @__PURE__ */ jsx(Fragment, { children: additionalDetails }) })
69
- ] }, id);
56
+ return /* @__PURE__ */ jsx(
57
+ "section",
58
+ {
59
+ className: clsx(set_container({ variant: getVariant(variant) })),
60
+ children: /* @__PURE__ */ jsxs("div", { className: "containment", children: [
61
+ (headline || bodyCopy) && /* @__PURE__ */ jsxs("div", { className: section_text, children: [
62
+ headline && /* @__PURE__ */ jsx(
63
+ "h2",
64
+ {
65
+ className: `header_2 ${header_section({ variant: billboard_variant })}`,
66
+ children: headline
67
+ }
68
+ ),
69
+ bodyCopy && /* @__PURE__ */ jsx(Fragment, { children: bodyCopy })
70
+ ] }),
71
+ /* @__PURE__ */ jsx("div", { className: `${inline_container}`, children }),
72
+ additionalDetails && /* @__PURE__ */ jsx("div", { className: clsx(section_text), children: /* @__PURE__ */ jsx(Fragment, { children: additionalDetails }) })
73
+ ] })
74
+ },
75
+ id
76
+ );
70
77
  };
71
78
  export {
72
79
  SetContainer
@@ -1,6 +1,7 @@
1
1
  import { SetContainer } from "./SetContainer.js";
2
- import { inline_container } from "./SetContainer.css.js";
2
+ import { inline_container, set_container } from "./SetContainer.css.js";
3
3
  export {
4
4
  SetContainer,
5
- inline_container
5
+ inline_container,
6
+ set_container
6
7
  };
@@ -13,6 +13,7 @@
13
13
  letter-spacing: 0.2px;
14
14
  color: var(--_1073cm83);
15
15
  font-weight: 600;
16
+ font-family: var(--header-font-family);
16
17
  }
17
18
  .ph6wj62 {
18
19
  display: flex;
@@ -168,6 +168,11 @@
168
168
  max-width: 100%;
169
169
  }
170
170
  }
171
+ @media (max-width: 450px) {
172
+ ._1ye8k3fa {
173
+ width: 100%;
174
+ }
175
+ }
171
176
  @media screen and (max-width:1024px) {
172
177
  ._1ye8k3fl {
173
178
  flex-direction: column;
@@ -94,7 +94,8 @@
94
94
  }
95
95
  ._1r4ovbui {
96
96
  margin-inline: auto;
97
- margin-bottom: 2.5rem;
97
+ padding-bottom: 2.5rem;
98
+ padding-top: 2.5rem;
98
99
  text-align: center;
99
100
  max-width: 1000px;
100
101
  }
@@ -1,10 +1,10 @@
1
1
  ._1m7m2a0 {
2
2
  height: auto;
3
3
  }
4
- ._18ygy9m0 ._1m7m2a0 {
4
+ ._18ygy9m5 ._1m7m2a0 {
5
5
  flex-direction: column;
6
6
  }
7
- ._18ygy9m0 ._1m7m2a0:only-child {
7
+ ._18ygy9m5 ._1m7m2a0:only-child {
8
8
  flex-direction: row;
9
9
  }
10
10
  ._1m7m2a1 {
@@ -23,18 +23,18 @@
23
23
  background: var(--_1073cm8m);
24
24
  color: var(--_1073cm8n);
25
25
  }
26
- ._18ygy9m0 ._1m7m2a6 {
26
+ ._18ygy9m5 ._1m7m2a6 {
27
27
  flex-direction: column;
28
28
  }
29
- ._18ygy9m0 ._1m7m2a7 {
29
+ ._18ygy9m5 ._1m7m2a7 {
30
30
  flex-direction: column-reverse;
31
31
  justify-content: space-between;
32
32
  }
33
- ._18ygy9m0 > .billboard > div {
33
+ ._18ygy9m5 > .billboard > div {
34
34
  width: 100%;
35
35
  max-width: 100%;
36
36
  }
37
- ._18ygy9m0 .billboard {
37
+ ._18ygy9m5 .billboard {
38
38
  width: 100%;
39
39
  }
40
40
  ._1073cm80 ._1m7m2a9 {
@@ -89,7 +89,7 @@
89
89
  width: 100%;
90
90
  height: auto;
91
91
  }
92
- ._18ygy9m0 .billboard ._1m7m2aj img {
92
+ ._18ygy9m5 .billboard ._1m7m2aj img {
93
93
  max-height: 300px;
94
94
  }
95
95
  ._1m7m2aj img {
@@ -103,7 +103,7 @@
103
103
  width: 100%;
104
104
  max-width: 50%;
105
105
  }
106
- ._18ygy9m0 ._1m7m2an {
106
+ ._18ygy9m5 ._1m7m2an {
107
107
  height: 100%;
108
108
  display: flex;
109
109
  flex-direction: column;
@@ -141,7 +141,7 @@
141
141
  background-size: cover;
142
142
  background-position: center center;
143
143
  }
144
- ._18ygy9m0 ._1m7m2au {
144
+ ._18ygy9m5 ._1m7m2au {
145
145
  min-height: 330px;
146
146
  }
147
147
  ._1m7m2av {
@@ -205,7 +205,7 @@
205
205
  ._1m7m2au {
206
206
  min-height: 275px;
207
207
  }
208
- ._18ygy9m0 ._1m7m2au {
208
+ ._18ygy9m5 ._1m7m2au {
209
209
  min-height: 275px;
210
210
  }
211
211
  ._1m7m2ax {
@@ -222,7 +222,7 @@
222
222
  ._1m7m2au {
223
223
  min-height: 200px;
224
224
  }
225
- ._18ygy9m0 ._1m7m2au {
225
+ ._18ygy9m5 ._1m7m2au {
226
226
  min-height: 200px;
227
227
  }
228
228
  }
@@ -230,7 +230,7 @@
230
230
  ._1m7m2au {
231
231
  min-height: 160px;
232
232
  }
233
- ._18ygy9m0 ._1m7m2au {
233
+ ._18ygy9m5 ._1m7m2au {
234
234
  min-height: 160px;
235
235
  }
236
236
  }
@@ -1,13 +1,25 @@
1
- ._18ygy9m0 {
1
+ ._18ygy9m1 {
2
+ background: var(--_1073cm81);
3
+ }
4
+ ._18ygy9m2 {
5
+ background: var(--_1073cm88);
6
+ }
7
+ ._18ygy9m3 {
8
+ background: var(--_1073cm8f);
9
+ }
10
+ ._18ygy9m4 {
11
+ background: var(--_1073cm8m);
12
+ }
13
+ ._18ygy9m5 {
2
14
  display: grid;
3
15
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
4
16
  gap: 24px;
5
17
  }
6
- ._18ygy9m0 .containment {
18
+ ._18ygy9m5 .containment {
7
19
  width: 100%;
8
20
  }
9
- @media screen and (max-width: 1024px) {
10
- ._18ygy9m0 {
11
- grid-template-columns: 100%;
21
+ @media screen and (max-width: 1023px) {
22
+ ._18ygy9m5 {
23
+ grid-template-columns: 1fr;
12
24
  }
13
25
  }
@@ -1,5 +1,6 @@
1
1
  ._1nivbwe0 {
2
2
  border-radius: 16px;
3
+ height: 100%;
3
4
  }
4
5
  ._1nivbwe1 {
5
6
  background: #f4f4f4;
@@ -220,7 +221,7 @@ tr:last-child td {
220
221
  }
221
222
  @media screen and (max-width: 768px) {
222
223
  ._1nivbwed:first-child {
223
- box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
224
+ box-shadow: 0 15px 20px 0px rgb(0 0 0 / 0.3);
224
225
  z-index: 2;
225
226
  top: 0;
226
227
  width: 25%;
@@ -235,7 +236,7 @@ tr:last-child td {
235
236
  font-size: 14px;
236
237
  }
237
238
  ._1nivbwej:first-child {
238
- box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
239
+ box-shadow: 0 15px 20px 0px rgb(0 0 0 / 0.3);
239
240
  z-index: 2;
240
241
  width: 25%;
241
242
  }
@@ -283,4 +284,9 @@ tr:last-child td {
283
284
  border-radius: 0;
284
285
  overflow-x: scroll;
285
286
  }
287
+ }
288
+ @media screen and (max-width: 450px) {
289
+ ._1nivbwe12 {
290
+ min-width: 100%;
291
+ }
286
292
  }
package/dist/main.js CHANGED
@@ -44,7 +44,7 @@ import { default as default2 } from "./NavigationMenu/AxosAdvisor/index.js";
44
44
  import { default as default3 } from "./NavigationMenu/AxosFiduciary/index.js";
45
45
  import { SecondaryFooter } from "./SecondaryFooter/index.js";
46
46
  import { SetContainer } from "./SetContainer/SetContainer.js";
47
- import { inline_container } from "./SetContainer/SetContainer.css.js";
47
+ import { inline_container, set_container } from "./SetContainer/SetContainer.css.js";
48
48
  import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from "./Table/Table.js";
49
49
  import { alternate_color_rows, apy_table, bodyHeader, headerCell, headerVariants, highlight_first_row, highlight_last_row, table, tableWrapper, table_container, table_container_text, table_description_text, table_headline, td, th } from "./Table/Table.css.js";
50
50
  import { TextBlock } from "./TextBlock/TextBlock.js";
@@ -222,6 +222,7 @@ export {
222
222
  section_container,
223
223
  section_text,
224
224
  section_text_ImageBillboard,
225
+ set_container,
225
226
  shortUrl,
226
227
  show,
227
228
  single_container,
@@ -1,11 +1,10 @@
1
1
  const moreDomains = {
2
2
  "{AXOS}": "https://www.axos.com",
3
3
  "{AXOSBANK}": "https://www.axosbank.com",
4
- "{AXOSCLEARING}": "https://axosclearing.com/",
4
+ "{AXOSCLEARING}": "https://axosclearing.com",
5
5
  "{AAS}": "https://www.axosadvisorservices.com",
6
6
  "{NATIONWIDE}": "https://www.nationwide.axosbank.com",
7
- // '{ENROLLMENT}': process.env.NEXT_PUBLIC_ENROLLMENT_URL as string,
8
- // '{SECENROLLMENT}': process.env.NEXT_PUBLIC_ENROLLMENT2_URL as string,
7
+ "{ENROLLMENT}": "https://enrollment.axosbank.com",
9
8
  "{ASSETSURL}": "https://assets.axos.com",
10
9
  "{IMAGEASSETSURL}": "https://images.axos.com",
11
10
  "{ONLINEBANKING}": "https://onlinebanking.uat.axsobank.com",
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.25",
4
+ "version": "0.0.27",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",