@sps-woodland/file-upload 7.17.8 → 7.17.10
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/lib/index.es.js +55 -67
- package/package.json +13 -13
package/lib/index.es.js
CHANGED
|
@@ -212,73 +212,61 @@ function G({
|
|
|
212
212
|
)
|
|
213
213
|
) : D(t.dataTransfer.files);
|
|
214
214
|
}
|
|
215
|
-
return /* @__PURE__ */ e.createElement(
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
size: "md",
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
"
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
icon: W.X,
|
|
271
|
-
title: h("design-system:fileUpload.close"),
|
|
272
|
-
onClick: ie
|
|
273
|
-
})), /* @__PURE__ */ e.createElement("form", {
|
|
274
|
-
className: Ce
|
|
275
|
-
}, /* @__PURE__ */ e.createElement("input", {
|
|
276
|
-
ref: d,
|
|
277
|
-
type: "file",
|
|
278
|
-
accept: J || "*/*",
|
|
279
|
-
multiple: a || void 0,
|
|
280
|
-
onChange: se
|
|
281
|
-
})));
|
|
215
|
+
return /* @__PURE__ */ e.createElement(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
onDrop: de,
|
|
219
|
+
onDragOver: re,
|
|
220
|
+
onDragLeave: ce,
|
|
221
|
+
onDragEnter: pe,
|
|
222
|
+
className: I(Se({ active: Q, mini: v, error: g, shown: q }), K),
|
|
223
|
+
...Z
|
|
224
|
+
},
|
|
225
|
+
/* @__PURE__ */ e.createElement("div", { className: I(Ee({ constrainContentWidth: i })) }, n ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(he, { size: "md", "aria-hidden": "true" }), /* @__PURE__ */ e.createElement("div", { className: X }, h("design-system:fileUpload.processing"))) : /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(
|
|
226
|
+
ve,
|
|
227
|
+
{
|
|
228
|
+
className: je({ mini: v, error: g }),
|
|
229
|
+
icon: g ? "exclamation-circle" : "upload-cloud",
|
|
230
|
+
"aria-hidden": "true"
|
|
231
|
+
}
|
|
232
|
+
), /* @__PURE__ */ e.createElement("div", { className: De({ mini: v }) }, g ? /* @__PURE__ */ e.createElement("div", null, h(
|
|
233
|
+
j.length > 1 ? "design-system:fileUpload.cancelled_plural" : "design-system:fileUpload.cancelled"
|
|
234
|
+
)) : /* @__PURE__ */ e.createElement("div", null, h("design-system:fileUpload.title", { description: te }))), g ? /* @__PURE__ */ e.createElement("div", { className: ye }, new Set(
|
|
235
|
+
j.map((t, s) => {
|
|
236
|
+
const f = Math.floor(t.length / 2);
|
|
237
|
+
return /* @__PURE__ */ e.createElement("div", { className: xe, key: t }, /* @__PURE__ */ e.createElement("span", { className: k }, t.substr(0, f)), /* @__PURE__ */ e.createElement("div", { className: k }, /* @__PURE__ */ e.createElement("span", null, t.substr(f))), s < j.length - 1 ? "," : "");
|
|
238
|
+
})
|
|
239
|
+
)) : /* @__PURE__ */ e.createElement("span", null), /* @__PURE__ */ e.createElement("div", { className: X }, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("span", null, O[0]), /* @__PURE__ */ e.createElement("a", { href: "", onClick: oe }, O[1]), /* @__PURE__ */ e.createElement("span", null, O[2]))), /* @__PURE__ */ e.createElement("div", { className: Oe }, p ? /* @__PURE__ */ e.createElement("span", null, "(", " ", h("design-system:fileUpload.acceptedTypes", {
|
|
240
|
+
fileTypes: $
|
|
241
|
+
}), " ", ")") : "", c ? /* @__PURE__ */ e.createElement("span", null, "( ", h("design-system:fileUpload.maximumSize", { size: c }), " )") : "", F ? /* @__PURE__ */ e.createElement("span", null, " ", F, " ") : ""), w && /* @__PURE__ */ e.createElement("div", { className: Ue }, /* @__PURE__ */ e.createElement(
|
|
242
|
+
B,
|
|
243
|
+
{
|
|
244
|
+
kind: V.LINK,
|
|
245
|
+
icon: W.DOWNLOAD_CLOUD,
|
|
246
|
+
onClick: ne
|
|
247
|
+
},
|
|
248
|
+
w
|
|
249
|
+
)))),
|
|
250
|
+
l && !n && /* @__PURE__ */ e.createElement("div", { className: be }, /* @__PURE__ */ e.createElement(
|
|
251
|
+
B,
|
|
252
|
+
{
|
|
253
|
+
kind: V.ICON,
|
|
254
|
+
icon: W.X,
|
|
255
|
+
title: h("design-system:fileUpload.close"),
|
|
256
|
+
onClick: ie
|
|
257
|
+
}
|
|
258
|
+
)),
|
|
259
|
+
/* @__PURE__ */ e.createElement("form", { className: Ce }, /* @__PURE__ */ e.createElement(
|
|
260
|
+
"input",
|
|
261
|
+
{
|
|
262
|
+
ref: d,
|
|
263
|
+
type: "file",
|
|
264
|
+
accept: J || "*/*",
|
|
265
|
+
multiple: a || void 0,
|
|
266
|
+
onChange: se
|
|
267
|
+
}
|
|
268
|
+
))
|
|
269
|
+
);
|
|
282
270
|
}
|
|
283
271
|
ue.set(G, {
|
|
284
272
|
name: "FileUpload",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/file-upload",
|
|
3
3
|
"description": "SPS Woodland Design System file upload component",
|
|
4
|
-
"version": "7.17.
|
|
4
|
+
"version": "7.17.10",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/file-upload",
|
|
@@ -26,28 +26,28 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
+
"@sps-woodland/core": "7.17.10",
|
|
30
|
+
"@sps-woodland/tokens": "7.17.10",
|
|
31
|
+
"@spscommerce/ds-colors": "7.17.10",
|
|
32
|
+
"@spscommerce/ds-react": "7.17.10",
|
|
33
|
+
"@spscommerce/ds-shared": "7.17.10",
|
|
29
34
|
"@spscommerce/ds-illustrations": "6.37.3",
|
|
30
35
|
"@spscommerce/utils": "^6.12.1",
|
|
31
36
|
"react": "^16.14.0",
|
|
32
|
-
"react-dom": "^16.14.0"
|
|
33
|
-
"@sps-woodland/core": "7.17.8",
|
|
34
|
-
"@sps-woodland/tokens": "7.17.8",
|
|
35
|
-
"@spscommerce/ds-colors": "7.17.8",
|
|
36
|
-
"@spscommerce/ds-shared": "7.17.8",
|
|
37
|
-
"@spscommerce/ds-react": "7.17.8"
|
|
37
|
+
"react-dom": "^16.14.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@sps-woodland/core": "7.17.10",
|
|
41
|
+
"@sps-woodland/tokens": "7.17.10",
|
|
42
|
+
"@spscommerce/ds-colors": "7.17.10",
|
|
40
43
|
"@spscommerce/ds-illustrations": "6.37.3",
|
|
44
|
+
"@spscommerce/ds-react": "7.17.10",
|
|
45
|
+
"@spscommerce/ds-shared": "7.17.10",
|
|
41
46
|
"@spscommerce/utils": "^6.12.1",
|
|
42
47
|
"@vanilla-extract/css": "^1.9.3",
|
|
43
48
|
"@vanilla-extract/recipes": "^0.2.5",
|
|
44
49
|
"react": "^16.14.0",
|
|
45
|
-
"react-dom": "^16.14.0"
|
|
46
|
-
"@sps-woodland/core": "7.17.8",
|
|
47
|
-
"@sps-woodland/tokens": "7.17.8",
|
|
48
|
-
"@spscommerce/ds-colors": "7.17.8",
|
|
49
|
-
"@spscommerce/ds-react": "7.17.8",
|
|
50
|
-
"@spscommerce/ds-shared": "7.17.8"
|
|
50
|
+
"react-dom": "^16.14.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "pnpm run build:js && pnpm run build:types",
|