@smartos-lib/components 1.8.3 → 1.9.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1 @@
1
- var N,M,_;(function(f,g,R){"use strict";function h(e){return Object.prototype.toString.call(e)==="[object Object]"}function C(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function O(){return String.fromCharCode(C(97,122))}function B(){return String.fromCharCode(C(65,90))}function v(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let l;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(l=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=l>1?C(0,l-1):0,b=o[p];b==="l"?c+=O():b==="u"?c+=B():b==="n"&&(c+=C(0,9))}return c}function z(){return v(1,{uppercase:!0})+v(17,{uppercase:!0,number:!0})}function U(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(h(r)||(o=Array.isArray(r))){let l;if(n.has(r))l=n.get(r);else{let c;l=o?Array.isArray(c=e[t])?c:[]:h(c=e[t])?c:{},U(l,r,n)}e[t]=l}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!h(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(h(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)U(e,t,n);return e}const I=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},A={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},w={common:{fontFamily:A.sans,fontFamilyMono:A.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},w,{}),L({},w,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const V="1.8.3";function G(e,a){let n,t,r;const o=f.ref(!0),l=()=>{o.value=!0,r()};f.watch(e,l,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(u){p==null||p(u)}}));return Object.isExtensible(b)&&(b.trigger=l),b}function q(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function x(e){return typeof e=="function"?e():f.unref(e)}function H(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function j(e){return H(f.computed(e))}function W(e,...a){const n=a.flat(),t=n[0];return j(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(x(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const $=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function K(e,a,n){return f.watch(e,a,{...n,deep:!0})}function J(e){var a;const n=x(e);return(a=n==null?void 0:n.$el)!=null?a:n}const Q=$?window:void 0;function X(){const e=f.ref(!1);return f.getCurrentInstance()&&f.onMounted(()=>{e.value=!0}),e}function Y(e){const a=X();return f.computed(()=>(a.value,!!e()))}function Z(e,a,n={}){const{window:t=Q,...r}=n;let o;const l=Y(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.watch(()=>J(e),s=>{c(),l.value&&t&&s&&(o=new MutationObserver(a),o.observe(s,r))},{immediate:!0}),b=()=>o==null?void 0:o.takeRecords(),d=()=>{c(),p()};return q(d),{isSupported:l,stop:d,takeRecords:b}}function T(){const e=f.getCurrentInstance(),a=G(()=>null,()=>e.proxy.$el);return f.onUpdated(a.trigger),f.onMounted(a.trigger),a}function ee(e=z()){const a=T(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}Z(document.head,t,{childList:!0}),t()}),e}function fe(){const e=T();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[V])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:ee()}}const ae=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=fe(),l=W(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:u,onProgress:F}){const S=d.file,re=n.beforeUpload??(y=>y),P=new FormData;P.set("file",S);const oe=re({method:"post",url:"/admin/sys-file/upload",data:P,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:y,total:m}){F({percent:m?Math.ceil(y/m*100):0})}});R.getConfigProvider("request")(oe).then(y=>{const m=y.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:E})=>E===d.id),1,d),t.value.find(({fileName:E})=>E===m.url)||t.value.push({fileName:m.url,originalFileName:S.name}),s()}).catch(y=>{d.status="error",n.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),u(),console.error(y)})}function b(){setTimeout(()=>{for(let d=0;d<t.value.length;){const s=t.value[d].fileName;c.value.some(u=>u.url===s)?d++:t.value.splice(d,1)}},10)}return K(t,d=>{d.forEach(({fileName:s})=>{c.value.some(u=>u.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const u=c.value[s];u.status==="finished"&&u.url&&!d.some(({fileName:F})=>F===u.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(w),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(l),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=u=>f.isRef(c)?c.value=u:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",[`*[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }
2
- `]],["__scopeId","data-v-da18f512"]]),te="smart-upload";function ne(e,a){var n;I&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function k(e,a){return e._instance.exposed[a]}const D=f.defineCustomElement(ae);Object.assign(D.prototype,{getUploadRef(){return k(this,"uploadRef").value},getFileList(){return k(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),ne(te,D)})((N=SmartCore["1.8.3"])==null?void 0:N.Vue,(M=SmartCore["1.8.3"])==null?void 0:M.NaiveUI,(_=SmartCore["1.8.3"])==null?void 0:_.SmartCore);
1
+ var M,_,R;(function(f,g,O){"use strict";function w(e){return Object.prototype.toString.call(e)==="[object Object]"}function C(e,a){return Math.floor(Math.random()*(a-e+1)+e)}function B(){return String.fromCharCode(C(97,122))}function z(){return String.fromCharCode(C(65,90))}function U(e=12,a={}){const{lowercase:n=!0,uppercase:t=!1,number:r=!1}=a,o=[];let u;if(n&&o.push("l"),t&&o.push("u"),r&&o.push("n"),!(u=o.length))throw new Error("???");let c="";for(;e-- >0;){const p=u>1?C(0,u-1):0,b=o[p];b==="l"?c+=B():b==="u"?c+=z():b==="n"&&(c+=C(0,9))}return c}function I(){return U(1,{uppercase:!0})+U(17,{uppercase:!0,number:!0})}function A(e,a,n){n.set(a,e);for(const[t,r]of Object.entries(a)){let o=!1;if(w(r)||(o=Array.isArray(r))){let u;if(n.has(r))u=n.get(r);else{let c;u=o?Array.isArray(c=e[t])?c:[]:w(c=e[t])?c:{},A(u,r,n)}e[t]=u}else r!==void 0&&(e[t]=r)}}function L(e,...a){if(!w(e)&&!Array.isArray(e)||!a.length)return e;const n=new WeakMap;n.set(e,e);for(let t=0;t<a.length;){const r=a[t];if(w(r)||Array.isArray(r)){n.set(r,e),t++;continue}a.splice(t,1)}for(const t of a)A(e,t,n);return e}const V=typeof window<"u",i={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",rose:{1:"#ffe4e6",2:"#fecdd3",3:"#fda4af",4:"#fb7185",5:"#f43f5e",6:"#e11d48",7:"#be123c",8:"#9f1239",9:"#881337",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519",DEFAULT:"#fb7185"},pink:{1:"#fce7f3",2:"#fbcfe8",3:"#f9a8d4",4:"#f472b6",5:"#ec4899",6:"#db2777",7:"#be185d",8:"#9d174d",9:"#831843",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724",DEFAULT:"#f472b6"},fuchsia:{1:"#fae8ff",2:"#f5d0fe",3:"#f0abfc",4:"#e879f9",5:"#d946ef",6:"#c026d3",7:"#a21caf",8:"#86198f",9:"#701a75",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e",DEFAULT:"#e879f9"},purple:{1:"#f3e8ff",2:"#e9d5ff",3:"#d8b4fe",4:"#c084fc",5:"#a855f7",6:"#9333ea",7:"#7e22ce",8:"#6b21a8",9:"#581c87",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764",DEFAULT:"#c084fc"},violet:{1:"#ede9fe",2:"#ddd6fe",3:"#c4b5fd",4:"#a78bfa",5:"#8b5cf6",6:"#7c3aed",7:"#6d28d9",8:"#5b21b6",9:"#4c1d95",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065",DEFAULT:"#a78bfa"},indigo:{1:"#e0e7ff",2:"#c7d2fe",3:"#a5b4fc",4:"#818cf8",5:"#6366f1",6:"#4f46e5",7:"#4338ca",8:"#3730a3",9:"#312e81",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b",DEFAULT:"#818cf8"},blue:{1:"#dbeafe",2:"#bfdbfe",3:"#93c5fd",4:"#60a5fa",5:"#3b82f6",6:"#2563eb",7:"#1d4ed8",8:"#1e40af",9:"#1e3a8a",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554",DEFAULT:"#60a5fa"},sky:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},cyan:{1:"#cffafe",2:"#a5f3fc",3:"#67e8f9",4:"#22d3ee",5:"#06b6d4",6:"#0891b2",7:"#0e7490",8:"#155e75",9:"#164e63",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344",DEFAULT:"#22d3ee"},teal:{1:"#ccfbf1",2:"#99f6e4",3:"#5eead4",4:"#2dd4bf",5:"#14b8a6",6:"#0d9488",7:"#0f766e",8:"#115e59",9:"#134e4a",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e",DEFAULT:"#2dd4bf"},emerald:{1:"#d1fae5",2:"#a7f3d0",3:"#6ee7b7",4:"#34d399",5:"#10b981",6:"#059669",7:"#047857",8:"#065f46",9:"#064e3b",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22",DEFAULT:"#34d399"},green:{1:"#dcfce7",2:"#bbf7d0",3:"#86efac",4:"#4ade80",5:"#22c55e",6:"#16a34a",7:"#15803d",8:"#166534",9:"#14532d",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16",DEFAULT:"#4ade80"},lime:{1:"#ecfccb",2:"#d9f99d",3:"#bef264",4:"#a3e635",5:"#84cc16",6:"#65a30d",7:"#4d7c0f",8:"#3f6212",9:"#365314",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05",DEFAULT:"#a3e635"},yellow:{1:"#fef9c3",2:"#fef08a",3:"#fde047",4:"#facc15",5:"#eab308",6:"#ca8a04",7:"#a16207",8:"#854d0e",9:"#713f12",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006",DEFAULT:"#facc15"},amber:{1:"#fef3c7",2:"#fde68a",3:"#fcd34d",4:"#fbbf24",5:"#f59e0b",6:"#d97706",7:"#b45309",8:"#92400e",9:"#78350f",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03",DEFAULT:"#fbbf24"},orange:{1:"#ffedd5",2:"#fed7aa",3:"#fdba74",4:"#fb923c",5:"#f97316",6:"#ea580c",7:"#c2410c",8:"#9a3412",9:"#7c2d12",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407",DEFAULT:"#fb923c"},red:{1:"#fee2e2",2:"#fecaca",3:"#fca5a5",4:"#f87171",5:"#ef4444",6:"#dc2626",7:"#b91c1c",8:"#991b1b",9:"#7f1d1d",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a",DEFAULT:"#f87171"},gray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},slate:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},zinc:{1:"#f4f4f5",2:"#e4e4e7",3:"#d4d4d8",4:"#a1a1aa",5:"#71717a",6:"#52525b",7:"#3f3f46",8:"#27272a",9:"#18181b",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b",DEFAULT:"#a1a1aa"},neutral:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},stone:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},light:{1:"#fcfcfc",2:"#fafafa",3:"#f8f9fa",4:"#f6f6f6",5:"#f2f2f2",6:"#f1f3f5",7:"#e9ecef",8:"#dee2e6",9:"#dde1e3",50:"#fdfdfd",100:"#fcfcfc",200:"#fafafa",300:"#f8f9fa",400:"#f6f6f6",500:"#f2f2f2",600:"#f1f3f5",700:"#e9ecef",800:"#dee2e6",900:"#dde1e3",950:"#d8dcdf",DEFAULT:"#f6f6f6"},dark:{1:"#3c3c3c",2:"#323232",3:"#2d2d2d",4:"#222222",5:"#1f1f1f",6:"#1c1c1e",7:"#1b1b1b",8:"#181818",9:"#0f0f0f",50:"#4a4a4a",100:"#3c3c3c",200:"#323232",300:"#2d2d2d",400:"#222222",500:"#1f1f1f",600:"#1c1c1e",700:"#1b1b1b",800:"#181818",900:"#0f0f0f",950:"#080808",DEFAULT:"#222222"},lightblue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},lightBlue:{1:"#e0f2fe",2:"#bae6fd",3:"#7dd3fc",4:"#38bdf8",5:"#0ea5e9",6:"#0284c7",7:"#0369a1",8:"#075985",9:"#0c4a6e",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49",DEFAULT:"#38bdf8"},warmgray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},warmGray:{1:"#f5f5f4",2:"#e7e5e4",3:"#d6d3d1",4:"#a8a29e",5:"#78716c",6:"#57534e",7:"#44403c",8:"#292524",9:"#1c1917",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09",DEFAULT:"#a8a29e"},truegray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},trueGray:{1:"#f5f5f5",2:"#e5e5e5",3:"#d4d4d4",4:"#a3a3a3",5:"#737373",6:"#525252",7:"#404040",8:"#262626",9:"#171717",50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a",DEFAULT:"#a3a3a3"},coolgray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},coolGray:{1:"#f3f4f6",2:"#e5e7eb",3:"#d1d5db",4:"#9ca3af",5:"#6b7280",6:"#4b5563",7:"#374151",8:"#1f2937",9:"#111827",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712",DEFAULT:"#9ca3af"},bluegray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},blueGray:{1:"#f1f5f9",2:"#e2e8f0",3:"#cbd5e1",4:"#94a3b8",5:"#64748b",6:"#475569",7:"#334155",8:"#1e293b",9:"#0f172a",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617",DEFAULT:"#94a3b8"},primary:"#2080f0","primary-hover":"#4098fc","primary-active":"#1060c9",info:"#909399","info-hover":"#a6a9ad","info-active":"#82848a",success:"#18a058","success-hover":"#36ad6a","success-active":"#0c7a43",warning:"#f0a020","warning-hover":"#fcb040","warning-active":"#c97c10",error:"#d03050","error-hover":"#de576d","error-active":"#ab1f3f"},x={sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif',mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},F={common:{fontFamily:x.sans,fontFamilyMono:x.mono,primaryColor:i.primary,primaryColorHover:i["primary-hover"],primaryColorPressed:i["primary-active"],primaryColorSuppl:i.primary,infoColor:i.info,infoColorHover:i["info-hover"],infoColorPressed:i["info-active"],infoColorSuppl:i.info,successColor:i.success,successColorHover:i["success-hover"],successColorPressed:i["success-active"],successColorSuppl:i.success,warningColor:i.warning,warningColorHover:i["warning-hover"],warningColorPressed:i["warning-active"],warningColorSuppl:i.warning,errorColor:i.error,errorColorHover:i["error-hover"],errorColorPressed:i["error-active"],errorColorSuppl:i.error}};L({},F,{}),L({},F,{Button:{textColorPrimary:"#FFF",textColorHoverPrimary:"#FFF",textColorPressedPrimary:"#FFF",textColorFocusPrimary:"#FFF",textColorDisabledPrimary:"#FFF"}});const G="1.9.0-beta.1";function q(e,a){let n,t,r;const o=f.ref(!0),u=()=>{o.value=!0,r()};f.watch(e,u,{flush:"sync"});const c=typeof a=="function"?a:a.get,p=typeof a=="function"?void 0:a.set,b=f.customRef((d,s)=>(t=d,r=s,{get(){return o.value&&(n=c(),o.value=!1),t(),n},set(l){p==null||p(l)}}));return Object.isExtensible(b)&&(b.trigger=u),b}function H(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}function E(e){return typeof e=="function"?e():f.unref(e)}function j(e){if(!f.isRef(e))return f.reactive(e);const a=new Proxy({},{get(n,t,r){return f.unref(Reflect.get(e.value,t,r))},set(n,t,r){return f.isRef(e.value[t])&&!f.isRef(r)?e.value[t].value=r:e.value[t]=r,!0},deleteProperty(n,t){return Reflect.deleteProperty(e.value,t)},has(n,t){return Reflect.has(e.value,t)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return f.reactive(a)}function W(e){return j(f.computed(e))}function $(e,...a){const n=a.flat(),t=n[0];return W(()=>Object.fromEntries(typeof t=="function"?Object.entries(f.toRefs(e)).filter(([r,o])=>!t(E(o),r)):Object.entries(f.toRefs(e)).filter(r=>!n.includes(r[0]))))}const K=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J=e=>e!=null;function Q(e,a,n){return f.watch(e,a,{...n,deep:!0})}function T(e){var a;const n=E(e);return(a=n==null?void 0:n.$el)!=null?a:n}const X=K?window:void 0;function Y(){const e=f.ref(!1),a=f.getCurrentInstance();return a&&f.onMounted(()=>{e.value=!0},a),e}function Z(e){const a=Y();return f.computed(()=>(a.value,!!e()))}function ee(e,a,n={}){const{window:t=X,...r}=n;let o;const u=Z(()=>t&&"MutationObserver"in t),c=()=>{o&&(o.disconnect(),o=void 0)},p=f.computed(()=>{const l=E(e),y=(Array.isArray(l)?l:[l]).map(T).filter(J);return new Set(y)}),b=f.watch(()=>p.value,l=>{c(),u.value&&t&&l.size&&(o=new MutationObserver(a),l.forEach(y=>o.observe(y,r)))},{immediate:!0,flush:"post"}),d=()=>o==null?void 0:o.takeRecords(),s=()=>{c(),b()};return H(s),{isSupported:u,stop:s,takeRecords:d}}function k(e){const a=f.getCurrentInstance(),n=q(()=>null,()=>e?T(e):a.proxy.$el);return f.onUpdated(n.trigger),f.onMounted(n.trigger),n}function fe(e=I()){const a=k(),n=`style[cssr-id^="${e}-"]`;return f.onMounted(()=>{function t(){const r=a.value.parentNode;r.querySelectorAll(n).forEach(o=>{r.removeChild(o)}),Array.from(document.querySelectorAll(n)).forEach(o=>{r.appendChild(o.cloneNode()).textContent=o.textContent})}ee(document.head,t,{childList:!0}),t()}),e}function ae(){const e=k();return f.onMounted(()=>{var r;const a=e.value.parentNode,{tailwindResetStyle:n,elementPlusStyle:t}=((r=globalThis.SmartCore)==null?void 0:r[G])??{};if(n&&(a.appendChild(document.createElement("style")).textContent=n),t){const o=document.createElement("style");o.setAttribute("namespace","smart"),a.appendChild(o).textContent=t,document.querySelector('style[namespace="smart"]')||(document.head.appendChild(o.cloneNode()).textContent=t)}}),{classPrefix:fe()}}const te=((e,a)=>{const n=e.__vccOpts||e;for(const[t,r]of a)n[t]=r;return n})(f.defineComponent({__name:"index",props:f.mergeModels({beforeUpload:{type:Function},accept:{type:null},defaultFileList:{type:null},defaultUpload:{type:null},disabled:{type:null},directory:{type:null},directoryDnd:{type:null},fileListClass:{type:null},fileListStyle:{type:null},imageGroupProps:{type:null},inputProps:{type:null},listType:{type:null},max:{type:null},multiple:{type:null},renderIcon:{type:null},shouldUseThumbnailUrl:{type:null},showCancelButton:{type:null},showDownloadButton:{type:null},showRemoveButton:{type:null},showRetryButton:{type:null},showFileList:{type:null},showPreviewButton:{type:null},showTrigger:{type:null},triggerClass:{type:null},triggerStyle:{type:null},onError:{type:null},onFinish:{type:null}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e,{expose:a}){const n=e,t=f.useModel(e,"fileList"),r=f.ref(),{classPrefix:o}=ae(),u=$(n,["beforeUpload"]),c=f.ref(t.value.map(({fileName:d})=>({id:d,name:d,url:d,status:"finished"})));function p({file:d,onFinish:s,onError:l,onProgress:y}){const N=d.file,oe=n.beforeUpload??(h=>h),P=new FormData;P.set("file",N);const ce=oe({method:"post",url:"/admin/sys-file/upload",data:P,headers:{"Content-Type":"multipart/form-data"},onUploadProgress({loaded:h,total:m}){y({percent:m?Math.ceil(h/m*100):0})}});O.getConfigProvider("request")(ce).then(h=>{const m=h.data.data;d.url=m.url,d.status="finished",n.defaultUpload||c.value.splice(c.value.findIndex(({id:v})=>v===d.id),1,d),t.value.find(({fileName:v})=>v===m.url)||t.value.push({fileName:m.url,originalFileName:N.name}),s()}).catch(h=>{d.status="error",n.defaultUpload||c.value.splice(c.value.findIndex(({id:m})=>m===d.id),1,d),l(),console.error(h)})}function b(){setTimeout(()=>{for(let d=0;d<t.value.length;){const s=t.value[d].fileName;c.value.some(l=>l.url===s)?d++:t.value.splice(d,1)}},10)}return Q(t,d=>{d.forEach(({fileName:s})=>{c.value.some(l=>l.url===s)||c.value.push({id:s,name:s,url:s,status:"finished"})});for(let s=0;s<c.value.length;){const l=c.value[s];l.status==="finished"&&l.url&&!d.some(({fileName:y})=>y===l.url)?c.value.splice(s,1):s++}}),a({uploadRef:r,fileList:c}),(d,s)=>(f.openBlock(),f.createBlock(f.unref(g.NConfigProvider),{"cls-prefix":f.unref(o),"theme-overrides":f.unref(F),locale:f.unref(g.zhCN),abstract:""},{default:f.withCtx(()=>[f.createVNode(f.unref(g.NUpload),f.mergeProps({ref_key:"uploadRef",ref:r},f.unref(u),{"file-list":f.unref(c),"onUpdate:fileList":s[0]||(s[0]=l=>f.isRef(c)?c.value=l:null),"custom-request":p,onRemove:b}),{default:f.withCtx(()=>[f.renderSlot(d.$slots,"default",{},()=>[[void 0,"image"].includes(d.listType)?(f.openBlock(),f.createBlock(f.unref(g.NButton),{key:0},{default:f.withCtx(()=>[f.createTextVNode("选择文件")]),_:1})):f.createCommentVNode("v-if",!0)],!0)]),_:3},16,["file-list"])]),_:3},8,["cls-prefix","theme-overrides","locale"]))}}),[["styles",["*[data-v-da18f512],[data-v-da18f512]:before,[data-v-da18f512]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-da18f512]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }"]],["__scopeId","data-v-da18f512"]]),ne="smart-upload";function re(e,a){var n;V&&!customElements.get(e)&&customElements.define(e,(n=a.prototype)!=null&&n.connectedCallback?a:f.defineCustomElement(a))}function D(e,a){return e._instance.exposed[a]}const S=f.defineCustomElement(te);Object.assign(S.prototype,{getUploadRef(){return D(this,"uploadRef").value},getFileList(){return D(this,"fileList").value},submit(){return this.getUploadRef().submit()},clear(){return this.getUploadRef().clear()}}),re(ne,S)})((M=SmartCore["1.9.0-beta.1"])==null?void 0:M.Vue,(_=SmartCore["1.9.0-beta.1"])==null?void 0:_.NaiveUI,(R=SmartCore["1.9.0-beta.1"])==null?void 0:R.SmartCore);
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@smartos-lib/components",
3
3
  "type": "module",
4
- "version": "1.8.3",
5
- "packageManager": "pnpm@8.14.3",
4
+ "version": "1.9.0-beta.1",
5
+ "packageManager": "pnpm@8.15.4",
6
6
  "author": "Wei Zhang <https://github.com/Zhang-Wei-666>",
7
7
  "devDependencies": {
8
8
  "@rollup/pluginutils": "^5.1.0",
9
9
  "@types/prompts": "^2.4.9",
10
10
  "pinia": "^2.1.7",
11
11
  "prompts": "^2.4.2",
12
- "vite-plugin-inspect": "^0.8.2",
12
+ "vite-plugin-inspect": "^0.8.3",
13
13
  "vite-plugin-pages": "^0.32.0",
14
14
  "vite-plugin-vue-layouts": "^0.11.0",
15
- "vue-router": "^4.2.5"
15
+ "vue-router": "^4.3.0"
16
16
  },
17
17
  "scripts": {
18
18
  "dev": "pnpm install && vite --host",
@@ -165,6 +165,7 @@ declare global {
165
165
  const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
166
166
  const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
167
167
  const useDraggable: typeof import('@vueuse/core')['useDraggable']
168
+ const useDraggableDistance: typeof import('@mixte/use')['useDraggableDistance']
168
169
  const useDropZone: typeof import('@vueuse/core')['useDropZone']
169
170
  const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
170
171
  const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
@@ -329,6 +330,7 @@ declare global {
329
330
  // for vue template auto import
330
331
  import { UnwrapRef } from 'vue'
331
332
  declare module 'vue' {
333
+ interface GlobalComponents {}
332
334
  interface ComponentCustomProperties {
333
335
  readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
334
336
  readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
@@ -490,6 +492,7 @@ declare module 'vue' {
490
492
  readonly useDisplayMedia: UnwrapRef<typeof import('@vueuse/core')['useDisplayMedia']>
491
493
  readonly useDocumentVisibility: UnwrapRef<typeof import('@vueuse/core')['useDocumentVisibility']>
492
494
  readonly useDraggable: UnwrapRef<typeof import('@vueuse/core')['useDraggable']>
495
+ readonly useDraggableDistance: UnwrapRef<typeof import('@mixte/use')['useDraggableDistance']>
493
496
  readonly useDropZone: UnwrapRef<typeof import('@vueuse/core')['useDropZone']>
494
497
  readonly useElementBounding: UnwrapRef<typeof import('@vueuse/core')['useElementBounding']>
495
498
  readonly useElementByPoint: UnwrapRef<typeof import('@vueuse/core')['useElementByPoint']>
@@ -647,6 +650,7 @@ declare module 'vue' {
647
650
  }
648
651
  }
649
652
  declare module '@vue/runtime-core' {
653
+ interface GlobalComponents {}
650
654
  interface ComponentCustomProperties {
651
655
  readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
652
656
  readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
@@ -808,6 +812,7 @@ declare module '@vue/runtime-core' {
808
812
  readonly useDisplayMedia: UnwrapRef<typeof import('@vueuse/core')['useDisplayMedia']>
809
813
  readonly useDocumentVisibility: UnwrapRef<typeof import('@vueuse/core')['useDocumentVisibility']>
810
814
  readonly useDraggable: UnwrapRef<typeof import('@vueuse/core')['useDraggable']>
815
+ readonly useDraggableDistance: UnwrapRef<typeof import('@mixte/use')['useDraggableDistance']>
811
816
  readonly useDropZone: UnwrapRef<typeof import('@vueuse/core')['useDropZone']>
812
817
  readonly useElementBounding: UnwrapRef<typeof import('@vueuse/core')['useElementBounding']>
813
818
  readonly useElementByPoint: UnwrapRef<typeof import('@vueuse/core')['useElementByPoint']>