@sps-woodland/file-upload 8.0.0-rc1 → 8.0.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/lib/index.cjs.js +10 -10
- package/lib/index.es.js +206 -131
- package/lib/mime-type.enum.d.ts +76 -75
- package/package.json +12 -12
package/lib/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const de=require("react"),w=require("@sps-woodland/core"),p=require("@spscommerce/utils"),V=require("@sps-woodland/buttons");function ue(t){if(t&&t.__esModule)return t;const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(l,a,o.get?o:{enumerable:!0,get:()=>t[a]})}}return l.default=t,Object.freeze(l)}const e=ue(de),z={"7Z":["application/x-7z-compressed"],AAC:["audio/aac"],ABW:["application/x-abiword"],ARC:["application/octet-stream"],AVI:["video/x-msvideo"],AZW:["application/vnd.amazon.ebook"],BIN:["application/octet-stream"],BMP:["image/bmp"],BZ:["application/x-bzip"],BZ2:["application/x-bzip2"],CER:["application/pkix-cert","application/x-x509-ca-cert"],CSH:["application/x-csh"],CSS:["text/css"],CSV:["text/csv,application/vnd.ms-excel"],DOC:["application/msword"],DOCX:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],EOT:["application/vnd.ms-fontobject"],EPUB:["application/epub+zip"],ES:["application/ecmascript"],FLV:["video/x-flv"],GIF:["image/gif"],GZ:["application/x-gzip"],HTM:["text/html"],HTML:["text/html"],ICO:["image/x-icon"],ICS:["text/calendar"],JAR:["application/java-archive"],JPEG:["image/jpeg"],JPG:["image/jpeg"],JS:["application/javascript"],JSON:["application/json"],M3U:["audio/x-mpequrl"],MID:["audio/midi"],MIDI:["audio/midi"],MOV:["video/quicktime"],MP3:["audio/mpeg3"],MP4:["video/mp4"],MPEG:["video/mpeg"],MPKG:["application/vnd.apple.installer+xml"],ODP:["application/vnd.oasis.opendocument.presentation"],ODS:["application/vnd.oasis.opendocument.spreadsheet"],ODT:["application/vnd.oasis.opendocument.text"],OGA:["audio/ogg"],OGV:["video/ogg"],OGX:["application/ogg"],OTF:["font/otf"],PNG:["image/png"],PDF:["application/pdf"],PPT:["application/vnd.ms-powerpoint"],PPTX:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],RAR:["application/x-rar-compressed"],RTF:["application/rtf"],SH:["application/x-sh"],SVG:["image/svg+xml"],SWF:["application/x-shockwave-flash"],TAR:["application/x-tar"],TIF:["image/tiff"],TIFF:["image/tiff"],TS:["application/typescript"],TTF:["font/ttf"],TXT:["text/plain"],VSD:["application/vnd.visio"],WAV:["audio/wav"],WEBA:["audio/webm"],WEBM:["video/webm"],WEBP:["image/webp"],WOFF:["font/woff"],WOFF2:["font/woff2"],XHTML:["application/xhtml+xml"],XLS:["application/vnd.ms-excel"],XLSX:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],XML:["application/xml"],XUL:["application/vnd.mozilla.xul+xml"],ZIP:["application/zip"]};function fe(t,l,a){return l in t?Object.defineProperty(t,l,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[l]=a,t}function R(t,l){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);l&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,o)}return a}function W(t){for(var l=1;l<arguments.length;l++){var a=arguments[l]!=null?arguments[l]:{};l%2?R(Object(a),!0).forEach(function(o){fe(t,o,a[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):R(Object(a)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(a,o))})}return t}var me=(t,l,a)=>{for(var o of Object.keys(t)){var n;if(t[o]!==((n=l[o])!==null&&n!==void 0?n:a[o]))return!1}return!0},j=t=>l=>{var a=t.defaultClassName,o=W(W({},t.defaultVariants),l);for(var n in o){var v,g=(v=o[n])!==null&&v!==void 0?v:t.defaultVariants[n];if(g!=null){var c=g;typeof c=="boolean"&&(c=c===!0?"true":"false");var d=t.variantClassNames[n][c];d&&(a+=" "+d)}}for(var[x,C]of t.compoundVariants)me(x,o,t.defaultVariants)&&(a+=" "+C);return a},he="rh07jwm",k="rh07jwn",ve="rh07jwl",we=j({defaultClassName:"rh07jw0",variantClassNames:{active:{true:"rh07jw1",false:"rh07jw2"},mini:{true:"rh07jw3",false:"rh07jw4"},error:{true:"rh07jw5",false:"rh07jw6"},shown:{true:"rh07jw7",false:"rh07jw8"}},defaultVariants:{active:!1,mini:!1,error:!1,shown:!0},compoundVariants:[]}),ge="rh07jwq",Fe=j({defaultClassName:"rh07jw9",variantClassNames:{constrainContentWidth:{true:"rh07jwa",false:"rh07jwb"}},defaultVariants:{constrainContentWidth:!1},compoundVariants:[]}),xe="rh07jwp",be="rh07jwr",ye=j({defaultClassName:"rh07jwd",variantClassNames:{mini:{true:"rh07jwe",false:"rh07jwf"},error:{true:"rh07jwg",false:"rh07jwh"}},defaultVariants:{mini:!1,error:!1},compoundVariants:[]}),L="rh07jwc",Se="rh07jwo",Ee=j({defaultClassName:"rh07jwi",variantClassNames:{mini:{true:"rh07jwj",false:"rh07jwk"}},defaultVariants:{mini:!1},compoundVariants:[]});function N({constrainContentWidth:t,description:l,multiple:a=!1,dismissable:o,processing:n,mini:v,downloadLabel:g,acceptExtensions:c,maxSize:d,customRequirement:x,onSelection:C,onDismiss:P,download:M,shown:b,className:X,children:Ce,...G}){const y=e.useRef(new Set),[_,A]=e.useState(b),[Oe,q]=e.useState([]),[Z,H]=e.useState(""),[B,J]=e.useState(),[K,S]=e.useState(!1),[F,E]=e.useState(!1),[O,I]=e.useState([]),[Y,Q]=e.useState(""),{t:h}=e.useContext(w.I18nContext),D=h(a?"design-system:fileUpload.instructions_plural":"design-system:fileUpload.instructions").split("|"),$=l||(a?"Files":"File"),u=e.useRef(null);e.useEffect(()=>{b&&A(b)},[b]),e.useEffect(()=>{d&&te(d)},[d]),e.useEffect(()=>{c&&ie(c)},[c]);function ee(){o&&(A(!1),P&&P())}function te(i){try{J(p.parseFileSize(i))}catch{throw new Error(`Could not parse "${i}" as a file size.`)}}function ie(i){const f=(Array.isArray(i)?i:i.trim().split(/\s?,\s?/)).map(m=>m.replace(/^\./,"")),r=f.map(m=>`.${m}`.toLowerCase());Q(r.map((m,U)=>U>0&&U===r.length-1?`or ${m}`:m).join(r.length>2?", ":" ")),y.current.clear();for(const m of f){const U=Object.keys(z).includes(m.toUpperCase())?z[m.toUpperCase()]:[];for(const pe of U)y.current.add(pe)}H(r.concat(Array.from(y.current)).join(","))}function T(i){I([]);let s=[];const f=Array.from(i);for(const r of f)r===null?s.push("Not a file"):(c&&!y.current.has(r.type)&&s.push(r.name),d&&B&&r.size>B&&s.indexOf(r.name)===-1&&s.push(r.name));s.length?(E(!0),u.current&&u.current.value&&(u.current.value="")):(q(f),C(f)),I(s)}function ae(i){i.preventDefault(),E(!1),u.current&&u.current.click()}function oe(){M&&M()}function le(i){i.stopPropagation(),T(i.target.files||[]),u.current&&u.current.value&&(u.current.value="")}function ne(i){i.preventDefault(),i.stopPropagation(),S(!0),E(!1)}function se(i){i.preventDefault(),S(!0),E(!1)}function re(i){i.preventDefault(),S(!1)}function ce(i){i.preventDefault(),i.stopPropagation(),S(!1),i.dataTransfer.items?T(Array.from(i.dataTransfer.items).map(s=>s.getAsFile())):T(i.dataTransfer.files)}return e.createElement("div",{onDrop:ce,onDragOver:ne,onDragLeave:re,onDragEnter:se,className:w.cl(we({active:K,mini:v,error:F,shown:_}),X),...G},e.createElement("div",{className:w.cl(Fe({constrainContentWidth:t}))},n?e.createElement("div",null,e.createElement(w.Spinner,{size:"md","aria-hidden":"true"}),e.createElement("div",{className:L},h("design-system:fileUpload.processing"))):e.createElement("div",null,e.createElement(w.Icon,{className:ye({mini:v,error:F}),icon:F?"exclamation-circle":"upload-cloud","aria-hidden":"true"}),e.createElement("div",{className:Ee({mini:v})},F?e.createElement("div",null,h(O.length>1?"design-system:fileUpload.cancelled_plural":"design-system:fileUpload.cancelled")):e.createElement("div",null,h("design-system:fileUpload.title",{description:$}))),F?e.createElement("div",{className:ve},new Set(O.map((i,s)=>{const f=Math.floor(i.length/2);return e.createElement("div",{className:he,key:i},e.createElement("span",{className:k},i.substr(0,f)),e.createElement("div",{className:k},e.createElement("span",null,i.substr(f))),s<O.length-1?",":"")}))):e.createElement("span",null),e.createElement("div",{className:L},e.createElement("div",null,e.createElement("span",null,D[0]),e.createElement("a",{href:"",onClick:ae},D[1]),e.createElement("span",null,D[2]))),e.createElement("div",{className:Se},c?e.createElement("span",null,"("," ",h("design-system:fileUpload.acceptedTypes",{fileTypes:Y})," ",")"):"",d?e.createElement("span",null,"( ",h("design-system:fileUpload.maximumSize",{size:d})," )"):"",x?e.createElement("span",null," ",x," "):""),g&&e.createElement("div",{className:xe},e.createElement(V.Button,{kind:"link",icon:"download-cloud",onClick:oe},g)))),o&&!n&&e.createElement("div",{className:ge},e.createElement(V.Button,{kind:"icon",icon:"x",title:h("design-system:fileUpload.close"),onClick:ee})),e.createElement("form",{className:be},e.createElement("input",{ref:u,type:"file",accept:Z||"*/*",multiple:a||void 0,onChange:le})))}w.Metadata.set(N,{name:"FileUpload",props:{constrainContentWidth:{type:"boolean"},description:{type:"string"},multiple:{type:"boolean"},dismissable:{type:"boolean"},mini:{type:"boolean"},downloadLabel:{type:"string"},acceptExtensions:{type:"string[] | string"},maxSize:{type:"string"},customRequirement:{type:"string"},onSelection:{type:"(files: File[]) => void",required:!0},dismissal:{type:"() => void"},download:{type:"() => void"}}});const Ue={components:[N],examples:{basic:{label:"Basic File Upload",description:"Simply allow the user to drag-and-drop or select a single file or multiple files at once.",examples:{basic:{description:"Single file upload",react:p.code`
|
|
2
2
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
3
3
|
|
|
4
4
|
function Component() {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<FileUpload onSelection={selectFile} />
|
|
11
11
|
)
|
|
12
12
|
}
|
|
13
|
-
`},multiple:{description:"Multiple file upload",react:
|
|
13
|
+
`},multiple:{description:"Multiple file upload",react:p.code`
|
|
14
14
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
15
15
|
|
|
16
16
|
function Component() {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<FileUpload onSelection={selectFile} multiple />
|
|
23
23
|
)
|
|
24
24
|
}
|
|
25
|
-
`}}},restrictions:{label:"Restrictions",description:"You can place restrictions on what files will be accepted with an extension whitelist and/or a maximum size.",examples:{maxSize:{description:"Maximum size",react:
|
|
25
|
+
`}}},restrictions:{label:"Restrictions",description:"You can place restrictions on what files will be accepted with an extension whitelist and/or a maximum size.",examples:{maxSize:{description:"Maximum size",react:p.code`
|
|
26
26
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
27
27
|
|
|
28
28
|
function Component() {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<FileUpload onSelection={selectFile} maxSize="100KB" />
|
|
35
35
|
)
|
|
36
36
|
}
|
|
37
|
-
`},fileWhitelist:{description:"File type whitelist",react:
|
|
37
|
+
`},fileWhitelist:{description:"File type whitelist",react:p.code`
|
|
38
38
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
39
39
|
|
|
40
40
|
function Component() {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
/>
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
|
-
`},bothRestrictions:{description:"Both restrictions",react:
|
|
54
|
+
`},bothRestrictions:{description:"Both restrictions",react:p.code`
|
|
55
55
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
56
56
|
|
|
57
57
|
function Component() {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
/>
|
|
70
70
|
)
|
|
71
71
|
}
|
|
72
|
-
`}}},dismissable:{label:"Dismissable",description:"With this option, the file upload component can be dismissed by the user. If the user does dismiss it, you can show it again programmatically if you need to.",examples:{basic:{react:
|
|
72
|
+
`}}},dismissable:{label:"Dismissable",description:"With this option, the file upload component can be dismissed by the user. If the user does dismiss it, you can show it again programmatically if you need to.",examples:{basic:{react:p.code`
|
|
73
73
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
74
74
|
import { Button } from "@sps-woodland/buttons";
|
|
75
75
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
</>
|
|
100
100
|
)
|
|
101
101
|
}
|
|
102
|
-
`}}},download:{label:"Download Button",description:"You can optionally provide a button to download a file. Typically this will be a template for whatever the user is expected to upload. They can then fill out the template, save it, and upload it.",examples:{basic:{react:
|
|
102
|
+
`}}},download:{label:"Download Button",description:"You can optionally provide a button to download a file. Typically this will be a template for whatever the user is expected to upload. They can then fill out the template, save it, and upload it.",examples:{basic:{react:p.code`
|
|
103
103
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
104
104
|
|
|
105
105
|
function Component() {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
/>
|
|
122
122
|
)
|
|
123
123
|
}
|
|
124
|
-
`}}},mini:{label:"Mini File Upload",description:"When the file upload component is to be placed in a small container, it should be marked as a mini file upload so that everything fits.",examples:{basic:{react:
|
|
124
|
+
`}}},mini:{label:"Mini File Upload",description:"When the file upload component is to be placed in a small container, it should be marked as a mini file upload so that everything fits.",examples:{basic:{react:p.code`
|
|
125
125
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
126
126
|
|
|
127
127
|
function Component() {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
</div>
|
|
138
138
|
)
|
|
139
139
|
}
|
|
140
|
-
`}}},constrainContentWidth:{label:"Constrain Content Width",description:"If this prop is provided, the content will be restricted to 50% of the overall width of the component. Consult your product designer if you're not sure whether to use this variant.",examples:{basic:{react:
|
|
140
|
+
`}}},constrainContentWidth:{label:"Constrain Content Width",description:"If this prop is provided, the content will be restricted to 50% of the overall width of the component. Consult your product designer if you're not sure whether to use this variant.",examples:{basic:{react:p.code`
|
|
141
141
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
142
142
|
|
|
143
143
|
function Component() {
|
|
@@ -153,4 +153,4 @@
|
|
|
153
153
|
</div>
|
|
154
154
|
)
|
|
155
155
|
}
|
|
156
|
-
`}}}}},
|
|
156
|
+
`}}}}},je={"File Upload":Ue};exports.FileUpload=N;exports.MANIFEST=je;
|
package/lib/index.es.js
CHANGED
|
@@ -1,210 +1,285 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { Metadata as de, I18nContext as fe, cl as B, Spinner as ue, Icon as me } from "@sps-woodland/core";
|
|
3
3
|
import { parseFileSize as he, code as m } from "@spscommerce/utils";
|
|
4
|
-
import { Button as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { Button as I } from "@sps-woodland/buttons";
|
|
5
|
+
const V = {
|
|
6
|
+
"7Z": ["application/x-7z-compressed"],
|
|
7
|
+
AAC: ["audio/aac"],
|
|
8
|
+
ABW: ["application/x-abiword"],
|
|
9
|
+
ARC: ["application/octet-stream"],
|
|
10
|
+
AVI: ["video/x-msvideo"],
|
|
11
|
+
AZW: ["application/vnd.amazon.ebook"],
|
|
12
|
+
BIN: ["application/octet-stream"],
|
|
13
|
+
BMP: ["image/bmp"],
|
|
14
|
+
BZ: ["application/x-bzip"],
|
|
15
|
+
BZ2: ["application/x-bzip2"],
|
|
16
|
+
CER: ["application/pkix-cert", "application/x-x509-ca-cert"],
|
|
17
|
+
CSH: ["application/x-csh"],
|
|
18
|
+
CSS: ["text/css"],
|
|
19
|
+
CSV: ["text/csv,application/vnd.ms-excel"],
|
|
20
|
+
DOC: ["application/msword"],
|
|
21
|
+
DOCX: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
|
22
|
+
EOT: ["application/vnd.ms-fontobject"],
|
|
23
|
+
EPUB: ["application/epub+zip"],
|
|
24
|
+
ES: ["application/ecmascript"],
|
|
25
|
+
FLV: ["video/x-flv"],
|
|
26
|
+
GIF: ["image/gif"],
|
|
27
|
+
GZ: ["application/x-gzip"],
|
|
28
|
+
HTM: ["text/html"],
|
|
29
|
+
HTML: ["text/html"],
|
|
30
|
+
ICO: ["image/x-icon"],
|
|
31
|
+
ICS: ["text/calendar"],
|
|
32
|
+
JAR: ["application/java-archive"],
|
|
33
|
+
JPEG: ["image/jpeg"],
|
|
34
|
+
JPG: ["image/jpeg"],
|
|
35
|
+
JS: ["application/javascript"],
|
|
36
|
+
JSON: ["application/json"],
|
|
37
|
+
M3U: ["audio/x-mpequrl"],
|
|
38
|
+
MID: ["audio/midi"],
|
|
39
|
+
MIDI: ["audio/midi"],
|
|
40
|
+
MOV: ["video/quicktime"],
|
|
41
|
+
MP3: ["audio/mpeg3"],
|
|
42
|
+
MP4: ["video/mp4"],
|
|
43
|
+
MPEG: ["video/mpeg"],
|
|
44
|
+
MPKG: ["application/vnd.apple.installer+xml"],
|
|
45
|
+
ODP: ["application/vnd.oasis.opendocument.presentation"],
|
|
46
|
+
ODS: ["application/vnd.oasis.opendocument.spreadsheet"],
|
|
47
|
+
ODT: ["application/vnd.oasis.opendocument.text"],
|
|
48
|
+
OGA: ["audio/ogg"],
|
|
49
|
+
OGV: ["video/ogg"],
|
|
50
|
+
OGX: ["application/ogg"],
|
|
51
|
+
OTF: ["font/otf"],
|
|
52
|
+
PNG: ["image/png"],
|
|
53
|
+
PDF: ["application/pdf"],
|
|
54
|
+
PPT: ["application/vnd.ms-powerpoint"],
|
|
55
|
+
PPTX: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
|
|
56
|
+
RAR: ["application/x-rar-compressed"],
|
|
57
|
+
RTF: ["application/rtf"],
|
|
58
|
+
SH: ["application/x-sh"],
|
|
59
|
+
SVG: ["image/svg+xml"],
|
|
60
|
+
SWF: ["application/x-shockwave-flash"],
|
|
61
|
+
TAR: ["application/x-tar"],
|
|
62
|
+
TIF: ["image/tiff"],
|
|
63
|
+
TIFF: ["image/tiff"],
|
|
64
|
+
TS: ["application/typescript"],
|
|
65
|
+
TTF: ["font/ttf"],
|
|
66
|
+
TXT: ["text/plain"],
|
|
67
|
+
VSD: ["application/vnd.visio"],
|
|
68
|
+
WAV: ["audio/wav"],
|
|
69
|
+
WEBA: ["audio/webm"],
|
|
70
|
+
WEBM: ["video/webm"],
|
|
71
|
+
WEBP: ["image/webp"],
|
|
72
|
+
WOFF: ["font/woff"],
|
|
73
|
+
WOFF2: ["font/woff2"],
|
|
74
|
+
XHTML: ["application/xhtml+xml"],
|
|
75
|
+
XLS: ["application/vnd.ms-excel"],
|
|
76
|
+
XLSX: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
77
|
+
XML: ["application/xml"],
|
|
78
|
+
XUL: ["application/vnd.mozilla.xul+xml"],
|
|
79
|
+
ZIP: ["application/zip"]
|
|
80
|
+
};
|
|
81
|
+
function ve(i, o, a) {
|
|
82
|
+
return o in i ? Object.defineProperty(i, o, {
|
|
8
83
|
value: a,
|
|
9
84
|
enumerable: !0,
|
|
10
85
|
configurable: !0,
|
|
11
86
|
writable: !0
|
|
12
|
-
}) :
|
|
87
|
+
}) : i[o] = a, i;
|
|
13
88
|
}
|
|
14
|
-
function
|
|
15
|
-
var a = Object.keys(
|
|
89
|
+
function W(i, o) {
|
|
90
|
+
var a = Object.keys(i);
|
|
16
91
|
if (Object.getOwnPropertySymbols) {
|
|
17
|
-
var l = Object.getOwnPropertySymbols(
|
|
92
|
+
var l = Object.getOwnPropertySymbols(i);
|
|
18
93
|
o && (l = l.filter(function(n) {
|
|
19
|
-
return Object.getOwnPropertyDescriptor(
|
|
94
|
+
return Object.getOwnPropertyDescriptor(i, n).enumerable;
|
|
20
95
|
})), a.push.apply(a, l);
|
|
21
96
|
}
|
|
22
97
|
return a;
|
|
23
98
|
}
|
|
24
|
-
function
|
|
99
|
+
function z(i) {
|
|
25
100
|
for (var o = 1; o < arguments.length; o++) {
|
|
26
101
|
var a = arguments[o] != null ? arguments[o] : {};
|
|
27
|
-
o % 2 ?
|
|
28
|
-
ve(
|
|
29
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
30
|
-
Object.defineProperty(
|
|
102
|
+
o % 2 ? W(Object(a), !0).forEach(function(l) {
|
|
103
|
+
ve(i, l, a[l]);
|
|
104
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(a)) : W(Object(a)).forEach(function(l) {
|
|
105
|
+
Object.defineProperty(i, l, Object.getOwnPropertyDescriptor(a, l));
|
|
31
106
|
});
|
|
32
107
|
}
|
|
33
|
-
return
|
|
108
|
+
return i;
|
|
34
109
|
}
|
|
35
|
-
var we = (
|
|
36
|
-
for (var l of Object.keys(
|
|
110
|
+
var we = (i, o, a) => {
|
|
111
|
+
for (var l of Object.keys(i)) {
|
|
37
112
|
var n;
|
|
38
|
-
if (
|
|
113
|
+
if (i[l] !== ((n = o[l]) !== null && n !== void 0 ? n : a[l]))
|
|
39
114
|
return !1;
|
|
40
115
|
}
|
|
41
116
|
return !0;
|
|
42
|
-
},
|
|
43
|
-
var a =
|
|
117
|
+
}, U = (i) => (o) => {
|
|
118
|
+
var a = i.defaultClassName, l = z(z({}, i.defaultVariants), o);
|
|
44
119
|
for (var n in l) {
|
|
45
|
-
var v, w = (v = l[n]) !== null && v !== void 0 ? v :
|
|
120
|
+
var v, w = (v = l[n]) !== null && v !== void 0 ? v : i.defaultVariants[n];
|
|
46
121
|
if (w != null) {
|
|
47
|
-
var
|
|
48
|
-
typeof
|
|
49
|
-
var
|
|
50
|
-
|
|
122
|
+
var p = w;
|
|
123
|
+
typeof p == "boolean" && (p = p === !0 ? "true" : "false");
|
|
124
|
+
var c = i.variantClassNames[n][p];
|
|
125
|
+
c && (a += " " + c);
|
|
51
126
|
}
|
|
52
127
|
}
|
|
53
|
-
for (var [F,
|
|
54
|
-
we(F, l,
|
|
128
|
+
for (var [F, C] of i.compoundVariants)
|
|
129
|
+
we(F, l, i.defaultVariants) && (a += " " + C);
|
|
55
130
|
return a;
|
|
56
|
-
}, ge = "rh07jwm",
|
|
57
|
-
function
|
|
58
|
-
constrainContentWidth:
|
|
131
|
+
}, ge = "rh07jwm", R = "rh07jwn", Fe = "rh07jwl", xe = U({ defaultClassName: "rh07jw0", variantClassNames: { active: { true: "rh07jw1", false: "rh07jw2" }, mini: { true: "rh07jw3", false: "rh07jw4" }, error: { true: "rh07jw5", false: "rh07jw6" }, shown: { true: "rh07jw7", false: "rh07jw8" } }, defaultVariants: { active: !1, mini: !1, error: !1, shown: !0 }, compoundVariants: [] }), ye = "rh07jwq", be = U({ defaultClassName: "rh07jw9", variantClassNames: { constrainContentWidth: { true: "rh07jwa", false: "rh07jwb" } }, defaultVariants: { constrainContentWidth: !1 }, compoundVariants: [] }), Ee = "rh07jwp", Se = "rh07jwr", Ue = U({ defaultClassName: "rh07jwd", variantClassNames: { mini: { true: "rh07jwe", false: "rh07jwf" }, error: { true: "rh07jwg", false: "rh07jwh" } }, defaultVariants: { mini: !1, error: !1 }, compoundVariants: [] }), L = "rh07jwc", Ce = "rh07jwo", je = U({ defaultClassName: "rh07jwi", variantClassNames: { mini: { true: "rh07jwj", false: "rh07jwk" } }, defaultVariants: { mini: !1 }, compoundVariants: [] });
|
|
132
|
+
function k({
|
|
133
|
+
constrainContentWidth: i,
|
|
59
134
|
description: o,
|
|
60
135
|
multiple: a = !1,
|
|
61
136
|
dismissable: l,
|
|
62
137
|
processing: n,
|
|
63
138
|
mini: v,
|
|
64
139
|
downloadLabel: w,
|
|
65
|
-
acceptExtensions:
|
|
66
|
-
maxSize:
|
|
140
|
+
acceptExtensions: p,
|
|
141
|
+
maxSize: c,
|
|
67
142
|
customRequirement: F,
|
|
68
|
-
onSelection:
|
|
69
|
-
onDismiss:
|
|
70
|
-
download:
|
|
143
|
+
onSelection: C,
|
|
144
|
+
onDismiss: T,
|
|
145
|
+
download: N,
|
|
71
146
|
shown: x,
|
|
72
|
-
className:
|
|
73
|
-
children:
|
|
74
|
-
...
|
|
147
|
+
className: X,
|
|
148
|
+
children: De,
|
|
149
|
+
...G
|
|
75
150
|
}) {
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
x &&
|
|
79
|
-
}, [x]),
|
|
80
|
-
|
|
81
|
-
}, [
|
|
82
|
-
|
|
83
|
-
}, [
|
|
151
|
+
const y = e.useRef(/* @__PURE__ */ new Set()), [Z, P] = e.useState(x), [Te, q] = e.useState([]), [H, J] = e.useState(""), [A, K] = e.useState(), [_, b] = e.useState(!1), [g, E] = e.useState(!1), [j, M] = e.useState([]), [Y, Q] = e.useState(""), { t: h } = e.useContext(fe), O = h(a ? "design-system:fileUpload.instructions_plural" : "design-system:fileUpload.instructions").split("|"), $ = o || (a ? "Files" : "File"), d = e.useRef(null);
|
|
152
|
+
e.useEffect(() => {
|
|
153
|
+
x && P(x);
|
|
154
|
+
}, [x]), e.useEffect(() => {
|
|
155
|
+
c && te(c);
|
|
156
|
+
}, [c]), e.useEffect(() => {
|
|
157
|
+
p && ie(p);
|
|
158
|
+
}, [p]);
|
|
84
159
|
function ee() {
|
|
85
|
-
l && (
|
|
160
|
+
l && (P(!1), T && T());
|
|
86
161
|
}
|
|
87
|
-
function te(
|
|
162
|
+
function te(t) {
|
|
88
163
|
try {
|
|
89
|
-
|
|
164
|
+
K(he(t));
|
|
90
165
|
} catch {
|
|
91
|
-
throw new Error(`Could not parse "${
|
|
166
|
+
throw new Error(`Could not parse "${t}" as a file size.`);
|
|
92
167
|
}
|
|
93
168
|
}
|
|
94
|
-
function ie(
|
|
95
|
-
const f = (Array.isArray(
|
|
96
|
-
|
|
97
|
-
r.map((u,
|
|
98
|
-
),
|
|
169
|
+
function ie(t) {
|
|
170
|
+
const f = (Array.isArray(t) ? t : t.trim().split(/\s?,\s?/)).map((u) => u.replace(/^\./, "")), r = f.map((u) => `.${u}`.toLowerCase());
|
|
171
|
+
Q(
|
|
172
|
+
r.map((u, S) => S > 0 && S === r.length - 1 ? `or ${u}` : u).join(r.length > 2 ? ", " : " ")
|
|
173
|
+
), y.current.clear();
|
|
99
174
|
for (const u of f) {
|
|
100
|
-
const
|
|
101
|
-
for (const
|
|
102
|
-
|
|
175
|
+
const S = Object.keys(V).includes(u.toUpperCase()) ? V[u.toUpperCase()] : [];
|
|
176
|
+
for (const ce of S)
|
|
177
|
+
y.current.add(ce);
|
|
103
178
|
}
|
|
104
|
-
|
|
179
|
+
J(r.concat(Array.from(y.current)).join(","));
|
|
105
180
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
181
|
+
function D(t) {
|
|
182
|
+
M([]);
|
|
108
183
|
let s = [];
|
|
109
|
-
const f = Array.from(
|
|
184
|
+
const f = Array.from(t);
|
|
110
185
|
for (const r of f)
|
|
111
|
-
r === null ? s.push("Not a file") : (
|
|
112
|
-
s.length ? (
|
|
186
|
+
r === null ? s.push("Not a file") : (p && !y.current.has(r.type) && s.push(r.name), c && A && r.size > A && s.indexOf(r.name) === -1 && s.push(r.name));
|
|
187
|
+
s.length ? (E(!0), d.current && d.current.value && (d.current.value = "")) : (q(f), C(f)), M(s);
|
|
113
188
|
}
|
|
114
|
-
function ae(
|
|
115
|
-
|
|
189
|
+
function ae(t) {
|
|
190
|
+
t.preventDefault(), E(!1), d.current && d.current.click();
|
|
116
191
|
}
|
|
117
192
|
function le() {
|
|
118
|
-
|
|
193
|
+
N && N();
|
|
119
194
|
}
|
|
120
|
-
function oe(
|
|
121
|
-
|
|
195
|
+
function oe(t) {
|
|
196
|
+
t.stopPropagation(), D(t.target.files || []), d.current && d.current.value && (d.current.value = "");
|
|
122
197
|
}
|
|
123
|
-
function ne(
|
|
124
|
-
|
|
198
|
+
function ne(t) {
|
|
199
|
+
t.preventDefault(), t.stopPropagation(), b(!0), E(!1);
|
|
125
200
|
}
|
|
126
|
-
function se(
|
|
127
|
-
|
|
201
|
+
function se(t) {
|
|
202
|
+
t.preventDefault(), b(!0), E(!1);
|
|
128
203
|
}
|
|
129
|
-
function re(
|
|
130
|
-
|
|
204
|
+
function re(t) {
|
|
205
|
+
t.preventDefault(), b(!1);
|
|
131
206
|
}
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
Array.from(
|
|
207
|
+
function pe(t) {
|
|
208
|
+
t.preventDefault(), t.stopPropagation(), b(!1), t.dataTransfer.items ? D(
|
|
209
|
+
Array.from(t.dataTransfer.items).map(
|
|
135
210
|
(s) => s.getAsFile()
|
|
136
211
|
)
|
|
137
|
-
) :
|
|
212
|
+
) : D(t.dataTransfer.files);
|
|
138
213
|
}
|
|
139
|
-
return /* @__PURE__ */
|
|
140
|
-
onDrop:
|
|
214
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
215
|
+
onDrop: pe,
|
|
141
216
|
onDragOver: ne,
|
|
142
217
|
onDragLeave: re,
|
|
143
218
|
onDragEnter: se,
|
|
144
|
-
className:
|
|
145
|
-
...
|
|
146
|
-
}, /* @__PURE__ */
|
|
147
|
-
className:
|
|
148
|
-
}, n ? /* @__PURE__ */
|
|
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, {
|
|
149
224
|
size: "md",
|
|
150
225
|
"aria-hidden": "true"
|
|
151
|
-
}), /* @__PURE__ */
|
|
152
|
-
className:
|
|
153
|
-
}, h("design-system:fileUpload.processing"))) : /* @__PURE__ */
|
|
154
|
-
className:
|
|
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 }),
|
|
155
230
|
icon: g ? "exclamation-circle" : "upload-cloud",
|
|
156
231
|
"aria-hidden": "true"
|
|
157
|
-
}), /* @__PURE__ */
|
|
158
|
-
className:
|
|
159
|
-
}, g ? /* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
)) : /* @__PURE__ */
|
|
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", {
|
|
162
237
|
className: Fe
|
|
163
238
|
}, new Set(
|
|
164
|
-
|
|
165
|
-
const f = Math.floor(
|
|
166
|
-
return /* @__PURE__ */
|
|
239
|
+
j.map((t, s) => {
|
|
240
|
+
const f = Math.floor(t.length / 2);
|
|
241
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
167
242
|
className: ge,
|
|
168
|
-
key:
|
|
169
|
-
}, /* @__PURE__ */
|
|
170
|
-
className:
|
|
171
|
-
},
|
|
172
|
-
className:
|
|
173
|
-
}, /* @__PURE__ */
|
|
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 ? "," : "");
|
|
174
249
|
})
|
|
175
|
-
)) : /* @__PURE__ */
|
|
176
|
-
className:
|
|
177
|
-
}, /* @__PURE__ */
|
|
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", {
|
|
178
253
|
href: "",
|
|
179
254
|
onClick: ae
|
|
180
|
-
},
|
|
181
|
-
className:
|
|
182
|
-
},
|
|
183
|
-
fileTypes:
|
|
184
|
-
}), " ", ")") : "",
|
|
185
|
-
className:
|
|
186
|
-
}, /* @__PURE__ */
|
|
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, {
|
|
187
262
|
kind: "link",
|
|
188
263
|
icon: "download-cloud",
|
|
189
264
|
onClick: le
|
|
190
|
-
}, w)))), l && !n && /* @__PURE__ */
|
|
191
|
-
className:
|
|
192
|
-
}, /* @__PURE__ */
|
|
265
|
+
}, w)))), l && !n && /* @__PURE__ */ e.createElement("div", {
|
|
266
|
+
className: ye
|
|
267
|
+
}, /* @__PURE__ */ e.createElement(I, {
|
|
193
268
|
kind: "icon",
|
|
194
269
|
icon: "x",
|
|
195
270
|
title: h("design-system:fileUpload.close"),
|
|
196
271
|
onClick: ee
|
|
197
|
-
})), /* @__PURE__ */
|
|
198
|
-
className:
|
|
199
|
-
}, /* @__PURE__ */
|
|
200
|
-
ref:
|
|
272
|
+
})), /* @__PURE__ */ e.createElement("form", {
|
|
273
|
+
className: Se
|
|
274
|
+
}, /* @__PURE__ */ e.createElement("input", {
|
|
275
|
+
ref: d,
|
|
201
276
|
type: "file",
|
|
202
|
-
accept:
|
|
277
|
+
accept: H || "*/*",
|
|
203
278
|
multiple: a || void 0,
|
|
204
279
|
onChange: oe
|
|
205
280
|
})));
|
|
206
281
|
}
|
|
207
|
-
|
|
282
|
+
de.set(k, {
|
|
208
283
|
name: "FileUpload",
|
|
209
284
|
props: {
|
|
210
285
|
constrainContentWidth: { type: "boolean" },
|
|
@@ -221,8 +296,8 @@ pe.set(H, {
|
|
|
221
296
|
download: { type: "() => void" }
|
|
222
297
|
}
|
|
223
298
|
});
|
|
224
|
-
const
|
|
225
|
-
components: [
|
|
299
|
+
const Oe = {
|
|
300
|
+
components: [k],
|
|
226
301
|
examples: {
|
|
227
302
|
basic: {
|
|
228
303
|
label: "Basic File Upload",
|
|
@@ -448,10 +523,10 @@ const Ne = {
|
|
|
448
523
|
}
|
|
449
524
|
}
|
|
450
525
|
}
|
|
451
|
-
},
|
|
452
|
-
"File Upload":
|
|
526
|
+
}, Me = {
|
|
527
|
+
"File Upload": Oe
|
|
453
528
|
};
|
|
454
529
|
export {
|
|
455
|
-
|
|
456
|
-
|
|
530
|
+
k as FileUpload,
|
|
531
|
+
Me as MANIFEST
|
|
457
532
|
};
|
package/lib/mime-type.enum.d.ts
CHANGED
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
"7Z"
|
|
3
|
-
AAC
|
|
4
|
-
ABW
|
|
5
|
-
ARC
|
|
6
|
-
AVI
|
|
7
|
-
AZW
|
|
8
|
-
BIN
|
|
9
|
-
BMP
|
|
10
|
-
BZ
|
|
11
|
-
BZ2
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
export declare const MIMEType: {
|
|
2
|
+
"7Z": string[];
|
|
3
|
+
AAC: string[];
|
|
4
|
+
ABW: string[];
|
|
5
|
+
ARC: string[];
|
|
6
|
+
AVI: string[];
|
|
7
|
+
AZW: string[];
|
|
8
|
+
BIN: string[];
|
|
9
|
+
BMP: string[];
|
|
10
|
+
BZ: string[];
|
|
11
|
+
BZ2: string[];
|
|
12
|
+
CER: string[];
|
|
13
|
+
CSH: string[];
|
|
14
|
+
CSS: string[];
|
|
15
|
+
CSV: string[];
|
|
16
|
+
DOC: string[];
|
|
17
|
+
DOCX: string[];
|
|
18
|
+
EOT: string[];
|
|
19
|
+
EPUB: string[];
|
|
20
|
+
ES: string[];
|
|
21
|
+
FLV: string[];
|
|
22
|
+
GIF: string[];
|
|
23
|
+
GZ: string[];
|
|
24
|
+
HTM: string[];
|
|
25
|
+
HTML: string[];
|
|
26
|
+
ICO: string[];
|
|
27
|
+
ICS: string[];
|
|
28
|
+
JAR: string[];
|
|
29
|
+
JPEG: string[];
|
|
30
|
+
JPG: string[];
|
|
31
|
+
JS: string[];
|
|
32
|
+
JSON: string[];
|
|
33
|
+
M3U: string[];
|
|
34
|
+
MID: string[];
|
|
35
|
+
MIDI: string[];
|
|
36
|
+
MOV: string[];
|
|
37
|
+
MP3: string[];
|
|
38
|
+
MP4: string[];
|
|
39
|
+
MPEG: string[];
|
|
40
|
+
MPKG: string[];
|
|
41
|
+
ODP: string[];
|
|
42
|
+
ODS: string[];
|
|
43
|
+
ODT: string[];
|
|
44
|
+
OGA: string[];
|
|
45
|
+
OGV: string[];
|
|
46
|
+
OGX: string[];
|
|
47
|
+
OTF: string[];
|
|
48
|
+
PNG: string[];
|
|
49
|
+
PDF: string[];
|
|
50
|
+
PPT: string[];
|
|
51
|
+
PPTX: string[];
|
|
52
|
+
RAR: string[];
|
|
53
|
+
RTF: string[];
|
|
54
|
+
SH: string[];
|
|
55
|
+
SVG: string[];
|
|
56
|
+
SWF: string[];
|
|
57
|
+
TAR: string[];
|
|
58
|
+
TIF: string[];
|
|
59
|
+
TIFF: string[];
|
|
60
|
+
TS: string[];
|
|
61
|
+
TTF: string[];
|
|
62
|
+
TXT: string[];
|
|
63
|
+
VSD: string[];
|
|
64
|
+
WAV: string[];
|
|
65
|
+
WEBA: string[];
|
|
66
|
+
WEBM: string[];
|
|
67
|
+
WEBP: string[];
|
|
68
|
+
WOFF: string[];
|
|
69
|
+
WOFF2: string[];
|
|
70
|
+
XHTML: string[];
|
|
71
|
+
XLS: string[];
|
|
72
|
+
XLSX: string[];
|
|
73
|
+
XML: string[];
|
|
74
|
+
XUL: string[];
|
|
75
|
+
ZIP: string[];
|
|
76
|
+
};
|
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.0.0
|
|
4
|
+
"version": "8.0.0",
|
|
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.0.0
|
|
34
|
-
"@sps-woodland/tokens": "8.0.0
|
|
35
|
-
"@sps-woodland/buttons": "8.0.0
|
|
36
|
-
"@spscommerce/ds-react": "8.0.0
|
|
37
|
-
"@spscommerce/ds-shared": "8.0.0
|
|
33
|
+
"@sps-woodland/core": "8.0.0",
|
|
34
|
+
"@sps-woodland/tokens": "8.0.0",
|
|
35
|
+
"@sps-woodland/buttons": "8.0.0",
|
|
36
|
+
"@spscommerce/ds-react": "8.0.0",
|
|
37
|
+
"@spscommerce/ds-shared": "8.0.0"
|
|
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.0.0
|
|
47
|
-
"@sps-woodland/tokens": "8.0.0
|
|
48
|
-
"@
|
|
49
|
-
"@spscommerce/ds-
|
|
50
|
-
"@
|
|
51
|
-
"@spscommerce/ds-colors": "8.0.0
|
|
46
|
+
"@sps-woodland/core": "8.0.0",
|
|
47
|
+
"@sps-woodland/tokens": "8.0.0",
|
|
48
|
+
"@sps-woodland/buttons": "8.0.0",
|
|
49
|
+
"@spscommerce/ds-react": "8.0.0",
|
|
50
|
+
"@spscommerce/ds-shared": "8.0.0",
|
|
51
|
+
"@spscommerce/ds-colors": "8.0.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "pnpm run build:js && pnpm run build:types",
|