@sps-woodland/file-upload 7.13.0 → 7.14.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 +2 -2
- package/lib/index.es.js +9 -9
- package/lib/mime-type.enum.d.ts +1 -0
- 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"),d=require("@spscommerce/utils"),G=require("@spscommerce/ds-react"),O=require("@spscommerce/ds-shared");function fe(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return o.default=e,Object.freeze(o)}const t=fe(ue);var V=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(V||{});function me(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function _(e,o){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);o&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,l)}return a}function q(e){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?_(Object(a),!0).forEach(function(l){me(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}var he=(e,o,a)=>{for(var l of Object.keys(e)){var n;if(e[l]!==((n=o[l])!==null&&n!==void 0?n:a[l]))return!1}return!0},D=e=>o=>{var a=e.defaultClassName,l=q(q({},e.defaultVariants),o);for(var n in l){var v,g=(v=l[n])!==null&&v!==void 0?v:e.defaultVariants[n];if(g!=null){var c=g;typeof c=="boolean"&&(c=c===!0?"true":"false");var p=e.variantClassNames[n][c];p&&(a+=" "+p)}}for(var[S,N]of e.compoundVariants)he(S,l,e.defaultVariants)&&(a+=" "+N);return a},ve="rh07jwm",K="rh07jwn",we="rh07jwl",ge=D({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",Se=D({defaultClassName:"rh07jw9",variantClassNames:{constrainContentWidth:{true:"rh07jwa",false:"rh07jwb"}},defaultVariants:{constrainContentWidth:!1},compoundVariants:[]}),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const ue=require("react"),w=require("@sps-woodland/core"),d=require("@spscommerce/utils"),G=require("@spscommerce/ds-react"),O=require("@spscommerce/ds-shared");function fe(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return o.default=e,Object.freeze(o)}const t=fe(ue);var V=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CER="application/pkix-cert",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(V||{});function me(e,o,a){return o in e?Object.defineProperty(e,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[o]=a,e}function _(e,o){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);o&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,l)}return a}function q(e){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?_(Object(a),!0).forEach(function(l){me(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}var he=(e,o,a)=>{for(var l of Object.keys(e)){var n;if(e[l]!==((n=o[l])!==null&&n!==void 0?n:a[l]))return!1}return!0},D=e=>o=>{var a=e.defaultClassName,l=q(q({},e.defaultVariants),o);for(var n in l){var v,g=(v=l[n])!==null&&v!==void 0?v:e.defaultVariants[n];if(g!=null){var c=g;typeof c=="boolean"&&(c=c===!0?"true":"false");var p=e.variantClassNames[n][c];p&&(a+=" "+p)}}for(var[S,N]of e.compoundVariants)he(S,l,e.defaultVariants)&&(a+=" "+N);return a},ve="rh07jwm",K="rh07jwn",we="rh07jwl",ge=D({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",Se=D({defaultClassName:"rh07jw9",variantClassNames:{constrainContentWidth:{true:"rh07jwa",false:"rh07jwb"}},defaultVariants:{constrainContentWidth:!1},compoundVariants:[]}),xe="rh07jwp",be="rh07jwr",Ue=D({defaultClassName:"rh07jwd",variantClassNames:{mini:{true:"rh07jwe",false:"rh07jwf"},error:{true:"rh07jwg",false:"rh07jwh"}},defaultVariants:{mini:!1,error:!1},compoundVariants:[]}),Z="rh07jwc",Ce="rh07jwo",je=D({defaultClassName:"rh07jwi",variantClassNames:{mini:{true:"rh07jwj",false:"rh07jwk"}},defaultVariants:{mini:!1},compoundVariants:[]});function R({constrainContentWidth:e,description:o,multiple:a=!1,dismissable:l,processing:n,mini:v,downloadLabel:g,acceptExtensions:c,maxSize:p,customRequirement:S,onSelection:N,onDismiss:W,download:z,shown:x,className:H,children:Ne,...J}){const b=t.useRef(new Set),[Y,L]=t.useState(x),[Pe,Q]=t.useState([]),[$,y]=t.useState(""),[k,E]=t.useState(),[T,U]=t.useState(!1),[F,C]=t.useState(!1),[P,X]=t.useState([]),[I,M]=t.useState(""),{t:h}=t.useContext(w.I18nContext),A=h(a?"design-system:fileUpload.instructions_plural":"design-system:fileUpload.instructions").split("|"),ee=o||(a?"Files":"File"),u=t.useRef(null);t.useEffect(()=>{x&&L(x)},[x]),t.useEffect(()=>{p&&ie(p)},[p]),t.useEffect(()=>{c&&ae(c)},[c]);function te(){l&&(L(!1),W&&W())}function ie(i){try{E(d.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());M(r.map((m,j)=>j>0&&j===r.length-1?`or ${m}`:m).join(r.length>2?", ":" ")),b.current.clear();for(const m of f){const j=Object.keys(V).includes(m.toUpperCase())?V[m.toUpperCase()].split(","):[];for(const pe of j)b.current.add(pe)}y(r.concat(Array.from(b.current)).join(","))}function B(i){X([]);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),p&&k&&r.size>k&&s.indexOf(r.name)===-1&&s.push(r.name));s.length?(C(!0),u.current&&u.current.value&&(u.current.value="")):(Q(f),N(f)),X(s)}function le(i){i.preventDefault(),C(!1),u.current&&u.current.click()}function oe(){z&&z()}function ne(i){i.stopPropagation(),B(i.target.files||[]),u.current&&u.current.value&&(u.current.value="")}function se(i){i.preventDefault(),i.stopPropagation(),U(!0),C(!1)}function re(i){i.preventDefault(),U(!0),C(!1)}function ce(i){i.preventDefault(),U(!1)}function de(i){i.preventDefault(),i.stopPropagation(),U(!1),i.dataTransfer.items?B(Array.from(i.dataTransfer.items).map(s=>s.getAsFile())):B(i.dataTransfer.files)}return t.createElement("div",{onDrop:de,onDragOver:se,onDragLeave:ce,onDragEnter:re,className:w.cl(ge({active:T,mini:v,error:F,shown:Y}),H),...J},t.createElement("div",{className:w.cl(Se({constrainContentWidth:e}))},n?t.createElement("div",null,t.createElement(w.Spinner,{size:"md","aria-hidden":"true"}),t.createElement("div",{className:Z},h("design-system:fileUpload.processing"))):t.createElement("div",null,t.createElement(w.Icon,{className:Ue({mini:v,error:F}),icon:F?"exclamation-circle":"upload-cloud","aria-hidden":"true"}),t.createElement("div",{className:je({mini:v})},F?t.createElement("div",null,h(P.length>1?"design-system:fileUpload.cancelled_plural":"design-system:fileUpload.cancelled")):t.createElement("div",null,h("design-system:fileUpload.title",{description:ee}))),F?t.createElement("div",{className:we},new Set(P.map((i,s)=>{const f=Math.floor(i.length/2);return t.createElement("div",{className:ve,key:i},t.createElement("span",{className:K},i.substr(0,f)),t.createElement("div",{className:K},t.createElement("span",null,i.substr(f))),s<P.length-1?",":"")}))):t.createElement("span",null),t.createElement("div",{className:Z},t.createElement("div",null,t.createElement("span",null,A[0]),t.createElement("a",{href:"",onClick:le},A[1]),t.createElement("span",null,A[2]))),t.createElement("div",{className:Ce},c?t.createElement("span",null,"("," ",h("design-system:fileUpload.acceptedTypes",{fileTypes:I})," ",")"):"",p?t.createElement("span",null,"( ",h("design-system:fileUpload.maximumSize",{size:p})," )"):"",S?t.createElement("span",null," ",S," "):""),g&&t.createElement("div",{className:xe},t.createElement(G.SpsButton,{kind:O.ButtonKind.LINK,icon:O.SpsIcon.DOWNLOAD_CLOUD,onClick:oe},g)))),l&&!n&&t.createElement("div",{className:Fe},t.createElement(G.SpsButton,{kind:O.ButtonKind.ICON,icon:O.SpsIcon.X,title:h("design-system:fileUpload.close"),onClick:te})),t.createElement("form",{className:be},t.createElement("input",{ref:u,type:"file",accept:$||"*/*",multiple:a||void 0,onChange:ne})))}w.Metadata.set(R,{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 Oe={components:[R],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:d.code`
|
|
2
2
|
import { FileUpload } from "@sps-woodland/file-upload";
|
|
3
3
|
|
|
4
4
|
function Component() {
|
|
@@ -152,4 +152,4 @@
|
|
|
152
152
|
</div>
|
|
153
153
|
)
|
|
154
154
|
}
|
|
155
|
-
`}}}}},De={"File Upload":Oe};exports.FileUpload=
|
|
155
|
+
`}}}}},De={"File Upload":Oe};exports.FileUpload=R;exports.MANIFEST=De;
|
package/lib/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as t from "react";
|
|
2
2
|
import { Metadata as ue, I18nContext as me, cl as R, 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
|
-
var A = /* @__PURE__ */ ((e) => (e["7Z"] = "application/x-7z-compressed", e.AAC = "audio/aac", e.ABW = "application/x-abiword", e.ARC = "application/octet-stream", e.AVI = "video/x-msvideo", e.AZW = "application/vnd.amazon.ebook", e.BIN = "application/octet-stream", e.BMP = "image/bmp", e.BZ = "application/x-bzip", e.BZ2 = "application/x-bzip2", e.CSH = "application/x-csh", e.CSS = "text/css", e.CSV = "text/csv,application/vnd.ms-excel", e.DOC = "application/msword", e.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", e.EOT = "application/vnd.ms-fontobject", e.EPUB = "application/epub+zip", e.ES = "application/ecmascript", e.FLV = "video/x-flv", e.GIF = "image/gif", e.GZ = "application/x-gzip", e.HTM = "text/html", e.HTML = "text/html", e.ICO = "image/x-icon", e.ICS = "text/calendar", e.JAR = "application/java-archive", e.JPEG = "image/jpeg", e.JPG = "image/jpeg", e.JS = "application/javascript", e.JSON = "application/json", e.M3U = "audio/x-mpequrl", e.MID = "audio/midi", e.MIDI = "audio/midi", e.MOV = "video/quicktime", e.MP3 = "audio/mpeg3", e.MP4 = "video/mp4", e.MPEG = "video/mpeg", e.MPKG = "application/vnd.apple.installer+xml", e.ODP = "application/vnd.oasis.opendocument.presentation", e.ODS = "application/vnd.oasis.opendocument.spreadsheet", e.ODT = "application/vnd.oasis.opendocument.text", e.OGA = "audio/ogg", e.OGV = "video/ogg", e.OGX = "application/ogg", e.OTF = "font/otf", e.PNG = "image/png", e.PDF = "application/pdf", e.PPT = "application/vnd.ms-powerpoint", e.PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation", e.RAR = "application/x-rar-compressed", e.RTF = "application/rtf", e.SH = "application/x-sh", e.SVG = "image/svg+xml", e.SWF = "application/x-shockwave-flash", e.TAR = "application/x-tar", e.TIF = "image/tiff", e.TIFF = "image/tiff", e.TS = "application/typescript", e.TTF = "font/ttf", e.TXT = "text/plain", e.VSD = "application/vnd.visio", e.WAV = "audio/wav", e.WEBA = "audio/webm", e.WEBM = "video/webm", e.WEBP = "image/webp", e.WOFF = "font/woff", e.WOFF2 = "font/woff2", e.XHTML = "application/xhtml+xml", e.XLS = "application/vnd.ms-excel", e.XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", e.XML = "application/xml", e.XUL = "application/vnd.mozilla.xul+xml", e.ZIP = "application/zip", e))(A || {});
|
|
4
|
+
import { SpsButton as k } from "@spscommerce/ds-react";
|
|
5
|
+
import { ButtonKind as X, SpsIcon as G } from "@spscommerce/ds-shared";
|
|
6
|
+
var A = /* @__PURE__ */ ((e) => (e["7Z"] = "application/x-7z-compressed", e.AAC = "audio/aac", e.ABW = "application/x-abiword", e.ARC = "application/octet-stream", e.AVI = "video/x-msvideo", e.AZW = "application/vnd.amazon.ebook", e.BIN = "application/octet-stream", e.BMP = "image/bmp", e.BZ = "application/x-bzip", e.BZ2 = "application/x-bzip2", e.CER = "application/pkix-cert", e.CSH = "application/x-csh", e.CSS = "text/css", e.CSV = "text/csv,application/vnd.ms-excel", e.DOC = "application/msword", e.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", e.EOT = "application/vnd.ms-fontobject", e.EPUB = "application/epub+zip", e.ES = "application/ecmascript", e.FLV = "video/x-flv", e.GIF = "image/gif", e.GZ = "application/x-gzip", e.HTM = "text/html", e.HTML = "text/html", e.ICO = "image/x-icon", e.ICS = "text/calendar", e.JAR = "application/java-archive", e.JPEG = "image/jpeg", e.JPG = "image/jpeg", e.JS = "application/javascript", e.JSON = "application/json", e.M3U = "audio/x-mpequrl", e.MID = "audio/midi", e.MIDI = "audio/midi", e.MOV = "video/quicktime", e.MP3 = "audio/mpeg3", e.MP4 = "video/mp4", e.MPEG = "video/mpeg", e.MPKG = "application/vnd.apple.installer+xml", e.ODP = "application/vnd.oasis.opendocument.presentation", e.ODS = "application/vnd.oasis.opendocument.spreadsheet", e.ODT = "application/vnd.oasis.opendocument.text", e.OGA = "audio/ogg", e.OGV = "video/ogg", e.OGX = "application/ogg", e.OTF = "font/otf", e.PNG = "image/png", e.PDF = "application/pdf", e.PPT = "application/vnd.ms-powerpoint", e.PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation", e.RAR = "application/x-rar-compressed", e.RTF = "application/rtf", e.SH = "application/x-sh", e.SVG = "image/svg+xml", e.SWF = "application/x-shockwave-flash", e.TAR = "application/x-tar", e.TIF = "image/tiff", e.TIFF = "image/tiff", e.TS = "application/typescript", e.TTF = "font/ttf", e.TXT = "text/plain", e.VSD = "application/vnd.visio", e.WAV = "audio/wav", e.WEBA = "audio/webm", e.WEBM = "video/webm", e.WEBP = "image/webp", e.WOFF = "font/woff", e.WOFF2 = "font/woff2", e.XHTML = "application/xhtml+xml", e.XLS = "application/vnd.ms-excel", e.XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", e.XML = "application/xml", e.XUL = "application/vnd.mozilla.xul+xml", e.ZIP = "application/zip", e))(A || {});
|
|
7
7
|
function ge(e, o, a) {
|
|
8
8
|
return o in e ? Object.defineProperty(e, o, {
|
|
9
9
|
value: a,
|
|
@@ -184,14 +184,14 @@ function J({
|
|
|
184
184
|
fileTypes: M
|
|
185
185
|
}), " ", ")") : "", p ? /* @__PURE__ */ t.createElement("span", null, "( ", h("design-system:fileUpload.maximumSize", { size: p }), " )") : "", F ? /* @__PURE__ */ t.createElement("span", null, " ", F, " ") : ""), w && /* @__PURE__ */ t.createElement("div", {
|
|
186
186
|
className: je
|
|
187
|
-
}, /* @__PURE__ */ t.createElement(
|
|
188
|
-
kind:
|
|
187
|
+
}, /* @__PURE__ */ t.createElement(k, {
|
|
188
|
+
kind: X.LINK,
|
|
189
189
|
icon: G.DOWNLOAD_CLOUD,
|
|
190
190
|
onClick: ne
|
|
191
191
|
}, w)))), l && !n && /* @__PURE__ */ t.createElement("div", {
|
|
192
192
|
className: Ue
|
|
193
|
-
}, /* @__PURE__ */ t.createElement(
|
|
194
|
-
kind:
|
|
193
|
+
}, /* @__PURE__ */ t.createElement(k, {
|
|
194
|
+
kind: X.ICON,
|
|
195
195
|
icon: G.X,
|
|
196
196
|
title: h("design-system:fileUpload.close"),
|
|
197
197
|
onClick: ie
|
|
@@ -448,10 +448,10 @@ const Ae = {
|
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, ke = {
|
|
452
452
|
"File Upload": Ae
|
|
453
453
|
};
|
|
454
454
|
export {
|
|
455
455
|
J as FileUpload,
|
|
456
|
-
|
|
456
|
+
ke as MANIFEST
|
|
457
457
|
};
|
package/lib/mime-type.enum.d.ts
CHANGED
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.14.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",
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@sps-woodland/core": "7.
|
|
30
|
-
"@sps-woodland/tokens": "7.
|
|
31
|
-
"@spscommerce/ds-colors": "7.
|
|
32
|
-
"@spscommerce/ds-react": "7.
|
|
33
|
-
"@spscommerce/ds-shared": "7.
|
|
29
|
+
"@sps-woodland/core": "7.14.0",
|
|
30
|
+
"@sps-woodland/tokens": "7.14.0",
|
|
31
|
+
"@spscommerce/ds-colors": "7.14.0",
|
|
32
|
+
"@spscommerce/ds-react": "7.14.0",
|
|
33
|
+
"@spscommerce/ds-shared": "7.14.0",
|
|
34
34
|
"@spscommerce/ds-illustrations": "6.37.3",
|
|
35
35
|
"@spscommerce/utils": "^6.12.1",
|
|
36
36
|
"react": "^16.14.0",
|
|
37
37
|
"react-dom": "^16.14.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@sps-woodland/core": "7.
|
|
41
|
-
"@sps-woodland/tokens": "7.
|
|
42
|
-
"@spscommerce/ds-colors": "7.
|
|
40
|
+
"@sps-woodland/core": "7.14.0",
|
|
41
|
+
"@sps-woodland/tokens": "7.14.0",
|
|
42
|
+
"@spscommerce/ds-colors": "7.14.0",
|
|
43
43
|
"@spscommerce/ds-illustrations": "6.37.3",
|
|
44
|
-
"@spscommerce/ds-react": "7.
|
|
45
|
-
"@spscommerce/ds-shared": "7.
|
|
44
|
+
"@spscommerce/ds-react": "7.14.0",
|
|
45
|
+
"@spscommerce/ds-shared": "7.14.0",
|
|
46
46
|
"@spscommerce/utils": "^6.12.1",
|
|
47
47
|
"@vanilla-extract/css": "^1.9.3",
|
|
48
48
|
"@vanilla-extract/recipes": "^0.2.5",
|