@npm_leadtech/legal-contracts-ui 0.182.0 → 0.182.2
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.js +3 -3
- package/dist/components/Footer.d.ts +0 -2
- package/dist/components/Footer.js +3 -3
- package/dist/components/JumboDocs.d.ts +5 -1
- package/dist/components/JumboDocs.js +33 -32
- package/dist/components/LeadGateErrorModal.d.ts +15 -0
- package/dist/components/LeadGateErrorModal.js +78 -0
- package/dist/components/LeadGateModal.d.ts +33 -0
- package/dist/components/LeadGateModal.js +128 -0
- package/dist/components/LeadGateSuccessFeatureItem.d.ts +15 -0
- package/dist/components/LeadGateSuccessFeatureItem.js +27 -0
- package/dist/components/LeadGateSuccessModal.d.ts +28 -0
- package/dist/components/LeadGateSuccessModal.js +96 -0
- package/dist/components/Modal.d.ts +4 -1
- package/dist/components/Modal.js +23 -19
- package/dist/components/Preform.d.ts +5 -1
- package/dist/components/Preform.js +35 -34
- package/dist/components/PreformMobile.d.ts +5 -1
- package/dist/components/PreformMobile.js +65 -64
- package/dist/components/ProductSemTemplate.d.ts +5 -1
- package/dist/components/ProductTemplate.d.ts +6 -2
- package/dist/components/index.d.ts +78 -5
- package/dist/index.js +53 -49
- package/package.json +38 -29
|
@@ -4,7 +4,7 @@ import r from "clsx";
|
|
|
4
4
|
//#region lib/components/atoms/Checkbox.tsx
|
|
5
5
|
var i = ({ dataQa: i, id: a, name: o, required: s = !1, children: c, checked: l, error: u = !1, ...d }) => /* @__PURE__ */ n("label", {
|
|
6
6
|
htmlFor: a,
|
|
7
|
-
className: "text-medium flex cursor-pointer items-
|
|
7
|
+
className: "text-medium flex cursor-pointer items-start gap-2 text-neutral-800 select-none",
|
|
8
8
|
children: [
|
|
9
9
|
/* @__PURE__ */ t("input", {
|
|
10
10
|
id: a,
|
|
@@ -16,11 +16,11 @@ var i = ({ dataQa: i, id: a, name: o, required: s = !1, children: c, checked: l,
|
|
|
16
16
|
}),
|
|
17
17
|
/* @__PURE__ */ t("div", {
|
|
18
18
|
"data-qa": i,
|
|
19
|
-
className: r("flex h-5.5 w-5.5 items-center justify-center rounded transition-colors", "peer-focus-visible:ring-primary-500 peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2", !u && !l && "hover:bg-primary-200 border border-neutral-800 bg-white", l && "border-primary-500 bg-primary-200 border-2", u && "border-error-500 bg-error-20 border"),
|
|
19
|
+
className: r("flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded transition-colors", "peer-focus-visible:ring-primary-500 peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2", !u && !l && "hover:bg-primary-200 border border-neutral-800 bg-white", l && "border-primary-500 bg-primary-200 border-2", u && "border-error-500 bg-error-20 border"),
|
|
20
20
|
children: l && /* @__PURE__ */ t(e, {})
|
|
21
21
|
}),
|
|
22
22
|
/* @__PURE__ */ t("span", {
|
|
23
|
-
className: "leading-tight text-neutral-800",
|
|
23
|
+
className: "min-w-0 leading-tight text-neutral-800",
|
|
24
24
|
children: c
|
|
25
25
|
})
|
|
26
26
|
]
|
|
@@ -3,9 +3,9 @@ import { FooterNav as t } from "./FooterNav.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/components/organisms/Footer.tsx
|
|
6
|
-
var i = ({ nav: i, contactInfo: a, logoGray: o, socialLinks: s, legalLinks: c, disclaimerText: l, copyrightText: u, trustPilot: d, languageSelector: f
|
|
6
|
+
var i = ({ nav: i, contactInfo: a, logoGray: o, socialLinks: s, legalLinks: c, disclaimerText: l, copyrightText: u, trustPilot: d, languageSelector: f }) => /* @__PURE__ */ r("footer", {
|
|
7
7
|
className: "text-neutral-25 max-w-full overflow-x-hidden",
|
|
8
|
-
children: [
|
|
8
|
+
children: [/* @__PURE__ */ n("div", {
|
|
9
9
|
className: "bg-primary-900",
|
|
10
10
|
children: /* @__PURE__ */ r("div", {
|
|
11
11
|
className: "mx-auto flex w-full max-w-300 flex-col items-start gap-8 px-6 py-10 md:grid md:grid-cols-3 lg:flex lg:flex-row lg:justify-between",
|
|
@@ -46,7 +46,7 @@ var i = ({ nav: i, contactInfo: a, logoGray: o, socialLinks: s, legalLinks: c, d
|
|
|
46
46
|
})]
|
|
47
47
|
})]
|
|
48
48
|
})
|
|
49
|
-
}),
|
|
49
|
+
}), /* @__PURE__ */ n("div", {
|
|
50
50
|
className: "bg-neutral-900 px-6 py-8 text-neutral-400",
|
|
51
51
|
children: /* @__PURE__ */ r("div", {
|
|
52
52
|
className: "mx-auto flex w-full max-w-300 flex-col gap-6",
|
|
@@ -4,11 +4,15 @@ import { ReactNode } from 'react';
|
|
|
4
4
|
export declare const JumboDocs: FC<JumboDocsProps>;
|
|
5
5
|
|
|
6
6
|
export declare interface JumboDocsProps {
|
|
7
|
-
trustedBadge?:
|
|
7
|
+
trustedBadge?: TrustedBadgeProps;
|
|
8
8
|
imagePreview: ReactNode | null;
|
|
9
9
|
title: string;
|
|
10
10
|
freeDocTexts: string[];
|
|
11
11
|
pdfDownload: ReactNode;
|
|
12
12
|
wordDownload: ReactNode;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
export interface TrustedBadgeProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
14
18
|
|
|
@@ -1,79 +1,80 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { LinkWrapper as e } from "./LinkWrapper.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { TrustedBadge as t } from "./TrustedBadge.js";
|
|
5
|
+
import { useEffect as n, useRef as r, useState as i } from "react";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
7
|
//#region lib/components/organisms/JumboDocs.tsx
|
|
7
|
-
var
|
|
8
|
-
let [
|
|
9
|
-
return
|
|
10
|
-
let e =
|
|
8
|
+
var c = ({ trustedBadge: c, imagePreview: l, freeDocTexts: u, title: d, pdfDownload: f, wordDownload: p }) => {
|
|
9
|
+
let [m, h] = i(!1), g = r(null);
|
|
10
|
+
return n(() => {
|
|
11
|
+
let e = g.current;
|
|
11
12
|
if (!e) return;
|
|
12
13
|
let t = new IntersectionObserver(([e]) => {
|
|
13
|
-
|
|
14
|
+
h(!e.isIntersecting);
|
|
14
15
|
}, { threshold: 0 });
|
|
15
16
|
return t.observe(e), () => {
|
|
16
17
|
t.disconnect();
|
|
17
18
|
};
|
|
18
|
-
}, []), /* @__PURE__ */
|
|
19
|
+
}, []), /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("section", {
|
|
19
20
|
className: "bg-neutral-25 pt-8 text-neutral-800 sm:px-6 lg:px-8 xl:px-30",
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
ref:
|
|
21
|
+
children: /* @__PURE__ */ s("div", {
|
|
22
|
+
ref: g,
|
|
22
23
|
className: "relative mx-auto flex max-w-300 flex-col items-center justify-center gap-8 rounded bg-white px-6 py-8 shadow-md sm:px-4 md:flex-row lg:px-14",
|
|
23
24
|
children: [
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
c && /* @__PURE__ */ o(t, { ...c }),
|
|
26
|
+
/* @__PURE__ */ o("div", {
|
|
26
27
|
className: "border border-neutral-200 shadow",
|
|
27
|
-
children:
|
|
28
|
+
children: l
|
|
28
29
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ s("div", {
|
|
30
31
|
className: "flex flex-col gap-8 self-start",
|
|
31
|
-
children: [/* @__PURE__ */
|
|
32
|
+
children: [/* @__PURE__ */ s("div", {
|
|
32
33
|
className: "flex flex-col gap-4",
|
|
33
34
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ o("p", {
|
|
35
36
|
className: "text-big md:text-large font-bold",
|
|
36
|
-
children:
|
|
37
|
+
children: d
|
|
37
38
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
39
|
+
/* @__PURE__ */ o("span", { className: "h-px w-full bg-neutral-200" }),
|
|
40
|
+
u.length > 0 && /* @__PURE__ */ o("ul", {
|
|
40
41
|
className: "flex flex-col gap-4 md:gap-8",
|
|
41
|
-
children:
|
|
42
|
+
children: u.map((e) => /* @__PURE__ */ s("li", {
|
|
42
43
|
className: "text-small flex gap-2",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ o("span", {
|
|
44
45
|
className: "text-primary-500",
|
|
45
46
|
children: "•"
|
|
46
47
|
}), e]
|
|
47
48
|
}, e))
|
|
48
49
|
})
|
|
49
50
|
]
|
|
50
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ s("div", {
|
|
51
52
|
className: "flex w-full gap-4",
|
|
52
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ o(e, {
|
|
53
54
|
className: "w-full md:w-26.25",
|
|
54
55
|
variant: "secondary-black",
|
|
55
|
-
children:
|
|
56
|
-
}), /* @__PURE__ */
|
|
56
|
+
children: f
|
|
57
|
+
}), /* @__PURE__ */ o(e, {
|
|
57
58
|
className: "w-full md:w-26.25",
|
|
58
59
|
variant: "secondary-black",
|
|
59
|
-
children:
|
|
60
|
+
children: p
|
|
60
61
|
})]
|
|
61
62
|
})]
|
|
62
63
|
})
|
|
63
64
|
]
|
|
64
65
|
})
|
|
65
|
-
}),
|
|
66
|
+
}), m && /* @__PURE__ */ s("div", {
|
|
66
67
|
className: "fixed bottom-0 left-0 z-50 flex w-full gap-4 bg-white px-6 py-4 shadow sm:hidden",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ o(e, {
|
|
68
69
|
className: "w-full",
|
|
69
70
|
variant: "secondary-black",
|
|
70
|
-
children:
|
|
71
|
-
}), /* @__PURE__ */
|
|
71
|
+
children: f
|
|
72
|
+
}), /* @__PURE__ */ o(e, {
|
|
72
73
|
className: "w-full",
|
|
73
74
|
variant: "secondary-black",
|
|
74
|
-
children:
|
|
75
|
+
children: p
|
|
75
76
|
})]
|
|
76
77
|
})] });
|
|
77
78
|
};
|
|
78
79
|
//#endregion
|
|
79
|
-
export {
|
|
80
|
+
export { c as JumboDocs };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const LeadGateErrorModal: FC<LeadGateErrorModalProps>;
|
|
4
|
+
|
|
5
|
+
export declare interface LeadGateErrorModalProps {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
setIsOpen: (open: boolean) => void;
|
|
8
|
+
title: string;
|
|
9
|
+
closeLeadGateLabel: string;
|
|
10
|
+
heading: string;
|
|
11
|
+
description: string;
|
|
12
|
+
ctaLabel: string;
|
|
13
|
+
onRetry?: () => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { ClearIcon as e } from "./ClearIcon.js";
|
|
4
|
+
import { Button as t } from "./Button.js";
|
|
5
|
+
import { Markdown as n } from "./Markdown.js";
|
|
6
|
+
import { Modal as r } from "./Modal.js";
|
|
7
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
|
+
//#region lib/components/molecules/LeadGateErrorModal.tsx
|
|
9
|
+
var o = ({ isOpen: o, setIsOpen: s, title: c, closeLeadGateLabel: l, heading: u, description: d, ctaLabel: f, onRetry: p }) => /* @__PURE__ */ i(r, {
|
|
10
|
+
isOpen: o,
|
|
11
|
+
setIsOpen: s,
|
|
12
|
+
showClose: !1,
|
|
13
|
+
overlayVariant: "grey",
|
|
14
|
+
children: /* @__PURE__ */ a("div", {
|
|
15
|
+
className: "shadow-small flex w-[338px] max-w-[calc(100vw-3rem)] flex-col rounded-sm bg-white p-6 sm:w-96",
|
|
16
|
+
children: [/* @__PURE__ */ a("div", {
|
|
17
|
+
className: "flex items-center gap-2",
|
|
18
|
+
children: [/* @__PURE__ */ i("div", {
|
|
19
|
+
className: "flex min-w-0 flex-1 items-center gap-1",
|
|
20
|
+
children: /* @__PURE__ */ i("h2", {
|
|
21
|
+
id: "lead-gate-error-modal-title",
|
|
22
|
+
className: "text-big min-w-0 flex-1 font-bold break-words text-neutral-800",
|
|
23
|
+
children: c
|
|
24
|
+
})
|
|
25
|
+
}), /* @__PURE__ */ i(t, {
|
|
26
|
+
type: "button",
|
|
27
|
+
variant: "tertiary-icon",
|
|
28
|
+
className: "shrink-0 p-0!",
|
|
29
|
+
dataQa: "lead_gate_close",
|
|
30
|
+
"aria-label": l,
|
|
31
|
+
onClick: () => {
|
|
32
|
+
s(!1);
|
|
33
|
+
},
|
|
34
|
+
children: /* @__PURE__ */ i(e, {
|
|
35
|
+
width: 24,
|
|
36
|
+
height: 24,
|
|
37
|
+
fill: "var(--color-neutral-800)",
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
})
|
|
40
|
+
})]
|
|
41
|
+
}), /* @__PURE__ */ a("div", {
|
|
42
|
+
className: "mt-4 flex w-full flex-col",
|
|
43
|
+
children: [/* @__PURE__ */ i("span", { className: "h-px w-full bg-neutral-200" }), /* @__PURE__ */ a("div", {
|
|
44
|
+
className: "mt-10 flex w-full flex-col gap-10",
|
|
45
|
+
children: [/* @__PURE__ */ a("div", {
|
|
46
|
+
className: "mx-auto flex w-full max-w-80 flex-col items-center gap-4",
|
|
47
|
+
children: [/* @__PURE__ */ i("div", {
|
|
48
|
+
className: "bg-error-20 flex size-[74px] items-center justify-center rounded-full",
|
|
49
|
+
children: /* @__PURE__ */ i(e, {
|
|
50
|
+
width: 48,
|
|
51
|
+
height: 48,
|
|
52
|
+
fill: "var(--color-error-500)",
|
|
53
|
+
"aria-hidden": "true"
|
|
54
|
+
})
|
|
55
|
+
}), /* @__PURE__ */ a("div", {
|
|
56
|
+
className: "flex w-full flex-col gap-2 text-center",
|
|
57
|
+
children: [/* @__PURE__ */ i("p", {
|
|
58
|
+
className: "text-big font-bold text-neutral-800",
|
|
59
|
+
children: u
|
|
60
|
+
}), /* @__PURE__ */ i(n, {
|
|
61
|
+
className: "text-medium w-auto! text-neutral-800 [&_p]:mb-0",
|
|
62
|
+
content: d
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
}), /* @__PURE__ */ i(t, {
|
|
66
|
+
type: "button",
|
|
67
|
+
variant: "primary-green",
|
|
68
|
+
className: "w-full",
|
|
69
|
+
dataQa: "lead_gate_retry",
|
|
70
|
+
onClick: p,
|
|
71
|
+
children: f
|
|
72
|
+
})]
|
|
73
|
+
})]
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { o as LeadGateErrorModal };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const LeadGateModal: FC<LeadGateModalProps>;
|
|
4
|
+
|
|
5
|
+
export declare interface LeadGateModalErrors {
|
|
6
|
+
email?: boolean;
|
|
7
|
+
hasAcceptedTerms?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare interface LeadGateModalPayload {
|
|
11
|
+
email: string;
|
|
12
|
+
hasAcceptedTerms: boolean;
|
|
13
|
+
hasAcceptedMarketing: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare interface LeadGateModalProps {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
setIsOpen: (open: boolean) => void;
|
|
19
|
+
title: string;
|
|
20
|
+
closeLeadGateLabel: string;
|
|
21
|
+
description: string;
|
|
22
|
+
emailLabel: string;
|
|
23
|
+
emailPlaceholder: string;
|
|
24
|
+
emailErrorMessage: string;
|
|
25
|
+
termsLabel: string;
|
|
26
|
+
marketingLabel: string;
|
|
27
|
+
ctaLabel: string;
|
|
28
|
+
payload: LeadGateModalPayload;
|
|
29
|
+
errors?: LeadGateModalErrors;
|
|
30
|
+
onPayloadChange: (payload: LeadGateModalPayload) => void;
|
|
31
|
+
onSubmit?: () => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { ClearIcon as e } from "./ClearIcon.js";
|
|
4
|
+
import { Button as t } from "./Button.js";
|
|
5
|
+
import { Markdown as n } from "./Markdown.js";
|
|
6
|
+
import { Input as r } from "./Input.js";
|
|
7
|
+
import { Checkbox as i } from "./Checkbox.js";
|
|
8
|
+
import { Modal as a } from "./Modal.js";
|
|
9
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
10
|
+
//#region lib/components/molecules/LeadGateModal.tsx
|
|
11
|
+
var c = (e) => {
|
|
12
|
+
!(e.target instanceof HTMLElement) || !e.target.closest("a") || e.stopPropagation();
|
|
13
|
+
}, l = ({ isOpen: l, setIsOpen: u, title: d, closeLeadGateLabel: f, description: p, emailLabel: m, emailPlaceholder: h, emailErrorMessage: g, termsLabel: _, marketingLabel: v, ctaLabel: y, payload: b, errors: x = {}, onPayloadChange: S, onSubmit: C }) => {
|
|
14
|
+
let w = !!(x.email || x.hasAcceptedTerms);
|
|
15
|
+
return /* @__PURE__ */ o(a, {
|
|
16
|
+
isOpen: l,
|
|
17
|
+
setIsOpen: u,
|
|
18
|
+
showClose: !1,
|
|
19
|
+
overlayVariant: "grey",
|
|
20
|
+
children: /* @__PURE__ */ s("div", {
|
|
21
|
+
className: "shadow-small flex w-[338px] max-w-[calc(100vw-3rem)] flex-col rounded-sm bg-white p-6 sm:w-96",
|
|
22
|
+
children: [/* @__PURE__ */ s("div", {
|
|
23
|
+
className: "flex items-center gap-2",
|
|
24
|
+
children: [/* @__PURE__ */ o("div", {
|
|
25
|
+
className: "flex min-w-0 flex-1 items-center gap-1",
|
|
26
|
+
children: /* @__PURE__ */ o("h2", {
|
|
27
|
+
id: "lead-gate-capture-modal-title",
|
|
28
|
+
className: "text-big min-w-0 flex-1 font-bold break-words text-neutral-800",
|
|
29
|
+
children: d
|
|
30
|
+
})
|
|
31
|
+
}), /* @__PURE__ */ o(t, {
|
|
32
|
+
type: "button",
|
|
33
|
+
variant: "tertiary-icon",
|
|
34
|
+
className: "shrink-0 p-0!",
|
|
35
|
+
dataQa: "lead_gate_close",
|
|
36
|
+
"aria-label": f,
|
|
37
|
+
onClick: () => {
|
|
38
|
+
u(!1);
|
|
39
|
+
},
|
|
40
|
+
children: /* @__PURE__ */ o(e, {
|
|
41
|
+
width: 24,
|
|
42
|
+
height: 24,
|
|
43
|
+
fill: "var(--color-neutral-800)",
|
|
44
|
+
"aria-hidden": "true"
|
|
45
|
+
})
|
|
46
|
+
})]
|
|
47
|
+
}), /* @__PURE__ */ s("div", {
|
|
48
|
+
className: "mt-4 flex w-full flex-col gap-4",
|
|
49
|
+
children: [/* @__PURE__ */ o("span", { className: "h-px w-full bg-neutral-200" }), /* @__PURE__ */ s("form", {
|
|
50
|
+
className: "flex w-full flex-col gap-4",
|
|
51
|
+
noValidate: !0,
|
|
52
|
+
onSubmit: (e) => {
|
|
53
|
+
e.preventDefault(), C?.();
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ o(n, {
|
|
57
|
+
className: "text-medium w-auto! text-center text-neutral-800 [&_p]:mb-0",
|
|
58
|
+
content: p
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ o(r, {
|
|
61
|
+
id: "lead-gate-email",
|
|
62
|
+
name: "email",
|
|
63
|
+
type: "email",
|
|
64
|
+
label: m,
|
|
65
|
+
placeholder: h,
|
|
66
|
+
dataQa: "lead_gate_email",
|
|
67
|
+
value: b.email,
|
|
68
|
+
error: w,
|
|
69
|
+
errorMessage: g,
|
|
70
|
+
onInputChange: (e) => {
|
|
71
|
+
S({
|
|
72
|
+
...b,
|
|
73
|
+
email: e
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ s("div", {
|
|
78
|
+
className: "flex flex-col gap-4",
|
|
79
|
+
children: [/* @__PURE__ */ o(i, {
|
|
80
|
+
id: "lead-gate-terms",
|
|
81
|
+
name: "hasAcceptedTerms",
|
|
82
|
+
dataQa: "lead_gate_terms",
|
|
83
|
+
checked: b.hasAcceptedTerms,
|
|
84
|
+
error: x.hasAcceptedTerms,
|
|
85
|
+
onChange: (e) => {
|
|
86
|
+
S({
|
|
87
|
+
...b,
|
|
88
|
+
hasAcceptedTerms: e.currentTarget.checked
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
children: /* @__PURE__ */ o("span", {
|
|
92
|
+
className: "min-w-0",
|
|
93
|
+
onClick: c,
|
|
94
|
+
onKeyDown: c,
|
|
95
|
+
children: /* @__PURE__ */ o(n, {
|
|
96
|
+
className: "[&_p]:mb-0",
|
|
97
|
+
content: _
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
}), /* @__PURE__ */ o(i, {
|
|
101
|
+
id: "lead-gate-marketing",
|
|
102
|
+
name: "hasAcceptedMarketing",
|
|
103
|
+
dataQa: "lead_gate_marketing",
|
|
104
|
+
checked: b.hasAcceptedMarketing,
|
|
105
|
+
onChange: (e) => {
|
|
106
|
+
S({
|
|
107
|
+
...b,
|
|
108
|
+
hasAcceptedMarketing: e.currentTarget.checked
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
children: v
|
|
112
|
+
})]
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ o(t, {
|
|
115
|
+
type: "submit",
|
|
116
|
+
variant: "primary-green",
|
|
117
|
+
className: "w-full",
|
|
118
|
+
dataQa: "lead_gate_download",
|
|
119
|
+
children: y
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
})]
|
|
123
|
+
})]
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { l as LeadGateModal };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare type LeadGateMediaContent = {
|
|
4
|
+
url: string;
|
|
5
|
+
alternativeText?: string | null;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export declare const LeadGateSuccessFeatureItem: FC<LeadGateSuccessFeatureItemProps>;
|
|
9
|
+
|
|
10
|
+
export declare interface LeadGateSuccessFeatureItemProps {
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
icon?: LeadGateMediaContent | null;
|
|
14
|
+
}
|
|
15
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
//#region lib/components/molecules/LeadGateSuccessFeatureItem.tsx
|
|
3
|
+
var n = ({ url: t }) => /* @__PURE__ */ e("div", {
|
|
4
|
+
className: "bg-primary-500 h-6 w-6",
|
|
5
|
+
style: {
|
|
6
|
+
WebkitMask: `url(${t}) no-repeat center / contain`,
|
|
7
|
+
mask: `url(${t}) no-repeat center / contain`
|
|
8
|
+
},
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}), r = ({ icon: r, title: i, description: a }) => /* @__PURE__ */ t("li", {
|
|
11
|
+
className: "flex items-start gap-4",
|
|
12
|
+
children: [r?.url ? /* @__PURE__ */ e("span", {
|
|
13
|
+
className: "mt-0.5 shrink-0",
|
|
14
|
+
children: /* @__PURE__ */ e(n, { url: r.url })
|
|
15
|
+
}) : null, /* @__PURE__ */ t("div", {
|
|
16
|
+
className: "flex min-w-0 flex-1 flex-col gap-2",
|
|
17
|
+
children: [/* @__PURE__ */ e("p", {
|
|
18
|
+
className: "text-medium font-bold text-neutral-800",
|
|
19
|
+
children: i
|
|
20
|
+
}), /* @__PURE__ */ e("p", {
|
|
21
|
+
className: "text-small text-neutral-600",
|
|
22
|
+
children: a
|
|
23
|
+
})]
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { r as LeadGateSuccessFeatureItem };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare type LeadGateMediaContent = {
|
|
4
|
+
url: string;
|
|
5
|
+
alternativeText?: string | null;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export declare interface LeadGateSuccessFeatureItemProps {
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
icon?: LeadGateMediaContent | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare const LeadGateSuccessModal: FC<LeadGateSuccessModalProps>;
|
|
15
|
+
|
|
16
|
+
export declare interface LeadGateSuccessModalProps {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
setIsOpen: (open: boolean) => void;
|
|
19
|
+
title: string;
|
|
20
|
+
closeLeadGateLabel: string;
|
|
21
|
+
subtitle: string;
|
|
22
|
+
featureItems: LeadGateSuccessFeatureItemProps[];
|
|
23
|
+
ctaLabel: string;
|
|
24
|
+
footer: string;
|
|
25
|
+
headerImage: LeadGateMediaContent | null;
|
|
26
|
+
onCtaClick?: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { DoneCircleIcon as e } from "./DoneCircleIcon.js";
|
|
4
|
+
import { DocOutlineIcon as t } from "./DocOutlineIcon.js";
|
|
5
|
+
import { ClearIcon as n } from "./ClearIcon.js";
|
|
6
|
+
import { Button as r } from "./Button.js";
|
|
7
|
+
import { Markdown as i } from "./Markdown.js";
|
|
8
|
+
import { Modal as a } from "./Modal.js";
|
|
9
|
+
import { LeadGateSuccessFeatureItem as o } from "./LeadGateSuccessFeatureItem.js";
|
|
10
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
11
|
+
//#region lib/components/molecules/LeadGateSuccessModal.tsx
|
|
12
|
+
var l = ({ isOpen: l, setIsOpen: u, title: d, closeLeadGateLabel: f, subtitle: p, featureItems: m, ctaLabel: h, footer: g, headerImage: _, onCtaClick: v }) => /* @__PURE__ */ s(a, {
|
|
13
|
+
isOpen: l,
|
|
14
|
+
setIsOpen: u,
|
|
15
|
+
showClose: !1,
|
|
16
|
+
overlayVariant: "grey",
|
|
17
|
+
children: /* @__PURE__ */ c("div", {
|
|
18
|
+
className: "shadow-small flex w-[338px] max-w-[calc(100vw-3rem)] flex-col rounded-sm bg-white p-6 sm:w-96",
|
|
19
|
+
children: [/* @__PURE__ */ c("div", {
|
|
20
|
+
className: "flex items-center gap-2",
|
|
21
|
+
children: [/* @__PURE__ */ c("div", {
|
|
22
|
+
className: "flex min-w-0 flex-1 items-center gap-1",
|
|
23
|
+
children: [/* @__PURE__ */ s(e, {
|
|
24
|
+
width: 20,
|
|
25
|
+
height: 20,
|
|
26
|
+
fill: "var(--color-primary-500)",
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
className: "shrink-0"
|
|
29
|
+
}), /* @__PURE__ */ s("h2", {
|
|
30
|
+
id: "lead-gate-success-modal-title",
|
|
31
|
+
className: "text-big min-w-0 flex-1 font-bold break-words text-neutral-800",
|
|
32
|
+
children: d
|
|
33
|
+
})]
|
|
34
|
+
}), /* @__PURE__ */ s(r, {
|
|
35
|
+
type: "button",
|
|
36
|
+
variant: "tertiary-icon",
|
|
37
|
+
className: "shrink-0 p-0!",
|
|
38
|
+
dataQa: "lead_gate_close",
|
|
39
|
+
"aria-label": f,
|
|
40
|
+
onClick: () => {
|
|
41
|
+
u(!1);
|
|
42
|
+
},
|
|
43
|
+
children: /* @__PURE__ */ s(n, {
|
|
44
|
+
width: 24,
|
|
45
|
+
height: 24,
|
|
46
|
+
fill: "var(--color-neutral-800)",
|
|
47
|
+
"aria-hidden": "true"
|
|
48
|
+
})
|
|
49
|
+
})]
|
|
50
|
+
}), /* @__PURE__ */ c("div", {
|
|
51
|
+
className: "mt-6 flex w-full flex-col gap-6",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ s("div", {
|
|
54
|
+
className: "relative h-[227px] w-[302px] max-w-full overflow-hidden",
|
|
55
|
+
children: _ ? /* @__PURE__ */ s("img", {
|
|
56
|
+
src: _.url,
|
|
57
|
+
alt: _.alternativeText ?? "",
|
|
58
|
+
width: 302,
|
|
59
|
+
height: 227,
|
|
60
|
+
className: "h-full w-full object-contain"
|
|
61
|
+
}) : null
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ s("p", {
|
|
64
|
+
className: "text-medium text-primary-500 w-full text-center",
|
|
65
|
+
children: p
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ s("span", { className: "h-px w-full bg-neutral-200" }),
|
|
68
|
+
/* @__PURE__ */ s("ul", {
|
|
69
|
+
className: "flex w-full flex-col gap-4",
|
|
70
|
+
children: m.map((e) => /* @__PURE__ */ s(o, { ...e }, e.title))
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ c("div", {
|
|
73
|
+
className: "flex w-full flex-col gap-4",
|
|
74
|
+
children: [/* @__PURE__ */ c(r, {
|
|
75
|
+
type: "button",
|
|
76
|
+
variant: "primary-green",
|
|
77
|
+
className: "w-full",
|
|
78
|
+
dataQa: "lead_gate_success_cta",
|
|
79
|
+
onClick: v,
|
|
80
|
+
children: [/* @__PURE__ */ s(t, {
|
|
81
|
+
width: 22,
|
|
82
|
+
height: 22,
|
|
83
|
+
fill: "currentColor",
|
|
84
|
+
"aria-hidden": "true"
|
|
85
|
+
}), h]
|
|
86
|
+
}), /* @__PURE__ */ s(i, {
|
|
87
|
+
className: "text-extra-small [&_strong]:text-primary-500 text-center text-neutral-600 [&_p]:mb-0",
|
|
88
|
+
content: g
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})]
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
//#endregion
|
|
96
|
+
export { l as LeadGateSuccessModal };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
export declare const Modal: ({ trigger, children, isOpen, setIsOpen, showClose, onTrigger }: ModalProps) => JSX.Element;
|
|
4
|
+
export declare const Modal: ({ trigger, children, isOpen, setIsOpen, showClose, onTrigger, overlayVariant }: ModalProps) => JSX.Element;
|
|
5
|
+
|
|
6
|
+
export declare type ModalOverlayVariant = 'primary' | 'grey';
|
|
5
7
|
|
|
6
8
|
export interface ModalProps {
|
|
7
9
|
trigger?: ReactNode;
|
|
@@ -10,5 +12,6 @@ export interface ModalProps {
|
|
|
10
12
|
setIsOpen: (open: boolean) => void;
|
|
11
13
|
showClose?: boolean;
|
|
12
14
|
onTrigger?: () => void;
|
|
15
|
+
overlayVariant?: ModalOverlayVariant;
|
|
13
16
|
}
|
|
14
17
|
|