@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.
@@ -8,5 +8,6 @@ export declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInp
8
8
  name: string;
9
9
  required?: boolean;
10
10
  children: ReactNode;
11
+ error?: boolean;
11
12
  }
12
13
 
@@ -1,18 +1,22 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- const n = ({ id: t, name: r, required: s = !1, children: i, ...l }) => /* @__PURE__ */ a("label", { className: "text-medium flex items-center gap-3 text-neutral-800", children: [
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: t,
7
+ id: r,
7
8
  type: "checkbox",
8
- name: r,
9
- required: s,
10
- className: "text-primary-700 focus-visible:outline-primary-500 h-5 w-5 rounded border-neutral-400 focus-visible:outline-2",
11
- ...l
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: i })
18
+ /* @__PURE__ */ e("span", { children: s })
15
19
  ] });
16
20
  export {
17
- n as Checkbox
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 declare const ContactFormSection: FC;
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 t } from "./Textarea.js";
3
- import { Checkbox as i } from "./Checkbox.js";
4
- import { CommunicationIcon as l } from "./CommunicationIcon.js";
5
- import { Input as a } from "./Input.js";
6
- import { Select as n } from "./Select.js";
7
- import { Item as o } from "./Item.js";
8
- import { Button as s } from "./Button.js";
9
- const c = [
10
- { label: "Billing and subscriptions", value: "billing-and-subscriptions" },
11
- { label: "Technical support", value: "technical-support" },
12
- { label: "Document customization", value: "document-customization" },
13
- { label: "Account and security", value: "account-and-security" }
14
- ], y = () => /* @__PURE__ */ r("section", { "aria-labelledby": "contact-form-heading", className: "flex-1 rounded-xl bg-white p-6 shadow-md lg:p-8", children: [
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", { id: "contact-form-heading", className: "text-big font-bold text-neutral-600", children: "Send Us a Message" }),
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("form", { className: "mt-6 space-y-6", noValidate: !0, children: [
20
- /* @__PURE__ */ e(a, { label: "Full Name", id: "full-name", name: "full-name", type: "text", placeholder: "e.g. John Doe", required: !0 }),
21
- /* @__PURE__ */ e(a, { label: "Email", id: "email", name: "email", type: "email", placeholder: "example@email.com", required: !0 }),
22
- /* @__PURE__ */ e(
23
- a,
24
- {
25
- label: "Reference number",
26
- id: "reference-number",
27
- name: "reference-number",
28
- type: "text",
29
- placeholder: "e.g. 12345678",
30
- tooltip: "Where to find your reference number"
31
- }
32
- ),
33
- /* @__PURE__ */ e(
34
- n,
35
- {
36
- label: "Subject",
37
- id: "subject",
38
- name: "subject",
39
- placeholder: "Select a subject",
40
- options: c,
41
- required: !0
42
- }
43
- ),
44
- /* @__PURE__ */ e(t, { label: "Your Message", id: "message", name: "message", placeholder: "Write your message here", required: !0 }),
45
- /* @__PURE__ */ e("p", { className: "text-small text-neutral-600", children: "* Required fields" }),
46
- /* @__PURE__ */ e(i, { id: "privacy", name: "privacy", required: !0, children: /* @__PURE__ */ r("span", { children: [
47
- "I have read and accept the",
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
- "a",
91
+ p,
51
92
  {
52
- href: "https://www.lawdistrict.com/privacy-and-cookies-policy/",
53
- target: "_blank",
54
- rel: "noopener noreferrer",
55
- className: "text-primary-700 underline-offset-2 hover:underline",
56
- children: "Privacy and Cookies Policy."
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
- /* @__PURE__ */ e(
61
- o,
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: "ID",
64
- image: /* @__PURE__ */ e(l, { className: "size-5", "aria-hidden": "true" }),
65
- description: "This information is required for the security verification process.",
66
- className: "text-small flex items-start gap-3 rounded bg-neutral-50 p-4 text-neutral-600"
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
- s,
165
+ b,
71
166
  {
72
- type: "submit",
73
- size: "large",
74
- className: "bg-primary-500 hover:bg-primary-400 focus-visible:outline-primary-500 w-full justify-center text-white",
75
- children: /* @__PURE__ */ e("span", { className: "text-medium font-bold text-white", children: "Send Message" })
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
- y as ContactFormSection
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
- icon: React.ReactNode;
5
- label: string;
5
+ id: string;
6
+ label?: ReactNode;
6
7
  helper?: string;
7
- href?: string;
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 a, jsx as e } from "react/jsx-runtime";
2
- const i = ({ icon: n, label: t, helper: r, href: d }) => /* @__PURE__ */ a("article", { className: "bg-neutral-25 flex items-center gap-4 rounded-lg border border-neutral-200 p-4", children: [
3
- /* @__PURE__ */ e("div", { className: "flex h-10 w-10 items-center justify-center rounded-md bg-white", "aria-hidden": "true", children: n }),
4
- /* @__PURE__ */ a("div", { className: "flex-1", children: [
5
- d ? /* @__PURE__ */ e("a", { href: d, className: "text-medium text-primary-800 font-bold underline-offset-4 hover:underline", children: t }) : /* @__PURE__ */ e("p", { className: "text-medium text-primary-800 font-bold", children: t }),
6
- r && /* @__PURE__ */ e("p", { className: "text-small text-neutral-600", children: r })
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
- i as ContactMethodCard
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
- icon: React.ReactNode;
6
- label: string;
5
+ id: string;
6
+ label?: ReactNode;
7
7
  helper?: string;
8
- href?: string;
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 o } from "react/jsx-runtime";
2
- import { Card as r } from "./Card.js";
3
- import { ContactMethodCard as c } from "./ContactMethodCard.js";
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
- n as ContactMethodsSection
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 ContactMethod {
5
- icon: React.ReactNode;
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
- href?: string;
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
- subjectOptions?: string[];
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 e, jsxs as l } from "react/jsx-runtime";
2
- import { ContactFormSection as a } from "./ContactFormSection.js";
3
- import { Jumbotron2 as t } from "./Jumbotron2.js";
4
- import { ContactMethodsSection as m } from "./ContactMethodsSection.js";
5
- const n = ({ jumbotron: o, contactMethods: r }) => /* @__PURE__ */ e("main", { className: "bg-primary-50 flex-1 px-4 py-12 lg:px-0", children: /* @__PURE__ */ l("div", { className: "relative mx-auto flex w-full max-w-6xl flex-col gap-12", children: [
6
- /* @__PURE__ */ e(t, { ...o }),
7
- /* @__PURE__ */ l("div", { className: "relative flex flex-col gap-10 lg:flex-row", children: [
8
- /* @__PURE__ */ e("div", { className: "flex-1 space-y-8", children: /* @__PURE__ */ e(m, { ...r }) }),
9
- /* @__PURE__ */ e(a, {})
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
- n as ContactUsTemplate
25
+ N as ContactUsTemplate
14
26
  };
@@ -13,5 +13,6 @@ export declare interface InputProps extends React.InputHTMLAttributes<HTMLInputE
13
13
  tooltip?: string;
14
14
  onInputChange?: (str: string) => void;
15
15
  containerClassName?: string;
16
+ error?: boolean;
16
17
  }
17
18