@npm_leadtech/legal-contracts-ui 0.190.1 → 0.190.11
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/AboutUsTemplate.d.ts +1 -0
- package/dist/components/AiLegalDocumentReviewerTemplate.d.ts +0 -20
- package/dist/components/AllDocumentsTemplate.d.ts +1 -0
- package/dist/components/ContentItem.d.ts +1 -0
- package/dist/components/ContentItem.js +5 -1
- package/dist/components/ConversionSection.d.ts +0 -20
- package/dist/components/CtaSection.d.ts +1 -0
- package/dist/components/DefaultSubtypeDocument.d.ts +1 -0
- package/dist/components/DefaultSubtypeDocument.js +10 -9
- package/dist/components/ElectronicSignatureTemplate.d.ts +0 -20
- package/dist/components/GuidelinesSection.d.ts +1 -0
- package/dist/components/Hero2Section.d.ts +0 -20
- package/dist/components/IntroSection.d.ts +1 -0
- package/dist/components/LinkWrapper.d.ts +2 -1
- package/dist/components/LinkWrapper.js +12 -7
- package/dist/components/PdfToolsHero.d.ts +0 -20
- package/dist/components/PdfToolsTemplate.d.ts +0 -20
- package/dist/components/Preform.js +1 -0
- package/dist/components/PreformMobile.js +1 -0
- package/dist/components/PreviewDownload.js +1 -0
- package/dist/components/PreviewSection.js +1 -0
- package/dist/components/PricingTemplate.d.ts +1 -0
- package/dist/components/ProductTemplate.d.ts +1 -0
- package/dist/components/TryNowSection.js +4 -1
- package/dist/components/UploadZone.d.ts +0 -20
- package/dist/components/UploadZone.js +53 -114
- package/dist/components/WeHelpSection.d.ts +1 -0
- package/dist/components/index.d.ts +3 -21
- package/package.json +2 -2
|
@@ -130,20 +130,6 @@ export interface ToastProps {
|
|
|
130
130
|
onClose: () => void;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
export interface UploadZoneError {
|
|
134
|
-
kind: UploadZoneErrorKind;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface UploadZoneErrorCopy {
|
|
138
|
-
tooLarge: string;
|
|
139
|
-
unsupportedFormat: string;
|
|
140
|
-
generic: string;
|
|
141
|
-
retryLabel: string;
|
|
142
|
-
chooseFileLabel: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
146
|
-
|
|
147
133
|
export interface UploadZoneProps {
|
|
148
134
|
uploadPromptText?: string;
|
|
149
135
|
addDocumentLabel: string;
|
|
@@ -158,11 +144,5 @@ export interface UploadZoneProps {
|
|
|
158
144
|
onAddDocument?: () => void;
|
|
159
145
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
160
146
|
dataQa?: string;
|
|
161
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
162
|
-
error?: UploadZoneError | null;
|
|
163
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
164
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
165
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
166
|
-
onErrorAction?: () => void;
|
|
167
147
|
}
|
|
168
148
|
|
|
@@ -22,6 +22,7 @@ var c = ({ id: c, title: l, content: u, linkedProducts: d, sampleImage: f, cta:
|
|
|
22
22
|
f && /* @__PURE__ */ o(n, { ...f }),
|
|
23
23
|
!!p && /* @__PURE__ */ o(t, {
|
|
24
24
|
className: "w-75 self-center text-center",
|
|
25
|
+
"data-qa": `createDocument-seo-content-cta-${c}`,
|
|
25
26
|
children: p
|
|
26
27
|
}),
|
|
27
28
|
!!m && /* @__PURE__ */ o(t, {
|
|
@@ -44,7 +45,10 @@ var c = ({ id: c, title: l, content: u, linkedProducts: d, sampleImage: f, cta:
|
|
|
44
45
|
}),
|
|
45
46
|
g.length > 0 && /* @__PURE__ */ o("div", {
|
|
46
47
|
className: "flex flex-wrap gap-2",
|
|
47
|
-
children: g.map((e) => e.format === "Alternative" ? /* @__PURE__ */ o(i, { ...e }, e.id) : /* @__PURE__ */ o(a, {
|
|
48
|
+
children: g.map((e) => e.format === "Alternative" ? /* @__PURE__ */ o(i, { ...e }, e.id) : /* @__PURE__ */ o(a, {
|
|
49
|
+
...e,
|
|
50
|
+
ctaDataQa: `createDocument-seo-content-${c}-subtype-${e.id}`
|
|
51
|
+
}, e.id))
|
|
48
52
|
})
|
|
49
53
|
]
|
|
50
54
|
});
|
|
@@ -10,20 +10,6 @@ export declare interface ConversionSectionProps {
|
|
|
10
10
|
dataQa?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export interface UploadZoneError {
|
|
14
|
-
kind: UploadZoneErrorKind;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface UploadZoneErrorCopy {
|
|
18
|
-
tooLarge: string;
|
|
19
|
-
unsupportedFormat: string;
|
|
20
|
-
generic: string;
|
|
21
|
-
retryLabel: string;
|
|
22
|
-
chooseFileLabel: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
26
|
-
|
|
27
13
|
export interface UploadZoneProps {
|
|
28
14
|
uploadPromptText?: string;
|
|
29
15
|
addDocumentLabel: string;
|
|
@@ -38,11 +24,5 @@ export interface UploadZoneProps {
|
|
|
38
24
|
onAddDocument?: () => void;
|
|
39
25
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
40
26
|
dataQa?: string;
|
|
41
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
42
|
-
error?: UploadZoneError | null;
|
|
43
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
44
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
45
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
46
|
-
onErrorAction?: () => void;
|
|
47
27
|
}
|
|
48
28
|
|
|
@@ -19,6 +19,7 @@ export declare interface DefaultSubtypeDocumentProps extends BaseSubtypeDocument
|
|
|
19
19
|
format: 'Default';
|
|
20
20
|
createDocButton: ReactNode;
|
|
21
21
|
description: string;
|
|
22
|
+
ctaDataQa?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export declare type SubtypeDocumentProps = DefaultSubtypeDocumentProps | AlternativeSubtypeDocumentProps;
|
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { LinkWrapper as e } from "./LinkWrapper.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region lib/components/molecules/DefaultSubtypeDocument.tsx
|
|
4
|
-
var r = ({
|
|
4
|
+
var r = ({ id: r, link: i, sampleImage: a, pdfDownload: o, wordDownload: s, createDocButton: c, description: l, ctaDataQa: u = `createDocument-seo-subtype-${r}` }) => /* @__PURE__ */ n("div", {
|
|
5
5
|
className: "bg-secondary-50 mb-6 flex max-w-100 flex-col items-center justify-center gap-6 rounded-xs px-6 py-8 shadow-md last:mb-0 lg:max-w-136 lg:flex-row lg:items-start xl:max-w-179",
|
|
6
6
|
children: [/* @__PURE__ */ t("div", {
|
|
7
7
|
className: "max-w-35 shadow",
|
|
8
|
-
children:
|
|
8
|
+
children: a
|
|
9
9
|
}), /* @__PURE__ */ n("div", {
|
|
10
10
|
className: "flex w-full flex-col gap-4",
|
|
11
11
|
children: [
|
|
12
12
|
/* @__PURE__ */ t("div", {
|
|
13
13
|
className: "text-medium font-bold text-neutral-900 underline",
|
|
14
|
-
children:
|
|
14
|
+
children: i
|
|
15
15
|
}),
|
|
16
16
|
/* @__PURE__ */ t("p", {
|
|
17
17
|
className: "text-medium text-neutral-900",
|
|
18
|
-
children:
|
|
18
|
+
children: l
|
|
19
19
|
}),
|
|
20
20
|
/* @__PURE__ */ n("div", {
|
|
21
21
|
className: "flex flex-col gap-4 xl:flex-row",
|
|
22
22
|
children: [/* @__PURE__ */ t(e, {
|
|
23
23
|
size: "small",
|
|
24
24
|
className: "w-full",
|
|
25
|
-
|
|
25
|
+
"data-qa": u,
|
|
26
|
+
children: c
|
|
26
27
|
}), /* @__PURE__ */ n("div", {
|
|
27
28
|
className: "flex w-full justify-between gap-4",
|
|
28
|
-
children: [!!
|
|
29
|
+
children: [!!o && /* @__PURE__ */ t(e, {
|
|
29
30
|
size: "small",
|
|
30
31
|
className: "w-full",
|
|
31
32
|
variant: "secondary-black",
|
|
32
|
-
children:
|
|
33
|
-
}), !!
|
|
33
|
+
children: o
|
|
34
|
+
}), !!s && /* @__PURE__ */ t(e, {
|
|
34
35
|
size: "small",
|
|
35
36
|
className: "w-full",
|
|
36
37
|
variant: "secondary-black",
|
|
37
|
-
children:
|
|
38
|
+
children: s
|
|
38
39
|
})]
|
|
39
40
|
})]
|
|
40
41
|
})
|
|
@@ -122,20 +122,6 @@ export interface ToastProps {
|
|
|
122
122
|
onClose: () => void;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
export interface UploadZoneError {
|
|
126
|
-
kind: UploadZoneErrorKind;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export interface UploadZoneErrorCopy {
|
|
130
|
-
tooLarge: string;
|
|
131
|
-
unsupportedFormat: string;
|
|
132
|
-
generic: string;
|
|
133
|
-
retryLabel: string;
|
|
134
|
-
chooseFileLabel: string;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
138
|
-
|
|
139
125
|
export interface UploadZoneProps {
|
|
140
126
|
uploadPromptText?: string;
|
|
141
127
|
addDocumentLabel: string;
|
|
@@ -150,11 +136,5 @@ export interface UploadZoneProps {
|
|
|
150
136
|
onAddDocument?: () => void;
|
|
151
137
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
152
138
|
dataQa?: string;
|
|
153
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
154
|
-
error?: UploadZoneError | null;
|
|
155
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
156
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
157
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
158
|
-
onErrorAction?: () => void;
|
|
159
139
|
}
|
|
160
140
|
|
|
@@ -19,20 +19,6 @@ export declare interface Hero2SectionProps {
|
|
|
19
19
|
uploadZone: UploadZoneProps;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export interface UploadZoneError {
|
|
23
|
-
kind: UploadZoneErrorKind;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface UploadZoneErrorCopy {
|
|
27
|
-
tooLarge: string;
|
|
28
|
-
unsupportedFormat: string;
|
|
29
|
-
generic: string;
|
|
30
|
-
retryLabel: string;
|
|
31
|
-
chooseFileLabel: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
35
|
-
|
|
36
22
|
export interface UploadZoneProps {
|
|
37
23
|
uploadPromptText?: string;
|
|
38
24
|
addDocumentLabel: string;
|
|
@@ -47,11 +33,5 @@ export interface UploadZoneProps {
|
|
|
47
33
|
onAddDocument?: () => void;
|
|
48
34
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
49
35
|
dataQa?: string;
|
|
50
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
51
|
-
error?: UploadZoneError | null;
|
|
52
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
53
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
54
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
55
|
-
onErrorAction?: () => void;
|
|
56
36
|
}
|
|
57
37
|
|
|
@@ -7,7 +7,7 @@ export type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yel
|
|
|
7
7
|
|
|
8
8
|
export type IconPosition = 'left' | 'right' | 'top';
|
|
9
9
|
|
|
10
|
-
export declare const LinkWrapper: ({ size, variant, iconPosition, disabled, className, children }: LinkWrapperProps) => JSX.Element;
|
|
10
|
+
export declare const LinkWrapper: ({ size, variant, iconPosition, disabled, className, children, "data-qa": dataQa }: LinkWrapperProps) => JSX.Element;
|
|
11
11
|
|
|
12
12
|
export declare interface LinkWrapperProps {
|
|
13
13
|
children: ReactNode;
|
|
@@ -16,6 +16,7 @@ export declare interface LinkWrapperProps {
|
|
|
16
16
|
iconPosition?: IconPosition;
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
className?: string;
|
|
19
|
+
'data-qa'?: string;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export type ResponsiveButtonVariant = ButtonVariant | {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { getButtonClasses as e } from "./Button.utils.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Children as t, Fragment as n, cloneElement as r, isValidElement as i } from "react";
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import { clsx as o } from "clsx";
|
|
4
5
|
//#region lib/components/atoms/LinkWrapper.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var s = ({ size: s, variant: c, iconPosition: l, disabled: u = !1, className: d, children: f, "data-qa": p }) => {
|
|
7
|
+
let m = e(s, c, l, u, d), h = p === void 0 ? [] : t.toArray(f), g = h.length === 1 ? h[0] : f, _ = i(g) && g.type !== n;
|
|
8
|
+
return /* @__PURE__ */ a("span", {
|
|
9
|
+
className: o(m, "relative [&_a]:before:absolute [&_a]:before:inset-0 [&_a]:before:content-[\"\"]"),
|
|
10
|
+
"data-qa": _ ? void 0 : p,
|
|
11
|
+
children: p !== void 0 && _ ? r(g, { "data-qa": p }) : f
|
|
12
|
+
});
|
|
13
|
+
};
|
|
9
14
|
//#endregion
|
|
10
|
-
export {
|
|
15
|
+
export { s as LinkWrapper };
|
|
@@ -20,20 +20,6 @@ export declare interface PdfToolsHeroProps {
|
|
|
20
20
|
bgRight?: ReactNode | null;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export interface UploadZoneError {
|
|
24
|
-
kind: UploadZoneErrorKind;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface UploadZoneErrorCopy {
|
|
28
|
-
tooLarge: string;
|
|
29
|
-
unsupportedFormat: string;
|
|
30
|
-
generic: string;
|
|
31
|
-
retryLabel: string;
|
|
32
|
-
chooseFileLabel: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
36
|
-
|
|
37
23
|
export interface UploadZoneProps {
|
|
38
24
|
uploadPromptText?: string;
|
|
39
25
|
addDocumentLabel: string;
|
|
@@ -48,11 +34,5 @@ export interface UploadZoneProps {
|
|
|
48
34
|
onAddDocument?: () => void;
|
|
49
35
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
50
36
|
dataQa?: string;
|
|
51
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
52
|
-
error?: UploadZoneError | null;
|
|
53
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
54
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
55
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
56
|
-
onErrorAction?: () => void;
|
|
57
37
|
}
|
|
58
38
|
|
|
@@ -108,20 +108,6 @@ export interface ToastProps {
|
|
|
108
108
|
onClose: () => void;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
export interface UploadZoneError {
|
|
112
|
-
kind: UploadZoneErrorKind;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface UploadZoneErrorCopy {
|
|
116
|
-
tooLarge: string;
|
|
117
|
-
unsupportedFormat: string;
|
|
118
|
-
generic: string;
|
|
119
|
-
retryLabel: string;
|
|
120
|
-
chooseFileLabel: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
124
|
-
|
|
125
111
|
export interface UploadZoneProps {
|
|
126
112
|
uploadPromptText?: string;
|
|
127
113
|
addDocumentLabel: string;
|
|
@@ -136,11 +122,5 @@ export interface UploadZoneProps {
|
|
|
136
122
|
onAddDocument?: () => void;
|
|
137
123
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
138
124
|
dataQa?: string;
|
|
139
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
140
|
-
error?: UploadZoneError | null;
|
|
141
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
142
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
143
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
144
|
-
onErrorAction?: () => void;
|
|
145
125
|
}
|
|
146
126
|
|
|
@@ -70,6 +70,7 @@ var u = ({ radioFieldData: u, inputFieldData: d, cta: f, trustedBadge: p, hasMob
|
|
|
70
70
|
/* @__PURE__ */ c(n, {
|
|
71
71
|
variant: "primary-green",
|
|
72
72
|
className: `text-small ${t ? "w-fit text-nowrap" : "w-full"}`,
|
|
73
|
+
"data-qa": t ? "createDocument-mobile-sticky" : "createDocument-mobile-hero",
|
|
73
74
|
children: f
|
|
74
75
|
})
|
|
75
76
|
]
|
|
@@ -38,6 +38,7 @@ var s = ({ title: s, footerText: c, preview: l, cta: u, pdfDownload: d, wordDown
|
|
|
38
38
|
!!u && /* @__PURE__ */ a(n, {
|
|
39
39
|
className: "w-full",
|
|
40
40
|
variant: "primary-green",
|
|
41
|
+
"data-qa": "createDocument-desktop-sidebar",
|
|
41
42
|
children: u
|
|
42
43
|
}),
|
|
43
44
|
/* @__PURE__ */ a("div", { className: "h-px w-full bg-neutral-200" }),
|
|
@@ -15,7 +15,10 @@ var r = ({ title: r, benefits: i, cta: a }) => /* @__PURE__ */ t("section", {
|
|
|
15
15
|
className: "text-medium flex flex-col gap-8 md:grid md:grid-cols-3 md:gap-20",
|
|
16
16
|
children: i.map((e) => /* @__PURE__ */ t("p", { children: e }, e))
|
|
17
17
|
}),
|
|
18
|
-
/* @__PURE__ */ t(e, {
|
|
18
|
+
/* @__PURE__ */ t(e, {
|
|
19
|
+
"data-qa": "createDocument-try-now",
|
|
20
|
+
children: a
|
|
21
|
+
})
|
|
19
22
|
]
|
|
20
23
|
})
|
|
21
24
|
});
|
|
@@ -9,20 +9,6 @@ export declare type Hero2Highlight = {
|
|
|
9
9
|
|
|
10
10
|
export declare const UploadZone: FC<UploadZoneProps>;
|
|
11
11
|
|
|
12
|
-
export declare interface UploadZoneError {
|
|
13
|
-
kind: UploadZoneErrorKind;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export declare interface UploadZoneErrorCopy {
|
|
17
|
-
tooLarge: string;
|
|
18
|
-
unsupportedFormat: string;
|
|
19
|
-
generic: string;
|
|
20
|
-
retryLabel: string;
|
|
21
|
-
chooseFileLabel: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export declare type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
25
|
-
|
|
26
12
|
export declare interface UploadZoneProps {
|
|
27
13
|
uploadPromptText?: string;
|
|
28
14
|
addDocumentLabel: string;
|
|
@@ -37,11 +23,5 @@ export declare interface UploadZoneProps {
|
|
|
37
23
|
onAddDocument?: () => void;
|
|
38
24
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
39
25
|
dataQa?: string;
|
|
40
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
41
|
-
error?: UploadZoneError | null;
|
|
42
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
43
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
44
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
45
|
-
onErrorAction?: () => void;
|
|
46
26
|
}
|
|
47
27
|
|
|
@@ -1,72 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { AddIcon as e } from "./AddIcon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
11
|
-
import u from "clsx";
|
|
4
|
+
import { SecurityIcon as t } from "./SecurityIcon.js";
|
|
5
|
+
import { UploadDocIcon as n } from "./UploadDocIcon.js";
|
|
6
|
+
import { Button as r } from "./Button.js";
|
|
7
|
+
import { Markdown as i } from "./Markdown.js";
|
|
8
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
9
|
+
import s from "clsx";
|
|
12
10
|
//#region lib/components/molecules/UploadZone.tsx
|
|
13
|
-
var d = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
generic: "Something went wrong. Please retry.",
|
|
17
|
-
retryLabel: "Try Again",
|
|
18
|
-
chooseFileLabel: "Choose Another File"
|
|
19
|
-
};
|
|
20
|
-
function f(e, t) {
|
|
21
|
-
return e === "too-large" ? t.tooLarge : e === "unsupported-format" ? t.unsupportedFormat : t.generic;
|
|
22
|
-
}
|
|
23
|
-
function p(e, t) {
|
|
24
|
-
return e === "generic" ? t.retryLabel : t.chooseFileLabel;
|
|
25
|
-
}
|
|
26
|
-
var m = ({ uploadPromptText: m, addDocumentLabel: h, fileSizeText: g, disclaimer: _, title: v, description: y, trustLine: b, uploadIcon: x, variant: S = "default", containerClassName: C = "", onAddDocument: w, onDropDocument: T, dataQa: E, error: D, errorCopy: O, onErrorAction: k }) => {
|
|
27
|
-
let A = S === "pdf-tools", j = s(null), M = s(void 0), N = D?.kind ?? null, P = {
|
|
28
|
-
...d,
|
|
29
|
-
...O
|
|
30
|
-
};
|
|
31
|
-
o(() => {
|
|
32
|
-
let e = M.current;
|
|
33
|
-
e !== void 0 && N !== null && N !== e && j.current?.focus(), M.current = N;
|
|
34
|
-
}, [N]);
|
|
35
|
-
let F = N ? /* @__PURE__ */ l("div", {
|
|
36
|
-
role: "alert",
|
|
37
|
-
"aria-live": "assertive",
|
|
38
|
-
"data-qa": E ? `${E}_error` : "upload-document-error",
|
|
39
|
-
className: "flex flex-col items-center gap-3",
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ c(t, {
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
className: "h-6 w-6",
|
|
44
|
-
fill: "var(--color-error-500)"
|
|
45
|
-
}),
|
|
46
|
-
/* @__PURE__ */ c("p", {
|
|
47
|
-
className: "text-small md:text-medium text-neutral-600",
|
|
48
|
-
children: f(N, P)
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ c(i, {
|
|
51
|
-
ref: j,
|
|
52
|
-
dataQa: E ? `${E}_error_action` : void 0,
|
|
53
|
-
variant: "primary-green",
|
|
54
|
-
className: "w-fit",
|
|
55
|
-
onClick: () => {
|
|
56
|
-
if (k) {
|
|
57
|
-
k();
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
w?.();
|
|
61
|
-
},
|
|
62
|
-
children: /* @__PURE__ */ c("span", {
|
|
63
|
-
className: "text-medium font-bold",
|
|
64
|
-
children: p(N, P)
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
]
|
|
68
|
-
}) : null;
|
|
69
|
-
return /* @__PURE__ */ l("div", {
|
|
11
|
+
var c = ({ uploadPromptText: c, addDocumentLabel: l, fileSizeText: u, disclaimer: d, title: f, description: p, trustLine: m, uploadIcon: h, variant: g = "default", containerClassName: _ = "", onAddDocument: v, onDropDocument: y, dataQa: b }) => {
|
|
12
|
+
let x = g === "pdf-tools";
|
|
13
|
+
return /* @__PURE__ */ o("div", {
|
|
70
14
|
role: "presentation",
|
|
71
15
|
"data-qa": "upload-document-dragover",
|
|
72
16
|
onDragOver: (e) => {
|
|
@@ -76,92 +20,87 @@ var m = ({ uploadPromptText: m, addDocumentLabel: h, fileSizeText: g, disclaimer
|
|
|
76
20
|
e.preventDefault();
|
|
77
21
|
},
|
|
78
22
|
onDrop: (e) => {
|
|
79
|
-
e.preventDefault(),
|
|
23
|
+
e.preventDefault(), y?.(e);
|
|
80
24
|
},
|
|
81
|
-
className:
|
|
82
|
-
children: [
|
|
25
|
+
className: s("rounded-3xl", x ? "w-full bg-white p-5 shadow-[0px_10px_30px_0px_rgba(2,55,74,0.06)]" : "group bg-neutral-200/50 p-4 backdrop-blur-xs md:max-w-80 lg:max-w-120 xl:max-w-140", _),
|
|
26
|
+
children: [x && /* @__PURE__ */ o("div", {
|
|
83
27
|
className: "border-primary-300 flex flex-col items-center gap-4 rounded-2xl border-[1.5px] border-dashed px-4 py-8 text-center md:px-6 lg:px-8 lg:py-10",
|
|
84
28
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ a("div", {
|
|
86
30
|
className: "bg-primary-50 text-primary-800 flex h-13.5 w-13.5 items-center justify-center rounded-2xl",
|
|
87
|
-
children:
|
|
31
|
+
children: h ?? /* @__PURE__ */ a(n, { className: "h-6 w-6" })
|
|
88
32
|
}),
|
|
89
|
-
|
|
90
|
-
!F && (v || m || y) && /* @__PURE__ */ l("div", {
|
|
33
|
+
(f || c || p) && /* @__PURE__ */ o("div", {
|
|
91
34
|
className: "flex flex-col gap-1.5",
|
|
92
35
|
children: [
|
|
93
|
-
|
|
36
|
+
f && /* @__PURE__ */ a("p", {
|
|
94
37
|
className: "text-big md:text-large font-bold text-neutral-800",
|
|
95
|
-
children:
|
|
38
|
+
children: f
|
|
96
39
|
}),
|
|
97
|
-
|
|
40
|
+
c && /* @__PURE__ */ a("p", {
|
|
98
41
|
className: "text-small text-neutral-600",
|
|
99
|
-
children:
|
|
42
|
+
children: c
|
|
100
43
|
}),
|
|
101
|
-
|
|
44
|
+
p && /* @__PURE__ */ a("p", {
|
|
102
45
|
className: "text-small md:text-medium text-neutral-600",
|
|
103
|
-
children:
|
|
46
|
+
children: p
|
|
104
47
|
})
|
|
105
48
|
]
|
|
106
49
|
}),
|
|
107
|
-
|
|
108
|
-
dataQa:
|
|
50
|
+
/* @__PURE__ */ a(r, {
|
|
51
|
+
dataQa: b,
|
|
109
52
|
variant: "primary-green",
|
|
110
53
|
className: "w-fit",
|
|
111
|
-
onClick:
|
|
112
|
-
children: /* @__PURE__ */
|
|
54
|
+
onClick: v,
|
|
55
|
+
children: /* @__PURE__ */ a("span", {
|
|
113
56
|
className: "text-medium font-bold",
|
|
114
|
-
children:
|
|
57
|
+
children: l
|
|
115
58
|
})
|
|
116
59
|
}),
|
|
117
|
-
|
|
60
|
+
u && /* @__PURE__ */ a("p", {
|
|
118
61
|
className: "text-extra-small md:text-small text-neutral-600",
|
|
119
|
-
children:
|
|
62
|
+
children: u
|
|
120
63
|
}),
|
|
121
|
-
|
|
64
|
+
m && /* @__PURE__ */ o("div", {
|
|
122
65
|
className: "flex items-start justify-center gap-1 text-left md:items-center",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
66
|
+
children: [/* @__PURE__ */ a(t, {
|
|
124
67
|
className: "h-4 w-4 shrink-0",
|
|
125
68
|
fill: "var(--color-neutral-600)"
|
|
126
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ a("p", {
|
|
127
70
|
className: "text-extra-small md:text-small text-neutral-600",
|
|
128
|
-
children:
|
|
71
|
+
children: m
|
|
129
72
|
})]
|
|
130
73
|
})
|
|
131
74
|
]
|
|
132
|
-
}), !
|
|
75
|
+
}), !x && /* @__PURE__ */ o("div", {
|
|
133
76
|
className: "bg-neutral-25 flex flex-col gap-14 rounded-2xl px-6 pt-14 pb-2 text-center",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ o("div", {
|
|
135
78
|
className: "flex flex-col items-center gap-10",
|
|
136
|
-
children: [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
className: "
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
})]
|
|
151
|
-
})
|
|
152
|
-
]
|
|
153
|
-
}), /* @__PURE__ */ l("div", {
|
|
79
|
+
children: [c && /* @__PURE__ */ a("p", {
|
|
80
|
+
className: "text-medium text-neutral-400 transition-all duration-500 group-hover:text-neutral-900",
|
|
81
|
+
children: c
|
|
82
|
+
}), /* @__PURE__ */ o(r, {
|
|
83
|
+
dataQa: b,
|
|
84
|
+
variant: "primary-green",
|
|
85
|
+
className: "w-fit",
|
|
86
|
+
onClick: v,
|
|
87
|
+
children: [/* @__PURE__ */ a(e, {}), /* @__PURE__ */ a("span", {
|
|
88
|
+
className: "text-medium font-bold",
|
|
89
|
+
children: l
|
|
90
|
+
})]
|
|
91
|
+
})]
|
|
92
|
+
}), /* @__PURE__ */ o("div", {
|
|
154
93
|
className: "flex flex-col gap-2",
|
|
155
|
-
children: [
|
|
94
|
+
children: [u && /* @__PURE__ */ a("p", {
|
|
156
95
|
className: "text-extra-small text-neutral-400",
|
|
157
|
-
children:
|
|
158
|
-
}),
|
|
96
|
+
children: u
|
|
97
|
+
}), d && /* @__PURE__ */ a(i, {
|
|
159
98
|
className: "text-tiny text-neutral-400 [&_a]:text-neutral-400",
|
|
160
|
-
content:
|
|
99
|
+
content: d
|
|
161
100
|
})]
|
|
162
101
|
})]
|
|
163
102
|
})]
|
|
164
103
|
});
|
|
165
104
|
};
|
|
166
105
|
//#endregion
|
|
167
|
-
export {
|
|
106
|
+
export { c as UploadZone };
|
|
@@ -322,6 +322,7 @@ export declare interface DefaultSubtypeDocumentProps extends BaseSubtypeDocument
|
|
|
322
322
|
format: 'Default';
|
|
323
323
|
createDocButton: ReactNode;
|
|
324
324
|
description: string;
|
|
325
|
+
ctaDataQa?: string;
|
|
325
326
|
}
|
|
326
327
|
|
|
327
328
|
export declare const DeFlagIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
@@ -901,7 +902,7 @@ export declare interface LinkedProductsProps {
|
|
|
901
902
|
linkedProducts: LinkedProductProps[];
|
|
902
903
|
}
|
|
903
904
|
|
|
904
|
-
export declare const LinkWrapper: ({ size, variant, iconPosition, disabled, className, children }: LinkWrapperProps) => JSX.Element;
|
|
905
|
+
export declare const LinkWrapper: ({ size, variant, iconPosition, disabled, className, children, "data-qa": dataQa }: LinkWrapperProps) => JSX.Element;
|
|
905
906
|
|
|
906
907
|
export declare interface LinkWrapperProps {
|
|
907
908
|
children: ReactNode;
|
|
@@ -910,6 +911,7 @@ export declare interface LinkWrapperProps {
|
|
|
910
911
|
iconPosition?: IconPosition;
|
|
911
912
|
disabled?: boolean;
|
|
912
913
|
className?: string;
|
|
914
|
+
'data-qa'?: string;
|
|
913
915
|
}
|
|
914
916
|
|
|
915
917
|
export declare const LocationIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
@@ -1454,20 +1456,6 @@ export declare interface UnsubscribeSectionProps {
|
|
|
1454
1456
|
|
|
1455
1457
|
export declare const UploadDocIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
1456
1458
|
|
|
1457
|
-
export interface UploadZoneError {
|
|
1458
|
-
kind: UploadZoneErrorKind;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
export interface UploadZoneErrorCopy {
|
|
1462
|
-
tooLarge: string;
|
|
1463
|
-
unsupportedFormat: string;
|
|
1464
|
-
generic: string;
|
|
1465
|
-
retryLabel: string;
|
|
1466
|
-
chooseFileLabel: string;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
export type UploadZoneErrorKind = 'too-large' | 'unsupported-format' | 'generic';
|
|
1470
|
-
|
|
1471
1459
|
export interface UploadZoneProps {
|
|
1472
1460
|
uploadPromptText?: string;
|
|
1473
1461
|
addDocumentLabel: string;
|
|
@@ -1482,12 +1470,6 @@ export interface UploadZoneProps {
|
|
|
1482
1470
|
onAddDocument?: () => void;
|
|
1483
1471
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
1484
1472
|
dataQa?: string;
|
|
1485
|
-
/** Inline error state: replaces the prompt block and keeps the zone droppable. */
|
|
1486
|
-
error?: UploadZoneError | null;
|
|
1487
|
-
/** Per-locale copy for the inline error state; missing entries fall back to English. */
|
|
1488
|
-
errorCopy?: Partial<UploadZoneErrorCopy>;
|
|
1489
|
-
/** Recovery action for the inline error CTA (retry or open the picker). */
|
|
1490
|
-
onErrorAction?: () => void;
|
|
1491
1473
|
}
|
|
1492
1474
|
|
|
1493
1475
|
export declare const UsFlagIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npm_leadtech/legal-contracts-ui",
|
|
3
|
-
"version": "0.190.
|
|
3
|
+
"version": "0.190.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -754,7 +754,7 @@
|
|
|
754
754
|
"build": "tsc --project tsconfig.build.json && vite build && cp lib/globals-core.css dist/globals.css",
|
|
755
755
|
"sonar:scan": "bash scripts/sonar.sh",
|
|
756
756
|
"sonar": "pnpm test && pnpm sonar:scan",
|
|
757
|
-
"chromatic": "npx chromatic --project-token=
|
|
757
|
+
"chromatic": "npx chromatic --project-token=chpt_f2cdc115a03f4c9",
|
|
758
758
|
"yalc-push": "pnpm build && yalc push",
|
|
759
759
|
"format": "prettier --write .",
|
|
760
760
|
"prettier": "prettier --check .",
|