@npm_leadtech/legal-contracts-ui 0.182.1 → 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.
|
@@ -6,9 +6,9 @@ import { Markdown as n } from "./Markdown.js";
|
|
|
6
6
|
import { Modal as r } from "./Modal.js";
|
|
7
7
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
8
|
//#region lib/components/molecules/LeadGateErrorModal.tsx
|
|
9
|
-
var o =
|
|
10
|
-
isOpen:
|
|
11
|
-
setIsOpen:
|
|
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
12
|
showClose: !1,
|
|
13
13
|
overlayVariant: "grey",
|
|
14
14
|
children: /* @__PURE__ */ a("div", {
|
|
@@ -18,18 +18,18 @@ var o = "lead-gate-modal-title", s = ({ isOpen: s, setIsOpen: c, title: l, close
|
|
|
18
18
|
children: [/* @__PURE__ */ i("div", {
|
|
19
19
|
className: "flex min-w-0 flex-1 items-center gap-1",
|
|
20
20
|
children: /* @__PURE__ */ i("h2", {
|
|
21
|
-
id:
|
|
21
|
+
id: "lead-gate-error-modal-title",
|
|
22
22
|
className: "text-big min-w-0 flex-1 font-bold break-words text-neutral-800",
|
|
23
|
-
children:
|
|
23
|
+
children: c
|
|
24
24
|
})
|
|
25
25
|
}), /* @__PURE__ */ i(t, {
|
|
26
26
|
type: "button",
|
|
27
27
|
variant: "tertiary-icon",
|
|
28
28
|
className: "shrink-0 p-0!",
|
|
29
29
|
dataQa: "lead_gate_close",
|
|
30
|
-
"aria-label":
|
|
30
|
+
"aria-label": l,
|
|
31
31
|
onClick: () => {
|
|
32
|
-
|
|
32
|
+
s(!1);
|
|
33
33
|
},
|
|
34
34
|
children: /* @__PURE__ */ i(e, {
|
|
35
35
|
width: 24,
|
|
@@ -56,10 +56,10 @@ var o = "lead-gate-modal-title", s = ({ isOpen: s, setIsOpen: c, title: l, close
|
|
|
56
56
|
className: "flex w-full flex-col gap-2 text-center",
|
|
57
57
|
children: [/* @__PURE__ */ i("p", {
|
|
58
58
|
className: "text-big font-bold text-neutral-800",
|
|
59
|
-
children:
|
|
59
|
+
children: u
|
|
60
60
|
}), /* @__PURE__ */ i(n, {
|
|
61
61
|
className: "text-medium w-auto! text-neutral-800 [&_p]:mb-0",
|
|
62
|
-
content:
|
|
62
|
+
content: d
|
|
63
63
|
})]
|
|
64
64
|
})]
|
|
65
65
|
}), /* @__PURE__ */ i(t, {
|
|
@@ -67,12 +67,12 @@ var o = "lead-gate-modal-title", s = ({ isOpen: s, setIsOpen: c, title: l, close
|
|
|
67
67
|
variant: "primary-green",
|
|
68
68
|
className: "w-full",
|
|
69
69
|
dataQa: "lead_gate_retry",
|
|
70
|
-
onClick:
|
|
71
|
-
children:
|
|
70
|
+
onClick: p,
|
|
71
|
+
children: f
|
|
72
72
|
})]
|
|
73
73
|
})]
|
|
74
74
|
})]
|
|
75
75
|
})
|
|
76
76
|
});
|
|
77
77
|
//#endregion
|
|
78
|
-
export {
|
|
78
|
+
export { o as LeadGateErrorModal };
|
|
@@ -8,13 +8,13 @@ import { Checkbox as i } from "./Checkbox.js";
|
|
|
8
8
|
import { Modal as a } from "./Modal.js";
|
|
9
9
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
10
10
|
//#region lib/components/molecules/LeadGateModal.tsx
|
|
11
|
-
var c =
|
|
11
|
+
var c = (e) => {
|
|
12
12
|
!(e.target instanceof HTMLElement) || !e.target.closest("a") || e.stopPropagation();
|
|
13
|
-
},
|
|
14
|
-
let
|
|
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
15
|
return /* @__PURE__ */ o(a, {
|
|
16
|
-
isOpen:
|
|
17
|
-
setIsOpen:
|
|
16
|
+
isOpen: l,
|
|
17
|
+
setIsOpen: u,
|
|
18
18
|
showClose: !1,
|
|
19
19
|
overlayVariant: "grey",
|
|
20
20
|
children: /* @__PURE__ */ s("div", {
|
|
@@ -24,18 +24,18 @@ var c = "lead-gate-modal-title", l = (e) => {
|
|
|
24
24
|
children: [/* @__PURE__ */ o("div", {
|
|
25
25
|
className: "flex min-w-0 flex-1 items-center gap-1",
|
|
26
26
|
children: /* @__PURE__ */ o("h2", {
|
|
27
|
-
id:
|
|
27
|
+
id: "lead-gate-capture-modal-title",
|
|
28
28
|
className: "text-big min-w-0 flex-1 font-bold break-words text-neutral-800",
|
|
29
|
-
children:
|
|
29
|
+
children: d
|
|
30
30
|
})
|
|
31
31
|
}), /* @__PURE__ */ o(t, {
|
|
32
32
|
type: "button",
|
|
33
33
|
variant: "tertiary-icon",
|
|
34
34
|
className: "shrink-0 p-0!",
|
|
35
35
|
dataQa: "lead_gate_close",
|
|
36
|
-
"aria-label":
|
|
36
|
+
"aria-label": f,
|
|
37
37
|
onClick: () => {
|
|
38
|
-
|
|
38
|
+
u(!1);
|
|
39
39
|
},
|
|
40
40
|
children: /* @__PURE__ */ o(e, {
|
|
41
41
|
width: 24,
|
|
@@ -50,26 +50,26 @@ var c = "lead-gate-modal-title", l = (e) => {
|
|
|
50
50
|
className: "flex w-full flex-col gap-4",
|
|
51
51
|
noValidate: !0,
|
|
52
52
|
onSubmit: (e) => {
|
|
53
|
-
e.preventDefault(),
|
|
53
|
+
e.preventDefault(), C?.();
|
|
54
54
|
},
|
|
55
55
|
children: [
|
|
56
56
|
/* @__PURE__ */ o(n, {
|
|
57
57
|
className: "text-medium w-auto! text-center text-neutral-800 [&_p]:mb-0",
|
|
58
|
-
content:
|
|
58
|
+
content: p
|
|
59
59
|
}),
|
|
60
60
|
/* @__PURE__ */ o(r, {
|
|
61
61
|
id: "lead-gate-email",
|
|
62
62
|
name: "email",
|
|
63
63
|
type: "email",
|
|
64
|
-
label:
|
|
65
|
-
placeholder:
|
|
64
|
+
label: m,
|
|
65
|
+
placeholder: h,
|
|
66
66
|
dataQa: "lead_gate_email",
|
|
67
|
-
value:
|
|
68
|
-
error:
|
|
69
|
-
errorMessage:
|
|
67
|
+
value: b.email,
|
|
68
|
+
error: w,
|
|
69
|
+
errorMessage: g,
|
|
70
70
|
onInputChange: (e) => {
|
|
71
|
-
|
|
72
|
-
...
|
|
71
|
+
S({
|
|
72
|
+
...b,
|
|
73
73
|
email: e
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -80,35 +80,35 @@ var c = "lead-gate-modal-title", l = (e) => {
|
|
|
80
80
|
id: "lead-gate-terms",
|
|
81
81
|
name: "hasAcceptedTerms",
|
|
82
82
|
dataQa: "lead_gate_terms",
|
|
83
|
-
checked:
|
|
84
|
-
error:
|
|
83
|
+
checked: b.hasAcceptedTerms,
|
|
84
|
+
error: x.hasAcceptedTerms,
|
|
85
85
|
onChange: (e) => {
|
|
86
|
-
|
|
87
|
-
...
|
|
86
|
+
S({
|
|
87
|
+
...b,
|
|
88
88
|
hasAcceptedTerms: e.currentTarget.checked
|
|
89
89
|
});
|
|
90
90
|
},
|
|
91
91
|
children: /* @__PURE__ */ o("span", {
|
|
92
92
|
className: "min-w-0",
|
|
93
|
-
onClick:
|
|
94
|
-
onKeyDown:
|
|
93
|
+
onClick: c,
|
|
94
|
+
onKeyDown: c,
|
|
95
95
|
children: /* @__PURE__ */ o(n, {
|
|
96
96
|
className: "[&_p]:mb-0",
|
|
97
|
-
content:
|
|
97
|
+
content: _
|
|
98
98
|
})
|
|
99
99
|
})
|
|
100
100
|
}), /* @__PURE__ */ o(i, {
|
|
101
101
|
id: "lead-gate-marketing",
|
|
102
102
|
name: "hasAcceptedMarketing",
|
|
103
103
|
dataQa: "lead_gate_marketing",
|
|
104
|
-
checked:
|
|
104
|
+
checked: b.hasAcceptedMarketing,
|
|
105
105
|
onChange: (e) => {
|
|
106
|
-
|
|
107
|
-
...
|
|
106
|
+
S({
|
|
107
|
+
...b,
|
|
108
108
|
hasAcceptedMarketing: e.currentTarget.checked
|
|
109
109
|
});
|
|
110
110
|
},
|
|
111
|
-
children:
|
|
111
|
+
children: v
|
|
112
112
|
})]
|
|
113
113
|
}),
|
|
114
114
|
/* @__PURE__ */ o(t, {
|
|
@@ -116,7 +116,7 @@ var c = "lead-gate-modal-title", l = (e) => {
|
|
|
116
116
|
variant: "primary-green",
|
|
117
117
|
className: "w-full",
|
|
118
118
|
dataQa: "lead_gate_download",
|
|
119
|
-
children:
|
|
119
|
+
children: y
|
|
120
120
|
})
|
|
121
121
|
]
|
|
122
122
|
})]
|
|
@@ -125,4 +125,4 @@ var c = "lead-gate-modal-title", l = (e) => {
|
|
|
125
125
|
});
|
|
126
126
|
};
|
|
127
127
|
//#endregion
|
|
128
|
-
export {
|
|
128
|
+
export { l as LeadGateModal };
|
|
@@ -9,9 +9,9 @@ import { Modal as a } from "./Modal.js";
|
|
|
9
9
|
import { LeadGateSuccessFeatureItem as o } from "./LeadGateSuccessFeatureItem.js";
|
|
10
10
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
11
11
|
//#region lib/components/molecules/LeadGateSuccessModal.tsx
|
|
12
|
-
var l =
|
|
13
|
-
isOpen:
|
|
14
|
-
setIsOpen:
|
|
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
15
|
showClose: !1,
|
|
16
16
|
overlayVariant: "grey",
|
|
17
17
|
children: /* @__PURE__ */ c("div", {
|
|
@@ -27,18 +27,18 @@ var l = "lead-gate-modal-title", u = ({ isOpen: u, setIsOpen: d, title: f, close
|
|
|
27
27
|
"aria-hidden": "true",
|
|
28
28
|
className: "shrink-0"
|
|
29
29
|
}), /* @__PURE__ */ s("h2", {
|
|
30
|
-
id:
|
|
30
|
+
id: "lead-gate-success-modal-title",
|
|
31
31
|
className: "text-big min-w-0 flex-1 font-bold break-words text-neutral-800",
|
|
32
|
-
children:
|
|
32
|
+
children: d
|
|
33
33
|
})]
|
|
34
34
|
}), /* @__PURE__ */ s(r, {
|
|
35
35
|
type: "button",
|
|
36
36
|
variant: "tertiary-icon",
|
|
37
37
|
className: "shrink-0 p-0!",
|
|
38
38
|
dataQa: "lead_gate_close",
|
|
39
|
-
"aria-label":
|
|
39
|
+
"aria-label": f,
|
|
40
40
|
onClick: () => {
|
|
41
|
-
|
|
41
|
+
u(!1);
|
|
42
42
|
},
|
|
43
43
|
children: /* @__PURE__ */ s(n, {
|
|
44
44
|
width: 24,
|
|
@@ -52,9 +52,9 @@ var l = "lead-gate-modal-title", u = ({ isOpen: u, setIsOpen: d, title: f, close
|
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ s("div", {
|
|
54
54
|
className: "relative h-[227px] w-[302px] max-w-full overflow-hidden",
|
|
55
|
-
children:
|
|
56
|
-
src:
|
|
57
|
-
alt:
|
|
55
|
+
children: _ ? /* @__PURE__ */ s("img", {
|
|
56
|
+
src: _.url,
|
|
57
|
+
alt: _.alternativeText ?? "",
|
|
58
58
|
width: 302,
|
|
59
59
|
height: 227,
|
|
60
60
|
className: "h-full w-full object-contain"
|
|
@@ -62,12 +62,12 @@ var l = "lead-gate-modal-title", u = ({ isOpen: u, setIsOpen: d, title: f, close
|
|
|
62
62
|
}),
|
|
63
63
|
/* @__PURE__ */ s("p", {
|
|
64
64
|
className: "text-medium text-primary-500 w-full text-center",
|
|
65
|
-
children:
|
|
65
|
+
children: p
|
|
66
66
|
}),
|
|
67
67
|
/* @__PURE__ */ s("span", { className: "h-px w-full bg-neutral-200" }),
|
|
68
68
|
/* @__PURE__ */ s("ul", {
|
|
69
69
|
className: "flex w-full flex-col gap-4",
|
|
70
|
-
children:
|
|
70
|
+
children: m.map((e) => /* @__PURE__ */ s(o, { ...e }, e.title))
|
|
71
71
|
}),
|
|
72
72
|
/* @__PURE__ */ c("div", {
|
|
73
73
|
className: "flex w-full flex-col gap-4",
|
|
@@ -76,16 +76,16 @@ var l = "lead-gate-modal-title", u = ({ isOpen: u, setIsOpen: d, title: f, close
|
|
|
76
76
|
variant: "primary-green",
|
|
77
77
|
className: "w-full",
|
|
78
78
|
dataQa: "lead_gate_success_cta",
|
|
79
|
-
onClick:
|
|
79
|
+
onClick: v,
|
|
80
80
|
children: [/* @__PURE__ */ s(t, {
|
|
81
81
|
width: 22,
|
|
82
82
|
height: 22,
|
|
83
83
|
fill: "currentColor",
|
|
84
84
|
"aria-hidden": "true"
|
|
85
|
-
}),
|
|
85
|
+
}), h]
|
|
86
86
|
}), /* @__PURE__ */ s(i, {
|
|
87
87
|
className: "text-extra-small [&_strong]:text-primary-500 text-center text-neutral-600 [&_p]:mb-0",
|
|
88
|
-
content:
|
|
88
|
+
content: g
|
|
89
89
|
})]
|
|
90
90
|
})
|
|
91
91
|
]
|
|
@@ -93,4 +93,4 @@ var l = "lead-gate-modal-title", u = ({ isOpen: u, setIsOpen: d, title: f, close
|
|
|
93
93
|
})
|
|
94
94
|
});
|
|
95
95
|
//#endregion
|
|
96
|
-
export {
|
|
96
|
+
export { l as LeadGateSuccessModal };
|