@axos-web-dev/shared-components 0.0.108 → 0.0.110
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/ATMLocator/ATMLocator.js +3 -1
- package/dist/Accordion/Accordion.css.d.ts +9 -9
- package/dist/Button/Button.js +2 -0
- package/dist/Calculators/BalanceAPYCalculator/index.js +7 -2
- package/dist/Calculators/Calculator.js +5 -2
- package/dist/Calculators/MonthlyPaymentCalculator/index.d.ts +2 -1
- package/dist/Calculators/MonthlyPaymentCalculator/index.js +22 -9
- package/dist/Carousel/index.js +2 -0
- package/dist/Chevron/index.js +2 -0
- package/dist/Comparison/Comparison.js +2 -0
- package/dist/FaqAccordion/FaqAccordion.css.js +1 -1
- package/dist/FaqAccordion/index.d.ts +4 -0
- package/dist/FaqAccordion/index.js +113 -1
- package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +2 -0
- package/dist/Forms/ClearingForm.d.ts +14 -0
- package/dist/Forms/ClearingForm.js +334 -0
- package/dist/Forms/ContactUsBusiness.js +2 -0
- package/dist/Forms/ContactUsNMLSId.js +2 -0
- package/dist/Forms/EmailOnly.js +2 -0
- package/dist/Forms/SalesforceFieldsForm.d.ts +0 -1
- package/dist/Forms/ScheduleCall.js +4 -1
- package/dist/Forms/SuccesForm.js +2 -0
- package/dist/Forms/index.d.ts +1 -0
- package/dist/Forms/index.js +2 -0
- package/dist/Hyperlink/index.js +2 -0
- package/dist/ImageLink/ImageLink.js +2 -0
- package/dist/ImageLink/ImageLinkSet.js +2 -0
- package/dist/ImageLink/index.js +2 -0
- package/dist/Input/Checkbox.css.d.ts +2 -0
- package/dist/Input/Checkbox.css.js +5 -1
- package/dist/Input/Checkbox.d.ts +1 -1
- package/dist/Input/CheckboxGroup.d.ts +20 -0
- package/dist/Input/CheckboxGroup.js +39 -0
- package/dist/Input/DatePicker.css.d.ts +1 -0
- package/dist/Input/DatePicker.css.js +6 -0
- package/dist/Input/Datepicker.d.ts +3 -0
- package/dist/Input/Datepicker.js +47 -0
- package/dist/Input/InputDate.css.d.ts +6 -0
- package/dist/Input/InputDate.css.js +15 -0
- package/dist/Input/InputDate.d.ts +3 -0
- package/dist/Input/InputDate.js +47 -0
- package/dist/Input/InputProps.d.ts +6 -0
- package/dist/Insight/Featured/CategorySelector.js +2 -0
- package/dist/Insight/Featured/Featured.js +2 -0
- package/dist/Modal/Modal.js +2 -0
- package/dist/NavigationMenu/AxosBank/SubNavBar.js +2 -0
- package/dist/SetContainer/SetContainer.js +2 -0
- package/dist/SocialMediaBar/SocialMediaBar.css.d.ts +1 -0
- package/dist/SocialMediaBar/SocialMediaBar.css.js +2 -0
- package/dist/SocialMediaBar/index.d.ts +7 -1
- package/dist/SocialMediaBar/index.js +17 -3
- package/dist/Table/Table.d.ts +13 -13
- package/dist/assets/FaqAccordion/FaqAccordion.css +6 -0
- package/dist/assets/Input/Checkbox.css +7 -0
- package/dist/assets/Input/DatePicker.css +95 -0
- package/dist/assets/Input/InputDate.css +39 -0
- package/dist/assets/Interstitial/Interstitial-variants.css +7 -0
- package/dist/assets/SocialMediaBar/SocialMediaBar.css +13 -0
- package/dist/assets/Table/Table.css +0 -1
- package/dist/main.js +8 -1
- package/dist/utils/allowedAxosDomains.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
4
|
+
import { Button } from "../Button/Button.js";
|
|
5
|
+
import "../Button/Button.css.js";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import "react-use";
|
|
8
|
+
import "../Input/Checkbox.js";
|
|
9
|
+
import "../Input/CurrencyInput.js";
|
|
10
|
+
import { Dropdown } from "../Input/Dropdown.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import { Input } from "../Input/Input.js";
|
|
14
|
+
import "../Input/Input.css.js";
|
|
15
|
+
import "../Input/InputAmount.js";
|
|
16
|
+
import { InputPhone } from "../Input/InputPhone.js";
|
|
17
|
+
import "../Input/InputTextArea.js";
|
|
18
|
+
import "../icons/ArrowIcon/ArrowIcon.css.js";
|
|
19
|
+
import SvgAxosX from "../icons/AxosX/index.js";
|
|
20
|
+
import SvgComponent from "../icons/AxosX/Blue.js";
|
|
21
|
+
import "../icons/CheckIcon/CheckIcon.css.js";
|
|
22
|
+
/* empty css */
|
|
23
|
+
/* empty css */
|
|
24
|
+
/* empty css */
|
|
25
|
+
/* empty css */
|
|
26
|
+
import { associatedEmail } from "../utils/EverestValidity.js";
|
|
27
|
+
import "../utils/allowedAxosDomains.js";
|
|
28
|
+
import { getVariant } from "../utils/getVariant.js";
|
|
29
|
+
import clsx from "clsx";
|
|
30
|
+
import { useForm, FormProvider } from "react-hook-form";
|
|
31
|
+
import * as z from "zod";
|
|
32
|
+
import { formContainer, iconForm, headerContainer, headerForm, form, descriptionField, formWrapper, fullRowForm, disclosureForm, actions } from "./Forms.css.js";
|
|
33
|
+
import { SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
34
|
+
import CheckboxGroup from "../Input/CheckboxGroup.js";
|
|
35
|
+
const options = [
|
|
36
|
+
{ label: "Active Trading", value: "Active Trading" },
|
|
37
|
+
{ label: "FinTech", value: "FinTech" },
|
|
38
|
+
{ label: "Foreign", value: "Foreign" },
|
|
39
|
+
{ label: "Hybrid (RIA and BD)", value: "Hybrid (RIA and BD)" },
|
|
40
|
+
{ label: "Independent Contractor", value: "Independent Contractor" },
|
|
41
|
+
{ label: "IPOs", value: "IPOs" },
|
|
42
|
+
{ label: "Institutional Fixed Income", value: "Institutional Fixed Income" },
|
|
43
|
+
{ label: "Institutional Equity", value: "Institutional Equity" },
|
|
44
|
+
{ label: "Prime Services", value: "Prime Services" },
|
|
45
|
+
{ label: "Retail", value: "Retail" },
|
|
46
|
+
{ label: "Retail/Institutional", value: "Retail/Institutional" },
|
|
47
|
+
{ label: "RIA", value: "RIA" },
|
|
48
|
+
{ label: "Self-Directed", value: "Self-Directed" }
|
|
49
|
+
];
|
|
50
|
+
const ClearingForm = ({
|
|
51
|
+
icon = false,
|
|
52
|
+
children,
|
|
53
|
+
onSubmit = (values) => {
|
|
54
|
+
console.log(values);
|
|
55
|
+
},
|
|
56
|
+
disclosure,
|
|
57
|
+
variant: fullVariant = "primary",
|
|
58
|
+
headline,
|
|
59
|
+
description,
|
|
60
|
+
callToAction,
|
|
61
|
+
validateEmail,
|
|
62
|
+
id
|
|
63
|
+
}) => {
|
|
64
|
+
const schema = z.object({
|
|
65
|
+
first_name: z.string({ message: "First name is required." }).regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g, {
|
|
66
|
+
message: "First name is required."
|
|
67
|
+
}).trim().min(1, { message: "First Name is required." }),
|
|
68
|
+
last_name: z.string({ message: "Last Name is required." }).regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g, {
|
|
69
|
+
message: "Last Name is required."
|
|
70
|
+
}).trim().min(1, { message: "Last Name is required." }),
|
|
71
|
+
email: z.string().email({ message: "Email is required." }).refine(async (val) => await validateEmail(val)),
|
|
72
|
+
phone: z.string({ message: "Phone is required." }).regex(/[\d-]{10}/, { message: "Phone is required." }).min(10, { message: "Phone is required." }).max(12, { message: "Phone is required." }).transform((val, ctx) => {
|
|
73
|
+
const removeDashes = val.replace(/-/gi, "");
|
|
74
|
+
if (removeDashes.length !== 10) {
|
|
75
|
+
ctx.addIssue({
|
|
76
|
+
code: z.ZodIssueCode.custom,
|
|
77
|
+
message: "Phone must have at least 10 and no more than 10 characters."
|
|
78
|
+
});
|
|
79
|
+
return z.NEVER;
|
|
80
|
+
}
|
|
81
|
+
return removeDashes;
|
|
82
|
+
}),
|
|
83
|
+
company: z.string({ message: "Broker-Dealer Name is required." }).regex(/^[A-Za-z][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*,.^(){}|~<>;:[\]]{1,}$/g, {
|
|
84
|
+
message: "Broker-Dealer Name is required"
|
|
85
|
+
}).trim().min(1, { message: "Broker-Dealer Name is required." }),
|
|
86
|
+
Business_Type__c: z.string({ message: "Type of Business is required." }).trim().min(1, { message: "Type of Business is required." }).refine((val) => val.trim().length > 0, {
|
|
87
|
+
message: "Type of Business is required."
|
|
88
|
+
}),
|
|
89
|
+
Current_Assets_Under_Management__c: z.string().trim().min(1, { message: "Assets Under Management is required." }),
|
|
90
|
+
Memo__c: z.string().trim()
|
|
91
|
+
});
|
|
92
|
+
const [selectedValues, setSelectedValues] = useState([]);
|
|
93
|
+
const [showBusinessTypes, setShowBusinessTypes] = useState(false);
|
|
94
|
+
const [requiredAUM, setRequiredAUM] = useState(false);
|
|
95
|
+
const [requiredTOB, setRequiredTOB] = useState(false);
|
|
96
|
+
const handleShowBusinessType = () => {
|
|
97
|
+
setShowBusinessTypes(true);
|
|
98
|
+
};
|
|
99
|
+
let formattedValues = "";
|
|
100
|
+
const handleBusinessTypeChange = (updatedValues) => {
|
|
101
|
+
setSelectedValues(updatedValues);
|
|
102
|
+
formattedValues = updatedValues.join(";");
|
|
103
|
+
setValue("Business_Type__c", formattedValues);
|
|
104
|
+
handleTOBerrors();
|
|
105
|
+
};
|
|
106
|
+
const methods = useForm({
|
|
107
|
+
resolver: zodResolver(schema.merge(SalesforceSchema), {
|
|
108
|
+
async: true
|
|
109
|
+
}),
|
|
110
|
+
mode: "all",
|
|
111
|
+
defaultValues: {
|
|
112
|
+
email: "",
|
|
113
|
+
Business_Type__c: "FinTech"
|
|
114
|
+
// Set default value as empty array
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
const {
|
|
118
|
+
handleSubmit,
|
|
119
|
+
register,
|
|
120
|
+
setValue,
|
|
121
|
+
setError,
|
|
122
|
+
clearErrors,
|
|
123
|
+
formState: { errors, isValid, isSubmitting }
|
|
124
|
+
} = methods;
|
|
125
|
+
const submitForm = async (data) => {
|
|
126
|
+
await onSubmit(data);
|
|
127
|
+
};
|
|
128
|
+
const handleTOBerrors = () => {
|
|
129
|
+
if (!formattedValues.length) {
|
|
130
|
+
setError("Business_Type__c", {
|
|
131
|
+
type: "manual",
|
|
132
|
+
message: "Type of Business is required."
|
|
133
|
+
});
|
|
134
|
+
return;
|
|
135
|
+
} else {
|
|
136
|
+
clearErrors("Business_Type__c");
|
|
137
|
+
setRequiredTOB(true);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const handleDropdownChange = (event) => {
|
|
141
|
+
const value = event.target.value;
|
|
142
|
+
setValue("Current_Assets_Under_Management__c", value);
|
|
143
|
+
if (value) setRequiredAUM(true);
|
|
144
|
+
};
|
|
145
|
+
const variant = getVariant(fullVariant);
|
|
146
|
+
return /* @__PURE__ */ jsx(
|
|
147
|
+
"section",
|
|
148
|
+
{
|
|
149
|
+
id: `id_${id}`,
|
|
150
|
+
className: clsx(formContainer({ variant })),
|
|
151
|
+
children: /* @__PURE__ */ jsx("div", { className: clsx("containment"), children: /* @__PURE__ */ jsxs(FormProvider, { ...methods, children: [
|
|
152
|
+
icon && /* @__PURE__ */ jsx("div", { className: clsx("text_center", iconForm), children: ["primary", "secondary"].includes(variant) ? /* @__PURE__ */ jsx(SvgComponent, {}) : /* @__PURE__ */ jsx(SvgAxosX, {}) }),
|
|
153
|
+
/* @__PURE__ */ jsxs("div", { className: clsx(headerContainer, "text_center"), children: [
|
|
154
|
+
/* @__PURE__ */ jsx("h2", { className: clsx("header_2", headerForm({ variant })), children: headline }),
|
|
155
|
+
description && /* @__PURE__ */ jsx(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
className: clsx(
|
|
159
|
+
form,
|
|
160
|
+
descriptionField({ variant }),
|
|
161
|
+
"text_center"
|
|
162
|
+
),
|
|
163
|
+
children: description
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
] }),
|
|
167
|
+
/* @__PURE__ */ jsxs("form", { className: form, onSubmit: handleSubmit(submitForm), children: [
|
|
168
|
+
/* @__PURE__ */ jsxs("div", { className: clsx(formWrapper({ variant })), children: [
|
|
169
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
170
|
+
Input,
|
|
171
|
+
{
|
|
172
|
+
id: "first_name",
|
|
173
|
+
...register("first_name", {
|
|
174
|
+
required: "First Name is required"
|
|
175
|
+
}),
|
|
176
|
+
label: "First Name",
|
|
177
|
+
sizes: "medium",
|
|
178
|
+
required: true,
|
|
179
|
+
error: !!errors.first_name,
|
|
180
|
+
helperText: errors.first_name?.message,
|
|
181
|
+
variant
|
|
182
|
+
}
|
|
183
|
+
) }),
|
|
184
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
185
|
+
Input,
|
|
186
|
+
{
|
|
187
|
+
id: "last_name",
|
|
188
|
+
...register("last_name", { required: true }),
|
|
189
|
+
label: "Last Name",
|
|
190
|
+
sizes: "medium",
|
|
191
|
+
required: true,
|
|
192
|
+
error: !!errors.last_name,
|
|
193
|
+
helperText: errors.last_name?.message,
|
|
194
|
+
variant
|
|
195
|
+
}
|
|
196
|
+
) }),
|
|
197
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
198
|
+
Input,
|
|
199
|
+
{
|
|
200
|
+
id: "email",
|
|
201
|
+
...register("email", {
|
|
202
|
+
required: true,
|
|
203
|
+
validate: {
|
|
204
|
+
isValid: associatedEmail
|
|
205
|
+
}
|
|
206
|
+
}),
|
|
207
|
+
label: "Email",
|
|
208
|
+
sizes: "medium",
|
|
209
|
+
required: true,
|
|
210
|
+
error: !!errors.email,
|
|
211
|
+
helperText: errors.email?.message,
|
|
212
|
+
variant
|
|
213
|
+
}
|
|
214
|
+
) }),
|
|
215
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
216
|
+
InputPhone,
|
|
217
|
+
{
|
|
218
|
+
id: "phone",
|
|
219
|
+
...register("phone", { required: true, maxLength: 12 }),
|
|
220
|
+
label: "Phone",
|
|
221
|
+
sizes: "medium",
|
|
222
|
+
required: true,
|
|
223
|
+
error: !!errors.phone,
|
|
224
|
+
helperText: errors.phone?.message,
|
|
225
|
+
variant
|
|
226
|
+
}
|
|
227
|
+
) }),
|
|
228
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
229
|
+
Input,
|
|
230
|
+
{
|
|
231
|
+
id: "company",
|
|
232
|
+
...register("company", { required: true }),
|
|
233
|
+
label: "Broker-Dealer Name",
|
|
234
|
+
sizes: "medium",
|
|
235
|
+
required: true,
|
|
236
|
+
error: !!errors.company,
|
|
237
|
+
helperText: errors.company?.message,
|
|
238
|
+
variant
|
|
239
|
+
}
|
|
240
|
+
) }),
|
|
241
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
242
|
+
Dropdown,
|
|
243
|
+
{
|
|
244
|
+
id: "Current_Assets_Under_Management__c",
|
|
245
|
+
...register("Current_Assets_Under_Management__c", {
|
|
246
|
+
required: true
|
|
247
|
+
}),
|
|
248
|
+
label: "Assets Under Management",
|
|
249
|
+
sizes: "medium",
|
|
250
|
+
required: true,
|
|
251
|
+
error: !!errors.Current_Assets_Under_Management__c,
|
|
252
|
+
helperText: errors.Current_Assets_Under_Management__c?.message,
|
|
253
|
+
variant,
|
|
254
|
+
defaultValue: "Select option",
|
|
255
|
+
onChange: handleDropdownChange,
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ jsx("option", { value: "Select option", disabled: true, children: "Select Option" }),
|
|
258
|
+
/* @__PURE__ */ jsx("option", { value: "$0 - $100MM", children: "$0 - $100MM" }),
|
|
259
|
+
/* @__PURE__ */ jsx("option", { value: "$101MM - $200MM", children: "$101MM - $200MM" }),
|
|
260
|
+
/* @__PURE__ */ jsx("option", { value: "$201MM - $500MM", children: "$201MM - $500MM" }),
|
|
261
|
+
/* @__PURE__ */ jsx("option", { value: "$501MM - $750MM", children: "$501MM - $750MM" }),
|
|
262
|
+
/* @__PURE__ */ jsx("option", { value: "$751MM - $1B", children: "$751MM - $1B" }),
|
|
263
|
+
/* @__PURE__ */ jsx("option", { value: "$1B -$2B", children: "$1B -$2B" }),
|
|
264
|
+
/* @__PURE__ */ jsx("option", { value: "$2B+", children: "$2B+" })
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
) }),
|
|
268
|
+
/* @__PURE__ */ jsxs("div", { className: `${fullRowForm}`, children: [
|
|
269
|
+
/* @__PURE__ */ jsx(
|
|
270
|
+
Input,
|
|
271
|
+
{
|
|
272
|
+
id: "business_type_selection",
|
|
273
|
+
label: "Type of Business",
|
|
274
|
+
onFocus: handleShowBusinessType,
|
|
275
|
+
onBlur: handleTOBerrors,
|
|
276
|
+
sizes: "medium",
|
|
277
|
+
placeholder: "Select All That Apply",
|
|
278
|
+
error: !!errors.Business_Type__c,
|
|
279
|
+
disabled: true
|
|
280
|
+
}
|
|
281
|
+
),
|
|
282
|
+
showBusinessTypes && /* @__PURE__ */ jsx(
|
|
283
|
+
CheckboxGroup,
|
|
284
|
+
{
|
|
285
|
+
options,
|
|
286
|
+
selectedValues,
|
|
287
|
+
onChange: handleBusinessTypeChange
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
] }),
|
|
291
|
+
/* @__PURE__ */ jsx("div", { className: fullRowForm, children: /* @__PURE__ */ jsx(
|
|
292
|
+
Input,
|
|
293
|
+
{
|
|
294
|
+
id: "Memo__c",
|
|
295
|
+
...register("Memo__c", { required: false }),
|
|
296
|
+
label: "Please provide additional details about your clearing need (optional)",
|
|
297
|
+
sizes: "medium",
|
|
298
|
+
required: false,
|
|
299
|
+
error: !!errors.Memo__c,
|
|
300
|
+
helperText: errors.Memo__c?.message,
|
|
301
|
+
variant
|
|
302
|
+
}
|
|
303
|
+
) }),
|
|
304
|
+
/* @__PURE__ */ jsx(
|
|
305
|
+
"input",
|
|
306
|
+
{
|
|
307
|
+
type: "hidden",
|
|
308
|
+
...register("Lead_Source_Detail_SFDC2__c", {
|
|
309
|
+
value: "Axos Clearing"
|
|
310
|
+
})
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
] }),
|
|
314
|
+
children,
|
|
315
|
+
/* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
|
|
316
|
+
/* @__PURE__ */ jsx("div", { className: actions, children: /* @__PURE__ */ jsx(
|
|
317
|
+
Button,
|
|
318
|
+
{
|
|
319
|
+
color: getVariant(callToAction?.variant),
|
|
320
|
+
as: "button",
|
|
321
|
+
type: "submit",
|
|
322
|
+
disabled: !isValid || isSubmitting || !requiredAUM || !requiredTOB,
|
|
323
|
+
children: callToAction?.displayText
|
|
324
|
+
}
|
|
325
|
+
) })
|
|
326
|
+
] })
|
|
327
|
+
] }) })
|
|
328
|
+
},
|
|
329
|
+
id
|
|
330
|
+
);
|
|
331
|
+
};
|
|
332
|
+
export {
|
|
333
|
+
ClearingForm
|
|
334
|
+
};
|
|
@@ -43,6 +43,8 @@ import { formContainer, iconForm, headerContainer, headerForm, form, description
|
|
|
43
43
|
import { SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
44
44
|
import "../LoadingIndicator/LoadingIndicator.css.js";
|
|
45
45
|
import "../Input/RadioButton.js";
|
|
46
|
+
import "../Input/RadioButton.css.js";
|
|
47
|
+
import "../Input/Checkbox.css.js";
|
|
46
48
|
import "iframe-resizer";
|
|
47
49
|
import "../Calculators/calculator.css.js";
|
|
48
50
|
/* empty css */
|
|
@@ -43,6 +43,8 @@ import { formContainer, iconForm, headerContainer, headerForm, form, description
|
|
|
43
43
|
import { SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
44
44
|
import "../LoadingIndicator/LoadingIndicator.css.js";
|
|
45
45
|
import "../Input/RadioButton.js";
|
|
46
|
+
import "../Input/RadioButton.css.js";
|
|
47
|
+
import "../Input/Checkbox.css.js";
|
|
46
48
|
import "iframe-resizer";
|
|
47
49
|
import "../Calculators/calculator.css.js";
|
|
48
50
|
/* empty css */
|
package/dist/Forms/EmailOnly.js
CHANGED
|
@@ -44,6 +44,8 @@ import { formContainer, iconForm, headerContainer, headerForm, form, description
|
|
|
44
44
|
import { SalesforceSchema } from "./SalesforceFieldsForm.js";
|
|
45
45
|
import "../LoadingIndicator/LoadingIndicator.css.js";
|
|
46
46
|
import "../Input/RadioButton.js";
|
|
47
|
+
import "../Input/RadioButton.css.js";
|
|
48
|
+
import "../Input/Checkbox.css.js";
|
|
47
49
|
import "iframe-resizer";
|
|
48
50
|
import "../Calculators/calculator.css.js";
|
|
49
51
|
/* empty css */
|
|
@@ -15,6 +15,7 @@ import "../Input/Input.css.js";
|
|
|
15
15
|
import "../Input/InputAmount.js";
|
|
16
16
|
import { InputPhone } from "../Input/InputPhone.js";
|
|
17
17
|
import "../Input/InputTextArea.js";
|
|
18
|
+
import { InputDate } from "../Input/InputDate.js";
|
|
18
19
|
import "../icons/ArrowIcon/ArrowIcon.css.js";
|
|
19
20
|
import SvgAxosX from "../icons/AxosX/index.js";
|
|
20
21
|
import SvgComponent from "../icons/AxosX/Blue.js";
|
|
@@ -220,7 +221,9 @@ const ScheduleCall = ({
|
|
|
220
221
|
/* @__PURE__ */ jsx("option", { value: "5:00 pm", children: "5:00 pm" })
|
|
221
222
|
]
|
|
222
223
|
}
|
|
223
|
-
) })
|
|
224
|
+
) }),
|
|
225
|
+
/* @__PURE__ */ jsx(InputDate, { onDateChange: () => {
|
|
226
|
+
} })
|
|
224
227
|
] }),
|
|
225
228
|
children,
|
|
226
229
|
/* @__PURE__ */ jsx("div", { className: disclosureForm({ variant }), children: disclosure }),
|
package/dist/Forms/SuccesForm.js
CHANGED
|
@@ -93,6 +93,8 @@ import "react-hook-form";
|
|
|
93
93
|
import { success_wrap, success_icon, success_circle, succes_check_mark } from "./Forms.css.js";
|
|
94
94
|
import "./SalesforceFieldsForm.js";
|
|
95
95
|
import "../Input/RadioButton.js";
|
|
96
|
+
import "../Input/RadioButton.css.js";
|
|
97
|
+
import "../Input/Checkbox.css.js";
|
|
96
98
|
function SuccesFormWrapper({
|
|
97
99
|
children,
|
|
98
100
|
isSubmitted,
|
package/dist/Forms/index.d.ts
CHANGED
package/dist/Forms/index.js
CHANGED
|
@@ -15,8 +15,10 @@ import { ScheduleCall } from "./ScheduleCall.js";
|
|
|
15
15
|
import { ScheduleCallPremier } from "./ScheduleCallPremier.js";
|
|
16
16
|
import { SuccesFormWrapper } from "./SuccesForm.js";
|
|
17
17
|
import { WCPLSurvey } from "./WcplSurvey.js";
|
|
18
|
+
import { ClearingForm } from "./ClearingForm.js";
|
|
18
19
|
export {
|
|
19
20
|
ApplicationStart,
|
|
21
|
+
ClearingForm,
|
|
20
22
|
CommercialLending,
|
|
21
23
|
ContactCompany,
|
|
22
24
|
ContactUs,
|
package/dist/Hyperlink/index.js
CHANGED
|
@@ -43,6 +43,8 @@ import "../Forms/Forms.css.js";
|
|
|
43
43
|
import "../Forms/SalesforceFieldsForm.js";
|
|
44
44
|
import "../LoadingIndicator/LoadingIndicator.css.js";
|
|
45
45
|
import "../Input/RadioButton.js";
|
|
46
|
+
import "../Input/RadioButton.css.js";
|
|
47
|
+
import "../Input/Checkbox.css.js";
|
|
46
48
|
import "iframe-resizer";
|
|
47
49
|
import "../Calculators/calculator.css.js";
|
|
48
50
|
/* empty css */
|
|
@@ -38,6 +38,8 @@ import "../Forms/SalesforceFieldsForm.js";
|
|
|
38
38
|
import "../LoadingIndicator/LoadingIndicator.css.js";
|
|
39
39
|
import "react-use";
|
|
40
40
|
import "../Input/RadioButton.js";
|
|
41
|
+
import "../Input/RadioButton.css.js";
|
|
42
|
+
import "../Input/Checkbox.css.js";
|
|
41
43
|
import "iframe-resizer";
|
|
42
44
|
import "../Calculators/calculator.css.js";
|
|
43
45
|
/* empty css */
|
|
@@ -42,6 +42,8 @@ import "../Forms/Forms.css.js";
|
|
|
42
42
|
import "../Forms/SalesforceFieldsForm.js";
|
|
43
43
|
import "../LoadingIndicator/LoadingIndicator.css.js";
|
|
44
44
|
import "../Input/RadioButton.js";
|
|
45
|
+
import "../Input/RadioButton.css.js";
|
|
46
|
+
import "../Input/Checkbox.css.js";
|
|
45
47
|
import "iframe-resizer";
|
|
46
48
|
import "../Calculators/calculator.css.js";
|
|
47
49
|
/* empty css */
|
package/dist/ImageLink/index.js
CHANGED
|
@@ -41,6 +41,8 @@ import "../Forms/Forms.css.js";
|
|
|
41
41
|
import "../Forms/SalesforceFieldsForm.js";
|
|
42
42
|
import "../LoadingIndicator/LoadingIndicator.css.js";
|
|
43
43
|
import "../Input/RadioButton.js";
|
|
44
|
+
import "../Input/RadioButton.css.js";
|
|
45
|
+
import "../Input/Checkbox.css.js";
|
|
44
46
|
import "iframe-resizer";
|
|
45
47
|
import "../Calculators/calculator.css.js";
|
|
46
48
|
/* empty css */
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
3
|
var checkboxContainer = createRuntimeFn({ defaultClassName: "_3tjom70", variantClassNames: { disabled: { true: "_3tjom71" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
4
|
var checkbox = createRuntimeFn({ defaultClassName: "_3tjom72", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
|
|
5
|
+
var checkbox_group_container = "_3tjom73";
|
|
6
|
+
var no_borders = "_3tjom74";
|
|
5
7
|
export {
|
|
6
8
|
checkbox,
|
|
7
|
-
checkboxContainer
|
|
9
|
+
checkboxContainer,
|
|
10
|
+
checkbox_group_container,
|
|
11
|
+
no_borders
|
|
8
12
|
};
|
package/dist/Input/Checkbox.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputProps } from './InputProps';
|
|
2
2
|
|
|
3
3
|
export declare const Checkbox: import('react').ForwardRefExoticComponent<InputProps & {
|
|
4
|
-
children?: import('react').ReactNode;
|
|
4
|
+
children?: import('react').ReactNode | undefined;
|
|
5
5
|
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface CheckboxOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
interface CheckboxGroupProps {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
label?: string;
|
|
11
|
+
variant?: string;
|
|
12
|
+
helperText?: string;
|
|
13
|
+
options: CheckboxOption[];
|
|
14
|
+
selectedValues: string[];
|
|
15
|
+
onChange: (selectedValues: string[]) => void;
|
|
16
|
+
direction?: "row" | "column";
|
|
17
|
+
iconLeft?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
|
|
20
|
+
export default CheckboxGroup;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox } from "./Checkbox.js";
|
|
3
|
+
import { labelClassName } from "./Input.css.js";
|
|
4
|
+
import { fieldset_wrapper, fieldset_container, fieldset } from "./RadioButton.css.js";
|
|
5
|
+
import { checkbox_group_container } from "./Checkbox.css.js";
|
|
6
|
+
const CheckboxGroup = ({
|
|
7
|
+
error = false,
|
|
8
|
+
label,
|
|
9
|
+
options,
|
|
10
|
+
selectedValues,
|
|
11
|
+
onChange,
|
|
12
|
+
direction = "column"
|
|
13
|
+
}) => {
|
|
14
|
+
const handleCheckboxChange = (e) => {
|
|
15
|
+
const value = e.target.value;
|
|
16
|
+
const isChecked = e.target.checked;
|
|
17
|
+
const updatedValues = isChecked ? [...selectedValues, value] : selectedValues.filter((item) => item !== value);
|
|
18
|
+
onChange(updatedValues);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { className: fieldset_wrapper, children: [
|
|
21
|
+
label && /* @__PURE__ */ jsx("label", { className: labelClassName({ error }), children: label }),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: `${fieldset_container} ${checkbox_group_container}`, children: /* @__PURE__ */ jsx("fieldset", { className: fieldset({ direction }), children: options.map((option) => /* @__PURE__ */ jsx(
|
|
23
|
+
Checkbox,
|
|
24
|
+
{
|
|
25
|
+
name: option.value,
|
|
26
|
+
value: option.value,
|
|
27
|
+
checked: selectedValues.includes(option.value),
|
|
28
|
+
onChange: handleCheckboxChange,
|
|
29
|
+
sizes: "medium",
|
|
30
|
+
children: option.label
|
|
31
|
+
},
|
|
32
|
+
option.value
|
|
33
|
+
)) }) }),
|
|
34
|
+
error && /* @__PURE__ */ jsx("span", { className: "error-text", children: "Error message here" })
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
CheckboxGroup as default
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const datePicker: string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import DatePicker from "react-date-picker";
|
|
5
|
+
import { wrapper, labelClassName, container, iconContainer, iconInput, helperText } from "./Input.css.js";
|
|
6
|
+
const DatePickerInput = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
disabled,
|
|
9
|
+
label,
|
|
10
|
+
iconLeft,
|
|
11
|
+
iconRight,
|
|
12
|
+
sizes,
|
|
13
|
+
error = false,
|
|
14
|
+
helperText: helper,
|
|
15
|
+
variant
|
|
16
|
+
} = props;
|
|
17
|
+
const [value, onChange] = useState();
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapper(), children: [
|
|
19
|
+
label && /* @__PURE__ */ jsx(
|
|
20
|
+
"label",
|
|
21
|
+
{
|
|
22
|
+
className: labelClassName({ error, variant }),
|
|
23
|
+
htmlFor: props.name,
|
|
24
|
+
children: label
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { className: container({ size: sizes, error }), children: [
|
|
28
|
+
iconLeft && /* @__PURE__ */ jsx("span", { className: iconContainer["left"], children: /* @__PURE__ */ jsx("div", { className: iconInput({ size: sizes }), children: iconLeft }) }),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
DatePicker,
|
|
31
|
+
{
|
|
32
|
+
dayPlaceholder: "dd",
|
|
33
|
+
monthPlaceholder: "mm",
|
|
34
|
+
yearPlaceholder: "yyyy",
|
|
35
|
+
minDate: /* @__PURE__ */ new Date(),
|
|
36
|
+
onChange,
|
|
37
|
+
value
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
iconRight && /* @__PURE__ */ jsx("span", { className: iconContainer.right, children: /* @__PURE__ */ jsx("div", { className: iconInput({ size: sizes }), children: iconRight }) })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ jsx("span", { className: helperText({ disabled, error }), children: helper })
|
|
43
|
+
] });
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
DatePickerInput
|
|
47
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
var calendarContainer = "skzved0";
|
|
3
|
+
var calendarIcon = "skzved1";
|
|
4
|
+
var inputDate = "skzved2";
|
|
5
|
+
var verticalCenter = "skzved3";
|
|
6
|
+
var calendar = "skzved4";
|
|
7
|
+
var headerCalendar = "skzved5";
|
|
8
|
+
export {
|
|
9
|
+
calendar,
|
|
10
|
+
calendarContainer,
|
|
11
|
+
calendarIcon,
|
|
12
|
+
headerCalendar,
|
|
13
|
+
inputDate,
|
|
14
|
+
verticalCenter
|
|
15
|
+
};
|