@npm_leadtech/legal-contracts-ui 0.100.0 → 0.101.1
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/components/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox.js +12 -8
- package/dist/components/ContactFormSection.d.ts +83 -1
- package/dist/components/ContactFormSection.js +161 -64
- package/dist/components/ContactMethodCard.d.ts +4 -3
- package/dist/components/ContactMethodCard.js +32 -7
- package/dist/components/ContactMethodsSection.d.ts +3 -4
- package/dist/components/ContactMethodsSection.js +4 -5
- package/dist/components/ContactUsTemplate.d.ts +90 -5
- package/dist/components/ContactUsTemplate.js +22 -10
- package/dist/components/Input.d.ts +1 -0
- package/dist/components/Input.js +25 -20
- package/dist/components/Jumbotron2.js +4 -4
- package/dist/components/LocationIcon.js +4 -4
- package/dist/components/MailFillIcon.js +4 -4
- package/dist/components/MobileMenu.js +6 -6
- package/dist/components/NotFoundTemplate.d.ts +3 -4
- package/dist/components/NotFoundTemplate.js +7 -16
- package/dist/components/Select.d.ts +1 -0
- package/dist/components/Select.js +21 -16
- package/dist/components/Textarea.d.ts +1 -0
- package/dist/components/Textarea.js +24 -12
- package/dist/components/index.d.ts +1243 -0
- package/dist/globals.css +1 -1
- package/package.json +1 -5
- package/dist/components/Card.d.ts +0 -10
- package/dist/components/Card.js +0 -8
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
import c from "clsx";
|
|
3
|
+
const u = ({ id: r, name: t, required: o = !1, children: s, error: l = !1, ...i }) => /* @__PURE__ */ a("label", { className: "text-medium flex items-center gap-3 text-neutral-800", children: [
|
|
3
4
|
/* @__PURE__ */ e(
|
|
4
5
|
"input",
|
|
5
6
|
{
|
|
6
|
-
id:
|
|
7
|
+
id: r,
|
|
7
8
|
type: "checkbox",
|
|
8
|
-
name:
|
|
9
|
-
required:
|
|
10
|
-
className:
|
|
11
|
-
|
|
9
|
+
name: t,
|
|
10
|
+
required: o,
|
|
11
|
+
className: c(
|
|
12
|
+
"text-primary-700 focus-visible:outline-primary-500 h-5 w-5 rounded border focus-visible:outline-2",
|
|
13
|
+
l ? "border-error-500" : "border-neutral-400"
|
|
14
|
+
),
|
|
15
|
+
...i
|
|
12
16
|
}
|
|
13
17
|
),
|
|
14
|
-
/* @__PURE__ */ e("span", { children:
|
|
18
|
+
/* @__PURE__ */ e("span", { children: s })
|
|
15
19
|
] });
|
|
16
20
|
export {
|
|
17
|
-
|
|
21
|
+
u as Checkbox
|
|
18
22
|
};
|
|
@@ -1,4 +1,86 @@
|
|
|
1
|
+
import { ChangeEventHandler } from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ComponentPropsWithRef } from 'react';
|
|
1
4
|
import { FC } from 'react';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
2
6
|
|
|
3
|
-
export
|
|
7
|
+
export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
variant?: ResponsiveButtonVariant;
|
|
11
|
+
iconPosition?: IconPosition;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ButtonSize = 'small' | 'default' | 'large';
|
|
15
|
+
|
|
16
|
+
export type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yellow' | 'primary-white' | 'secondary-green' | 'secondary-yellow' | 'secondary-red' | 'secondary-black' | 'tertiary-bold' | 'tertiary-thin' | 'tertiary-icon' | 'tertiary-link' | 'icon-black' | 'icon-grey' | 'icon-mobile';
|
|
17
|
+
|
|
18
|
+
export interface ContactFormCheckboxFieldProps extends Omit<ContactFormFieldProps, 'placeholder' | 'tooltip'> {
|
|
19
|
+
checked: boolean;
|
|
20
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ContactFormFeedbackProps {
|
|
24
|
+
message: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
cta?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare interface ContactFormFieldProps {
|
|
30
|
+
label: string;
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
tooltip?: string;
|
|
36
|
+
errorMessage?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare const ContactFormSection: FC<ContactFormSectionProps>;
|
|
40
|
+
|
|
41
|
+
export declare interface ContactFormSectionProps {
|
|
42
|
+
title: ReactNode;
|
|
43
|
+
subjectOptions: {
|
|
44
|
+
label: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}[];
|
|
47
|
+
fullNameField: Omit<ContactFormTextFieldProps, 'tooltip'>;
|
|
48
|
+
emailField: Omit<ContactFormTextFieldProps, 'tooltip'>;
|
|
49
|
+
referenceNumberField: ContactFormTextFieldProps;
|
|
50
|
+
subjectField: ContactFormSelectFieldProps;
|
|
51
|
+
messageField: ContactFormTextareaFieldProps;
|
|
52
|
+
requiredFieldsText: string;
|
|
53
|
+
privacyField: ContactFormCheckboxFieldProps;
|
|
54
|
+
securityHint: string;
|
|
55
|
+
status?: 'default' | 'loading' | 'success' | 'error';
|
|
56
|
+
successFeedback?: ContactFormFeedbackProps;
|
|
57
|
+
errorFeedback?: ContactFormFeedbackProps;
|
|
58
|
+
onSubmit?: ComponentProps<'form'>['onSubmit'];
|
|
59
|
+
button: ButtonProps;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ContactFormSelectFieldProps extends Omit<ContactFormFieldProps, 'tooltip'> {
|
|
63
|
+
value: string;
|
|
64
|
+
onChange: ChangeEventHandler<HTMLSelectElement>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ContactFormTextareaFieldProps extends Omit<ContactFormFieldProps, 'tooltip'> {
|
|
68
|
+
value: string;
|
|
69
|
+
onChange: ChangeEventHandler<HTMLTextAreaElement>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface ContactFormTextFieldProps extends ContactFormFieldProps {
|
|
73
|
+
value: string;
|
|
74
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type IconPosition = 'left' | 'right' | 'top';
|
|
78
|
+
|
|
79
|
+
export type ResponsiveButtonVariant = ButtonVariant | {
|
|
80
|
+
initial?: ButtonVariant;
|
|
81
|
+
sm?: ButtonVariant;
|
|
82
|
+
md?: ButtonVariant;
|
|
83
|
+
lg?: ButtonVariant;
|
|
84
|
+
xl?: ButtonVariant;
|
|
85
|
+
};
|
|
4
86
|
|
|
@@ -1,82 +1,179 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Textarea as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Button as
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
import { Textarea as N } from "./Textarea.js";
|
|
3
|
+
import { Checkbox as f } from "./Checkbox.js";
|
|
4
|
+
import { Input as p } from "./Input.js";
|
|
5
|
+
import { Select as M } from "./Select.js";
|
|
6
|
+
import { Markdown as w } from "./Markdown.js";
|
|
7
|
+
import { InfoIcon as y } from "./InfoIcon.js";
|
|
8
|
+
import { Button as b } from "./Button.js";
|
|
9
|
+
const _ = ({
|
|
10
|
+
title: m,
|
|
11
|
+
subjectOptions: x,
|
|
12
|
+
fullNameField: n,
|
|
13
|
+
emailField: o,
|
|
14
|
+
referenceNumberField: a,
|
|
15
|
+
subjectField: t,
|
|
16
|
+
messageField: s,
|
|
17
|
+
privacyField: l,
|
|
18
|
+
requiredFieldsText: g,
|
|
19
|
+
securityHint: u,
|
|
20
|
+
status: c = "default",
|
|
21
|
+
successFeedback: d,
|
|
22
|
+
errorFeedback: i,
|
|
23
|
+
onSubmit: v,
|
|
24
|
+
button: h
|
|
25
|
+
}) => c === "success" ? /* @__PURE__ */ r("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
15
26
|
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
16
|
-
/* @__PURE__ */ e("p", {
|
|
27
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: m }),
|
|
17
28
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
18
29
|
] }),
|
|
19
|
-
/* @__PURE__ */ r(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
30
|
+
/* @__PURE__ */ r(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
role: "status",
|
|
34
|
+
"aria-live": "polite",
|
|
35
|
+
className: "mt-6 rounded border border-green-300 bg-green-50 px-4 py-3 text-green-900",
|
|
36
|
+
children: [
|
|
37
|
+
d?.title && /* @__PURE__ */ e("p", { className: "text-medium mb-1 font-bold", children: d.title }),
|
|
38
|
+
/* @__PURE__ */ e("p", { children: d?.message }),
|
|
39
|
+
d?.cta != null && /* @__PURE__ */ e("div", { className: "mt-2", children: d.cta })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] }) : c === "error" ? /* @__PURE__ */ r("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
44
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
45
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: m }),
|
|
46
|
+
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
role: "alert",
|
|
52
|
+
"aria-live": "assertive",
|
|
53
|
+
className: "mt-6 rounded border border-red-300 bg-red-50 px-4 py-3 text-red-800",
|
|
54
|
+
children: [
|
|
55
|
+
i?.title && /* @__PURE__ */ e("p", { className: "text-medium mb-1 font-bold", children: i.title }),
|
|
56
|
+
/* @__PURE__ */ e("p", { children: i?.message }),
|
|
57
|
+
i?.cta != null && /* @__PURE__ */ e("div", { className: "mt-2", children: i.cta })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] }) : c === "loading" ? /* @__PURE__ */ r("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
62
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
63
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: m }),
|
|
64
|
+
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ e(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
role: "status",
|
|
70
|
+
"aria-live": "polite",
|
|
71
|
+
className: "mt-6 flex items-center justify-center rounded border border-neutral-200 bg-neutral-50 px-4 py-6 text-neutral-700",
|
|
72
|
+
children: /* @__PURE__ */ e("div", { className: "border-primary-500 h-[25px] w-[25px] animate-spin rounded-full border-3 border-t-transparent" })
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }) : /* @__PURE__ */ r("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
76
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
77
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: m }),
|
|
78
|
+
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ r("form", { className: "mt-6 flex flex-col gap-6", noValidate: !0, onSubmit: v, children: [
|
|
81
|
+
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
82
|
+
/* @__PURE__ */ e(p, { ...n, type: "text", error: !!n.errorMessage }),
|
|
83
|
+
n.errorMessage && /* @__PURE__ */ e("p", { id: `${n.id}-error-message`, className: "text-small text-red-700", children: n.errorMessage })
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
86
|
+
/* @__PURE__ */ e(p, { ...o, type: "email", error: !!o.errorMessage }),
|
|
87
|
+
o.errorMessage && /* @__PURE__ */ e("p", { id: `${o.id}-error-message`, className: "text-small text-red-700", children: o.errorMessage })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
49
90
|
/* @__PURE__ */ e(
|
|
50
|
-
|
|
91
|
+
p,
|
|
51
92
|
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
93
|
+
label: a.label,
|
|
94
|
+
id: a.id,
|
|
95
|
+
name: a.name,
|
|
96
|
+
type: "text",
|
|
97
|
+
placeholder: a.placeholder,
|
|
98
|
+
tooltip: a.tooltip,
|
|
99
|
+
required: a.required,
|
|
100
|
+
value: a.value,
|
|
101
|
+
onChange: a.onChange,
|
|
102
|
+
error: !!a.errorMessage
|
|
57
103
|
}
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
104
|
+
),
|
|
105
|
+
a.errorMessage && /* @__PURE__ */ e("p", { id: `${a.id}-error-message`, className: "text-small text-red-700", children: a.errorMessage })
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
108
|
+
/* @__PURE__ */ e(
|
|
109
|
+
M,
|
|
110
|
+
{
|
|
111
|
+
label: t.label,
|
|
112
|
+
id: t.id,
|
|
113
|
+
name: t.name,
|
|
114
|
+
placeholder: t.placeholder,
|
|
115
|
+
options: x,
|
|
116
|
+
required: t.required,
|
|
117
|
+
value: t.value,
|
|
118
|
+
onChange: t.onChange,
|
|
119
|
+
error: !!t.errorMessage
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
t.errorMessage && /* @__PURE__ */ e("p", { id: `${t.id}-error-message`, className: "text-small text-red-700", children: t.errorMessage })
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
125
|
+
/* @__PURE__ */ e(
|
|
126
|
+
N,
|
|
127
|
+
{
|
|
128
|
+
label: s.label,
|
|
129
|
+
id: s.id,
|
|
130
|
+
name: s.name,
|
|
131
|
+
placeholder: s.placeholder,
|
|
132
|
+
required: s.required,
|
|
133
|
+
value: s.value,
|
|
134
|
+
onChange: s.onChange,
|
|
135
|
+
error: !!s.errorMessage
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
s.errorMessage && /* @__PURE__ */ e("p", { id: `${s.id}-error-message`, className: "text-small text-red-700", children: s.errorMessage })
|
|
139
|
+
] }),
|
|
140
|
+
/* @__PURE__ */ e("p", { className: "text-medium text-neutral-600", children: g }),
|
|
141
|
+
/* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ e(
|
|
142
|
+
f,
|
|
143
|
+
{
|
|
144
|
+
id: l.id,
|
|
145
|
+
name: l.name,
|
|
146
|
+
required: l.required,
|
|
147
|
+
checked: l.checked,
|
|
148
|
+
onChange: l.onChange,
|
|
149
|
+
error: !!l.errorMessage,
|
|
150
|
+
children: /* @__PURE__ */ e(w, { className: "text-medium [&_p:last-child]:mb-0", content: l.label })
|
|
151
|
+
}
|
|
152
|
+
) }),
|
|
153
|
+
/* @__PURE__ */ r(
|
|
154
|
+
"div",
|
|
62
155
|
{
|
|
63
|
-
id: "
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
156
|
+
id: "security-hint",
|
|
157
|
+
className: "text-small flex items-start gap-2 rounded bg-neutral-50 p-4 text-neutral-600",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ e(y, { width: 24, height: 24, "aria-hidden": "true" }),
|
|
160
|
+
/* @__PURE__ */ e("p", { children: u })
|
|
161
|
+
]
|
|
67
162
|
}
|
|
68
163
|
),
|
|
69
164
|
/* @__PURE__ */ e(
|
|
70
|
-
|
|
165
|
+
b,
|
|
71
166
|
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
className: "
|
|
75
|
-
|
|
167
|
+
...h,
|
|
168
|
+
variant: "primary-green",
|
|
169
|
+
className: "w-fit self-center",
|
|
170
|
+
type: h.type ?? "submit",
|
|
171
|
+
disabled: h.disabled,
|
|
172
|
+
children: h.children
|
|
76
173
|
}
|
|
77
174
|
)
|
|
78
175
|
] })
|
|
79
176
|
] });
|
|
80
177
|
export {
|
|
81
|
-
|
|
178
|
+
_ as ContactFormSection
|
|
82
179
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
export declare interface ContactMethod {
|
|
4
|
-
|
|
5
|
-
label
|
|
5
|
+
id: string;
|
|
6
|
+
label?: ReactNode;
|
|
6
7
|
helper?: string;
|
|
7
|
-
|
|
8
|
+
variant: 'phone' | 'email' | 'location';
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export declare const ContactMethodCard: FC<ContactMethod>;
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsxs as i, Fragment as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { PhoneTalkIcon as n } from "./PhoneTalkIcon.js";
|
|
3
|
+
import { MailFillIcon as m } from "./MailFillIcon.js";
|
|
4
|
+
import { LocationIcon as c } from "./LocationIcon.js";
|
|
5
|
+
import { LinkWrapper as t } from "./LinkWrapper.js";
|
|
6
|
+
const y = ({ label: e, helper: l, variant: s }) => /* @__PURE__ */ i("article", { className: "bg-neutral-25 flex flex-wrap gap-2 rounded-sm p-4 md:flex-col", children: [
|
|
7
|
+
s === "phone" && /* @__PURE__ */ i(r, { children: [
|
|
8
|
+
/* @__PURE__ */ i(t, { variant: "primary-green", className: "w-full md:hidden", children: [
|
|
9
|
+
/* @__PURE__ */ a(n, { fill: "white" }),
|
|
10
|
+
" ",
|
|
11
|
+
e
|
|
12
|
+
] }),
|
|
13
|
+
/* @__PURE__ */ i("div", { className: "hidden gap-2 md:flex", children: [
|
|
14
|
+
/* @__PURE__ */ a("span", { className: "shrink-0", children: /* @__PURE__ */ a(n, { fill: "var(--primary-800)" }) }),
|
|
15
|
+
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
|
|
16
|
+
/* @__PURE__ */ a(t, { className: "justify-start! p-0! no-underline!", variant: "tertiary-link", children: /* @__PURE__ */ a("span", { className: "text-medium text-primary-800 font-bold", children: e }) }),
|
|
17
|
+
l && /* @__PURE__ */ a("p", { className: "text-small mx-auto text-neutral-600 md:mx-0", children: l })
|
|
18
|
+
] })
|
|
19
|
+
] }),
|
|
20
|
+
l && /* @__PURE__ */ a("p", { className: "text-small mx-auto text-neutral-600 md:mx-0 md:hidden", children: l })
|
|
21
|
+
] }),
|
|
22
|
+
s === "email" && /* @__PURE__ */ i("div", { className: "flex gap-2", children: [
|
|
23
|
+
/* @__PURE__ */ a("span", { className: "shrink-0", children: /* @__PURE__ */ a(m, { fill: "var(--primary-800)" }) }),
|
|
24
|
+
/* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
|
|
25
|
+
/* @__PURE__ */ a(t, { className: "justify-start! p-0!", variant: "tertiary-link", children: /* @__PURE__ */ a("span", { className: "text-medium text-primary-800 font-bold", children: e }) }),
|
|
26
|
+
l && /* @__PURE__ */ a("p", { className: "text-small text-neutral-600", children: l })
|
|
27
|
+
] })
|
|
28
|
+
] }),
|
|
29
|
+
s === "location" && /* @__PURE__ */ i("div", { className: "flex gap-2", children: [
|
|
30
|
+
/* @__PURE__ */ a("span", { className: "shrink-0", children: /* @__PURE__ */ a(c, { fill: "var(--primary-800)" }) }),
|
|
31
|
+
l && /* @__PURE__ */ a("p", { className: "text-small text-neutral-600", children: l })
|
|
7
32
|
] })
|
|
8
33
|
] });
|
|
9
34
|
export {
|
|
10
|
-
|
|
35
|
+
y as ContactMethodCard
|
|
11
36
|
};
|
|
@@ -2,16 +2,15 @@ import { FC } from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
export interface ContactMethod {
|
|
5
|
-
|
|
6
|
-
label
|
|
5
|
+
id: string;
|
|
6
|
+
label?: ReactNode;
|
|
7
7
|
helper?: string;
|
|
8
|
-
|
|
8
|
+
variant: 'phone' | 'email' | 'location';
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export declare const ContactMethodsSection: FC<ContactMethodsSectionProps>;
|
|
12
12
|
|
|
13
13
|
export declare interface ContactMethodsSectionProps {
|
|
14
14
|
items: ContactMethod[];
|
|
15
|
-
title?: ReactNode;
|
|
16
15
|
}
|
|
17
16
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const n = ({ items: t, title: a }) => /* @__PURE__ */ o("section", { "aria-labelledby": "contact-methods-heading", children: /* @__PURE__ */ o(r, { title: a, children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-4", children: t.map((e) => /* @__PURE__ */ o(c, { ...e }, e.label)) }) }) });
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { ContactMethodCard as s } from "./ContactMethodCard.js";
|
|
3
|
+
const r = ({ items: e }) => /* @__PURE__ */ t("section", { className: "flex flex-col gap-4 rounded-sm bg-white p-6 shadow-sm", children: e.map((o) => /* @__PURE__ */ t(s, { ...o }, o.id)) });
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
r as ContactMethodsSection
|
|
7
6
|
};
|
|
@@ -1,16 +1,86 @@
|
|
|
1
|
+
import { ChangeEventHandler } from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ComponentPropsWithRef } from 'react';
|
|
1
4
|
import { FC } from 'react';
|
|
2
5
|
import { ReactNode } from 'react';
|
|
3
6
|
|
|
4
|
-
export interface
|
|
5
|
-
|
|
7
|
+
export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
variant?: ResponsiveButtonVariant;
|
|
11
|
+
iconPosition?: IconPosition;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ButtonSize = 'small' | 'default' | 'large';
|
|
15
|
+
|
|
16
|
+
export type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yellow' | 'primary-white' | 'secondary-green' | 'secondary-yellow' | 'secondary-red' | 'secondary-black' | 'tertiary-bold' | 'tertiary-thin' | 'tertiary-icon' | 'tertiary-link' | 'icon-black' | 'icon-grey' | 'icon-mobile';
|
|
17
|
+
|
|
18
|
+
export interface ContactFormCheckboxFieldProps extends Omit<ContactFormFieldProps, 'placeholder' | 'tooltip'> {
|
|
19
|
+
checked: boolean;
|
|
20
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ContactFormFeedbackProps {
|
|
24
|
+
message: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
cta?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ContactFormFieldProps {
|
|
6
30
|
label: string;
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
tooltip?: string;
|
|
36
|
+
errorMessage?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ContactFormSectionProps {
|
|
40
|
+
title: ReactNode;
|
|
41
|
+
subjectOptions: {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}[];
|
|
45
|
+
fullNameField: Omit<ContactFormTextFieldProps, 'tooltip'>;
|
|
46
|
+
emailField: Omit<ContactFormTextFieldProps, 'tooltip'>;
|
|
47
|
+
referenceNumberField: ContactFormTextFieldProps;
|
|
48
|
+
subjectField: ContactFormSelectFieldProps;
|
|
49
|
+
messageField: ContactFormTextareaFieldProps;
|
|
50
|
+
requiredFieldsText: string;
|
|
51
|
+
privacyField: ContactFormCheckboxFieldProps;
|
|
52
|
+
securityHint: string;
|
|
53
|
+
status?: 'default' | 'loading' | 'success' | 'error';
|
|
54
|
+
successFeedback?: ContactFormFeedbackProps;
|
|
55
|
+
errorFeedback?: ContactFormFeedbackProps;
|
|
56
|
+
onSubmit?: ComponentProps<'form'>['onSubmit'];
|
|
57
|
+
button: ButtonProps;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ContactFormSelectFieldProps extends Omit<ContactFormFieldProps, 'tooltip'> {
|
|
61
|
+
value: string;
|
|
62
|
+
onChange: ChangeEventHandler<HTMLSelectElement>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ContactFormTextareaFieldProps extends Omit<ContactFormFieldProps, 'tooltip'> {
|
|
66
|
+
value: string;
|
|
67
|
+
onChange: ChangeEventHandler<HTMLTextAreaElement>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface ContactFormTextFieldProps extends ContactFormFieldProps {
|
|
71
|
+
value: string;
|
|
72
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ContactMethod {
|
|
76
|
+
id: string;
|
|
77
|
+
label?: ReactNode;
|
|
7
78
|
helper?: string;
|
|
8
|
-
|
|
79
|
+
variant: 'phone' | 'email' | 'location';
|
|
9
80
|
}
|
|
10
81
|
|
|
11
82
|
export interface ContactMethodsSectionProps {
|
|
12
83
|
items: ContactMethod[];
|
|
13
|
-
title?: ReactNode;
|
|
14
84
|
}
|
|
15
85
|
|
|
16
86
|
export declare const ContactUsTemplate: FC<ContactUsTemplateProps>;
|
|
@@ -18,13 +88,28 @@ export declare const ContactUsTemplate: FC<ContactUsTemplateProps>;
|
|
|
18
88
|
export declare interface ContactUsTemplateProps {
|
|
19
89
|
jumbotron: Jumbotron2Props;
|
|
20
90
|
contactMethods: ContactMethodsSectionProps;
|
|
21
|
-
|
|
91
|
+
contactForm: ContactFormSectionProps;
|
|
92
|
+
faqSection: {
|
|
93
|
+
faqTitle: string;
|
|
94
|
+
faqText: string;
|
|
95
|
+
faqCta: ReactNode;
|
|
96
|
+
};
|
|
22
97
|
}
|
|
23
98
|
|
|
99
|
+
export type IconPosition = 'left' | 'right' | 'top';
|
|
100
|
+
|
|
24
101
|
export interface Jumbotron2Props {
|
|
25
102
|
title: string;
|
|
26
103
|
subtitle?: string;
|
|
27
104
|
className?: string;
|
|
28
105
|
children?: React.ReactNode;
|
|
29
106
|
}
|
|
107
|
+
|
|
108
|
+
export type ResponsiveButtonVariant = ButtonVariant | {
|
|
109
|
+
initial?: ButtonVariant;
|
|
110
|
+
sm?: ButtonVariant;
|
|
111
|
+
md?: ButtonVariant;
|
|
112
|
+
lg?: ButtonVariant;
|
|
113
|
+
xl?: ButtonVariant;
|
|
114
|
+
};
|
|
30
115
|
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ContactFormSection as
|
|
3
|
-
import { Jumbotron2 as
|
|
4
|
-
import { ContactMethodsSection as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { ContactFormSection as i } from "./ContactFormSection.js";
|
|
3
|
+
import { Jumbotron2 as o } from "./Jumbotron2.js";
|
|
4
|
+
import { ContactMethodsSection as s } from "./ContactMethodsSection.js";
|
|
5
|
+
import { Markdown as c } from "./Markdown.js";
|
|
6
|
+
import { LinkWrapper as d } from "./LinkWrapper.js";
|
|
7
|
+
const N = ({
|
|
8
|
+
jumbotron: r,
|
|
9
|
+
contactMethods: m,
|
|
10
|
+
contactForm: t,
|
|
11
|
+
faqSection: e
|
|
12
|
+
}) => /* @__PURE__ */ a("main", { className: "bg-primary-50 flex-1 py-10 md:px-6 md:pb-20 lg:px-8 xl:px-0", children: /* @__PURE__ */ l("div", { className: "relative mx-auto flex w-full max-w-300 flex-col gap-12", children: [
|
|
13
|
+
/* @__PURE__ */ a(o, { ...r, className: "pb-0!" }),
|
|
14
|
+
/* @__PURE__ */ l("div", { className: "relative flex flex-col gap-10 md:grid md:grid-cols-2 md:items-start md:gap-x-10 md:gap-y-8 lg:gap-x-16 xl:gap-x-20", children: [
|
|
15
|
+
/* @__PURE__ */ a(s, { ...m }),
|
|
16
|
+
/* @__PURE__ */ a("div", { className: "md:row-span-2", children: /* @__PURE__ */ a(i, { ...t }) }),
|
|
17
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col gap-8 px-6", children: [
|
|
18
|
+
/* @__PURE__ */ a("h3", { className: "text-large text-primary-700 font-bold", children: e.faqTitle }),
|
|
19
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-8", children: /* @__PURE__ */ a(c, { content: e.faqText, className: "text-medium text-neutral-800 [&_p:last-child]:mb-0" }) }),
|
|
20
|
+
/* @__PURE__ */ a(d, { className: "w-fit", variant: "secondary-green", children: e.faqCta })
|
|
21
|
+
] })
|
|
10
22
|
] })
|
|
11
23
|
] }) });
|
|
12
24
|
export {
|
|
13
|
-
|
|
25
|
+
N as ContactUsTemplate
|
|
14
26
|
};
|