@npm_leadtech/legal-contracts-ui 0.190.0 → 0.191.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.
- package/dist/components/AiLegalDocumentReviewerTemplate.d.ts +20 -0
- package/dist/components/ConversionSection.d.ts +20 -0
- package/dist/components/ElectronicSignatureTemplate.d.ts +20 -0
- package/dist/components/Hero2Section.d.ts +20 -0
- package/dist/components/PdfToolsHero.d.ts +20 -0
- package/dist/components/PdfToolsTemplate.d.ts +20 -0
- package/dist/components/UploadZone.d.ts +20 -0
- package/dist/components/UploadZone.js +114 -53
- package/dist/components/index.d.ts +20 -0
- package/package.json +26 -24
|
@@ -130,6 +130,20 @@ 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
|
+
|
|
133
147
|
export interface UploadZoneProps {
|
|
134
148
|
uploadPromptText?: string;
|
|
135
149
|
addDocumentLabel: string;
|
|
@@ -144,5 +158,11 @@ export interface UploadZoneProps {
|
|
|
144
158
|
onAddDocument?: () => void;
|
|
145
159
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
146
160
|
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;
|
|
147
167
|
}
|
|
148
168
|
|
|
@@ -10,6 +10,20 @@ 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
|
+
|
|
13
27
|
export interface UploadZoneProps {
|
|
14
28
|
uploadPromptText?: string;
|
|
15
29
|
addDocumentLabel: string;
|
|
@@ -24,5 +38,11 @@ export interface UploadZoneProps {
|
|
|
24
38
|
onAddDocument?: () => void;
|
|
25
39
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
26
40
|
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;
|
|
27
47
|
}
|
|
28
48
|
|
|
@@ -122,6 +122,20 @@ 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
|
+
|
|
125
139
|
export interface UploadZoneProps {
|
|
126
140
|
uploadPromptText?: string;
|
|
127
141
|
addDocumentLabel: string;
|
|
@@ -136,5 +150,11 @@ export interface UploadZoneProps {
|
|
|
136
150
|
onAddDocument?: () => void;
|
|
137
151
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
138
152
|
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;
|
|
139
159
|
}
|
|
140
160
|
|
|
@@ -19,6 +19,20 @@ 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
|
+
|
|
22
36
|
export interface UploadZoneProps {
|
|
23
37
|
uploadPromptText?: string;
|
|
24
38
|
addDocumentLabel: string;
|
|
@@ -33,5 +47,11 @@ export interface UploadZoneProps {
|
|
|
33
47
|
onAddDocument?: () => void;
|
|
34
48
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
35
49
|
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;
|
|
36
56
|
}
|
|
37
57
|
|
|
@@ -20,6 +20,20 @@ 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
|
+
|
|
23
37
|
export interface UploadZoneProps {
|
|
24
38
|
uploadPromptText?: string;
|
|
25
39
|
addDocumentLabel: string;
|
|
@@ -34,5 +48,11 @@ export interface UploadZoneProps {
|
|
|
34
48
|
onAddDocument?: () => void;
|
|
35
49
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
36
50
|
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;
|
|
37
57
|
}
|
|
38
58
|
|
|
@@ -108,6 +108,20 @@ 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
|
+
|
|
111
125
|
export interface UploadZoneProps {
|
|
112
126
|
uploadPromptText?: string;
|
|
113
127
|
addDocumentLabel: string;
|
|
@@ -122,5 +136,11 @@ export interface UploadZoneProps {
|
|
|
122
136
|
onAddDocument?: () => void;
|
|
123
137
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
124
138
|
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;
|
|
125
145
|
}
|
|
126
146
|
|
|
@@ -9,6 +9,20 @@ 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
|
+
|
|
12
26
|
export declare interface UploadZoneProps {
|
|
13
27
|
uploadPromptText?: string;
|
|
14
28
|
addDocumentLabel: string;
|
|
@@ -23,5 +37,11 @@ export declare interface UploadZoneProps {
|
|
|
23
37
|
onAddDocument?: () => void;
|
|
24
38
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
25
39
|
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;
|
|
26
46
|
}
|
|
27
47
|
|
|
@@ -1,16 +1,72 @@
|
|
|
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 s from "
|
|
4
|
+
import { InfoIcon as t } from "./InfoIcon.js";
|
|
5
|
+
import { SecurityIcon as n } from "./SecurityIcon.js";
|
|
6
|
+
import { UploadDocIcon as r } from "./UploadDocIcon.js";
|
|
7
|
+
import { Button as i } from "./Button.js";
|
|
8
|
+
import { Markdown as a } from "./Markdown.js";
|
|
9
|
+
import { useEffect as o, useRef as s } from "react";
|
|
10
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
11
|
+
import u from "clsx";
|
|
10
12
|
//#region lib/components/molecules/UploadZone.tsx
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
var d = {
|
|
14
|
+
tooLarge: "File’s too large.",
|
|
15
|
+
unsupportedFormat: "Upload failed.",
|
|
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", {
|
|
14
70
|
role: "presentation",
|
|
15
71
|
"data-qa": "upload-document-dragover",
|
|
16
72
|
onDragOver: (e) => {
|
|
@@ -20,87 +76,92 @@ var c = ({ uploadPromptText: c, addDocumentLabel: l, fileSizeText: u, disclaimer
|
|
|
20
76
|
e.preventDefault();
|
|
21
77
|
},
|
|
22
78
|
onDrop: (e) => {
|
|
23
|
-
e.preventDefault(),
|
|
79
|
+
e.preventDefault(), T?.(e);
|
|
24
80
|
},
|
|
25
|
-
className:
|
|
26
|
-
children: [
|
|
81
|
+
className: u("rounded-3xl", A ? "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", C),
|
|
82
|
+
children: [A && /* @__PURE__ */ l("div", {
|
|
27
83
|
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",
|
|
28
84
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ c("div", {
|
|
30
86
|
className: "bg-primary-50 text-primary-800 flex h-13.5 w-13.5 items-center justify-center rounded-2xl",
|
|
31
|
-
children:
|
|
87
|
+
children: x ?? /* @__PURE__ */ c(r, { className: "h-6 w-6" })
|
|
32
88
|
}),
|
|
33
|
-
|
|
89
|
+
F,
|
|
90
|
+
!F && (v || m || y) && /* @__PURE__ */ l("div", {
|
|
34
91
|
className: "flex flex-col gap-1.5",
|
|
35
92
|
children: [
|
|
36
|
-
|
|
93
|
+
v && /* @__PURE__ */ c("p", {
|
|
37
94
|
className: "text-big md:text-large font-bold text-neutral-800",
|
|
38
|
-
children:
|
|
95
|
+
children: v
|
|
39
96
|
}),
|
|
40
|
-
|
|
97
|
+
m && /* @__PURE__ */ c("p", {
|
|
41
98
|
className: "text-small text-neutral-600",
|
|
42
|
-
children:
|
|
99
|
+
children: m
|
|
43
100
|
}),
|
|
44
|
-
|
|
101
|
+
y && /* @__PURE__ */ c("p", {
|
|
45
102
|
className: "text-small md:text-medium text-neutral-600",
|
|
46
|
-
children:
|
|
103
|
+
children: y
|
|
47
104
|
})
|
|
48
105
|
]
|
|
49
106
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
dataQa:
|
|
107
|
+
!F && /* @__PURE__ */ c(i, {
|
|
108
|
+
dataQa: E,
|
|
52
109
|
variant: "primary-green",
|
|
53
110
|
className: "w-fit",
|
|
54
|
-
onClick:
|
|
55
|
-
children: /* @__PURE__ */
|
|
111
|
+
onClick: w,
|
|
112
|
+
children: /* @__PURE__ */ c("span", {
|
|
56
113
|
className: "text-medium font-bold",
|
|
57
|
-
children:
|
|
114
|
+
children: h
|
|
58
115
|
})
|
|
59
116
|
}),
|
|
60
|
-
|
|
117
|
+
g && /* @__PURE__ */ c("p", {
|
|
61
118
|
className: "text-extra-small md:text-small text-neutral-600",
|
|
62
|
-
children:
|
|
119
|
+
children: g
|
|
63
120
|
}),
|
|
64
|
-
|
|
121
|
+
b && /* @__PURE__ */ l("div", {
|
|
65
122
|
className: "flex items-start justify-center gap-1 text-left md:items-center",
|
|
66
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ c(n, {
|
|
67
124
|
className: "h-4 w-4 shrink-0",
|
|
68
125
|
fill: "var(--color-neutral-600)"
|
|
69
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ c("p", {
|
|
70
127
|
className: "text-extra-small md:text-small text-neutral-600",
|
|
71
|
-
children:
|
|
128
|
+
children: b
|
|
72
129
|
})]
|
|
73
130
|
})
|
|
74
131
|
]
|
|
75
|
-
}), !
|
|
132
|
+
}), !A && /* @__PURE__ */ l("div", {
|
|
76
133
|
className: "bg-neutral-25 flex flex-col gap-14 rounded-2xl px-6 pt-14 pb-2 text-center",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ l("div", {
|
|
78
135
|
className: "flex flex-col items-center gap-10",
|
|
79
|
-
children: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
className: "
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
136
|
+
children: [
|
|
137
|
+
F,
|
|
138
|
+
!F && m && /* @__PURE__ */ c("p", {
|
|
139
|
+
className: "text-medium text-neutral-400 transition-all duration-500 group-hover:text-neutral-900",
|
|
140
|
+
children: m
|
|
141
|
+
}),
|
|
142
|
+
!F && /* @__PURE__ */ l(i, {
|
|
143
|
+
dataQa: E,
|
|
144
|
+
variant: "primary-green",
|
|
145
|
+
className: "w-fit",
|
|
146
|
+
onClick: w,
|
|
147
|
+
children: [/* @__PURE__ */ c(e, {}), /* @__PURE__ */ c("span", {
|
|
148
|
+
className: "text-medium font-bold",
|
|
149
|
+
children: h
|
|
150
|
+
})]
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
}), /* @__PURE__ */ l("div", {
|
|
93
154
|
className: "flex flex-col gap-2",
|
|
94
|
-
children: [
|
|
155
|
+
children: [g && /* @__PURE__ */ c("p", {
|
|
95
156
|
className: "text-extra-small text-neutral-400",
|
|
96
|
-
children:
|
|
97
|
-
}),
|
|
157
|
+
children: g
|
|
158
|
+
}), _ && /* @__PURE__ */ c(a, {
|
|
98
159
|
className: "text-tiny text-neutral-400 [&_a]:text-neutral-400",
|
|
99
|
-
content:
|
|
160
|
+
content: _
|
|
100
161
|
})]
|
|
101
162
|
})]
|
|
102
163
|
})]
|
|
103
164
|
});
|
|
104
165
|
};
|
|
105
166
|
//#endregion
|
|
106
|
-
export {
|
|
167
|
+
export { m as UploadZone };
|
|
@@ -1454,6 +1454,20 @@ export declare interface UnsubscribeSectionProps {
|
|
|
1454
1454
|
|
|
1455
1455
|
export declare const UploadDocIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
1456
1456
|
|
|
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
|
+
|
|
1457
1471
|
export interface UploadZoneProps {
|
|
1458
1472
|
uploadPromptText?: string;
|
|
1459
1473
|
addDocumentLabel: string;
|
|
@@ -1468,6 +1482,12 @@ export interface UploadZoneProps {
|
|
|
1468
1482
|
onAddDocument?: () => void;
|
|
1469
1483
|
onDropDocument?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
1470
1484
|
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;
|
|
1471
1491
|
}
|
|
1472
1492
|
|
|
1473
1493
|
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.
|
|
3
|
+
"version": "0.191.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -749,6 +749,29 @@
|
|
|
749
749
|
"bugs": {
|
|
750
750
|
"url": "https://bitbucket.org/grupoblidoo/legal-contracts-ui/issues"
|
|
751
751
|
},
|
|
752
|
+
"scripts": {
|
|
753
|
+
"dev": "vite",
|
|
754
|
+
"build": "tsc --project tsconfig.build.json && vite build && cp lib/globals-core.css dist/globals.css",
|
|
755
|
+
"sonar:scan": "bash scripts/sonar.sh",
|
|
756
|
+
"sonar": "pnpm test && pnpm sonar:scan",
|
|
757
|
+
"chromatic": "npx chromatic --project-token=chpt_be90ce8462f803c",
|
|
758
|
+
"yalc-push": "pnpm build && yalc push",
|
|
759
|
+
"format": "prettier --write .",
|
|
760
|
+
"prettier": "prettier --check .",
|
|
761
|
+
"eslint": "eslint . --quiet",
|
|
762
|
+
"test": "vitest run --coverage --project unit",
|
|
763
|
+
"test:storybook": "vitest run --project storybook --reporter=default",
|
|
764
|
+
"test:all": "pnpm test && pnpm test:storybook",
|
|
765
|
+
"test:watch": "vitest --coverage --project unit",
|
|
766
|
+
"storybook": "storybook dev -p 6006",
|
|
767
|
+
"build-storybook": "storybook build",
|
|
768
|
+
"reinstall-force": "rm -Rf node_modules && pnpm install",
|
|
769
|
+
"prepare-upgrade": "pnpm reinstall-force && pnpm build && pnpm chromatic && git add . && git commit -m \"$MSG\" --allow-empty && npm config set tag-version-prefix ''",
|
|
770
|
+
"upgrade-patch": "pnpm prepare-upgrade && npm version patch -m \"Update patch version number\" && git push && git push --tags",
|
|
771
|
+
"upgrade-minor": "pnpm prepare-upgrade && npm version minor -m \"Update minor version number\" && git push && git push --tags",
|
|
772
|
+
"upgrade-major": "pnpm prepare-upgrade && npm version major -m \"Update major version number\" && git push && git push --tags",
|
|
773
|
+
"prepare": "husky"
|
|
774
|
+
},
|
|
752
775
|
"dependencies": {
|
|
753
776
|
"clsx": "^2.1.1",
|
|
754
777
|
"react-markdown": "^10.1.0",
|
|
@@ -826,26 +849,5 @@
|
|
|
826
849
|
"prettier --write --ignore-unknown"
|
|
827
850
|
]
|
|
828
851
|
},
|
|
829
|
-
"
|
|
830
|
-
|
|
831
|
-
"build": "tsc --project tsconfig.build.json && vite build && cp lib/globals-core.css dist/globals.css",
|
|
832
|
-
"sonar:scan": "bash scripts/sonar.sh",
|
|
833
|
-
"sonar": "pnpm test && pnpm sonar:scan",
|
|
834
|
-
"chromatic": "npx chromatic --project-token=chpt_be90ce8462f803c",
|
|
835
|
-
"yalc-push": "pnpm build && yalc push",
|
|
836
|
-
"format": "prettier --write .",
|
|
837
|
-
"prettier": "prettier --check .",
|
|
838
|
-
"eslint": "eslint . --quiet",
|
|
839
|
-
"test": "vitest run --coverage --project unit",
|
|
840
|
-
"test:storybook": "vitest run --project storybook --reporter=default",
|
|
841
|
-
"test:all": "pnpm test && pnpm test:storybook",
|
|
842
|
-
"test:watch": "vitest --coverage --project unit",
|
|
843
|
-
"storybook": "storybook dev -p 6006",
|
|
844
|
-
"build-storybook": "storybook build",
|
|
845
|
-
"reinstall-force": "rm -Rf node_modules && pnpm install",
|
|
846
|
-
"prepare-upgrade": "pnpm reinstall-force && pnpm build && pnpm chromatic && git add . && git commit -m \"$MSG\" --allow-empty && npm config set tag-version-prefix ''",
|
|
847
|
-
"upgrade-patch": "pnpm prepare-upgrade && npm version patch -m \"Update patch version number\" && git push && git push --tags",
|
|
848
|
-
"upgrade-minor": "pnpm prepare-upgrade && npm version minor -m \"Update minor version number\" && git push && git push --tags",
|
|
849
|
-
"upgrade-major": "pnpm prepare-upgrade && npm version major -m \"Update major version number\" && git push && git push --tags"
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
+
"packageManager": "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48"
|
|
853
|
+
}
|