@reportportal/ui-kit 0.0.1-alpha.102 → 0.0.1-alpha.104
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/attachedFile.js +1 -1
- package/dist/{arrowUp-4a5caee7.js → chevronDownDropdown-66f5b1af.js} +4 -3
- package/dist/common/utils/index.d.ts +1 -0
- package/dist/common/utils/isString.d.ts +1 -0
- package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +1 -0
- package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +2 -2
- package/dist/components/fileDropArea/types.d.ts +1 -0
- package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +1 -1
- package/dist/components/table/constants.d.ts +3 -0
- package/dist/components/table/hooks/index.d.ts +4 -0
- package/dist/components/table/hooks/useColumnWidths.d.ts +8 -0
- package/dist/components/table/hooks/useTableColumns.d.ts +13 -0
- package/dist/components/table/hooks/useTableExpansion.d.ts +15 -0
- package/dist/components/table/hooks/useTableHover.d.ts +10 -0
- package/dist/components/table/types.d.ts +14 -2
- package/dist/components/table/utils.d.ts +7 -1
- package/dist/fileDropArea.js +160 -155
- package/dist/icons.js +37 -37
- package/dist/index-803576c3.js +110 -0
- package/dist/index.js +38 -38
- package/dist/style.css +1 -1
- package/dist/table-0ca84375.js +476 -0
- package/dist/table.js +2 -2
- package/package.json +1 -1
- package/dist/index-e27a72a8.js +0 -99
- package/dist/table-920fdad9.js +0 -142
package/dist/fileDropArea.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { jsx as f, jsxs as F } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { useState as C, useCallback as d, useRef as A, createContext as L, useMemo as z, useContext as M } from "react";
|
|
4
|
-
import { g as
|
|
5
|
-
import { B as
|
|
2
|
+
import { c as E } from "./bind-06a7ff84.js";
|
|
3
|
+
import { useState as C, useCallback as d, useRef as A, createContext as L, useMemo as z, useContext as M, useEffect as k } from "react";
|
|
4
|
+
import { g as B, A as S } from "./index-803576c3.js";
|
|
5
|
+
import { B as P } from "./button-97d9e587.js";
|
|
6
6
|
import w from "react-dropzone";
|
|
7
7
|
import "./close-4d480ef7.js";
|
|
8
8
|
import "./xls-995781cc.js";
|
|
9
|
-
function
|
|
9
|
+
function Z(e) {
|
|
10
10
|
return Number.isSafeInteger(e) && e >= 0;
|
|
11
11
|
}
|
|
12
12
|
function U(e) {
|
|
13
|
-
return e != null && typeof e != "function" &&
|
|
14
|
-
}
|
|
15
|
-
function Z(e) {
|
|
16
|
-
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
13
|
+
return e != null && typeof e != "function" && Z(e.length);
|
|
17
14
|
}
|
|
18
15
|
function V(e) {
|
|
19
|
-
return
|
|
16
|
+
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
20
17
|
}
|
|
21
18
|
function $(e) {
|
|
22
|
-
return e
|
|
19
|
+
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
23
20
|
}
|
|
24
21
|
function W(e) {
|
|
22
|
+
return e !== null && typeof e == "object" && V(e) === "[object Arguments]";
|
|
23
|
+
}
|
|
24
|
+
function X(e) {
|
|
25
25
|
const r = e == null ? void 0 : e.constructor, t = typeof r == "function" ? r.prototype : Object.prototype;
|
|
26
26
|
return e === t;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function q(e) {
|
|
29
|
+
return $(e);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function g(e) {
|
|
32
32
|
if (e == null)
|
|
33
33
|
return !0;
|
|
34
34
|
if (U(e))
|
|
35
|
-
return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !
|
|
35
|
+
return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !q(e) && !W(e) ? !1 : e.length === 0;
|
|
36
36
|
if (typeof e == "object") {
|
|
37
37
|
if (e instanceof Map || e instanceof Set)
|
|
38
38
|
return e.size === 0;
|
|
39
39
|
const r = Object.keys(e);
|
|
40
|
-
return
|
|
40
|
+
return X(e) ? r.filter((t) => t !== "constructor").length === 0 : r.length === 0;
|
|
41
41
|
}
|
|
42
42
|
return !0;
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const ge = {
|
|
45
45
|
png: "image/png",
|
|
46
46
|
jpeg: "image/jpeg",
|
|
47
47
|
gif: "image/gif",
|
|
@@ -76,111 +76,111 @@ const me = {
|
|
|
76
76
|
gtar: "application/x-gtar",
|
|
77
77
|
kml: "application/vnd.google-earth.kml+xml"
|
|
78
78
|
};
|
|
79
|
-
var
|
|
80
|
-
const
|
|
81
|
-
const { maxFileSize: t, acceptFileMimeTypes:
|
|
82
|
-
if (t && e.size > t &&
|
|
83
|
-
const s =
|
|
84
|
-
|
|
85
|
-
(
|
|
86
|
-
) ||
|
|
79
|
+
var h = /* @__PURE__ */ ((e) => (e.INCORRECT_FILE_SIZE = "INCORRECT_FILE_SIZE", e.INCORRECT_FILE_FORMAT = "INCORRECT_FILE_FORMAT", e))(h || {});
|
|
80
|
+
const Y = (e, r) => {
|
|
81
|
+
const { maxFileSize: t, acceptFileMimeTypes: o = [] } = r, a = [];
|
|
82
|
+
if (t && e.size > t && a.push(h.INCORRECT_FILE_SIZE), !g(o)) {
|
|
83
|
+
const s = B(e.name);
|
|
84
|
+
o.some(
|
|
85
|
+
(c) => c.startsWith(".") ? s === c.slice(1) : e.type === c
|
|
86
|
+
) || a.push(h.INCORRECT_FILE_FORMAT);
|
|
87
87
|
}
|
|
88
|
-
return
|
|
89
|
-
}, I = (e, r) =>
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
}[e[0]],
|
|
88
|
+
return a;
|
|
89
|
+
}, I = (e, r, t) => t || (g(e) ? null : {
|
|
90
|
+
[h.INCORRECT_FILE_SIZE]: r.incorrectFileSize,
|
|
91
|
+
[h.INCORRECT_FILE_FORMAT]: r.incorrectFileFormat
|
|
92
|
+
}[e[0]]), G = 128, b = G * 1024 * 1024, H = ({
|
|
93
93
|
maxFileSize: e = b,
|
|
94
94
|
acceptFileMimeTypes: r = [],
|
|
95
95
|
onFilesAdded: t
|
|
96
96
|
}) => {
|
|
97
|
-
const [
|
|
98
|
-
(
|
|
99
|
-
|
|
100
|
-
const p =
|
|
101
|
-
file:
|
|
102
|
-
validationErrors:
|
|
97
|
+
const [o, a] = C(null), s = d(
|
|
98
|
+
(i) => {
|
|
99
|
+
a(null);
|
|
100
|
+
const p = i.map((_) => ({
|
|
101
|
+
file: _,
|
|
102
|
+
validationErrors: Y(_, { maxFileSize: e, acceptFileMimeTypes: r })
|
|
103
103
|
}));
|
|
104
104
|
t(p);
|
|
105
105
|
const m = p.find(
|
|
106
|
-
({ validationErrors:
|
|
106
|
+
({ validationErrors: _ }) => !g(_)
|
|
107
107
|
);
|
|
108
|
-
m &&
|
|
108
|
+
m && a(m.validationErrors[0]);
|
|
109
109
|
},
|
|
110
110
|
[e, r, t]
|
|
111
111
|
), l = d(
|
|
112
|
-
(
|
|
113
|
-
s(
|
|
112
|
+
(i) => {
|
|
113
|
+
s(i);
|
|
114
114
|
},
|
|
115
115
|
[s]
|
|
116
|
-
),
|
|
117
|
-
(
|
|
118
|
-
const { files: p } =
|
|
119
|
-
p && s([...p]),
|
|
116
|
+
), c = d(
|
|
117
|
+
(i) => {
|
|
118
|
+
const { files: p } = i.currentTarget;
|
|
119
|
+
p && s([...p]), i.currentTarget.value = "";
|
|
120
120
|
},
|
|
121
121
|
[s]
|
|
122
|
-
),
|
|
123
|
-
|
|
122
|
+
), n = d(() => {
|
|
123
|
+
a(null);
|
|
124
124
|
}, []);
|
|
125
125
|
return {
|
|
126
|
-
|
|
127
|
-
handleFileInputChange:
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
error: o,
|
|
127
|
+
handleFileInputChange: c,
|
|
128
|
+
clearError: n,
|
|
129
|
+
onDrop: l
|
|
130
130
|
};
|
|
131
|
-
},
|
|
131
|
+
}, J = ({
|
|
132
132
|
maxFileSize: e = b,
|
|
133
133
|
acceptFileMimeTypes: r = [],
|
|
134
134
|
onFilesAdded: t
|
|
135
135
|
}) => {
|
|
136
|
-
const { onDrop:
|
|
136
|
+
const { onDrop: o, handleFileInputChange: a, error: s, clearError: l } = H({
|
|
137
137
|
maxFileSize: e,
|
|
138
138
|
acceptFileMimeTypes: r,
|
|
139
139
|
onFilesAdded: t
|
|
140
|
-
}),
|
|
140
|
+
}), c = d(() => {
|
|
141
141
|
l();
|
|
142
142
|
}, [l]);
|
|
143
143
|
return {
|
|
144
144
|
error: s,
|
|
145
|
-
onDrop:
|
|
146
|
-
handleDropzoneClick:
|
|
147
|
-
handleFileInputChange:
|
|
145
|
+
onDrop: o,
|
|
146
|
+
handleDropzoneClick: c,
|
|
147
|
+
handleFileInputChange: a,
|
|
148
148
|
clearError: l
|
|
149
149
|
};
|
|
150
|
-
},
|
|
151
|
-
const [r, t] = C(!1),
|
|
150
|
+
}, K = ({ isOverlay: e = !1 }) => {
|
|
151
|
+
const [r, t] = C(!1), o = A(null), a = d((i) => {
|
|
152
152
|
var p;
|
|
153
|
-
|
|
154
|
-
}, []), s = d((
|
|
155
|
-
|
|
156
|
-
}, []), l = d((
|
|
157
|
-
|
|
158
|
-
}, []),
|
|
159
|
-
|
|
153
|
+
i.preventDefault(), (p = i.dataTransfer) != null && p.types.includes("Files") && t(!0);
|
|
154
|
+
}, []), s = d((i) => {
|
|
155
|
+
i.preventDefault(), o.current && !o.current.contains(i.relatedTarget) && t(!1);
|
|
156
|
+
}, []), l = d((i) => {
|
|
157
|
+
i.preventDefault();
|
|
158
|
+
}, []), c = d((i) => {
|
|
159
|
+
i.preventDefault(), t(!1);
|
|
160
160
|
}, []);
|
|
161
161
|
return {
|
|
162
162
|
handlers: e ? {
|
|
163
|
-
ref:
|
|
164
|
-
onDragEnter:
|
|
163
|
+
ref: o,
|
|
164
|
+
onDragEnter: a,
|
|
165
165
|
onDragLeave: s,
|
|
166
166
|
onDragOver: l,
|
|
167
|
-
onDrop:
|
|
167
|
+
onDrop: c
|
|
168
168
|
} : {},
|
|
169
169
|
...e && { isDragActive: r }
|
|
170
170
|
};
|
|
171
171
|
}, y = L(null);
|
|
172
172
|
y.displayName = "FileDropAreaContext";
|
|
173
|
-
const
|
|
173
|
+
const Q = ({
|
|
174
174
|
children: e,
|
|
175
175
|
...r
|
|
176
176
|
}) => {
|
|
177
|
-
const t = A(null),
|
|
177
|
+
const t = A(null), o = d((l) => {
|
|
178
178
|
t.current = l;
|
|
179
|
-
}, []),
|
|
179
|
+
}, []), a = d(() => {
|
|
180
180
|
r.isDisabled || !t.current || (r.clearError(), t.current());
|
|
181
181
|
}, [r]), s = z(
|
|
182
|
-
() => ({ ...r, registerOpenFunction:
|
|
183
|
-
[r,
|
|
182
|
+
() => ({ ...r, registerOpenFunction: o, openFileDialog: a }),
|
|
183
|
+
[r, o, a]
|
|
184
184
|
);
|
|
185
185
|
return /* @__PURE__ */ f(y.Provider, { value: s, children: e });
|
|
186
186
|
}, v = () => {
|
|
@@ -188,166 +188,171 @@ const K = ({
|
|
|
188
188
|
if (!e)
|
|
189
189
|
throw new Error("useFileDropAreaContext must be used within a FileDropAreaProvider");
|
|
190
190
|
return e;
|
|
191
|
-
},
|
|
191
|
+
}, ee = ({
|
|
192
192
|
children: e,
|
|
193
193
|
className: r,
|
|
194
194
|
variant: t = "text",
|
|
195
|
-
...
|
|
195
|
+
...o
|
|
196
196
|
}) => {
|
|
197
|
-
const { openFileDialog:
|
|
197
|
+
const { openFileDialog: a, isDisabled: s } = v();
|
|
198
198
|
return /* @__PURE__ */ f(
|
|
199
|
-
|
|
199
|
+
P,
|
|
200
200
|
{
|
|
201
|
-
...
|
|
201
|
+
...o,
|
|
202
202
|
variant: t,
|
|
203
203
|
adjustWidthOn: "content",
|
|
204
204
|
disabled: s,
|
|
205
205
|
className: r,
|
|
206
|
-
onClick: (
|
|
207
|
-
|
|
206
|
+
onClick: (c) => {
|
|
207
|
+
c.stopPropagation(), a();
|
|
208
208
|
},
|
|
209
209
|
children: e
|
|
210
210
|
}
|
|
211
211
|
);
|
|
212
212
|
}, D = {
|
|
213
|
-
"file-drop-area": "_file-drop-
|
|
214
|
-
"file-drop-area--active": "_file-drop-area--
|
|
215
|
-
"file-drop-area--disabled": "_file-drop-area--
|
|
216
|
-
"file-drop-area--error": "_file-drop-area--
|
|
217
|
-
"file-drop-area__content": "_file-drop-
|
|
218
|
-
"file-drop-area__icon": "_file-drop-
|
|
219
|
-
"file-drop-area__text": "_file-drop-
|
|
220
|
-
"file-drop-area__description": "_file-drop-
|
|
221
|
-
"file-drop-area__browse-button": "_file-drop-area__browse-
|
|
222
|
-
"file-drop-area__file-size-info": "_file-drop-area__file-size-
|
|
223
|
-
"file-drop-area__hidden-input": "_file-drop-area__hidden-
|
|
224
|
-
"file-drop-area__error-message": "_file-drop-area__error-
|
|
225
|
-
"file-drop-area--overlay": "_file-drop-area--
|
|
226
|
-
"file-drop-area--overlay-mode": "_file-drop-area--overlay-
|
|
227
|
-
},
|
|
213
|
+
"file-drop-area": "_file-drop-area_1s34r_16",
|
|
214
|
+
"file-drop-area--active": "_file-drop-area--active_1s34r_28",
|
|
215
|
+
"file-drop-area--disabled": "_file-drop-area--disabled_1s34r_32",
|
|
216
|
+
"file-drop-area--error": "_file-drop-area--error_1s34r_36",
|
|
217
|
+
"file-drop-area__content": "_file-drop-area__content_1s34r_39",
|
|
218
|
+
"file-drop-area__icon": "_file-drop-area__icon_1s34r_46",
|
|
219
|
+
"file-drop-area__text": "_file-drop-area__text_1s34r_54",
|
|
220
|
+
"file-drop-area__description": "_file-drop-area__description_1s34r_60",
|
|
221
|
+
"file-drop-area__browse-button": "_file-drop-area__browse-button_1s34r_73",
|
|
222
|
+
"file-drop-area__file-size-info": "_file-drop-area__file-size-info_1s34r_76",
|
|
223
|
+
"file-drop-area__hidden-input": "_file-drop-area__hidden-input_1s34r_80",
|
|
224
|
+
"file-drop-area__error-message": "_file-drop-area__error-message_1s34r_83",
|
|
225
|
+
"file-drop-area--overlay": "_file-drop-area--overlay_1s34r_89",
|
|
226
|
+
"file-drop-area--overlay-mode": "_file-drop-area--overlay-mode_1s34r_107"
|
|
227
|
+
}, re = E.bind(D), te = ({ className: e }) => {
|
|
228
228
|
const { error: r, messages: t } = v();
|
|
229
229
|
return r ? /* @__PURE__ */ f(
|
|
230
230
|
"div",
|
|
231
231
|
{
|
|
232
|
-
className:
|
|
232
|
+
className: re("file-drop-area__error-message", e),
|
|
233
233
|
role: "alert",
|
|
234
234
|
"aria-live": "assertive",
|
|
235
235
|
"aria-atomic": "true",
|
|
236
236
|
children: I([r], t) || r
|
|
237
237
|
}
|
|
238
238
|
) : null;
|
|
239
|
-
},
|
|
239
|
+
}, u = E.bind(D), oe = ({ icon: e, description: r, fileSizeMessage: t, className: o }) => {
|
|
240
240
|
const {
|
|
241
|
-
variant:
|
|
241
|
+
variant: a = "default",
|
|
242
242
|
error: s,
|
|
243
243
|
isDisabled: l,
|
|
244
|
-
isMultipleFiles:
|
|
245
|
-
overlayProps:
|
|
246
|
-
onDrop:
|
|
244
|
+
isMultipleFiles: c,
|
|
245
|
+
overlayProps: n,
|
|
246
|
+
onDrop: i,
|
|
247
247
|
handleDropzoneClick: p,
|
|
248
248
|
registerOpenFunction: m
|
|
249
|
-
} = v(),
|
|
250
|
-
return /* @__PURE__ */ f(w, { multiple:
|
|
249
|
+
} = v(), _ = a === "overlay";
|
|
250
|
+
return /* @__PURE__ */ f(w, { multiple: c, disabled: l, noClick: _, onDrop: i, children: ({ getRootProps: R, getInputProps: T, isDragActive: N, open: O }) => {
|
|
251
251
|
m(O);
|
|
252
|
-
const j =
|
|
252
|
+
const j = _ ? !!(n != null && n.isDragActive) : N;
|
|
253
253
|
return /* @__PURE__ */ F(
|
|
254
254
|
"div",
|
|
255
255
|
{
|
|
256
256
|
...R({
|
|
257
|
-
className:
|
|
257
|
+
className: u("file-drop-area", o, {
|
|
258
258
|
"file-drop-area--active": j,
|
|
259
259
|
"file-drop-area--disabled": l,
|
|
260
260
|
"file-drop-area--error": !!s,
|
|
261
|
-
"file-drop-area--overlay-mode":
|
|
261
|
+
"file-drop-area--overlay-mode": _
|
|
262
262
|
}),
|
|
263
|
-
onClick:
|
|
263
|
+
onClick: _ ? void 0 : p
|
|
264
264
|
}),
|
|
265
265
|
children: [
|
|
266
266
|
/* @__PURE__ */ f("input", { ...T() }),
|
|
267
|
-
/* @__PURE__ */ F("div", { className:
|
|
268
|
-
/* @__PURE__ */ f("div", { className:
|
|
269
|
-
/* @__PURE__ */ F("div", { className:
|
|
270
|
-
r && /* @__PURE__ */ f("div", { className:
|
|
271
|
-
t && /* @__PURE__ */ f("div", { className:
|
|
267
|
+
/* @__PURE__ */ F("div", { className: u("file-drop-area__content"), children: [
|
|
268
|
+
/* @__PURE__ */ f("div", { className: u("file-drop-area__icon"), children: e }),
|
|
269
|
+
/* @__PURE__ */ F("div", { className: u("file-drop-area__text"), children: [
|
|
270
|
+
r && /* @__PURE__ */ f("div", { className: u("file-drop-area__description"), children: r }),
|
|
271
|
+
t && /* @__PURE__ */ f("div", { className: u("file-drop-area__file-size-info"), children: t })
|
|
272
272
|
] })
|
|
273
273
|
] })
|
|
274
274
|
]
|
|
275
275
|
}
|
|
276
276
|
);
|
|
277
277
|
} });
|
|
278
|
-
},
|
|
279
|
-
"attached-files-list": "_attached-files-
|
|
280
|
-
},
|
|
278
|
+
}, ie = {
|
|
279
|
+
"attached-files-list": "_attached-files-list_14nn3_16"
|
|
280
|
+
}, ne = E.bind(ie), ae = ({
|
|
281
281
|
files: e,
|
|
282
282
|
className: r,
|
|
283
283
|
onRemoveFile: t,
|
|
284
|
-
onDownloadFile:
|
|
284
|
+
onDownloadFile: o
|
|
285
285
|
}) => {
|
|
286
|
-
const { messages:
|
|
287
|
-
|
|
286
|
+
const { messages: a, clearError: s } = v();
|
|
287
|
+
k(() => {
|
|
288
|
+
e.some((i) => !g(i.validationErrors)) && s();
|
|
289
|
+
}, [e, s]);
|
|
290
|
+
const l = d(
|
|
291
|
+
(n) => () => t(n.id),
|
|
288
292
|
[t]
|
|
289
|
-
),
|
|
290
|
-
(
|
|
291
|
-
[
|
|
293
|
+
), c = d(
|
|
294
|
+
(n) => () => o == null ? void 0 : o(n),
|
|
295
|
+
[o]
|
|
292
296
|
);
|
|
293
|
-
return
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
297
|
+
return g(e) ? null : /* @__PURE__ */ f("div", { className: ne("attached-files-list", r), children: e.map((n) => {
|
|
298
|
+
const i = I(
|
|
299
|
+
n.validationErrors ?? [],
|
|
300
|
+
a,
|
|
301
|
+
n.customErrorMessage
|
|
302
|
+
);
|
|
298
303
|
return /* @__PURE__ */ f(
|
|
299
|
-
|
|
304
|
+
S,
|
|
300
305
|
{
|
|
301
|
-
fileName:
|
|
302
|
-
size:
|
|
303
|
-
uploadingProgress:
|
|
304
|
-
isUploadFailed:
|
|
305
|
-
isUploading:
|
|
306
|
-
onRemove:
|
|
307
|
-
...
|
|
308
|
-
...
|
|
306
|
+
fileName: n.fileName,
|
|
307
|
+
size: n.size,
|
|
308
|
+
uploadingProgress: n.uploadingProgress,
|
|
309
|
+
isUploadFailed: n.isUploadFailed || !!i,
|
|
310
|
+
isUploading: n.isUploading,
|
|
311
|
+
onRemove: l(n),
|
|
312
|
+
...i && { uploadFailedMessage: i },
|
|
313
|
+
...o && { onDownload: c(n) }
|
|
309
314
|
},
|
|
310
|
-
|
|
315
|
+
n.id
|
|
311
316
|
);
|
|
312
317
|
}) });
|
|
313
|
-
},
|
|
318
|
+
}, se = E.bind(D), x = ({
|
|
314
319
|
maxFileSize: e,
|
|
315
320
|
acceptFileMimeTypes: r,
|
|
316
321
|
isMultipleFiles: t,
|
|
317
|
-
isDisabled:
|
|
318
|
-
variant:
|
|
322
|
+
isDisabled: o,
|
|
323
|
+
variant: a = "default",
|
|
319
324
|
children: s,
|
|
320
325
|
messages: l,
|
|
321
|
-
onFilesAdded:
|
|
326
|
+
onFilesAdded: c
|
|
322
327
|
}) => {
|
|
323
|
-
const
|
|
328
|
+
const n = a === "overlay", i = J({
|
|
324
329
|
maxFileSize: e,
|
|
325
330
|
acceptFileMimeTypes: r,
|
|
326
331
|
messages: l,
|
|
327
332
|
isMultipleFiles: t,
|
|
328
|
-
isDisabled:
|
|
329
|
-
onFilesAdded:
|
|
330
|
-
}), p =
|
|
331
|
-
isOverlay:
|
|
333
|
+
isDisabled: o,
|
|
334
|
+
onFilesAdded: c
|
|
335
|
+
}), p = K({
|
|
336
|
+
isOverlay: n
|
|
332
337
|
});
|
|
333
338
|
return /* @__PURE__ */ f(
|
|
334
|
-
|
|
339
|
+
Q,
|
|
335
340
|
{
|
|
336
|
-
...
|
|
337
|
-
variant:
|
|
341
|
+
...i,
|
|
342
|
+
variant: a,
|
|
338
343
|
messages: l,
|
|
339
344
|
overlayProps: p,
|
|
340
|
-
isDisabled:
|
|
345
|
+
isDisabled: o,
|
|
341
346
|
isMultipleFiles: t,
|
|
342
|
-
children: (() =>
|
|
347
|
+
children: (() => n ? /* @__PURE__ */ f("div", { className: se("file-drop-area--overlay"), ...p.handlers, children: s }) : s)()
|
|
343
348
|
}
|
|
344
349
|
);
|
|
345
350
|
};
|
|
346
|
-
x.DropZone =
|
|
347
|
-
x.BrowseButton =
|
|
348
|
-
x.Error =
|
|
349
|
-
x.AttachedFilesList =
|
|
351
|
+
x.DropZone = oe;
|
|
352
|
+
x.BrowseButton = ee;
|
|
353
|
+
x.Error = te;
|
|
354
|
+
x.AttachedFilesList = ae;
|
|
350
355
|
export {
|
|
351
356
|
x as FileDropArea,
|
|
352
|
-
|
|
357
|
+
ge as MIME_TYPES
|
|
353
358
|
};
|