@npm_leadtech/legal-contracts-ui 0.184.10 → 0.185.0
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.
|
@@ -10,8 +10,8 @@ import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
|
10
10
|
//#region lib/components/molecules/LeadGateModal.tsx
|
|
11
11
|
var c = (e) => {
|
|
12
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
|
|
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, status: w = "default" }) => {
|
|
14
|
+
let T = !!x.email, E = w === "loading";
|
|
15
15
|
return /* @__PURE__ */ o(a, {
|
|
16
16
|
isOpen: l,
|
|
17
17
|
setIsOpen: u,
|
|
@@ -51,7 +51,7 @@ var c = (e) => {
|
|
|
51
51
|
className: "flex w-full flex-col gap-4",
|
|
52
52
|
noValidate: !0,
|
|
53
53
|
onSubmit: (e) => {
|
|
54
|
-
e.preventDefault(), C?.();
|
|
54
|
+
e.preventDefault(), !E && C?.();
|
|
55
55
|
},
|
|
56
56
|
children: [
|
|
57
57
|
/* @__PURE__ */ o(n, {
|
|
@@ -66,7 +66,7 @@ var c = (e) => {
|
|
|
66
66
|
placeholder: h,
|
|
67
67
|
dataQa: "lead_gate_email",
|
|
68
68
|
value: b.email,
|
|
69
|
-
error:
|
|
69
|
+
error: T,
|
|
70
70
|
errorMessage: g,
|
|
71
71
|
onInputChange: (e) => {
|
|
72
72
|
S({
|
|
@@ -112,12 +112,18 @@ var c = (e) => {
|
|
|
112
112
|
children: v
|
|
113
113
|
})]
|
|
114
114
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ s(t, {
|
|
116
116
|
type: "submit",
|
|
117
117
|
variant: "primary-green",
|
|
118
118
|
className: "w-full",
|
|
119
119
|
dataQa: "lead_gate_download",
|
|
120
|
-
|
|
120
|
+
disabled: E,
|
|
121
|
+
"aria-busy": E,
|
|
122
|
+
children: [E && /* @__PURE__ */ o("span", {
|
|
123
|
+
"data-qa": "lead_gate_loading",
|
|
124
|
+
"aria-hidden": "true",
|
|
125
|
+
className: "border-primary-500 h-5 w-5 animate-spin rounded-full border-3 border-t-transparent"
|
|
126
|
+
}), y]
|
|
121
127
|
})
|
|
122
128
|
]
|
|
123
129
|
})]
|
|
@@ -840,6 +840,7 @@ export declare interface LeadGateModalProps {
|
|
|
840
840
|
errors?: LeadGateModalErrors;
|
|
841
841
|
onPayloadChange: (payload: LeadGateModalPayload) => void;
|
|
842
842
|
onSubmit?: () => void;
|
|
843
|
+
status?: 'default' | 'loading';
|
|
843
844
|
}
|
|
844
845
|
|
|
845
846
|
export declare const LeadGateSuccessFeatureItem: FC<LeadGateSuccessFeatureItemProps>;
|