@npm_leadtech/legal-contracts-ui 0.176.5 → 0.176.6
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/LeadGateModal.js +76 -73
- package/package.json +1 -1
|
@@ -6,82 +6,85 @@ import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
|
6
6
|
//#region lib/components/molecules/LeadGateModal.tsx
|
|
7
7
|
var o = (e) => {
|
|
8
8
|
!(e.target instanceof HTMLElement) || !e.target.closest("a") || e.stopPropagation();
|
|
9
|
-
}, s = ({ description: s, emailLabel: c, emailPlaceholder: l, emailErrorMessage: u, termsLabel: d, marketingLabel: f, ctaLabel: p, payload: m, errors: h = {}, onPayloadChange: g, onSubmit: _ }) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
className: "flex w-full flex-col gap-4",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
email: e
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}),
|
|
39
|
-
/* @__PURE__ */ a("div", {
|
|
40
|
-
className: "flex flex-col gap-4",
|
|
41
|
-
children: [/* @__PURE__ */ i(r, {
|
|
42
|
-
id: "lead-gate-terms",
|
|
43
|
-
name: "hasAcceptedTerms",
|
|
44
|
-
dataQa: "lead_gate_terms",
|
|
45
|
-
checked: m.hasAcceptedTerms,
|
|
46
|
-
error: h.hasAcceptedTerms,
|
|
47
|
-
onChange: (e) => {
|
|
9
|
+
}, s = ({ description: s, emailLabel: c, emailPlaceholder: l, emailErrorMessage: u, termsLabel: d, marketingLabel: f, ctaLabel: p, payload: m, errors: h = {}, onPayloadChange: g, onSubmit: _ }) => {
|
|
10
|
+
let v = !!(h.email || h.hasAcceptedTerms);
|
|
11
|
+
return /* @__PURE__ */ a("div", {
|
|
12
|
+
className: "mt-4 flex w-full flex-col gap-4",
|
|
13
|
+
children: [/* @__PURE__ */ i("span", { className: "h-px w-full bg-neutral-200" }), /* @__PURE__ */ a("form", {
|
|
14
|
+
className: "flex w-full flex-col gap-4",
|
|
15
|
+
noValidate: !0,
|
|
16
|
+
onSubmit: (e) => {
|
|
17
|
+
e.preventDefault(), _?.();
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ i(t, {
|
|
21
|
+
className: "text-medium w-auto! text-center text-neutral-800 [&_p]:mb-0",
|
|
22
|
+
content: s
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ i(n, {
|
|
25
|
+
id: "lead-gate-email",
|
|
26
|
+
name: "email",
|
|
27
|
+
type: "email",
|
|
28
|
+
label: c,
|
|
29
|
+
placeholder: l,
|
|
30
|
+
dataQa: "lead_gate_email",
|
|
31
|
+
value: m.email,
|
|
32
|
+
error: v,
|
|
33
|
+
errorMessage: u,
|
|
34
|
+
onInputChange: (e) => {
|
|
48
35
|
g({
|
|
49
36
|
...m,
|
|
50
|
-
|
|
37
|
+
email: e
|
|
51
38
|
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ a("div", {
|
|
42
|
+
className: "flex flex-col gap-4",
|
|
43
|
+
children: [/* @__PURE__ */ i(r, {
|
|
44
|
+
id: "lead-gate-terms",
|
|
45
|
+
name: "hasAcceptedTerms",
|
|
46
|
+
dataQa: "lead_gate_terms",
|
|
47
|
+
checked: m.hasAcceptedTerms,
|
|
48
|
+
error: h.hasAcceptedTerms,
|
|
49
|
+
onChange: (e) => {
|
|
50
|
+
g({
|
|
51
|
+
...m,
|
|
52
|
+
hasAcceptedTerms: e.currentTarget.checked
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
children: /* @__PURE__ */ i("span", {
|
|
56
|
+
className: "min-w-0",
|
|
57
|
+
onClick: o,
|
|
58
|
+
onKeyDown: o,
|
|
59
|
+
children: /* @__PURE__ */ i(t, {
|
|
60
|
+
className: "[&_p]:mb-0",
|
|
61
|
+
content: d
|
|
62
|
+
})
|
|
60
63
|
})
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
]
|
|
84
|
-
})
|
|
85
|
-
}
|
|
64
|
+
}), /* @__PURE__ */ i(r, {
|
|
65
|
+
id: "lead-gate-marketing",
|
|
66
|
+
name: "hasAcceptedMarketing",
|
|
67
|
+
dataQa: "lead_gate_marketing",
|
|
68
|
+
checked: m.hasAcceptedMarketing,
|
|
69
|
+
onChange: (e) => {
|
|
70
|
+
g({
|
|
71
|
+
...m,
|
|
72
|
+
hasAcceptedMarketing: e.currentTarget.checked
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
children: f
|
|
76
|
+
})]
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ i(e, {
|
|
79
|
+
type: "submit",
|
|
80
|
+
variant: "primary-green",
|
|
81
|
+
className: "w-full",
|
|
82
|
+
dataQa: "lead_gate_download",
|
|
83
|
+
children: p
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
};
|
|
86
89
|
//#endregion
|
|
87
90
|
export { s as LeadGateModal };
|