@alixpartners/ui-components 2.4.2 → 2.4.3
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/assets/FilePicker.css +1 -1
- package/dist/assets/SplitButton.css +1 -1
- package/dist/assets/ap-icons-types.d.ts +1 -1
- package/dist/assets/ap-icons.d.ts +1 -1
- package/dist/assets/main.css +1 -1
- package/dist/components/DragAndDrop/DragAndDrop.d.ts +5 -3
- package/dist/components/DragAndDrop/DragAndDrop.js +103 -101
- package/dist/components/FilePicker/FilePicker.d.ts +6 -2
- package/dist/components/FilePicker/FilePicker.js +197 -189
- package/dist/components/Icons/IconsGallery.js +1 -1
- package/dist/components/SplitButton/SplitButton.js +132 -127
- package/dist/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.js +200 -196
- package/package.json +1 -1
|
@@ -39,7 +39,7 @@ type DragAndDropProps = {
|
|
|
39
39
|
label?: string;
|
|
40
40
|
required?: boolean;
|
|
41
41
|
fileExtensionsAllowed: string[];
|
|
42
|
-
maxSize
|
|
42
|
+
maxSize?: number;
|
|
43
43
|
maxFiles?: number;
|
|
44
44
|
value?: File | File[];
|
|
45
45
|
onUpload?: (files: UploadFile[]) => void;
|
|
@@ -49,6 +49,8 @@ type DragAndDropProps = {
|
|
|
49
49
|
*/
|
|
50
50
|
onRemoveFile?: (fileName: string) => void;
|
|
51
51
|
queueFiles?: boolean;
|
|
52
|
+
maxSizeErrorMessage?: string;
|
|
53
|
+
fileExtensionInvalidErrorMessage?: string;
|
|
52
54
|
/**
|
|
53
55
|
* Customizable text content for the component.
|
|
54
56
|
* @note Should be memoized (e.g., using `useMemo`) to prevent unnecessary re-renders.
|
|
@@ -83,12 +85,12 @@ type DragAndDropProps = {
|
|
|
83
85
|
* @param {string} [props.label] - Optional label displayed above the drop area
|
|
84
86
|
* @param {boolean} [props.required] - Whether the field is required; shows an asterisk
|
|
85
87
|
* @param {string[]} props.fileExtensionsAllowed - Allowed file extensions (e.g. ['pdf','png'])
|
|
86
|
-
* @param {number} props.maxSize - Maximum file size in MB
|
|
88
|
+
* @param {number} [props.maxSize] - Maximum file size in MB; default no limit
|
|
87
89
|
* @param {number} [props.maxFiles] - Maximum number of files when type is 'multiple'
|
|
88
90
|
* @param {File | File[]} [props.value] - Controlled value for the component; accepts a single File or array of Files
|
|
89
91
|
* @param {(files: UploadFile[]) => void} [props.onUpload] - Callback fired with validated files upon selection or drop
|
|
90
92
|
* @param {boolean} [props.queueFiles] - When true, newly selected files are appended to the existing list
|
|
91
93
|
* @returns {JSX.Element} The rendered DragAndDrop component
|
|
92
94
|
*/
|
|
93
|
-
export default function DragAndDrop({ label, type, disabled, required, fileExtensionsAllowed, maxSize, maxFiles, value, onUpload, onRemoveFile, queueFiles, className, texts, fileIcon, errorIcon, deleteIcon, browseButtonIcon, renderFileItem, fileSizeFormatter, browseButtonProps, validator, errors: externalErrors, ...props }: DragAndDropProps): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
export default function DragAndDrop({ label, type, disabled, required, fileExtensionsAllowed, maxSize, maxFiles, value, onUpload, onRemoveFile, queueFiles, className, maxSizeErrorMessage, fileExtensionInvalidErrorMessage, texts, fileIcon, errorIcon, deleteIcon, browseButtonIcon, renderFileItem, fileSizeFormatter, browseButtonProps, validator, errors: externalErrors, ...props }: DragAndDropProps): import("react/jsx-runtime").JSX.Element;
|
|
94
96
|
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import
|
|
4
|
-
import { c as
|
|
5
|
-
import
|
|
6
|
-
import '../../assets/DragAndDrop.css';const
|
|
1
|
+
import { jsxs as _, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useId as vr, useRef as Lr, useState as J, useCallback as p, useMemo as I } from "react";
|
|
3
|
+
import K from "../Button/Button.js";
|
|
4
|
+
import { c as U } from "../../clsx-OuTLNxxd.js";
|
|
5
|
+
import x from "../Icon/Icon.js";
|
|
6
|
+
import '../../assets/DragAndDrop.css';const Cr = "DragAndDrop-module__disabled___h47do", br = "DragAndDrop-module__required___z3cHB", Or = "DragAndDrop-module__active___ZMuEx", n = {
|
|
7
7
|
"drag-and-drop-container": "DragAndDrop-module__drag-and-drop-container___WHqGh",
|
|
8
|
-
disabled:
|
|
9
|
-
required:
|
|
8
|
+
disabled: Cr,
|
|
9
|
+
required: br,
|
|
10
10
|
"drag-and-drop-space-text-message": "DragAndDrop-module__drag-and-drop-space-text-message___fL-Ac",
|
|
11
11
|
"drag-and-drop-space-text-constraints": "DragAndDrop-module__drag-and-drop-space-text-constraints___YrL7J",
|
|
12
12
|
"drag-and-drop-space": "DragAndDrop-module__drag-and-drop-space___09a0I",
|
|
13
|
-
active:
|
|
13
|
+
active: Or,
|
|
14
14
|
"drag-and-drop-space-text": "DragAndDrop-module__drag-and-drop-space-text___-8rqC",
|
|
15
15
|
"drag-and-drop-files-list": "DragAndDrop-module__drag-and-drop-files-list___7WNCk",
|
|
16
16
|
"drag-and-drop-files-list-item": "DragAndDrop-module__drag-and-drop-files-list-item___vQO6M",
|
|
@@ -24,160 +24,162 @@ import '../../assets/DragAndDrop.css';const Ar = "DragAndDrop-module__disabled__
|
|
|
24
24
|
"drag-and-drop-files-list-item-error": "DragAndDrop-module__drag-and-drop-files-list-item-error___yR0DY",
|
|
25
25
|
"drag-and-drop-files-list-item-icon-error": "DragAndDrop-module__drag-and-drop-files-list-item-icon-error___17EE-",
|
|
26
26
|
"drag-and-drop-files-list-item-icon-delete": "DragAndDrop-module__drag-and-drop-files-list-item-icon-delete___Z1l-B"
|
|
27
|
-
}
|
|
28
|
-
function
|
|
29
|
-
label:
|
|
30
|
-
type:
|
|
31
|
-
disabled:
|
|
32
|
-
required:
|
|
27
|
+
}, Br = (f) => `File size is too large. Must be up to ${f}MB.`, Sr = (f) => `The file format is incorrect. Please make sure it is one of the extensions: ${f}.`;
|
|
28
|
+
function Rr({
|
|
29
|
+
label: f,
|
|
30
|
+
type: d = "single",
|
|
31
|
+
disabled: q,
|
|
32
|
+
required: rr,
|
|
33
33
|
fileExtensionsAllowed: c,
|
|
34
|
-
maxSize:
|
|
34
|
+
maxSize: g = Number.POSITIVE_INFINITY,
|
|
35
35
|
maxFiles: l = Number.POSITIVE_INFINITY,
|
|
36
|
-
value:
|
|
37
|
-
onUpload:
|
|
38
|
-
onRemoveFile:
|
|
39
|
-
queueFiles:
|
|
40
|
-
className:
|
|
36
|
+
value: u,
|
|
37
|
+
onUpload: m,
|
|
38
|
+
onRemoveFile: T,
|
|
39
|
+
queueFiles: P,
|
|
40
|
+
className: er,
|
|
41
|
+
maxSizeErrorMessage: v,
|
|
42
|
+
fileExtensionInvalidErrorMessage: L,
|
|
41
43
|
texts: e,
|
|
42
|
-
fileIcon:
|
|
43
|
-
errorIcon:
|
|
44
|
-
deleteIcon:
|
|
45
|
-
browseButtonIcon:
|
|
46
|
-
renderFileItem:
|
|
47
|
-
fileSizeFormatter:
|
|
48
|
-
browseButtonProps:
|
|
49
|
-
validator:
|
|
50
|
-
errors:
|
|
51
|
-
...
|
|
44
|
+
fileIcon: ar = "ap-icon-document",
|
|
45
|
+
errorIcon: nr = "ap-icon-alert",
|
|
46
|
+
deleteIcon: dr = "ap-icon-delete",
|
|
47
|
+
browseButtonIcon: ir,
|
|
48
|
+
renderFileItem: V,
|
|
49
|
+
fileSizeFormatter: O,
|
|
50
|
+
browseButtonProps: or,
|
|
51
|
+
validator: B,
|
|
52
|
+
errors: C,
|
|
53
|
+
...sr
|
|
52
54
|
}) {
|
|
53
|
-
const
|
|
55
|
+
const j = vr(), y = Lr(null), [D, Y] = J([]), [G, S] = J(!1), h = u !== void 0, M = c.join(", "), X = g ? `up to ${g}MB` : "", tr = c.map((r) => `.${r.replace(/^\./, "")}`).join(","), Z = p((r, a) => {
|
|
54
56
|
if (!r) return r || "";
|
|
55
57
|
if (e != null && e.errors && a) {
|
|
56
58
|
if (a === "SIZE_TOO_LARGE" && e.errors.sizeTooLarge)
|
|
57
|
-
return typeof e.errors.sizeTooLarge == "function" ? e.errors.sizeTooLarge(
|
|
59
|
+
return typeof e.errors.sizeTooLarge == "function" ? e.errors.sizeTooLarge(g) : e.errors.sizeTooLarge;
|
|
58
60
|
if (a === "INVALID_EXTENSION" && e.errors.invalidExtension)
|
|
59
61
|
return typeof e.errors.invalidExtension == "function" ? e.errors.invalidExtension(c) : e.errors.invalidExtension;
|
|
60
62
|
}
|
|
61
63
|
return r;
|
|
62
|
-
}, [e,
|
|
64
|
+
}, [e, g, c]), lr = p(() => e != null && e.browse ? typeof e.browse == "function" ? e.browse(d) : e.browse : d === "single" ? "Browse file" : "Browse files", [e, d]), cr = p(() => e != null && e.drag ? typeof e.drag == "function" ? e.drag(d) : e.drag : d === "single" ? "or drag your file" : "or drag multiple files", [e, d]), _r = p(() => e != null && e.constraints ? e.constraints({
|
|
63
65
|
extensions: c,
|
|
64
|
-
maxSize:
|
|
65
|
-
type:
|
|
66
|
-
}) : `${
|
|
66
|
+
maxSize: g,
|
|
67
|
+
type: d
|
|
68
|
+
}) : `${M} ${d === "single" ? "file" : "files"} ${X}`, [e, c, M, g, X, d]), pr = () => {
|
|
67
69
|
var r;
|
|
68
|
-
N || (r =
|
|
69
|
-
},
|
|
70
|
-
const s = a.maxSize ? a.maxSize * 1024 * 1024 : Number.POSITIVE_INFINITY, o = r.size <= s,
|
|
71
|
-
return
|
|
70
|
+
N || (r = y.current) == null || r.click();
|
|
71
|
+
}, w = I(() => new Set(c.map((r) => r.toLowerCase().replace(/^\./, ""))), [c]), F = p((r, a) => {
|
|
72
|
+
const s = a.maxSize ? a.maxSize * 1024 * 1024 : Number.POSITIVE_INFINITY, o = a.fileExtensionsAllowed.join(", "), A = (v == null ? void 0 : v.replace(/\{maxSize\}/g, String(a.maxSize))) ?? Br(a.maxSize), Nr = (L == null ? void 0 : L.replace(/\{fileExtensionsAllowed\}/g, o)) ?? Sr(o), Ar = r.size <= s, Q = r.name.toLowerCase(), Ir = Q.includes(".") ? Q.split(".").pop() ?? "" : "", Tr = w.size === 0 || w.has(Ir);
|
|
73
|
+
return Ar ? Tr ? {
|
|
72
74
|
file: r
|
|
73
75
|
} : {
|
|
74
76
|
file: r,
|
|
75
|
-
error:
|
|
77
|
+
error: Nr,
|
|
76
78
|
errorCode: "INVALID_EXTENSION"
|
|
77
79
|
} : {
|
|
78
80
|
file: r,
|
|
79
|
-
error:
|
|
81
|
+
error: A,
|
|
80
82
|
errorCode: "SIZE_TOO_LARGE"
|
|
81
83
|
};
|
|
82
|
-
}, [
|
|
83
|
-
maxSize:
|
|
84
|
+
}, [w, v, L]), $ = I(() => ({
|
|
85
|
+
maxSize: g,
|
|
84
86
|
fileExtensionsAllowed: c,
|
|
85
|
-
type:
|
|
87
|
+
type: d,
|
|
86
88
|
maxFiles: l
|
|
87
|
-
}), [
|
|
89
|
+
}), [g, c, d, l]), b = p((r) => {
|
|
88
90
|
let a;
|
|
89
|
-
|
|
91
|
+
B ? a = r.map((o) => B(o, $)) : a = r.map((o) => F(o, $));
|
|
90
92
|
let s = a.map((o) => {
|
|
91
|
-
const
|
|
93
|
+
const A = o.error ? Z(o.error, o.errorCode) : void 0;
|
|
92
94
|
return {
|
|
93
95
|
file: o.file,
|
|
94
96
|
// Don't merge external errors here - that happens in files useMemo
|
|
95
|
-
error:
|
|
97
|
+
error: A
|
|
96
98
|
};
|
|
97
99
|
});
|
|
98
|
-
return
|
|
100
|
+
return d === "single" && s.length > 1 ? s.slice(0, 1) : (l && l > 0 && s.length > l && (s = s.map((o, A) => A < l ? o : {
|
|
99
101
|
...o,
|
|
100
102
|
error: o.error ?? `Maximum ${l} file${l === 1 ? "" : "s"} allowed.`
|
|
101
103
|
})), s);
|
|
102
|
-
}, [
|
|
104
|
+
}, [d, l, B, $, Z, F]), i = I(() => {
|
|
103
105
|
let r;
|
|
104
|
-
if (
|
|
105
|
-
const a = Array.isArray(
|
|
106
|
-
r =
|
|
106
|
+
if (h) {
|
|
107
|
+
const a = Array.isArray(u) ? u : u ? [u] : [];
|
|
108
|
+
r = b(a);
|
|
107
109
|
} else
|
|
108
|
-
r =
|
|
110
|
+
r = D;
|
|
109
111
|
return r.map((a) => ({
|
|
110
112
|
...a,
|
|
111
113
|
// Validator errors take precedence over external errors
|
|
112
|
-
error: a.error ?? (
|
|
114
|
+
error: a.error ?? (C == null ? void 0 : C[a.file.name])
|
|
113
115
|
}));
|
|
114
|
-
}, [
|
|
115
|
-
const a =
|
|
116
|
-
if (
|
|
117
|
-
|
|
116
|
+
}, [h, u, b, D, C]), gr = p((r) => O ? O(r) : (r / 1024).toFixed(2) + " KB", [O]), N = I(() => q || (i == null ? void 0 : i.length) >= l || d === "single" && (i == null ? void 0 : i.length) > 0, [q, i, l, d]), H = p((r) => {
|
|
117
|
+
const a = b(r);
|
|
118
|
+
if (h)
|
|
119
|
+
m == null || m(a);
|
|
118
120
|
else {
|
|
119
|
-
const s =
|
|
120
|
-
|
|
121
|
+
const s = P ? [...D, ...a] : a;
|
|
122
|
+
Y(s), m == null || m(s);
|
|
121
123
|
}
|
|
122
|
-
}, [
|
|
124
|
+
}, [b, h, P, D, m]), mr = (r) => {
|
|
123
125
|
if (!r.target.files) return;
|
|
124
126
|
const a = Array.from(r.target.files);
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
if (!
|
|
128
|
-
const a =
|
|
129
|
-
|
|
127
|
+
H(a), r.target.value = "";
|
|
128
|
+
}, k = p((r) => {
|
|
129
|
+
if (!h) {
|
|
130
|
+
const a = D.filter((s) => s.file.name !== r);
|
|
131
|
+
Y(a);
|
|
130
132
|
}
|
|
131
|
-
|
|
132
|
-
}, [
|
|
133
|
+
T == null || T(r);
|
|
134
|
+
}, [h, D, T]), W = I(() => new Map(i.map((r) => [r.file.name, () => k(r.file.name)])), [i, k]), {
|
|
133
135
|
onDragOver: E,
|
|
134
|
-
onDragLeave:
|
|
135
|
-
onDrop:
|
|
136
|
-
...
|
|
137
|
-
} =
|
|
138
|
-
N || (r.preventDefault(),
|
|
139
|
-
},
|
|
140
|
-
r.preventDefault(),
|
|
141
|
-
},
|
|
136
|
+
onDragLeave: z,
|
|
137
|
+
onDrop: R,
|
|
138
|
+
...fr
|
|
139
|
+
} = sr, ur = (r) => {
|
|
140
|
+
N || (r.preventDefault(), G || S(!0), E == null || E(r));
|
|
141
|
+
}, Dr = (r) => {
|
|
142
|
+
r.preventDefault(), S(!1), z == null || z(r);
|
|
143
|
+
}, hr = (r) => {
|
|
142
144
|
if (N) return;
|
|
143
145
|
r.preventDefault();
|
|
144
146
|
const a = Array.from(r.dataTransfer.files);
|
|
145
|
-
|
|
147
|
+
H(a), r.dataTransfer.clearData(), S(!1), R == null || R(r);
|
|
146
148
|
};
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
return /* @__PURE__ */ _("div", { className: U(n["drag-and-drop-container"], N && n.disabled, er), ...fr, children: [
|
|
150
|
+
f && /* @__PURE__ */ _("label", { htmlFor: j, children: [
|
|
151
|
+
f,
|
|
152
|
+
rr && /* @__PURE__ */ t("span", { "aria-hidden": "true", className: n.required, children: "*" })
|
|
151
153
|
] }),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */ t(
|
|
154
|
-
/* @__PURE__ */ t("input", { id:
|
|
154
|
+
/* @__PURE__ */ _("div", { className: U(n["drag-and-drop-space"], G && n.active), onDragOver: ur, onDragLeave: Dr, onDrop: hr, children: [
|
|
155
|
+
/* @__PURE__ */ t(K, { type: "secondary", variant: "default", size: "sm", ...or, disabled: N, onClick: pr, icon: ir, children: lr() }),
|
|
156
|
+
/* @__PURE__ */ t("input", { id: j, ref: y, type: "file", style: {
|
|
155
157
|
display: "none"
|
|
156
|
-
}, multiple:
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */ t("span", { className: n["drag-and-drop-space-text-message"], children:
|
|
159
|
-
/* @__PURE__ */
|
|
158
|
+
}, multiple: d === "multiple", accept: tr, onChange: mr }),
|
|
159
|
+
/* @__PURE__ */ _("div", { className: n["drag-and-drop-space-text"], children: [
|
|
160
|
+
/* @__PURE__ */ t("span", { className: n["drag-and-drop-space-text-message"], children: cr() }),
|
|
161
|
+
/* @__PURE__ */ _("span", { className: n["drag-and-drop-space-text-constraints"], children: [
|
|
160
162
|
" ",
|
|
161
|
-
|
|
163
|
+
_r()
|
|
162
164
|
] })
|
|
163
165
|
] })
|
|
164
166
|
] }),
|
|
165
|
-
(
|
|
166
|
-
/* @__PURE__ */ t("span", { className: n["drag-and-drop-files-list-item-icon-container"], children: /* @__PURE__ */ t(
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
167
|
+
(i == null ? void 0 : i.length) > 0 && /* @__PURE__ */ t("ul", { className: n["drag-and-drop-files-list"], children: i == null ? void 0 : i.map((r, a) => V ? /* @__PURE__ */ t("li", { children: V(r, a, W.get(r.file.name) ?? (() => k(r.file.name))) }, r.file.name) : /* @__PURE__ */ t("li", { className: n["drag-and-drop-files-list-item"], children: /* @__PURE__ */ _("div", { className: n["drag-and-drop-files-list-item-content"], children: [
|
|
168
|
+
/* @__PURE__ */ t("span", { className: n["drag-and-drop-files-list-item-icon-container"], children: /* @__PURE__ */ t(x, { icon: ar, className: n["drag-and-drop-files-list-item-icon"] }) }),
|
|
169
|
+
/* @__PURE__ */ _("div", { className: n["drag-and-drop-files-list-item-content-data"], children: [
|
|
170
|
+
/* @__PURE__ */ _("div", { className: n["drag-and-drop-files-list-item-text"], children: [
|
|
169
171
|
/* @__PURE__ */ t("span", { className: n["drag-and-drop-files-list-item-name"], children: r.file.name }),
|
|
170
|
-
/* @__PURE__ */ t("span", { className: n["drag-and-drop-files-list-item-size"], children:
|
|
171
|
-
r.error && /* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */ t(
|
|
172
|
+
/* @__PURE__ */ t("span", { className: n["drag-and-drop-files-list-item-size"], children: gr(r.file.size) }),
|
|
173
|
+
r.error && /* @__PURE__ */ _("span", { className: n["drag-and-drop-files-list-item-error"], children: [
|
|
174
|
+
/* @__PURE__ */ t(x, { icon: nr, className: n["drag-and-drop-files-list-item-icon-error"] }),
|
|
173
175
|
r.error
|
|
174
176
|
] })
|
|
175
177
|
] }),
|
|
176
|
-
/* @__PURE__ */ t(
|
|
178
|
+
/* @__PURE__ */ t(K, { type: "tertiary", variant: "default", size: "sm", onClick: W.get(r.file.name), icon: dr, iconClassName: n["drag-and-drop-files-list-item-icon-delete"], "aria-label": `Remove ${r.file.name}` })
|
|
177
179
|
] })
|
|
178
180
|
] }) }, r.file.name)) })
|
|
179
181
|
] });
|
|
180
182
|
}
|
|
181
183
|
export {
|
|
182
|
-
|
|
184
|
+
Rr as default
|
|
183
185
|
};
|
|
@@ -33,13 +33,14 @@ export type FilePickerContextValue = {
|
|
|
33
33
|
handleKeyDown: (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
34
34
|
handleRemoveFile: (fileName: string) => void;
|
|
35
35
|
displayFileSize: (size: number) => string;
|
|
36
|
+
uploadedFileAppendedRow?: (item: UploadFile, index: number) => ReactNode;
|
|
36
37
|
};
|
|
37
38
|
declare function useFilePickerContext(): FilePickerContextValue;
|
|
38
39
|
type FilePickerProps = {
|
|
39
40
|
type?: 'single' | 'multiple';
|
|
40
41
|
maxFiles?: number;
|
|
41
42
|
fileExtensionsAllowed: string[];
|
|
42
|
-
maxSize
|
|
43
|
+
maxSize?: number;
|
|
43
44
|
queueFiles?: boolean;
|
|
44
45
|
isUploadDisabled?: boolean;
|
|
45
46
|
disabled?: boolean;
|
|
@@ -48,12 +49,15 @@ type FilePickerProps = {
|
|
|
48
49
|
required?: boolean;
|
|
49
50
|
placeholder?: string;
|
|
50
51
|
errorMessage?: string;
|
|
52
|
+
maxSizeErrorMessage?: string;
|
|
53
|
+
fileExtensionInvalidErrorMessage?: string;
|
|
51
54
|
helpText?: string;
|
|
52
55
|
helpLink?: string;
|
|
53
56
|
helpLinkText?: string;
|
|
54
57
|
multipleHelpText?: string;
|
|
55
58
|
multipleButtonHelpText?: string;
|
|
56
59
|
labelTooltip?: InputLabelTooltipProps;
|
|
60
|
+
uploadedFileAppendedRow?: (item: UploadFile, index: number) => ReactNode;
|
|
57
61
|
onUpload?: (files: UploadFile[]) => void;
|
|
58
62
|
onRemoveFile?: (fileName: string) => void;
|
|
59
63
|
children?: ReactNode;
|
|
@@ -62,7 +66,7 @@ type FilePickerProps = {
|
|
|
62
66
|
* FilePicker root. Use with no children for default layout, or compose with
|
|
63
67
|
* FilePicker.Label, FilePicker.BrowseButton, FilePicker.HelpText, FilePicker.UploadedFilesList, etc.
|
|
64
68
|
*/
|
|
65
|
-
declare function FilePickerRoot({ type, maxFiles, fileExtensionsAllowed, maxSize, queueFiles, disabled, isUploadDisabled, value, label, required, placeholder, errorMessage, helpText, helpLink, helpLinkText, multipleHelpText, multipleButtonHelpText, labelTooltip, onUpload, onRemoveFile, children, }: FilePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
declare function FilePickerRoot({ type, maxFiles, fileExtensionsAllowed, maxSize, queueFiles, disabled, isUploadDisabled, value, label, required, placeholder, errorMessage, maxSizeErrorMessage, fileExtensionInvalidErrorMessage, helpText, helpLink, helpLinkText, multipleHelpText, multipleButtonHelpText, labelTooltip, uploadedFileAppendedRow, onUpload, onRemoveFile, children, }: FilePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
66
70
|
type FilePickerLabelProps = {
|
|
67
71
|
/** Override label text. If not provided, uses FilePicker's label prop. */
|
|
68
72
|
children?: ReactNode;
|