@sps-woodland/file-upload 8.2.2 → 8.3.1

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 CHANGED
@@ -211,73 +211,53 @@ function k({
211
211
  )
212
212
  ) : D(t.dataTransfer.files);
213
213
  }
214
- return /* @__PURE__ */ e.createElement("div", {
215
- onDrop: pe,
216
- onDragOver: ne,
217
- onDragLeave: re,
218
- onDragEnter: se,
219
- className: B(xe({ active: _, mini: v, error: g, shown: Z }), X),
220
- ...G
221
- }, /* @__PURE__ */ e.createElement("div", {
222
- className: B(be({ constrainContentWidth: i }))
223
- }, n ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(ue, {
224
- size: "md",
225
- "aria-hidden": "true"
226
- }), /* @__PURE__ */ e.createElement("div", {
227
- className: L
228
- }, h("design-system:fileUpload.processing"))) : /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(me, {
229
- className: Ue({ mini: v, error: g }),
230
- icon: g ? "exclamation-circle" : "upload-cloud",
231
- "aria-hidden": "true"
232
- }), /* @__PURE__ */ e.createElement("div", {
233
- className: je({ mini: v })
234
- }, g ? /* @__PURE__ */ e.createElement("div", null, h(
235
- j.length > 1 ? "design-system:fileUpload.cancelled_plural" : "design-system:fileUpload.cancelled"
236
- )) : /* @__PURE__ */ e.createElement("div", null, h("design-system:fileUpload.title", { description: $ }))), g ? /* @__PURE__ */ e.createElement("div", {
237
- className: Fe
238
- }, new Set(
239
- j.map((t, s) => {
240
- const f = Math.floor(t.length / 2);
241
- return /* @__PURE__ */ e.createElement("div", {
242
- className: ge,
243
- key: t
244
- }, /* @__PURE__ */ e.createElement("span", {
245
- className: R
246
- }, t.substr(0, f)), /* @__PURE__ */ e.createElement("div", {
247
- className: R
248
- }, /* @__PURE__ */ e.createElement("span", null, t.substr(f))), s < j.length - 1 ? "," : "");
249
- })
250
- )) : /* @__PURE__ */ e.createElement("span", null), /* @__PURE__ */ e.createElement("div", {
251
- className: L
252
- }, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("span", null, O[0]), /* @__PURE__ */ e.createElement("a", {
253
- href: "",
254
- onClick: ae
255
- }, O[1]), /* @__PURE__ */ e.createElement("span", null, O[2]))), /* @__PURE__ */ e.createElement("div", {
256
- className: Ce
257
- }, p ? /* @__PURE__ */ e.createElement("span", null, "(", " ", h("design-system:fileUpload.acceptedTypes", {
258
- fileTypes: Y
259
- }), " ", ")") : "", 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", {
260
- className: Ee
261
- }, /* @__PURE__ */ e.createElement(I, {
262
- kind: "link",
263
- icon: "download-cloud",
264
- onClick: le
265
- }, w)))), l && !n && /* @__PURE__ */ e.createElement("div", {
266
- className: ye
267
- }, /* @__PURE__ */ e.createElement(I, {
268
- kind: "icon",
269
- icon: "x",
270
- title: h("design-system:fileUpload.close"),
271
- onClick: ee
272
- })), /* @__PURE__ */ e.createElement("form", {
273
- className: Se
274
- }, /* @__PURE__ */ e.createElement("input", {
275
- ref: d,
276
- type: "file",
277
- accept: H || "*/*",
278
- multiple: a || void 0,
279
- onChange: oe
280
- })));
214
+ return /* @__PURE__ */ e.createElement(
215
+ "div",
216
+ {
217
+ onDrop: pe,
218
+ onDragOver: ne,
219
+ onDragLeave: re,
220
+ onDragEnter: se,
221
+ className: B(xe({ active: _, mini: v, error: g, shown: Z }), X),
222
+ ...G
223
+ },
224
+ /* @__PURE__ */ e.createElement("div", { className: B(be({ constrainContentWidth: i })) }, n ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(ue, { size: "md", "aria-hidden": "true" }), /* @__PURE__ */ e.createElement("div", { className: L }, h("design-system:fileUpload.processing"))) : /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(
225
+ me,
226
+ {
227
+ className: Ue({ mini: v, error: g }),
228
+ icon: g ? "exclamation-circle" : "upload-cloud",
229
+ "aria-hidden": "true"
230
+ }
231
+ ), /* @__PURE__ */ e.createElement("div", { className: je({ mini: v }) }, g ? /* @__PURE__ */ e.createElement("div", null, h(
232
+ j.length > 1 ? "design-system:fileUpload.cancelled_plural" : "design-system:fileUpload.cancelled"
233
+ )) : /* @__PURE__ */ e.createElement("div", null, h("design-system:fileUpload.title", { description: $ }))), g ? /* @__PURE__ */ e.createElement("div", { className: Fe }, new Set(
234
+ j.map((t, s) => {
235
+ const f = Math.floor(t.length / 2);
236
+ return /* @__PURE__ */ e.createElement("div", { className: ge, key: t }, /* @__PURE__ */ e.createElement("span", { className: R }, t.substr(0, f)), /* @__PURE__ */ e.createElement("div", { className: R }, /* @__PURE__ */ e.createElement("span", null, t.substr(f))), s < j.length - 1 ? "," : "");
237
+ })
238
+ )) : /* @__PURE__ */ e.createElement("span", null), /* @__PURE__ */ e.createElement("div", { className: L }, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("span", null, O[0]), /* @__PURE__ */ e.createElement("a", { href: "", onClick: ae }, O[1]), /* @__PURE__ */ e.createElement("span", null, O[2]))), /* @__PURE__ */ e.createElement("div", { className: Ce }, p ? /* @__PURE__ */ e.createElement("span", null, "(", " ", h("design-system:fileUpload.acceptedTypes", {
239
+ fileTypes: Y
240
+ }), " ", ")") : "", 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: Ee }, /* @__PURE__ */ e.createElement(I, { kind: "link", icon: "download-cloud", onClick: le }, w)))),
241
+ l && !n && /* @__PURE__ */ e.createElement("div", { className: ye }, /* @__PURE__ */ e.createElement(
242
+ I,
243
+ {
244
+ kind: "icon",
245
+ icon: "x",
246
+ title: h("design-system:fileUpload.close"),
247
+ onClick: ee
248
+ }
249
+ )),
250
+ /* @__PURE__ */ e.createElement("form", { className: Se }, /* @__PURE__ */ e.createElement(
251
+ "input",
252
+ {
253
+ ref: d,
254
+ type: "file",
255
+ accept: H || "*/*",
256
+ multiple: a || void 0,
257
+ onChange: oe
258
+ }
259
+ ))
260
+ );
281
261
  }
