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