@shrfe/assets 1.0.21 → 1.0.23-alpha.2
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/js/shrfe-core-umd.js +7 -7
- package/package.json +1 -1
- package/wc-lib/p-0ab5aa8f.entry.js +1 -0
- package/wc-lib/{p-7aab95ba.entry.js → p-0c66b75b.entry.js} +1 -1
- package/wc-lib/p-1721388d.entry.js +1 -0
- package/wc-lib/p-252bb260.entry.js +1 -0
- package/wc-lib/p-28add28f.entry.js +1 -0
- package/wc-lib/p-322b6a84.entry.js +1 -0
- package/wc-lib/p-45d216c5.entry.js +6 -0
- package/wc-lib/p-4adb8241.entry.js +1 -0
- package/wc-lib/p-513a64f8.entry.js +1 -0
- package/wc-lib/p-681129c8.entry.js +1 -0
- package/wc-lib/p-82beda62.entry.js +1 -0
- package/wc-lib/p-929e3dd9.entry.js +1 -0
- package/wc-lib/p-CUS2AmqM.js +2 -0
- package/wc-lib/p-a0c6e079.entry.js +1 -0
- package/wc-lib/p-a5a7f920.js +1 -0
- package/wc-lib/p-a9faae34.entry.js +1 -0
- package/wc-lib/p-adc51af7.entry.js +1 -0
- package/wc-lib/{p-b6c40d9f.entry.js → p-bbc59b1f.entry.js} +1 -1
- package/wc-lib/p-cb6082d5.entry.js +1 -0
- package/wc-lib/p-ee08c411.entry.js +1 -0
- package/wc-lib/p-f1e95f08.entry.js +1 -0
- package/wc-lib/wc-lib.esm.js +1 -1
- package/wc-lib/p-06933d31.entry.js +0 -1
- package/wc-lib/p-125d443b.entry.js +0 -1
- package/wc-lib/p-197b576e.entry.js +0 -1
- package/wc-lib/p-3eaa4250.entry.js +0 -1
- package/wc-lib/p-4865cb8d.entry.js +0 -1
- package/wc-lib/p-6f116fdb.entry.js +0 -1
- package/wc-lib/p-72ad0bd5.entry.js +0 -1
- package/wc-lib/p-75161f0b.entry.js +0 -1
- package/wc-lib/p-86b5690c.entry.js +0 -1
- package/wc-lib/p-8f324339.entry.js +0 -1
- package/wc-lib/p-9cf22f72.entry.js +0 -1
- package/wc-lib/p-C6hwjI5h.js +0 -2
- package/wc-lib/p-b0330a3a.entry.js +0 -6
- package/wc-lib/p-b243e285.entry.js +0 -1
- package/wc-lib/p-bbc4e214.entry.js +0 -1
- package/wc-lib/p-c132b4fa.js +0 -1
- package/wc-lib/p-c57ce36c.entry.js +0 -1
- package/wc-lib/p-c592afb3.entry.js +0 -1
- package/wc-lib/p-ff9e9733.entry.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,d as e,e as o,h as s,H as r}from"./p-CUS2AmqM.js";import{u as a}from"./p-DOY8Zr-F.js";const t=class{constructor(o){c(this,o),this.checkboxChange=e(this,"checkboxChange",7)}value;checked=!1;error=!1;disabled=!1;falseValue;label;isIndeterminate=!1;testId="";checkboxChange;get checkboxHostElement(){return o(this)}checkboxId=`${a().generate("_checkbox_")}`;handleChange=c=>{const e=c.target.checked;this.checked=e,this.checkboxChange.emit(e?"boolean"==typeof this.value?{value:!0,checked:e}:{value:this.value,checked:e}:"boolean"==typeof this.value?{value:this.falseValue??!1,checked:!1}:{value:this.value,checked:!1})};render(){const c=this.checkboxHostElement.getAttribute("id");return s(r,{key:"c6b85aa3a46b31e2faf94f16d37add26147c486b"},s("div",{key:"eeec5e127a51e84d65f5e3acfc453f8dc2b0b28d",class:"sfe-checkbox-container"},s("input",{key:"b3d1baefd30f854cb5522fba79c166dbcf7a1a82",type:"checkbox",id:c||this.checkboxId,value:this.value,checked:this.checked,"data-testid":`swc-checkbox-${this.testId}`,disabled:this.disabled,class:{"sfe-checkbox":!0,"sfe-checkbox--error":this.error,checked:this.checked},indeterminate:this.isIndeterminate,onChange:this.handleChange}),this.label&&s("swc-label",{key:"c1c57de6b7f88cee7e749f3af1feb6a1ea3d6a57",for:c||this.checkboxId,disabled:this.disabled,size:"md",class:"sfe-checkbox-label","data-for":this.checkboxId||c},this.label)))}};t.style='.sc-swc-checkbox-h .sfe-checkbox-container.sc-swc-checkbox{display:inline-flex;align-items:center}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox{width:16px;height:16px;position:relative;border:2px solid var(--sfe-color-interaction-neutral-faded-subtle);border-radius:var(--sfe-sizing-radius-small);background-color:#fff;cursor:pointer;line-height:0;margin:0 0.2em 0 0;outline:0;padding:0;vertical-align:text-top;appearance:none;transition:border-color 0.3s ease, background-color 0.3s ease}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:hover{opacity:1;border-color:var(--sfe-color-interaction-neutral-faded-strong)}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:checked{border:none;background-color:var(--sfe-color-interaction-brand-solid-weak);opacity:1}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:focus-visible{outline:2px solid #9747ff;outline-offset:1px}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:disabled{border-color:var(--sfe-color-interaction-disabled-strong);opacity:0.5;cursor:not-allowed}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:indeterminate{background-color:var(--sfe-color-interaction-brand-solid-weak);border-color:var(--sfe-color-interaction-brand-solid-weak)}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:indeterminate::before{content:"";position:absolute;right:50%;top:50%;width:10px;height:2px;background-color:#fff;margin:0 -10px 0 -1px;transform:translate(-50%, -50%)}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:checked:hover{border:none;background-color:var(--sfe-color-interaction-brand-solid-subtle);opacity:1}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:checked:disabled{border:none;background-color:var(--sfe-color-interaction-disabled-strong);opacity:0.5}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:indeterminate:disabled{background-color:var(--sfe-color-interaction-disabled-strong);border-color:var(--sfe-color-interaction-disabled-strong);opacity:1}.sc-swc-checkbox-h .sfe-checkbox.checked.sc-swc-checkbox::before{content:"";position:absolute;right:50%;top:50%;width:4px;height:10px;border:solid #fff;border-width:0 2px 2px 0;margin:-1px 0 0 -1px;transform:rotate(45deg) translate(-50%, -50%);z-index:2}.sc-swc-checkbox-h .sfe-checkbox--error.sc-swc-checkbox{border-color:var(--sfe-color-interaction-critical-solid-weak)}.sc-swc-checkbox-h .sfe-checkbox.sc-swc-checkbox:checked.sfe-checkbox--error{border:none;background-color:var(--sfe-color-interaction-brand-solid-weak);opacity:1}.sc-swc-checkbox-h .sfe-checkbox-label.sc-swc-checkbox{margin-top:0;margin-bottom:0;margin-left:8px}';export{t as swc_checkbox}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,d as s,h as i,H as l}from"./p-C6hwjI5h.js";import{u as t}from"./p-DOY8Zr-F.js";const a=e=>e&&e.length>0?e.map(((e,s)=>{const i=e.name;return{id:s,name:i.substring(0,i.lastIndexOf("."))||i,size:`${(e.size/1024/1024).toFixed(2)} MB`}})):[],c=e=>0===Object.keys(e).length&&e.constructor===Object,n=class{constructor(i){e(this,i),this.updateRemove=s(this,"updateRemove",7),this.updateReplace=s(this,"updateReplace",7),this.uploadRetry=s(this,"uploadRetry",7)}fileInfo=[];inverted=!1;hasError=!1;progress=0;uniqueId=`multiple-file-${t().generate()}`;updateRemove;updateReplace;uploadRetry;get fileDetails(){return a(this.fileInfo)}handleUpdateReplace=(e,s)=>{e.preventDefault(),this.updateReplace.emit(s)};handleUpdateRemove=(e,s)=>{e.preventDefault(),this.updateRemove.emit(s)};handleUploadRetry=e=>{e.preventDefault(),this.uploadRetry.emit(null)};render(){return i(l,{key:"2ac121e3a8320c32e694a4e4a684e0527c9ef2db"},i("section",{key:"42e4a20a2b096218b8416e94b9f097ee16de88bd",class:{"multiple-file-choosen":!0,inverted:this.inverted,uploaded:100===this.progress,"has-error":this.hasError}},this.fileDetails.map(((e,s)=>i("div",{class:"multiple-file-choosen__wrapper",key:s},i("div",{class:"multiple-file-choosen__name"},e.name),i("div",{class:"multiple-file-choosen__size"},e.size),i("div",{class:"d-flex align-items-center justify-content-end"},i("swc-button",{size:"lg",intent:"brand",variant:"bare","aria-label":"replace",class:"mr-1",onClick:s=>this.handleUpdateReplace(s,e.id)},i("span",null,"Replace")),i("swc-icon-button",{intent:"neutral",variant:"bare",size:"lg","aria-label":"dismiss",onClick:s=>this.handleUpdateRemove(s,e.id)},i("swc-svg-icon",{name:"Dismiss",size:"16"})))))),this.progress>0&&100!==this.progress&&this.fileDetails.length>0&&!this.hasError&&i("swc-progress",{key:"3216027ca75a018466a9880f45522f24a08a0146",value:this.progress,max:100,class:"mt-2"}),!this.hasError&&this.fileDetails.length>0&&100===this.progress&&i("div",{key:"10e0c220f9d067b3a9fcb4465c774c5080cb6741",class:"d-flex align-items-center mt-2"},i("div",{key:"ae241bc2b77c88476fe00cb42bd2d969bcd074a8",class:"completed"},"Upload completed")),this.hasError&&i("div",{key:"f4145cd6d422f1aad9048c45d6446ab84a79b6df",class:"d-flex justify-content-between align-items-center mt-2"},i("div",{key:"12c0dea427fc9cf00fd181ff38d044f9c4ca9f73",class:"has-error"},i("swc-svg-icon",{key:"afff19f5d66979b48e136ea7b3e60f514f95215b",name:"Warning",size:"20",variant:"filled",color:"#bf3835",opacity:"1"})),i("swc-button",{key:"bfb59f691bb78aaf21d2c129e2bcff7b9dc5266b",size:"lg",intent:"neutral",variant:"bare","aria-label":"dismiss",class:"has-error",onClick:this.handleUploadRetry},i("span",{key:"6b6ef5ee8e0dfa93662b227773e1fc817e6b2fae"},"Retry")))))}};n.style=".sc-swc-multiple-file-h .me-2.sc-swc-multiple-file{margin-right:8px}.sc-swc-multiple-file-h .me-1.sc-swc-multiple-file{margin-right:4px}.sc-swc-multiple-file-h .mt-2.sc-swc-multiple-file{margin-top:8px}.sc-swc-multiple-file-h .d-flex.sc-swc-multiple-file{display:flex}.sc-swc-multiple-file-h .align-items-center.sc-swc-multiple-file{align-items:center}.sc-swc-multiple-file-h .justify-content-end.sc-swc-multiple-file{justify-content:flex-end}.sc-swc-multiple-file-h .justify-content-between.sc-swc-multiple-file{justify-content:space-between}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file{border-radius:var(--sfe-sizing-radius-default, 8px);background:var(--sfe-color-fill-neutral-lightest, #f5f7f9);padding:var(--sfe-sizing-gap-small, 8px) var(--sfe-sizing-gap-large, 16px) !important;margin-top:8px}.sc-swc-multiple-file-h .multiple-file-choosen.uploaded.sc-swc-multiple-file{background:var(--sfe-color-fill-brand-light, #e4edfc) !important}.sc-swc-multiple-file-h .multiple-file-choosen.inverted.sc-swc-multiple-file{border:1px solid var(--sfe-color-border-neutral-subtle, #dee3e7);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-multiple-file-h .multiple-file-choosen.has-error.sc-swc-multiple-file{background:var(--sfe-color-fill-critical-light, #f8e0e0)}.sc-swc-multiple-file-h .multiple-file-choosen.has-error.inverted.sc-swc-multiple-file{border:1px solid var(--sfe-color-border-critical-solid, #a22827);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-multiple-file-h .multiple-file-choosen__wrapper.sc-swc-multiple-file{display:grid;align-items:center;grid-template-columns:2fr 1fr 3fr;gap:22px}.sc-swc-multiple-file-h .multiple-file-choosen__name.sc-swc-multiple-file{color:var(--sfe-color-text-default-primary, rgba(0, 0, 0, 0.95));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:3rem}.sc-swc-multiple-file-h .multiple-file-choosen__size.sc-swc-multiple-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;white-space:nowrap}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file div.sc-swc-multiple-file div.completed.sc-swc-multiple-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-small, 0.75rem);font-style:normal;font-weight:400;line-height:14px}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file button.sc-swc-multiple-file span.sc-swc-multiple-file{color:var(--sfe-btn-color-content-bare-brand, #004ca6);font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-default, 0.875rem);font-style:normal;font-weight:400;line-height:16px}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file button.has-error.sc-swc-multiple-file span.sc-swc-multiple-file{color:var(--sfe-btn-color-content-bare-critical, #a22827)}";const f=class{constructor(i){e(this,i),this.updateRemove=s(this,"updateRemove",7),this.updateReplace=s(this,"updateReplace",7),this.uploadRetry=s(this,"uploadRetry",7)}fileInfo=[];extended=!1;thumbnail="file";inverted=!1;hasError=!1;progress=0;uniqueId=`single-file-${t().generate()}`;updateRemove;updateReplace;uploadRetry;get getFileExtension(){if(this.fileInfo.length>0){const e=this.fileInfo[0].name;return e.split(".").pop()?.toUpperCase()||""}return""}get fileExtensionColour(){return"var(--sfe-color-non-semantic-content-violet-subtle, #4E38BC)"}get fileFontSize(){return this.getFileExtension.length<=3?"13px":"10px"}get shouldShowFile(){return"file"===this.thumbnail||"photo"===this.thumbnail&&this.fileInfo.length>0&&!["PNG","JPEG","JPG"].includes(this.getFileExtension)}get createImageUrl(){return this.fileInfo.length>0?URL.createObjectURL(this.fileInfo[0]):""}get fileDetails(){return a(this.fileInfo)[0]}retryUpload=e=>{e.preventDefault(),this.uploadRetry.emit(null)};replaceFile=e=>{e.preventDefault(),this.updateReplace.emit(null)};removeFile=e=>{this.updateRemove.emit(e)};render(){return i(l,{key:"2fab112e5c844fa5f97055b99a0b361eb237dea1"},i("section",{key:"639d461a0e960a6aa07caa6c75fc121e974aa7b3",class:{"single-file-choosen":!0,inverted:this.inverted,uploaded:100===this.progress,"has-error":this.hasError,extended:this.extended}},!this.extended&&i("div",{key:"78f483485b126aba7c9a21eef0f9847886da8e33",class:"single-file-choosen__wrapper"},i("div",{key:"f47b8180558dd71e55526d80ec838b29d3c54ae3",class:"single-file-choosen__wrapper__name"},this.hasError&&i("swc-svg-icon",{key:"e0b2d269e2dd93bdc69bd60d1a40cbceeba15530",class:"me-2",name:"Warning",size:"20",variant:"filled",color:"#bf3835",opacity:"1"}),this.fileDetails.name),i("div",{key:"f14e897a0d73781f2cec35d330856b9ad7b41d53",class:"single-file-choosen__wrapper__size"},this.fileDetails.size),i("div",{key:"fe7ca3a0596fb70e2b176e37afca63a8266e754e"},this.progress>0&&100!==this.progress&&!c(this.fileDetails)&&!this.extended&&!this.hasError&&i("swc-progress",{key:"f44ed4a8b31ef8b0e9642b26c40f8da9e382130e",value:this.progress,max:100})),i("div",{key:"46a166784ebf4e862abb6c1ab0768d87d660c854",class:"d-flex align-items-center justify-content-end"},this.hasError&&!c(this.fileDetails)&&i("swc-button",{key:"2476338915301207f6a5beb8feda23c9e6239482",size:"lg",intent:"neutral",variant:"bare","aria-label":"dismiss",class:"has-error",onClick:this.retryUpload},i("span",{key:"f505613e2e793ab05ee4febff317a44dd0109747",class:"btn-span"},"Retry")),!this.hasError&&!c(this.fileDetails)&&(0===this.progress||100===this.progress)&&i("swc-button",{key:"2b999a7a2145ec98bd5831bede2b8ba44ac101c3",size:"lg",intent:"brand",variant:"bare","aria-label":"replace",class:"me-1",onClick:this.replaceFile},i("span",{key:"2fccac6c8969b39b81ab67d709202144189295aa",class:"btn-span"},"Replace")),i("swc-icon-button",{key:"d3073d0cd23f07dca6536f3f92d51d07f4fbf56e",intent:"neutral",variant:"bare",size:"lg","aria-label":"dismiss",onClick:()=>this.removeFile(this.fileDetails.id)},i("swc-svg-icon",{key:"f38f18b3cc67200a7827c3a7bb33aa3df1f29ba9",name:"Dismiss",size:"16"})))),this.extended&&i("div",{key:"43a8ee67f8ebff72f424f3d440c177d36ee31bcc",class:{"single-file-choosen__extended-wrapper":!0,"no-thumbnail":"none"===this.thumbnail}},"none"!==this.thumbnail&&i("div",{key:"f3f19be181db8ef6814b0730d6f40bcb64f06f91",class:"file__extension"},this.shouldShowFile&&i("div",{key:"4b6f20045850df9b52554096e09c0bcc0e3590ed"},i("svg",{key:"cf71598fbe08e2a3c4ecd1cb826f1283d6df702b",width:"32",height:"40",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{key:"27d711f22f4ec2ac3a9540e74df1abcf4685de72",d:"M1 6C1 3.5 3.5 1 6 1H21.1071C21.9328 1 22.1149 1.10983 22.6954 1.70367C25.2864 4.35425 28.1524 7.58204 30.3895 9.88063C30.9814 10.4888 31 10.6512 31 11.5V33.5C31 36.5 29.5 39 26 39H6C2.5 39 1 36 1 33.5V6Z",fill:"white",stroke:this.fileExtensionColour,"stroke-width":"1.5"})),i("div",{key:"ee837e612c9f033fbcec55ee1ce0950dd3ffd2a8",class:"file-type",style:{color:this.fileExtensionColour,fontSize:this.fileFontSize}},this.getFileExtension)),"photo"===this.thumbnail&&["PNG","JPEG","JPG"].includes(this.getFileExtension)&&!c(this.fileDetails)&&i("div",{key:"32d1563799342b9f2aa8e3ebbac820ceb5f57bfa",class:"file-img"},i("img",{key:"0bc0df2523031afcfaeb54089c11ef08dd50454d",src:this.createImageUrl,alt:this.fileDetails.name}))),i("div",{key:"f279610d5ad3d4c22521a007a840e2506e3cb865",class:{file:!0,"ms-3":"none"!==this.thumbnail}},i("div",{key:"d221185222370b2d54633c065f01871af85c34ed",class:"file__identifier"},i("div",{key:"3d2ff31776de4987d4383bf90fc3c45a89918156",class:"file__identifier__name"},this.fileDetails.name),i("div",{key:"d200b7d35d69e6591f34eb112e308f582dc62973",class:"d-flex align-items-center justify-content-end"},this.hasError&&!c(this.fileDetails)&&i("swc-button",{key:"7be11951f87101f733d5b2f32df3fdcfdee175a0",size:"md",intent:"neutral",variant:"bare","aria-label":"dismiss",class:"has-error",onClick:this.retryUpload},i("span",{key:"b7115268487a3f188a57efeda21236a9954574c1",class:"btn-span"},"Retry")),!this.hasError&&!c(this.fileDetails)&&(0===this.progress||100===this.progress)&&i("swc-button",{key:"d2661388b5050bfdb6a721d92039d67df5159d1a",size:"md",intent:"brand",variant:"bare","aria-label":"replace",class:"me-1",onClick:this.replaceFile},i("span",{key:"8b757acd9f74c3bd294c572c8586b1d4ed92b8b7",class:"btn-span"},"Replace")),i("swc-icon-button",{key:"46274785adfdc8127a6b92ab97732703d439c276",intent:"neutral",variant:"bare",size:"md","aria-label":"dismiss",onClick:()=>this.removeFile(this.fileDetails.id)},i("swc-svg-icon",{key:"1c9bcf75c9fb977a2861d4380a18aa4ce04761ff",name:"Dismiss",size:"16"})))),i("div",{key:"4f07be25cb80a617290097df6848165315dcdaeb",class:"file__identifier__size mt-3 d-flex align-items-center"},this.hasError&&i("div",{key:"05897812cb36ad1ef2c3f9ec93499462347b5855"},i("swc-svg-icon",{key:"4f8468089465ff447a34d5c9c98d4c7549729141","v-if":"hasError",class:"me-2",name:"Warning",size:"20",variant:"filled",color:"#bf3835",opacity:"1"})),i("span",{key:"8b24ca1d228b070f1b9e4b9f2aa7e09e7e5ad379"},this.fileDetails.size)))),this.progress>0&&100!==this.progress&&this.extended&&!c(this.fileDetails)&&!this.hasError&&i("swc-progress",{key:"6fc1066072eed483fcfdd4316cee67e3dce75f95",value:this.progress,max:100})))}};f.style=".sc-swc-single-file-h .single-file-choosen.sc-swc-single-file{border-radius:var(--sfe-sizing-radius-default, 8px);background:var(--sfe-color-fill-neutral-lightest, #f5f7f9);padding:0 var(--sfe-sizing-gap-large, 16px)}.sc-swc-single-file-h .single-file-choosen.uploaded.sc-swc-single-file{background:var(--sfe-color-fill-brand-light, #e4edfc) !important}.sc-swc-single-file-h .single-file-choosen.inverted.sc-swc-single-file{border:1px solid var(--sfe-color-border-neutral-subtle, #dee3e7);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-single-file-h .single-file-choosen.has-error.sc-swc-single-file{background:var(--sfe-color-fill-critical-light, #f8e0e0)}.sc-swc-single-file-h .single-file-choosen.has-error.inverted.sc-swc-single-file{border:1px solid var(--sfe-color-border-critical-solid, #a22827);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-single-file-h .single-file-choosen.extended.sc-swc-single-file{padding:var(--sfe-sizing-gap-large, 16px) !important}.sc-swc-single-file-h .single-file-choosen.sc-swc-single-file .btn-span.sc-swc-single-file{color:var(--sfe-btn-color-content-bare-brand, #004ca6);font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-default, 0.875rem);font-style:normal;font-weight:400;line-height:16px}.sc-swc-single-file-h .single-file-choosen__wrapper.sc-swc-single-file{display:grid;align-items:center;grid-template-columns:2fr 1fr 3fr 1fr;gap:10px}.sc-swc-single-file-h .single-file-choosen__wrapper__name.sc-swc-single-file{color:var(--sfe-color-text-default-primary, rgba(0, 0, 0, 0.95));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:4.5rem}.sc-swc-single-file-h .single-file-choosen__wrapper__size.sc-swc-single-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;white-space:nowrap}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file{display:grid;align-items:center;grid-template-columns:1fr 24fr}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.no-thumbnail.sc-swc-single-file{grid-template-columns:1fr}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file{position:relative;width:32px;height:40px}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file .file-type.sc-swc-single-file{position:absolute;transform:translate(-50%, -50%);top:65%;left:50%}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file .file-img.sc-swc-single-file img.sc-swc-single-file{width:32px;height:32px;border-radius:4px}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file:empty{display:none}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__identifier.sc-swc-single-file{display:grid;grid-template-columns:3fr 1fr;align-items:center}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__identifier__name.sc-swc-single-file{color:var(--sfe-color-text-default-primary, rgba(0, 0, 0, 0.95));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;min-width:3.4rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__identifier__size.sc-swc-single-file span.sc-swc-single-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;white-space:nowrap}.sc-swc-single-file-h .single-file-choosen.sc-swc-single-file button.has-error.sc-swc-single-file span.sc-swc-single-file{color:var(--sfe-btn-color-content-bare-critical, #a22827)}.sc-swc-single-file-h .me-2.sc-swc-single-file{margin-right:8px}.sc-swc-single-file-h .me-1.sc-swc-single-file{margin-right:4px}.sc-swc-single-file-h .mt-2.sc-swc-single-file{margin-top:8px}.sc-swc-single-file-h .ms-3.sc-swc-single-file{margin-left:16px}.sc-swc-single-file-h .d-flex.sc-swc-single-file{display:flex}.sc-swc-single-file-h .align-items-center.sc-swc-single-file{align-items:center}.sc-swc-single-file-h .justify-content-end.sc-swc-single-file{justify-content:flex-end}.sc-swc-single-file-h .justify-content-between.sc-swc-single-file{justify-content:space-between}";export{n as swc_multiple_file,f as swc_single_file}
|
|
1
|
+
import{r as e,d as s,h as i,H as l}from"./p-CUS2AmqM.js";import{u as t}from"./p-DOY8Zr-F.js";const a=e=>e&&e.length>0?e.map(((e,s)=>{const i=e.name;return{id:s,name:i.substring(0,i.lastIndexOf("."))||i,size:`${(e.size/1024/1024).toFixed(2)} MB`}})):[],c=e=>0===Object.keys(e).length&&e.constructor===Object,n=class{constructor(i){e(this,i),this.updateRemove=s(this,"updateRemove",7),this.updateReplace=s(this,"updateReplace",7),this.uploadRetry=s(this,"uploadRetry",7)}fileInfo=[];inverted=!1;hasError=!1;progress=0;uniqueId=`multiple-file-${t().generate()}`;updateRemove;updateReplace;uploadRetry;get fileDetails(){return a(this.fileInfo)}handleUpdateReplace=(e,s)=>{e.preventDefault(),this.updateReplace.emit(s)};handleUpdateRemove=(e,s)=>{e.preventDefault(),this.updateRemove.emit(s)};handleUploadRetry=e=>{e.preventDefault(),this.uploadRetry.emit(null)};render(){return i(l,{key:"2ac121e3a8320c32e694a4e4a684e0527c9ef2db"},i("section",{key:"42e4a20a2b096218b8416e94b9f097ee16de88bd",class:{"multiple-file-choosen":!0,inverted:this.inverted,uploaded:100===this.progress,"has-error":this.hasError}},this.fileDetails.map(((e,s)=>i("div",{class:"multiple-file-choosen__wrapper",key:s},i("div",{class:"multiple-file-choosen__name"},e.name),i("div",{class:"multiple-file-choosen__size"},e.size),i("div",{class:"d-flex align-items-center justify-content-end"},i("swc-button",{size:"lg",intent:"brand",variant:"bare","aria-label":"replace",class:"mr-1",onClick:s=>this.handleUpdateReplace(s,e.id)},i("span",null,"Replace")),i("swc-icon-button",{intent:"neutral",variant:"bare",size:"lg","aria-label":"dismiss",onClick:s=>this.handleUpdateRemove(s,e.id)},i("swc-svg-icon",{name:"Dismiss",size:"16"})))))),this.progress>0&&100!==this.progress&&this.fileDetails.length>0&&!this.hasError&&i("swc-progress",{key:"3216027ca75a018466a9880f45522f24a08a0146",value:this.progress,max:100,class:"mt-2"}),!this.hasError&&this.fileDetails.length>0&&100===this.progress&&i("div",{key:"10e0c220f9d067b3a9fcb4465c774c5080cb6741",class:"d-flex align-items-center mt-2"},i("div",{key:"ae241bc2b77c88476fe00cb42bd2d969bcd074a8",class:"completed"},"Upload completed")),this.hasError&&i("div",{key:"f4145cd6d422f1aad9048c45d6446ab84a79b6df",class:"d-flex justify-content-between align-items-center mt-2"},i("div",{key:"12c0dea427fc9cf00fd181ff38d044f9c4ca9f73",class:"has-error"},i("swc-svg-icon",{key:"afff19f5d66979b48e136ea7b3e60f514f95215b",name:"Warning",size:"20",variant:"filled",color:"#bf3835",opacity:"1"})),i("swc-button",{key:"bfb59f691bb78aaf21d2c129e2bcff7b9dc5266b",size:"lg",intent:"neutral",variant:"bare","aria-label":"dismiss",class:"has-error",onClick:this.handleUploadRetry},i("span",{key:"6b6ef5ee8e0dfa93662b227773e1fc817e6b2fae"},"Retry")))))}};n.style=".sc-swc-multiple-file-h .me-2.sc-swc-multiple-file{margin-right:8px}.sc-swc-multiple-file-h .me-1.sc-swc-multiple-file{margin-right:4px}.sc-swc-multiple-file-h .mt-2.sc-swc-multiple-file{margin-top:8px}.sc-swc-multiple-file-h .d-flex.sc-swc-multiple-file{display:flex}.sc-swc-multiple-file-h .align-items-center.sc-swc-multiple-file{align-items:center}.sc-swc-multiple-file-h .justify-content-end.sc-swc-multiple-file{justify-content:flex-end}.sc-swc-multiple-file-h .justify-content-between.sc-swc-multiple-file{justify-content:space-between}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file{border-radius:var(--sfe-sizing-radius-default, 8px);background:var(--sfe-color-fill-neutral-lightest, #f5f7f9);padding:var(--sfe-sizing-gap-small, 8px) var(--sfe-sizing-gap-large, 16px) !important;margin-top:8px}.sc-swc-multiple-file-h .multiple-file-choosen.uploaded.sc-swc-multiple-file{background:var(--sfe-color-fill-brand-light, #e4edfc) !important}.sc-swc-multiple-file-h .multiple-file-choosen.inverted.sc-swc-multiple-file{border:1px solid var(--sfe-color-border-neutral-subtle, #dee3e7);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-multiple-file-h .multiple-file-choosen.has-error.sc-swc-multiple-file{background:var(--sfe-color-fill-critical-light, #f8e0e0)}.sc-swc-multiple-file-h .multiple-file-choosen.has-error.inverted.sc-swc-multiple-file{border:1px solid var(--sfe-color-border-critical-solid, #a22827);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-multiple-file-h .multiple-file-choosen__wrapper.sc-swc-multiple-file{display:grid;align-items:center;grid-template-columns:2fr 1fr 3fr;gap:22px}.sc-swc-multiple-file-h .multiple-file-choosen__name.sc-swc-multiple-file{color:var(--sfe-color-text-default-primary, rgba(0, 0, 0, 0.95));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:3rem}.sc-swc-multiple-file-h .multiple-file-choosen__size.sc-swc-multiple-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;white-space:nowrap}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file div.sc-swc-multiple-file div.completed.sc-swc-multiple-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-small, 0.75rem);font-style:normal;font-weight:400;line-height:14px}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file button.sc-swc-multiple-file span.sc-swc-multiple-file{color:var(--sfe-btn-color-content-bare-brand, #004ca6);font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-default, 0.875rem);font-style:normal;font-weight:400;line-height:16px}.sc-swc-multiple-file-h .multiple-file-choosen.sc-swc-multiple-file button.has-error.sc-swc-multiple-file span.sc-swc-multiple-file{color:var(--sfe-btn-color-content-bare-critical, #a22827)}";const f=class{constructor(i){e(this,i),this.updateRemove=s(this,"updateRemove",7),this.updateReplace=s(this,"updateReplace",7),this.uploadRetry=s(this,"uploadRetry",7)}fileInfo=[];extended=!1;thumbnail="file";inverted=!1;hasError=!1;progress=0;uniqueId=`single-file-${t().generate()}`;updateRemove;updateReplace;uploadRetry;get getFileExtension(){if(this.fileInfo.length>0){const e=this.fileInfo[0].name;return e.split(".").pop()?.toUpperCase()||""}return""}get fileExtensionColour(){return"var(--sfe-color-non-semantic-content-violet-subtle, #4E38BC)"}get fileFontSize(){return this.getFileExtension.length<=3?"13px":"10px"}get shouldShowFile(){return"file"===this.thumbnail||"photo"===this.thumbnail&&this.fileInfo.length>0&&!["PNG","JPEG","JPG"].includes(this.getFileExtension)}get createImageUrl(){return this.fileInfo.length>0?URL.createObjectURL(this.fileInfo[0]):""}get fileDetails(){return a(this.fileInfo)[0]}retryUpload=e=>{e.preventDefault(),this.uploadRetry.emit(null)};replaceFile=e=>{e.preventDefault(),this.updateReplace.emit(null)};removeFile=e=>{this.updateRemove.emit(e)};render(){return i(l,{key:"2fab112e5c844fa5f97055b99a0b361eb237dea1"},i("section",{key:"639d461a0e960a6aa07caa6c75fc121e974aa7b3",class:{"single-file-choosen":!0,inverted:this.inverted,uploaded:100===this.progress,"has-error":this.hasError,extended:this.extended}},!this.extended&&i("div",{key:"78f483485b126aba7c9a21eef0f9847886da8e33",class:"single-file-choosen__wrapper"},i("div",{key:"f47b8180558dd71e55526d80ec838b29d3c54ae3",class:"single-file-choosen__wrapper__name"},this.hasError&&i("swc-svg-icon",{key:"e0b2d269e2dd93bdc69bd60d1a40cbceeba15530",class:"me-2",name:"Warning",size:"20",variant:"filled",color:"#bf3835",opacity:"1"}),this.fileDetails.name),i("div",{key:"f14e897a0d73781f2cec35d330856b9ad7b41d53",class:"single-file-choosen__wrapper__size"},this.fileDetails.size),i("div",{key:"fe7ca3a0596fb70e2b176e37afca63a8266e754e"},this.progress>0&&100!==this.progress&&!c(this.fileDetails)&&!this.extended&&!this.hasError&&i("swc-progress",{key:"f44ed4a8b31ef8b0e9642b26c40f8da9e382130e",value:this.progress,max:100})),i("div",{key:"46a166784ebf4e862abb6c1ab0768d87d660c854",class:"d-flex align-items-center justify-content-end"},this.hasError&&!c(this.fileDetails)&&i("swc-button",{key:"2476338915301207f6a5beb8feda23c9e6239482",size:"lg",intent:"neutral",variant:"bare","aria-label":"dismiss",class:"has-error",onClick:this.retryUpload},i("span",{key:"f505613e2e793ab05ee4febff317a44dd0109747",class:"btn-span"},"Retry")),!this.hasError&&!c(this.fileDetails)&&(0===this.progress||100===this.progress)&&i("swc-button",{key:"2b999a7a2145ec98bd5831bede2b8ba44ac101c3",size:"lg",intent:"brand",variant:"bare","aria-label":"replace",class:"me-1",onClick:this.replaceFile},i("span",{key:"2fccac6c8969b39b81ab67d709202144189295aa",class:"btn-span"},"Replace")),i("swc-icon-button",{key:"d3073d0cd23f07dca6536f3f92d51d07f4fbf56e",intent:"neutral",variant:"bare",size:"lg","aria-label":"dismiss",onClick:()=>this.removeFile(this.fileDetails.id)},i("swc-svg-icon",{key:"f38f18b3cc67200a7827c3a7bb33aa3df1f29ba9",name:"Dismiss",size:"16"})))),this.extended&&i("div",{key:"43a8ee67f8ebff72f424f3d440c177d36ee31bcc",class:{"single-file-choosen__extended-wrapper":!0,"no-thumbnail":"none"===this.thumbnail}},"none"!==this.thumbnail&&i("div",{key:"f3f19be181db8ef6814b0730d6f40bcb64f06f91",class:"file__extension"},this.shouldShowFile&&i("div",{key:"4b6f20045850df9b52554096e09c0bcc0e3590ed"},i("svg",{key:"cf71598fbe08e2a3c4ecd1cb826f1283d6df702b",width:"32",height:"40",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{key:"27d711f22f4ec2ac3a9540e74df1abcf4685de72",d:"M1 6C1 3.5 3.5 1 6 1H21.1071C21.9328 1 22.1149 1.10983 22.6954 1.70367C25.2864 4.35425 28.1524 7.58204 30.3895 9.88063C30.9814 10.4888 31 10.6512 31 11.5V33.5C31 36.5 29.5 39 26 39H6C2.5 39 1 36 1 33.5V6Z",fill:"white",stroke:this.fileExtensionColour,"stroke-width":"1.5"})),i("div",{key:"ee837e612c9f033fbcec55ee1ce0950dd3ffd2a8",class:"file-type",style:{color:this.fileExtensionColour,fontSize:this.fileFontSize}},this.getFileExtension)),"photo"===this.thumbnail&&["PNG","JPEG","JPG"].includes(this.getFileExtension)&&!c(this.fileDetails)&&i("div",{key:"32d1563799342b9f2aa8e3ebbac820ceb5f57bfa",class:"file-img"},i("img",{key:"0bc0df2523031afcfaeb54089c11ef08dd50454d",src:this.createImageUrl,alt:this.fileDetails.name}))),i("div",{key:"f279610d5ad3d4c22521a007a840e2506e3cb865",class:{file:!0,"ms-3":"none"!==this.thumbnail}},i("div",{key:"d221185222370b2d54633c065f01871af85c34ed",class:"file__identifier"},i("div",{key:"3d2ff31776de4987d4383bf90fc3c45a89918156",class:"file__identifier__name"},this.fileDetails.name),i("div",{key:"d200b7d35d69e6591f34eb112e308f582dc62973",class:"d-flex align-items-center justify-content-end"},this.hasError&&!c(this.fileDetails)&&i("swc-button",{key:"7be11951f87101f733d5b2f32df3fdcfdee175a0",size:"md",intent:"neutral",variant:"bare","aria-label":"dismiss",class:"has-error",onClick:this.retryUpload},i("span",{key:"b7115268487a3f188a57efeda21236a9954574c1",class:"btn-span"},"Retry")),!this.hasError&&!c(this.fileDetails)&&(0===this.progress||100===this.progress)&&i("swc-button",{key:"d2661388b5050bfdb6a721d92039d67df5159d1a",size:"md",intent:"brand",variant:"bare","aria-label":"replace",class:"me-1",onClick:this.replaceFile},i("span",{key:"8b757acd9f74c3bd294c572c8586b1d4ed92b8b7",class:"btn-span"},"Replace")),i("swc-icon-button",{key:"46274785adfdc8127a6b92ab97732703d439c276",intent:"neutral",variant:"bare",size:"md","aria-label":"dismiss",onClick:()=>this.removeFile(this.fileDetails.id)},i("swc-svg-icon",{key:"1c9bcf75c9fb977a2861d4380a18aa4ce04761ff",name:"Dismiss",size:"16"})))),i("div",{key:"4f07be25cb80a617290097df6848165315dcdaeb",class:"file__identifier__size mt-3 d-flex align-items-center"},this.hasError&&i("div",{key:"05897812cb36ad1ef2c3f9ec93499462347b5855"},i("swc-svg-icon",{key:"4f8468089465ff447a34d5c9c98d4c7549729141","v-if":"hasError",class:"me-2",name:"Warning",size:"20",variant:"filled",color:"#bf3835",opacity:"1"})),i("span",{key:"8b24ca1d228b070f1b9e4b9f2aa7e09e7e5ad379"},this.fileDetails.size)))),this.progress>0&&100!==this.progress&&this.extended&&!c(this.fileDetails)&&!this.hasError&&i("swc-progress",{key:"6fc1066072eed483fcfdd4316cee67e3dce75f95",value:this.progress,max:100})))}};f.style=".sc-swc-single-file-h .single-file-choosen.sc-swc-single-file{border-radius:var(--sfe-sizing-radius-default, 8px);background:var(--sfe-color-fill-neutral-lightest, #f5f7f9);padding:0 var(--sfe-sizing-gap-large, 16px)}.sc-swc-single-file-h .single-file-choosen.uploaded.sc-swc-single-file{background:var(--sfe-color-fill-brand-light, #e4edfc) !important}.sc-swc-single-file-h .single-file-choosen.inverted.sc-swc-single-file{border:1px solid var(--sfe-color-border-neutral-subtle, #dee3e7);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-single-file-h .single-file-choosen.has-error.sc-swc-single-file{background:var(--sfe-color-fill-critical-light, #f8e0e0)}.sc-swc-single-file-h .single-file-choosen.has-error.inverted.sc-swc-single-file{border:1px solid var(--sfe-color-border-critical-solid, #a22827);background:var(--sfe-color-fill-backround, #fafbff)}.sc-swc-single-file-h .single-file-choosen.extended.sc-swc-single-file{padding:var(--sfe-sizing-gap-large, 16px) !important}.sc-swc-single-file-h .single-file-choosen.sc-swc-single-file .btn-span.sc-swc-single-file{color:var(--sfe-btn-color-content-bare-brand, #004ca6);font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-default, 0.875rem);font-style:normal;font-weight:400;line-height:16px}.sc-swc-single-file-h .single-file-choosen__wrapper.sc-swc-single-file{display:grid;align-items:center;grid-template-columns:2fr 1fr 3fr 1fr;gap:10px}.sc-swc-single-file-h .single-file-choosen__wrapper__name.sc-swc-single-file{color:var(--sfe-color-text-default-primary, rgba(0, 0, 0, 0.95));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:4.5rem}.sc-swc-single-file-h .single-file-choosen__wrapper__size.sc-swc-single-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;white-space:nowrap}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file{display:grid;align-items:center;grid-template-columns:1fr 24fr}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.no-thumbnail.sc-swc-single-file{grid-template-columns:1fr}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file{position:relative;width:32px;height:40px}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file .file-type.sc-swc-single-file{position:absolute;transform:translate(-50%, -50%);top:65%;left:50%}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file .file-img.sc-swc-single-file img.sc-swc-single-file{width:32px;height:32px;border-radius:4px}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__extension.sc-swc-single-file:empty{display:none}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__identifier.sc-swc-single-file{display:grid;grid-template-columns:3fr 1fr;align-items:center}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__identifier__name.sc-swc-single-file{color:var(--sfe-color-text-default-primary, rgba(0, 0, 0, 0.95));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;min-width:3.4rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sc-swc-single-file-h .single-file-choosen__extended-wrapper.sc-swc-single-file .file__identifier__size.sc-swc-single-file span.sc-swc-single-file{color:var(--sfe-color-text-default-secondary, rgba(0, 0, 0, 0.8));font-family:var(--sfe-typography-font-serif-font, Sora);font-size:var(--sfe-typography-font-size-label-large, 1rem);font-style:normal;font-weight:400;line-height:20px;white-space:nowrap}.sc-swc-single-file-h .single-file-choosen.sc-swc-single-file button.has-error.sc-swc-single-file span.sc-swc-single-file{color:var(--sfe-btn-color-content-bare-critical, #a22827)}.sc-swc-single-file-h .me-2.sc-swc-single-file{margin-right:8px}.sc-swc-single-file-h .me-1.sc-swc-single-file{margin-right:4px}.sc-swc-single-file-h .mt-2.sc-swc-single-file{margin-top:8px}.sc-swc-single-file-h .ms-3.sc-swc-single-file{margin-left:16px}.sc-swc-single-file-h .d-flex.sc-swc-single-file{display:flex}.sc-swc-single-file-h .align-items-center.sc-swc-single-file{align-items:center}.sc-swc-single-file-h .justify-content-end.sc-swc-single-file{justify-content:flex-end}.sc-swc-single-file-h .justify-content-between.sc-swc-single-file{justify-content:space-between}";export{n as swc_multiple_file,f as swc_single_file}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as s}from"./p-CUS2AmqM.js";const a=class{constructor(t){e(this,t)}testId="";render(){return t(s,{key:"e860ed5f9c44eb666d7c996b106ea2624c847b9c",class:"sfe-table-footer","data-testid":`swc-table-footer-${this.testId}`},t("slot",{key:"f743bab38b277c4713dbe4950ba12fe2c3b706f8"}))}};export{a as swc_table_footer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,d as s,e as t,h as i}from"./p-CUS2AmqM.js";import{u as r}from"./p-DOY8Zr-F.js";const a=class{constructor(t){e(this,t),this.stepChanged=s(this,"stepChanged",7)}get hostElement(){return t(this)}orientation="horizontal";activeIndex=0;withCheckmark=!0;lineSize="150px";testId="";stepChanged;stepItemIds=[];provide=()=>{const e=this.hostElement.querySelectorAll("swc-stepper-item");e.forEach(((s,t)=>{s.activeIndex=this.activeIndex,s.orientation=this.orientation,s.withCheckmark=this.withCheckmark,s.lineSize=this.lineSize,s.index=t,s.isLastItem=t===e.length-1,s.idProp=r().generate(`sfe-stepper-item-${t}`),this.stepItemIds.push(s.idProp)}))};render(){return this.provide(),i("div",{key:"aef80769eeef48547fe02ba74e3a5ea21bb4c94d","aria-orientation":this.orientation,class:`sfe-stepper ${this.orientation}`,"data-testid":`swc-stepper-${this.testId}`},i("slot",{key:"7caee4a9dbc86646c40dace96ae611a06ed45821"}))}};a.style=".sfe-stepper.sc-swc-stepper{display:inline-flex;position:relative}.sfe-stepper.vertical.sc-swc-stepper{flex-direction:column}";export{a as swc_stepper}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,d as a,h as t}from"./p-CUS2AmqM.js";const i=class{constructor(t){e(this,t),this.searchInput=a(this,"searchInput",7),this.toggleSearchInput=a(this,"toggleSearchInput",7),this.showNotification=a(this,"showNotification",7)}maxWidth="100%";roleWrapperWidth=152;hasNotifications=!0;hasReadNotifications=!1;hasUserRoleDropdown=!0;hasSearch=!0;testId="";areLinksVisible=!0;isSearchVisible=!1;searchQuery="";searchInput;toggleSearchInput;showNotification;get roleMenuStyleObj(){return{minWidth:"152px",width:`${this.roleWrapperWidth}px`}}handleInputEventChange(e){const a=e.detail.value;this.searchQuery=a,this.searchInput.emit(a)}toggleSearch=async()=>{this.areLinksVisible?(this.areLinksVisible=!1,setTimeout((()=>{this.isSearchVisible=!0}),400)):(this.isSearchVisible=!1,setTimeout((()=>{this.areLinksVisible=!0}),400))};handleInputChange=e=>{this.searchQuery=e,this.searchInput.emit(e)};handleStopPropagation=e=>{e.stopPropagation()};handleShowNotification=()=>{this.showNotification.emit(!0)};searchVisibleChangeHandler(e){this.toggleSearchInput.emit(e)}render(){return t("header",{key:"f0ca5bfe8bcbd155745d730d3b258526ea732706",class:"topnav","data-testid":`swc-top-nav-${this.testId}`,style:{"--max-width":this.maxWidth}},t("div",{key:"b19667e73cab2b9a3f97b9a39d1b177ef8f7b107",class:"topnav__content"},t("div",{key:"028dcfbb71f2fe0cf8d73e5f6a284aebe51e626f",class:"topnav__left"},t("div",{key:"e8b516a9e00ec930f86d9050d20c4c29657f1e8d",class:"topnav__brand"},t("slot",{key:"55f21e006ca3209e45b9da52c2fa561c24fd8db0",name:"companyLogo"},"Logo")),t("div",{key:"352c68bd53412898c668b8827c26e5ec03239a47",class:{topnav__links:!0,"fade-enter":this.areLinksVisible,"fade-leave-to":!this.areLinksVisible}},t("slot",{key:"4a9b739f75ae7838ac28ecd7e18631b3e9f7a9ee",name:"navLinks"}))),t("div",{key:"26131fb249cd5ed54dc04c6a4bf9f5432162e818",class:{"topnav__search-container":!0,"slide-fade-enter-from":this.isSearchVisible,"slide-fade-leave-to":!this.isSearchVisible},onClick:this.handleStopPropagation},t("swc-input",{key:"7f22798d8acc8cd91826e1fbfc610096346ceb12",value:this.searchQuery,type:"search",placeholder:"Search hint",variant:"faded",containerClass:"w-40 search-transition","arial-expanded":!0,"arial-label":!0,handleInputChange:this.handleInputChange},t("span",{key:"2d5504e78d11589fed77bd174757a34236477d52",slot:"leftAddon"},t("svg",{key:"7b5284b292c7a7c90bafe341d1ba8543c9f977c1",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},t("path",{key:"1ae20da73ec3568bbda97196c103cef2365b0b9e",d:"M8.19009 14.0467C4.68621 14.0467 1.8335 11.194 1.8335 7.69009C1.8335 4.18621 4.68621 1.3335 8.19009 1.3335C11.694 1.3335 14.5467 4.18621 14.5467 7.69009C14.5467 11.194 11.694 14.0467 8.19009 14.0467ZM8.19009 2.26373C5.19474 2.26373 2.76373 4.70094 2.76373 7.69009C2.76373 10.6792 5.19474 13.1164 8.19009 13.1164C11.1854 13.1164 13.6164 10.6792 13.6164 7.69009C13.6164 4.70094 11.1854 2.26373 8.19009 2.26373Z",fill:"black","fill-opacity":"0.7"}),t("path",{key:"bd8d3d2601bad8c954bbbfe76b14fad191277c8b",d:"M14.7017 14.6668C14.5839 14.6668 14.4661 14.6234 14.373 14.5304L13.1327 13.2901C12.9529 13.1102 12.9529 12.8126 13.1327 12.6327C13.3126 12.4529 13.6102 12.4529 13.7901 12.6327L15.0304 13.873C15.2102 14.0529 15.2102 14.3506 15.0304 14.5304C14.9374 14.6234 14.8195 14.6668 14.7017 14.6668Z",fill:"black","fill-opacity":"0.7"})))),t("div",{key:"5f6d97503da64ad654651d3a8566b4c216ce3148",class:"search-list"},this.isSearchVisible&&t("slot",{key:"e890ef95885a30a853c95f25ad74bfcf7ff7fe0b",name:"searchList"}))),t("div",{key:"e1e1e6791bae08993f6555f727b0c9a330a49750",class:"topnav__right"},this.hasSearch&&t("swc-icon-button",{key:"724ee9e0560811a6a20fdd1cccaafd40e7876734",intent:"neutral",variant:"bare",size:"lg","aria-label":"Search",class:"topnav__search-icon",round:!0,onClick:this.toggleSearch},this.isSearchVisible?t("swc-svg-icon",{name:"Dismiss",size:"16"}):t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t("path",{d:"M7.69009 14.0467C4.18621 14.0467 1.3335 11.194 1.3335 7.69009C1.3335 4.18621 4.18621 1.3335 7.69009 1.3335C11.194 1.3335 14.0467 4.18621 14.0467 7.69009C14.0467 11.194 11.194 14.0467 7.69009 14.0467ZM7.69009 2.26373C4.69474 2.26373 2.26373 4.70094 2.26373 7.69009C2.26373 10.6792 4.69474 13.1164 7.69009 13.1164C10.6854 13.1164 13.1164 10.6792 13.1164 7.69009C13.1164 4.70094 10.6854 2.26373 7.69009 2.26373Z",fill:"black","fill-opacity":"0.7"}),t("path",{d:"M14.2017 14.6668C14.0839 14.6668 13.9661 14.6234 13.873 14.5304L12.6327 13.2901C12.4529 13.1102 12.4529 12.8126 12.6327 12.6327C12.8126 12.4529 13.1102 12.4529 13.2901 12.6327L14.5304 13.873C14.7102 14.0529 14.7102 14.3506 14.5304 14.5304C14.4374 14.6234 14.3195 14.6668 14.2017 14.6668Z",fill:"black","fill-opacity":"0.7"}))),this.hasUserRoleDropdown&&t("swc-dropdown",{key:"47ade5795dfa636b257dc703cf508c318848e6f3",class:"topnav__role-switch"},t("span",{key:"feba38c19156b55d907e865e1dae92229877f0e7",slot:"trigger"},t("swc-dropdown-trigger",{key:"31ecdfd89c64875a166ed6043509da946b52ba6f",size:"md",style:this.roleMenuStyleObj},t("div",{key:"2d7bd989b36cc6c65ce6fe5095e463a0ac99bd85",class:"topnav__role-liner"},t("swc-svg-icon",{key:"8563abc06836c4093b6cfe1ecf4732283efec7d5",name:"Person",variant:"filled",size:"20"})," ",t("slot",{key:"e0c184a9c3e0d3a3076757b97ae784cf10c37a17",name:"roleSelected"})))),t("span",{key:"ef778743b3214b1118cf4d12a3740bdeb46ce793",slot:"list"},t("slot",{key:"5a825d6c5a4ab39dc62cf5bad5659275a0ca2a02",name:"userRolesList"},"User Role Dropdown Menu"))),this.hasNotifications&&t("div",{key:"98f27746ebfb9249130b513c6cd93d6be6809a34",class:"topnav__notification"},t("swc-dropdown",{key:"5c260978902b533637217a4a7cb541652bf3c48b"},t("span",{key:"a55440317ed5ccd6ad83f6ad27254f3ec5a5ea84",slot:"trigger"},t("swc-icon-button",{key:"33762acb02d1046d5de2052a7bdc96c64ecf3bb5",intent:"brand",variant:"ghost",size:"lg","aria-label":"Alert",class:"alert-btn",round:!0,onClick:this.handleShowNotification},t("svg",{key:"9f7ab0cef593f6a0d87fb02f0df2b8555e3e3c6b",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t("path",{key:"49baf7836deee9609e83953dfb76ed4fa803cc7c",d:"M7.9979 0C11.1469 0 13.7418 2.33488 13.9824 5.3554L13.9958 5.57762L14.0003 5.80214L13.9993 9.398L14.9247 11.6202C14.9472 11.6743 14.9649 11.7302 14.9776 11.7871L14.9929 11.8733L15.0015 12.0046C15.0015 12.4526 14.705 12.8387 14.2524 12.9677L14.136 12.9945L14.0015 13.0046L10.4999 13.004L10.4949 13.1653C10.4098 14.469 9.32542 15.5 8.00026 15.5C6.67478 15.5 5.59022 14.4685 5.50558 13.1644L5.49986 13.004L1.99915 13.0046C1.9112 13.0046 1.82383 12.993 1.73927 12.9702L1.61481 12.9277C1.20403 12.7567 0.962056 12.3392 1.01246 11.8757L1.03354 11.7483L1.07596 11.6202L1.99926 9.401L2.00035 5.79281L2.00465 5.56824C2.12726 2.45115 4.77129 0 7.9979 0ZM9.49986 13.004H6.49986L6.50722 13.1454C6.57576 13.8581 7.143 14.425 7.8558 14.4931L8.00026 14.5C8.77996 14.5 9.42071 13.9051 9.49339 13.1445L9.49986 13.004ZM7.9979 1C5.37535 1 3.22741 2.92372 3.0174 5.38498L3.00417 5.59723L3.00026 5.80214V9.5L2.96185 9.69217L1.99914 12.0046L13.9569 12.0066L14.0021 12.0045L13.0387 9.6922L13.0003 9.5L13.0004 5.81241L12.9963 5.60831C12.8911 3.0349 10.6949 1 7.9979 1Z",fill:"#004CA6"})),!this.hasReadNotifications&&t("div",{key:"a3c16749e3fd4f5ca5aa0341f86bac4efdc2a2db",class:"notify"},t("svg",{key:"5043884ee229120414767d8f38cd1774d6144a29",xmlns:"http://www.w3.org/2000/svg",width:"4",height:"4",viewBox:"0 0 4 4",fill:"none"},t("circle",{key:"b370e07c8c5d0032594bff209c403d17fdbebda7",cx:"2",cy:"2",r:"2",fill:"var(--sfe-color-non-semantic-fill-red-strong)"}))))),t("span",{key:"c70e9efff0a6e5be5af3ebe41638bb4e3b0c454a",slot:"list"},t("slot",{key:"271cfceb6dc63e98325cf108e920d10f1d01ac2b",name:"notificationsList"})))),t("div",{key:"8308d0157ab1068d514dae0a5f28cca2ef78adb3",class:"topnav__avatar"},t("slot",{key:"7b499933bfc8396f11924682266de4fbc2b7de17",name:"userAvatar"})))))}static get watchers(){return{isSearchVisible:[{searchVisibleChangeHandler:0}]}}};i.style=".topnav{position:fixed;top:0;left:0;width:100%;z-index:var(--sfe-stack-level-navs);background:var(--sfe-color-fill-surface)}.topnav__content{border-bottom:0.8px solid var(--sfe-color-border-neutral-light);display:flex;padding:var(--sfe-sizing-gap-mid) var(--sfe-sizing-padding-large);justify-content:space-between;align-items:center;margin-inline:auto;height:var(--sfe-sizing-size-640, 64px);max-width:var(--max-width)}.topnav__links{transition:opacity 0.3s ease}.topnav__role-liner{display:flex;align-items:center}.topnav__left,.topnav__search-container,.topnav__right{display:flex;align-items:center}.topnav__left .topnav__brand{max-height:40px;overflow:hidden;width:auto;display:inline-block}.topnav__left .topnav__brand svg{width:auto;height:100%}.topnav__left .topnav__links{display:flex;margin-left:26px}.topnav__search-container{transition:opacity 0.3s ease, transform 0.3s ease;position:relative;justify-content:center;width:40%}.topnav__search-container .search-list{position:relative}.topnav__right{padding:0 24px 0 8px;justify-content:center;align-items:center}.topnav__right .topnav__search-icon,.topnav__right .topnav__role-switch,.topnav__right .topnav__notification,.topnav__right .topnav__avatar{margin:0 12px}.topnav__right .topnav__notification{position:relative}.topnav__right .topnav__notification .alert-btn .notify{position:absolute;right:13px;top:3px}.topnav__right .topnav__notification .topnav__notification-list{position:relative}.topnav__right .topnav__avatar{align-items:center}.w-40{width:36vw}.fade-leave-to{opacity:0}.fade-enter{opacity:1}.slide-fade-leave-to{transform:translateY(-10px);opacity:0}.slide-fade-enter-from{transform:translateY(0);opacity:1}";export{i as swc_top_nav}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,d as s,h as a}from"./p-CUS2AmqM.js";const i=class{constructor(a){e(this,a),this.closeModal=s(this,"closeModal",7)}isModalOpen=!1;closeOnEsc=!0;closeOnOverlayClick=!0;size="sm";position="right";testId="";closeModal;closeDialog=()=>{this.closeModal.emit()};render(){return a("swc-modal-root",{key:"2109a329ba0c16d3c3670e113991950ed1aca947",isModalOpen:this.isModalOpen,closeOnEsc:this.closeOnEsc,closeOnOverlayClick:this.closeOnOverlayClick,onCloseModal:this.closeDialog,"data-testid":`swc-side-panel-${this.testId}`},a("div",{key:"29ee628803432a2d2b63b03ca20c6dd211153199",class:`sfe-side-panel sfe-side-panel--${this.position} sfe-side-panel--${this.size}`},a("header",{key:"d1397bcabb9ba65e5fcf68f9144d11a6df96a02f",class:"sfe-side-panel__header"},a("div",{key:"b0b772cc8ab15030f1c0f6fb0260c6230d689416"},a("h3",{key:"18d24ba7ab8ff62b372fe968971f17b03548d3c8",class:"sfe-side-panel__title"},a("slot",{key:"577dbc3cd9c873e9b5b052ab5227999f66a01885",name:"title"})),a("p",{key:"0dd48b9a644f6f777167fe35ae26012a6dfc9999",class:"sfe-side-panel__description"},a("slot",{key:"b0cfbbc74b73e1f82f192e7a9ed6627767c7fa23",name:"description"}))),a("swc-button",{key:"0322a40064c54b9d9d331dc85d1f81c17d551563",round:!0,intent:"neutral",variant:"bare",size:"md","aria-label":"Close",onClick:this.closeDialog},"×")),a("section",{key:"6f3695ffa95dc177592d91d3b6071de30755eda4",class:"sfe-side-panel__body"},a("slot",{key:"adb6cf84a662c0719a8564aae686c621c1cf62e9",name:"body"})),a("footer",{key:"6181329d9d70504c0048c6604c320168129607b0",class:"sfe-side-panel__footer"},a("slot",{key:"538c84d304e9675f8281ac2f2646b7d1e16a2d33",name:"footer"}))))}};i.style=".sfe-side-panel.sc-swc-side-panel{display:flex;flex-direction:column;height:100vh;background-color:white;position:fixed;top:0;bottom:0}.sfe-side-panel--right.sc-swc-side-panel{right:0;animation:slide-left 0.3s ease}.sfe-side-panel--left.sc-swc-side-panel{left:0;animation:slide-right 0.3s ease}.sfe-side-panel--sm.sc-swc-side-panel{width:360px}.sfe-side-panel--md.sc-swc-side-panel{width:480px}.sfe-side-panel--lg.sc-swc-side-panel{width:640px}.sfe-side-panel__header.sc-swc-side-panel{display:flex;justify-content:space-between;align-items:center;padding:1em;border-bottom:1px solid #ccc}.sfe-side-panel__title.sc-swc-side-panel{font-size:1rem;font-weight:500;margin:0}.sfe-side-panel__description.sc-swc-side-panel{font-size:0.875rem;color:gray;margin:0}.sfe-side-panel__body.sc-swc-side-panel{padding:1em;overflow-y:auto}.sfe-side-panel__footer.sc-swc-side-panel{padding:1em;margin:auto auto 2em 0;text-align:right}@keyframes slide-left{from{opacity:0;transform:translateX(50%)}}@keyframes slide-right{from{opacity:0;transform:translateX(-50%)}}";export{i as swc_side_panel}
|