282
262
  de.set(k, {
283
263
  name: "FileUpload",
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- .rh07jw0{border-width:.0625rem;border-style:dashed;border-radius:.25rem;display:block;padding:1rem;position:relative}.rh07jw1{background-color:#f4ecf2;border-color:#91467f;border-style:solid}.rh07jw3{padding:1rem}.rh07jw5{border-color:#de002e}.rh07jw8{display:none}.rh07jw9{color:#4b5356;margin:0 auto;text-align:center}.rh07jwa{width:50%}.rh07jwc{font-size:.75rem;line-height:1.25rem}.rh07jwd{color:#717779;display:block;margin-bottom:.25rem}.rh07jwe{font-size:1.5rem;line-height:1.5rem}.rh07jwf{font-size:3rem;line-height:3rem}.rh07jwg{color:#de002e}.rh07jwi{font-weight:600;margin-bottom:.25rem}.rh07jwj{font-size:1rem;line-height:1.25rem}.rh07jwk{font-size:1.125rem;line-height:1.25rem}.rh07jwl{font-size:.875rem;font-weight:600;line-height:1.25rem}.rh07jwm{display:flex;justify-content:center;white-space:nowrap}.rh07jwn{max-width:50%;overflow:hidden}.rh07jwn:first-child{text-overflow:ellipsis}.rh07jwn:last-child{float:right}.rh07jwo{font-size:.75rem;line-height:1.125rem;margin-top:.25rem}.rh07jwo>span+span{margin-left:.125rem}.rh07jwp{margin-top:1rem}.rh07jwq{position:absolute;right:.5rem;top:.5rem}.rh07jwr{display:none}
1
+ .rh07jw0{border-width:.0625rem;border-style:dashed;border-radius:.25rem;display:block;padding:1rem;position:relative}.rh07jw1{background-color:oklch(95.1% .012 334.08);border-color:oklch(50.83% .125 337.21);border-style:solid}.rh07jw3{padding:1rem}.rh07jw5{border-color:oklch(56.83% .229 22.94)}.rh07jw8{display:none}.rh07jw9{color:oklch(43.62% .011 222.24);margin:0 auto;text-align:center}.rh07jwa{width:50%}.rh07jwc{font-size:.75rem;line-height:1.25rem}.rh07jwd{color:oklch(56.48% .008 219.62);display:block;margin-bottom:.25rem}.rh07jwe{font-size:1.5rem;line-height:1.5rem}.rh07jwf{font-size:3rem;line-height:3rem}.rh07jwg{color:oklch(56.83% .229 22.94)}.rh07jwi{font-weight:600;margin-bottom:.25rem}.rh07jwj{font-size:1rem;line-height:1.25rem}.rh07jwk{font-size:1.125rem;line-height:1.25rem}.rh07jwl{font-size:.875rem;font-weight:600;line-height:1.25rem}.rh07jwm{display:flex;justify-content:center;white-space:nowrap}.rh07jwn{max-width:50%;overflow:hidden}.rh07jwn:first-child{text-overflow:ellipsis}.rh07jwn:last-child{float:right}.rh07jwo{font-size:.75rem;line-height:1.125rem;margin-top:.25rem}.rh07jwo>span+span{margin-left:.125rem}.rh07jwp{margin-top:1rem}.rh07jwq{position:absolute;right:.5rem;top:.5rem}.rh07jwr{display:none}
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": "8.2.2",
4
+ "version": "8.3.1",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/file-upload",
@@ -30,11 +30,11 @@
30
30
  "@spscommerce/ds-illustrations": "^6.12.1",
31
31
  "react": "^16.14.0",
32
32
  "react-dom": "^16.14.0",
33
- "@sps-woodland/core": "8.2.2",
34
- "@sps-woodland/tokens": "8.2.2",
35
- "@sps-woodland/buttons": "8.2.2",
36
- "@spscommerce/ds-react": "8.2.2",
37
- "@spscommerce/ds-shared": "8.2.2"
33
+ "@sps-woodland/core": "8.3.1",
34
+ "@sps-woodland/tokens": "8.3.1",
35
+ "@sps-woodland/buttons": "8.3.1",
36
+ "@spscommerce/ds-react": "8.3.1",
37
+ "@spscommerce/ds-shared": "8.3.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@spscommerce/utils": "^6.12.1",
@@ -43,12 +43,12 @@
43
43
  "@vanilla-extract/recipes": "^0.2.5",
44
44
  "react": "^16.14.0",
45
45
  "react-dom": "^16.14.0",
46
- "@sps-woodland/core": "8.2.2",
47
- "@sps-woodland/tokens": "8.2.2",
48
- "@sps-woodland/buttons": "8.2.2",
49
- "@spscommerce/ds-react": "8.2.2",
50
- "@spscommerce/ds-shared": "8.2.2",
51
- "@spscommerce/ds-colors": "8.2.2"
46
+ "@sps-woodland/core": "8.3.1",
47
+ "@sps-woodland/tokens": "8.3.1",
48
+ "@sps-woodland/buttons": "8.3.1",
49
+ "@spscommerce/ds-react": "8.3.1",
50
+ "@spscommerce/ds-shared": "8.3.1",
51
+ "@spscommerce/ds-colors": "8.3.1"
52
52
  },
53
53
  "scripts": {
54
54
  "build": "pnpm run build:js && pnpm run build:types",